[3.13.y-ckt stable] Patch "ALSA: usb-audio: fix missing input volume controls in MAYA44 USB(+)" has been added to staging queue

Kamal Mostafa kamal at canonical.com
Tue Jul 7 22:16:20 UTC 2015


This is a note to let you know that I have just added a patch titled

    ALSA: usb-audio: fix missing input volume controls in MAYA44 USB(+)

to the linux-3.13.y-queue branch of the 3.13.y-ckt extended stable tree 
which can be found at:

    http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.13.y-queue

This patch is scheduled to be released in version 3.13.11-ckt23.

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.13.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Kamal

------

>From 1dc7e42f4b3a5714676a5fe6e49567434f8f55d1 Mon Sep 17 00:00:00 2001
From: Clemens Ladisch <clemens at ladisch.de>
Date: Wed, 3 Jun 2015 11:36:51 +0200
Subject: ALSA: usb-audio: fix missing input volume controls in MAYA44 USB(+)

commit ea114fc27dc0cb9a550b6add5426720feb66262a upstream.

The driver worked around an error in the MAYA44 USB(+)'s mixer unit
descriptor by aborting before parsing the missing field.  However,
aborting parsing too early prevented parsing of the other units
connected to this unit, so the capture mixer controls would be missing.

Fix this by moving the check for this descriptor error after the parsing
of the unit's input pins.

Reported-by: nightmixes <nightmixes at gmail.com>
Tested-by: nightmixes <nightmixes at gmail.com>
Signed-off-by: Clemens Ladisch <clemens at ladisch.de>
Signed-off-by: Takashi Iwai <tiwai at suse.de>
[ kamal: backport to 3.13-stable: context ]
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
 sound/usb/mixer.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index c601033..4f51876 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -1514,11 +1514,6 @@ static int parse_audio_mixer_unit(struct mixer_build *state, int unitid, void *r
 		snd_printk(KERN_ERR "invalid MIXER UNIT descriptor %d\n", unitid);
 		return -EINVAL;
 	}
-	/* no bmControls field (e.g. Maya44) -> ignore */
-	if (desc->bLength <= 10 + input_pins) {
-		snd_printdd(KERN_INFO "MU %d has no bmControls field\n", unitid);
-		return 0;
-	}

 	num_ins = 0;
 	ich = 0;
@@ -1526,6 +1521,9 @@ static int parse_audio_mixer_unit(struct mixer_build *state, int unitid, void *r
 		err = parse_audio_unit(state, desc->baSourceID[pin]);
 		if (err < 0)
 			continue;
+		/* no bmControls field (e.g. Maya44) -> ignore */
+		if (desc->bLength <= 10 + input_pins)
+			continue;
 		err = check_input_term(state, desc->baSourceID[pin], &iterm);
 		if (err < 0)
 			return err;
--
1.9.1





More information about the kernel-team mailing list