<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/sound/usb/clock.c, branch v4.10</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: Limit retrying sample rate reads</title>
<updated>2016-04-29T09:49:04+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2016-04-29T09:49:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=57dd5414a087991d427067b32dc3324af61b1c8b'/>
<id>57dd5414a087991d427067b32dc3324af61b1c8b</id>
<content type='text'>
There are many USB audio devices with buggy firmware that don't react
with the sample rate reading properly.  This often results in the
flood of error messages and slowing down the operation.

The sample rate read back is basically only for confirming the sample
rate setup, and it's not critically important.  As a compromise, in
this patch, we stop the sample rate read back once when the device
gives errors more than tolerance (twice, as of now).  This should
improve most of error cases while we still can catch the firmware
bugginess.

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are many USB audio devices with buggy firmware that don't react
with the sample rate reading properly.  This often results in the
flood of error messages and slowing down the operation.

The sample rate read back is basically only for confirming the sample
rate setup, and it's not critically important.  As a compromise, in
this patch, we stop the sample rate read back once when the device
gives errors more than tolerance (twice, as of now).  This should
improve most of error cases while we still can catch the firmware
bugginess.

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ALSA: usb-audio: Add sanity checks for endpoint accesses</title>
<updated>2016-03-16T11:45:32+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2016-03-15T14:20:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=447d6275f0c21f6cc97a88b3a0c601436a4cdf2a'/>
<id>447d6275f0c21f6cc97a88b3a0c601436a4cdf2a</id>
<content type='text'>
Add some sanity check codes before actually accessing the endpoint via
get_endpoint() in order to avoid the invalid access through a
malformed USB descriptor.  Mostly just checking bNumEndpoints, but in
one place (snd_microii_spdif_default_get()), the validity of iface and
altsetting index is checked as well.

Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=971125
Cc: &lt;stable@vger.kernel.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>
Add some sanity check codes before actually accessing the endpoint via
get_endpoint() in order to avoid the invalid access through a
malformed USB descriptor.  Mostly just checking bNumEndpoints, but in
one place (snd_microii_spdif_default_get()), the validity of iface and
altsetting index is checked as well.

Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=971125
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ALSA: usb-audio: Don't attempt to get Lifecam HD-5000 sample rate</title>
<updated>2015-02-17T06:20:04+00:00</updated>
<author>
<name>Joe Turner</name>
<email>joe@oampo.co.uk</email>
</author>
<published>2015-02-16T20:44:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b62b998010028c4dfd7db7c26990efb2a0985a1e'/>
<id>b62b998010028c4dfd7db7c26990efb2a0985a1e</id>
<content type='text'>
Adds a quirk to disable the check that the sample rate has been set correctly, as the Lifecam does not support getting the sample rate.

This means that we don't need to wait for the USB timeout when attempting to get the sample rate. Waiting for the timeout causes problems in some applications, which give up on the device acquisition process before it has had time to complete, resulting in no sound.

[minor tidy up by tiwai]

Signed-off-by: Joe Turner &lt;joe@oampo.co.uk&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adds a quirk to disable the check that the sample rate has been set correctly, as the Lifecam does not support getting the sample rate.

This means that we don't need to wait for the USB timeout when attempting to get the sample rate. Waiting for the timeout causes problems in some applications, which give up on the device acquisition process before it has had time to complete, resulting in no sound.

[minor tidy up by tiwai]

Signed-off-by: Joe Turner &lt;joe@oampo.co.uk&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: 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: usb - Avoid unnecessary sample rate changes on USB 2.0 clock sources</title>
<updated>2013-04-26T05:37:09+00:00</updated>
<author>
<name>David Henningsson</name>
<email>david.henningsson@canonical.com</email>
</author>
<published>2013-04-25T12:32:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=fa92dd77ec5623cc0546acb77ee61a0a7ea4f0f0'/>
<id>fa92dd77ec5623cc0546acb77ee61a0a7ea4f0f0</id>
<content type='text'>
The Scarlett 2i2 seems to take almost 500 ms to set the sample rate,
even if the clock is currently set to that value. This patch speeds
up prepare of the device, by avoiding setting the clock to something
it already is.

