summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2015-06-03 11:36:51 +0200
committerLuis Henriques <luis.henriques@canonical.com>2015-06-11 11:24:59 +0100
commita531697d6d1798ab4b32849a2f251213df53bf2a (patch)
tree391cbed2a13c87b7334a7683b706bd296689d9bd /sound
parent3fd42a5450f01efb731978b27932687383370d89 (diff)
downloadlinux-stable-a531697d6d1798ab4b32849a2f251213df53bf2a.tar.gz
linux-stable-a531697d6d1798ab4b32849a2f251213df53bf2a.tar.bz2
linux-stable-a531697d6d1798ab4b32849a2f251213df53bf2a.zip
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@gmail.com> Tested-by: nightmixes <nightmixes@gmail.com> Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/usb/mixer.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index b4283660d430..f6d4967a652a 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -1583,12 +1583,6 @@ static int parse_audio_mixer_unit(struct mixer_build *state, int unitid,
unitid);
return -EINVAL;
}
- /* no bmControls field (e.g. Maya44) -> ignore */
- if (desc->bLength <= 10 + input_pins) {
- usb_audio_dbg(state->chip, "MU %d has no bmControls field\n",
- unitid);
- return 0;
- }
num_ins = 0;
ich = 0;
@@ -1596,6 +1590,9 @@ static int parse_audio_mixer_unit(struct mixer_build *state, int unitid,
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;