<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/sound/usb/format.c, branch v4.4.63</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>ALSA: usb-audio: Fix audio output on Roland SC-D70 sound module</title>
<updated>2015-04-21T05:59:10+00:00</updated>
<author>
<name>Takamichi Horikawa</name>
<email>takamichiho@gmail.com</email>
</author>
<published>2015-04-21T02:23:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6d1f2f605601ec701b561eca143c03e2a22d6489'/>
<id>6d1f2f605601ec701b561eca143c03e2a22d6489</id>
<content type='text'>
Roland SC-D70 reports its device class as vendor specific class and
the quirk QUIRK_AUDIO_FIXED_ENDPOINT was used for audio output.

In the quirks table the sampling rate was hard-coded to 44100 Hz
and therefore not worked when the sound module was in 48000 Hz mode.

In this change the quirk is changed to QUIRK_AUDIO_STANDARD_INTERFACE
but as the sound module reports incorrect bSubframeSize in its
descriptors, additional change is made in format.c to detect it and
to override it (which uses the existing code for Edirol SD-90).

Tested both when the sound module was in 44100 Hz mode and 48000 Hz
mode and both audio input and output. MIDI related part of the driver
is not touched.

Signed-off-by: Takamichi Horikawa &lt;takamichiho@gmail.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Roland SC-D70 reports its device class as vendor specific class and
the quirk QUIRK_AUDIO_FIXED_ENDPOINT was used for audio output.

In the quirks table the sampling rate was hard-coded to 44100 Hz
and therefore not worked when the sound module was in 48000 Hz mode.

In this change the quirk is changed to QUIRK_AUDIO_STANDARD_INTERFACE
but as the sound module reports incorrect bSubframeSize in its
descriptors, additional change is made in format.c to detect it and
to override it (which uses the existing code for Edirol SD-90).

Tested both when the sound module was in 44100 Hz mode and 48000 Hz
mode and both audio input and output. MIDI related part of the driver
is not touched.

Signed-off-by: Takamichi Horikawa &lt;takamichiho@gmail.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ALSA: usb-audio: Use standard printk helpers</title>
<updated>2014-02-26T15:45:34+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2014-02-26T12:02:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0ba41d917eeb87f608cf147f870ff2f4c1056bab'/>
<id>0ba41d917eeb87f608cf147f870ff2f4c1056bab</id>
<content type='text'>
Convert with dev_err() and co from snd_printk(), etc.
As there are too deep indirections (e.g. ep-&gt;chip-&gt;dev-&gt;dev),
a few new local macros, usb_audio_err() &amp; co, are introduced.

Also, the device numbers in some messages are dropped, as they are
shown in the prefix automatically.

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Convert with dev_err() and co from snd_printk(), etc.
As there are too deep indirections (e.g. ep-&gt;chip-&gt;dev-&gt;dev),
a few new local macros, usb_audio_err() &amp; co, are introduced.

Also, the device numbers in some messages are dropped, as they are
shown in the prefix automatically.

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ALSA: usb-audio: Fix Creative VF0420 rate</title>
<updated>2014-01-14T13:23:47+00:00</updated>
<author>
<name>Pavel Hofman</name>
<email>pavel.hofman@ivitera.com</email>
</author>
<published>2014-01-14T12:42:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8c4b79cf216f467faacdfa7c6c40b6b85cc05782'/>
<id>8c4b79cf216f467faacdfa7c6c40b6b85cc05782</id>
<content type='text'>
Creative Live! Cam Vista IM (VF0420) reports rate of 16kHz while working
at 8kHz. The patch adds its USB ID to the existing quirk.

Signed-off-by: Pavel Hofman &lt;pavel.hofman@ivitera.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Creative Live! Cam Vista IM (VF0420) reports rate of 16kHz while working
at 8kHz. The patch adds its USB ID to the existing quirk.

