This is a note to let you know that I've just added the patch titled

    ALSA: snd-usb: fix clock source validity index

to the 3.0-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     alsa-snd-usb-fix-clock-source-validity-index.patch
and it can be found in the queue-3.0 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From aff252a848ce21b431ba822de3dab9c4c94571cb Mon Sep 17 00:00:00 2001
From: Daniel Mack <[email protected]>
Date: Wed, 1 Aug 2012 10:16:53 +0200
Subject: ALSA: snd-usb: fix clock source validity index

From: Daniel Mack <[email protected]>

commit aff252a848ce21b431ba822de3dab9c4c94571cb upstream.

uac_clock_source_is_valid() uses the control selector value to access
the bmControls bitmap of the clock source unit. This is wrong, as
control selector values start from 1, while the bitmap uses all
available bits.

In other words, "Clock Validity Control" is stored in D3..2, not D5..4
of the clock selector unit's bmControls.

Signed-off-by: Daniel Mack <[email protected]>
Reported-by: Andreas Koch <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 sound/usb/clock.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/sound/usb/clock.c
+++ b/sound/usb/clock.c
@@ -111,7 +111,8 @@ static bool uac_clock_source_is_valid(st
                return 0;
 
        /* If a clock source can't tell us whether it's valid, we assume it is 
*/
-       if (!uac2_control_is_readable(cs_desc->bmControls, 
UAC2_CS_CONTROL_CLOCK_VALID))
+       if (!uac2_control_is_readable(cs_desc->bmControls,
+                                     UAC2_CS_CONTROL_CLOCK_VALID - 1))
                return 1;
 
        err = snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), UAC2_CS_CUR,


Patches currently in stable-queue which might be from [email protected] are

queue-3.0/alsa-snd-usb-fix-clock-source-validity-index.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to