Signed-off-by: David Henningsson &lt;david.henningsson@canonical.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>
The Scarlett 2i2 seems to take almost 500 ms to set the sample rate,
even if the clock is currently set to that value. This patch speeds
up prepare of the device, by avoiding setting the clock to something
it already is.

Signed-off-by: David Henningsson &lt;david.henningsson@canonical.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ALSA: snd-usb: Playback Design: use usb_set_inferface quirk from more locations</title>
<updated>2013-04-10T07:21:43+00:00</updated>
<author>
<name>Daniel Mack</name>
<email>zonque@gmail.com</email>
</author>
<published>2013-04-09T16:56:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=21bb5aafce4350e243f9be3d981c0beb2e2c5ab4'/>
<id>21bb5aafce4350e243f9be3d981c0beb2e2c5ab4</id>
<content type='text'>
It turns out the devices from Playback Design need the delay quirk
after usb_set_interface from clocks.c as well. Make it a proper
quirks function and factor out the code to quirks.c.

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>
It turns out the devices from Playback Design need the delay quirk
after usb_set_interface from clocks.c as well. Make it a proper
quirks function and factor out the code to quirks.c.

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: support read-only freq control</title>
<updated>2013-04-04T06:32:07+00:00</updated>
<author>
<name>Eldad Zack</name>
<email>eldad@fogrefinery.com</email>
</author>
<published>2013-04-03T21:18:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1dc669fed61a4ec4270a89e5fb3535802cc45668'/>
<id>1dc669fed61a4ec4270a89e5fb3535802cc45668</id>
<content type='text'>
Some clocks might be read-only, e.g., external clocks (see also
UAC2 4.7.2.1).

In this case, setting the sample frequency will always fail
(even if the rate is equal to the current clock rate),
therefore do not write, but read the value and compare to the
requested rate.
If the clock is read only, avoid reading it twice.

If it doesn't match, return -ENXIO since the clock is invalid for
this configuration.

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>
Some clocks might be read-only, e.g., external clocks (see also
UAC2 4.7.2.1).

In this case, setting the sample frequency will always fail
(even if the rate is equal to the current clock rate),
therefore do not write, but read the value and compare to the
requested rate.
If the clock is read only, avoid reading it twice.

If it doesn't match, return -ENXIO since the clock is invalid for
this configuration.

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: usb-audio: show err in set_sample_rate_v2 debug</title>
<updated>2013-04-04T06:31:40+00:00</updated>
<author>
<name>Eldad Zack</name>
<email>eldad@fogrefinery.com</email>
</author>
<published>2013-04-03T21:18:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=027bbc15460d68fc8a04d9be03856e2cdb913157'/>
<id>027bbc15460d68fc8a04d9be03856e2cdb913157</id>
<content type='text'>
Show the error code returned from the USB subsystem in
the debug messages.

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>
Show the error code returned from the USB subsystem in
the debug messages.

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: usb-audio: UAC2: auto clock selection module param</title>
<updated>2013-04-04T06:31:32+00:00</updated>
<author>
<name>Eldad Zack</name>
<email>eldad@fogrefinery.com</email>
</author>
<published>2013-04-03T21:18:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ef02e29b0180ddbcc1ecf3c362e333c572f27c08'/>
<id>ef02e29b0180ddbcc1ecf3c362e333c572f27c08</id>
<content type='text'>
Add a module param to disable auto clock selection.
This is provided for users that expect the audio stream to
fail when the clock source is invalid (e.g., the word clock
was unintentionally disconnected).

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 module param to disable auto clock selection.
This is provided for users that expect the audio stream to
fail when the clock source is invalid (e.g., the word clock
was unintentionally disconnected).

Signed-off-by: Eldad Zack &lt;eldad@fogrefinery.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</pre>
</div>
</content>
</entry>
</feed>