Signed-off-by: Pavel Hofman &lt;pavel.hofman@ivitera.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ALSA: usb-audio: store protocol version in struct audioformat</title>
<updated>2013-06-27T19:59:47+00:00</updated>
<author>
<name>Clemens Ladisch</name>
<email>clemens@ladisch.de</email>
</author>
<published>2013-01-31T20:39:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8f898e92aea2c24c7f379ee265d178f69ebb9c07'/>
<id>8f898e92aea2c24c7f379ee265d178f69ebb9c07</id>
<content type='text'>
Instead of reading bInterfaceProtocol from the descriptor whenever it's
needed, store this value in the audioformat structure.  Besides
simplifying some code, this will allow us to correctly handle vendor-
specific devices where the descriptors are marked with other values.

Signed-off-by: Clemens Ladisch &lt;clemens@ladisch.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of reading bInterfaceProtocol from the descriptor whenever it's
needed, store this value in the audioformat structure.  Besides
simplifying some code, this will allow us to correctly handle vendor-
specific devices where the descriptors are marked with other values.

Signed-off-by: Clemens Ladisch &lt;clemens@ladisch.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ALSA: pcm_format_to_bits strong-typed conversion</title>
<updated>2013-04-29T11:36:15+00:00</updated>
<author>
<name>Eldad Zack</name>
<email>eldad@fogrefinery.com</email>
</author>
<published>2013-04-22T23:00:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=74c34ca1cc12884703c70d34ed333517d978c2e7'/>
<id>74c34ca1cc12884703c70d34ed333517d978c2e7</id>
<content type='text'>
Add a function to handle conversion from snd_pcm_format_t
to bitwise with proper typing.

Change such conversions to use this function and silence sparse
warnings.

Signed-off-by: Eldad Zack &lt;eldad@fogrefinery.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a function to handle conversion from snd_pcm_format_t
to bitwise with proper typing.

Change such conversions to use this function and silence sparse
warnings.

Signed-off-by: Eldad Zack &lt;eldad@fogrefinery.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ALSA: snd-usb: add quirks handler for DSD streams</title>
<updated>2013-04-18T08:03:53+00:00</updated>
<author>
<name>Daniel Mack</name>
<email>zonque@gmail.com</email>
</author>
<published>2013-04-16T16:01:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=126825e7ea271ae8e3172e10ca1fc22c908b5385'/>
<id>126825e7ea271ae8e3172e10ca1fc22c908b5385</id>
<content type='text'>
Unfortunately, none of the UAC standards provides a way to identify DSD
(Direct Stream Digital) formats. Hence, this patch adds a quirks
handler to identify USB interfaces that are capable of handling DSD.

That quirks handler can augment the already parsed formats bit-field,
by any of the new SNDRV_PCM_FMTBIT_DSD_{U8_U16} and setting the dsd_dop
flag in the audio format, if the driver should take care for the DOP
byte stuffing.

The only devices that are known to work with this are the ones with
a 'Playback Designs' vendor id.

Signed-off-by: Daniel Mack &lt;zonque@gmail.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Unfortunately, none of the UAC standards provides a way to identify DSD
(Direct Stream Digital) formats. Hence, this patch adds a quirks
handler to identify USB interfaces that are capable of handling DSD.

That quirks handler can augment the already parsed formats bit-field,
by any of the new SNDRV_PCM_FMTBIT_DSD_{U8_U16} and setting the dsd_dop
flag in the audio format, if the driver should take care for the DOP
byte stuffing.

The only devices that are known to work with this are the ones with
a 'Playback Designs' vendor id.

Signed-off-by: Daniel Mack &lt;zonque@gmail.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ALSA: usb-audio: UAC2: do clock validity check earlier</title>
<updated>2013-04-04T06:30:59+00:00</updated>
<author>
<name>Eldad Zack</name>
<email>eldad@fogrefinery.com</email>
</author>
<published>2013-04-03T21:18:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=06ffc1ebddbed88662a47646ff6aa6a2b41f0aec'/>
<id>06ffc1ebddbed88662a47646ff6aa6a2b41f0aec</id>
<content type='text'>
Move the check that parse_audio_format_rates_v2() do after
receiving the clock source entity ID directly into the find
function and add a validation flag to the function.

