aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2015-06-03 05:36:51 -0400
committerTakashi Iwai <tiwai@suse.de>2015-06-03 05:58:15 -0400
commitea114fc27dc0cb9a550b6add5426720feb66262a (patch)
tree5e105a6859798038204b1327738cd407f87a216f /sound
parent044bddb9ca8d49edb91bc22b9940a463b0dbb97f (diff)
ALSA: usb-audio: fix missing input volume controls in MAYA44 USB(+)
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> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
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 4256fdedbd80..8b7e391dd0b8 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,
1583 unitid); 1583 unitid);
1584 return -EINVAL; 1584 return -EINVAL;
1585 } 1585 }
1586 /* no bmControls field (e.g. Maya44) -> ignore */
1587 if (desc->bLength <= 10 + input_pins) {
1588 usb_audio_dbg(state->chip, "MU %d has no bmControls field\n",
1589 unitid);
1590 return 0;
1591 }
1592 1586
1593 num_ins = 0; 1587 num_ins = 0;
1594 ich = 0; 1588 ich = 0;
@@ -1596,6 +1590,9 @@ static int parse_audio_mixer_unit(struct mixer_build *state, int unitid,
1596 err = parse_audio_unit(state, desc->baSourceID[pin]); 1590 err = parse_audio_unit(state, desc->baSourceID[pin]);
1597 if (err < 0) 1591 if (err < 0)
1598 continue; 1592 continue;
1593 /* no bmControls field (e.g. Maya44) -> ignore */
1594 if (desc->bLength <= 10 + input_pins)
1595 continue;
1599 err = check_input_term(state, desc->baSourceID[pin], &iterm); 1596 err = check_input_term(state, desc->baSourceID[pin], &iterm);
1600 if (err < 0) 1597 if (err < 0)
1601 return err; 1598 return err;