]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: usb-audio: UAC2: support read-only freq control
authorEldad Zack <eldad@fogrefinery.com>
Wed, 3 Apr 2013 21:18:58 +0000 (23:18 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 4 Apr 2013 06:32:07 +0000 (08:32 +0200)
commitfc34fe11b3a0fdb075c550280dd1522809100559
tree437f2fbd3f8b88f94ef862305cf837a04f23aef3
parent8accf2b236daf9be27730c7bba53e5927b6b6d6c
ALSA: usb-audio: UAC2: support read-only freq control

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 <eldad@fogrefinery.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/clock.c