aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorDaniel Mack <daniel@caiaq.de>2010-09-02 05:13:15 -0400
committerTakashi Iwai <tiwai@suse.de>2010-09-02 05:58:37 -0400
commit7b6717e144de6592e614fd7fc3b914b6bf686a9d (patch)
tree14a5a0040455fc98136a7cdb6f8ec883d7d118c4 /sound
parent2bfc96a127bc1cc94d26bfaa40159966064f9c8c (diff)
ALSA: usb-audio: Assume first control interface is for audio
For devices with more than one control interface, let's assume the first one contains the audio controls. Unfortunately, there is no field in any of the descriptors to tell us whether a control interface is for audio or MIDI controls, so a better check is not easy to implement. On a composite device with audio and MIDI functions, for example, the code currently overwrites chip->ctrl_intf, causing operations on the control interface to fail if they are issued after the device probe. Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/usb/card.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sound/usb/card.c b/sound/usb/card.c
index 9feb00c831a0..b443a33d31c9 100644
--- a/sound/usb/card.c
+++ b/sound/usb/card.c
@@ -465,7 +465,13 @@ static void *snd_usb_audio_probe(struct usb_device *dev,
465 goto __error; 465 goto __error;
466 } 466 }
467 467
468 chip->ctrl_intf = alts; 468 /*
469 * For devices with more than one control interface, we assume the
470 * first contains the audio controls. We might need a more specific
471 * check here in the future.
472 */
473 if (!chip->ctrl_intf)
474 chip->ctrl_intf = alts;
469 475
470 if (err > 0) { 476 if (err > 0) {
471 /* create normal USB audio interfaces */ 477 /* create normal USB audio interfaces */