This patch does not introduce any logic flow change.

It is provided to allow introducing automatic clock switching
easier later. By moving this uac_clock_source_is_valid callsite,
2 additional callsites can be avoided.

Signed-off-by: Eldad Zack &lt;eldad@fogrefinery.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move the check that parse_audio_format_rates_v2() do after
receiving the clock source entity ID directly into the find
function and add a validation flag to the function.

This patch does not introduce any logic flow change.

It is provided to allow introducing automatic clock switching
easier later. By moving this uac_clock_source_is_valid callsite,
2 additional callsites can be avoided.

Signed-off-by: Eldad Zack &lt;eldad@fogrefinery.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ALSA: snd-usb: handle raw data format of UAC2 devices</title>
<updated>2013-03-18T07:47:13+00:00</updated>
<author>
<name>Daniel Mack</name>
<email>zonque@gmail.com</email>
</author>
<published>2013-03-17T12:07:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=717bfb5f46f0ee809f6ce04ebdf44521730fff05'/>
<id>717bfb5f46f0ee809f6ce04ebdf44521730fff05</id>
<content type='text'>
UAC2 compliant audio devices may announce the capability to transport
raw audio data on their endpoints. Catch this and handle it as
'special' stream on the ALSA side.

Signed-off-by: Daniel Mack &lt;zonque@gmail.com&gt;
Reported-by: Andreas Koch &lt;andreas@akdesigninc.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
UAC2 compliant audio devices may announce the capability to transport
raw audio data on their endpoints. Catch this and handle it as
'special' stream on the ALSA side.

Signed-off-by: Daniel Mack &lt;zonque@gmail.com&gt;
Reported-by: Andreas Koch &lt;andreas@akdesigninc.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ALSA: snd-usb: handle the bmFormats field as unsigned int</title>
<updated>2013-03-18T07:47:04+00:00</updated>
<author>
<name>Daniel Mack</name>
<email>zonque@gmail.com</email>
</author>
<published>2013-03-17T12:07:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2fcdb06d4919da89ed6d52742dcc83ae4669ac30'/>
<id>2fcdb06d4919da89ed6d52742dcc83ae4669ac30</id>
<content type='text'>
This field may use up to 32 bits, so it should be handled as unsigned
int.

Signed-off-by: Daniel Mack &lt;zonque@gmail.com&gt;
Reported-by: Andreas Koch &lt;andreas@akdesigninc.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This field may use up to 32 bits, so it should be handled as unsigned
int.

Signed-off-by: Daniel Mack &lt;zonque@gmail.com&gt;
Reported-by: Andreas Koch &lt;andreas@akdesigninc.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ALSA: usb-audio: Return meaningful error codes instead of -1 in format.c</title>
<updated>2012-11-21T10:31:52+00:00</updated>
<author>
<name>Sachin Kamat</name>
<email>sachin.kamat@linaro.org</email>
</author>
<published>2012-11-21T09:55:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8ad10dc6d3fe8396d8213af4d5ce58e0010a3cbc'/>
<id>8ad10dc6d3fe8396d8213af4d5ce58e0010a3cbc</id>
<content type='text'>
Also, silences the following smatch warning:
sound/usb/format.c:170 parse_audio_format_rates_v1() warn:
returning -1 instead of -ENOMEM is sloppy

Signed-off-by: Sachin Kamat &lt;sachin.kamat@linaro.org&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also, silences the following smatch warning:
sound/usb/format.c:170 parse_audio_format_rates_v1() warn:
returning -1 instead of -ENOMEM is sloppy

Signed-off-by: Sachin Kamat &lt;sachin.kamat@linaro.org&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</pre>
</div>
</content>
</entry>
</feed>
