On Tue, 2 Apr 2013, Takashi Iwai wrote:
At Sun, 31 Mar 2013 17:52:29 +0200, Eldad Zack wrote:
If a selector is available on a device, it may be pointing to a clock source which is currently invalid. If there is a valid clock source which can be selected, switch to it.
Signed-off-by: Eldad Zack eldad@fogrefinery.com
sound/usb/clock.c | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 63 insertions(+), 2 deletions(-)
diff --git a/sound/usb/clock.c b/sound/usb/clock.c index 08fa345..6b79e25 100644 --- a/sound/usb/clock.c +++ b/sound/usb/clock.c @@ -99,6 +99,40 @@ static int uac_clock_selector_get_val(struct snd_usb_audio *chip, int selector_i
- buf = uac_clock_selector_get_val(chip, selector_id);
- if (buf != pin) {
uac_clock_selector_get_val() returns an int with a negative value, so it's safer to compare it as an int.
Right, and I need to return the error code, too. Thanks!
Cheers, Eldad