diff options
author | Daniel Mack <daniel@caiaq.de> | 2010-02-22 23:49:12 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-02-23 08:40:26 +0100 |
commit | 7b8a043f2686af9f41e313a78ed5e98233e5fded (patch) | |
tree | af7b3a3d2a6394b2a6053681b7f251315570b293 | |
parent | 53ee98fe8ac77d00bacc1c814d450d83cbd193d4 (diff) | |
download | kernel_samsung_crespo-7b8a043f2686af9f41e313a78ed5e98233e5fded.zip kernel_samsung_crespo-7b8a043f2686af9f41e313a78ed5e98233e5fded.tar.gz kernel_samsung_crespo-7b8a043f2686af9f41e313a78ed5e98233e5fded.tar.bz2 |
ALSA: usbmixer: bail out early when parsing audio class v2 descriptors
This is just a quick hack that needs to be removed once the new units
defined by the audio class v2.0 standard are supported.
However, it allows using these devices for now, without mixer support.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/usb/usbmixer.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sound/usb/usbmixer.c b/sound/usb/usbmixer.c index ca79495..42bb95c 100644 --- a/sound/usb/usbmixer.c +++ b/sound/usb/usbmixer.c @@ -2258,7 +2258,8 @@ int snd_usb_create_mixer(struct snd_usb_audio *chip, int ctrlif, }; struct usb_mixer_interface *mixer; struct snd_info_entry *entry; - int err; + struct usb_host_interface *host_iface; + int err, protocol; strcpy(chip->card->mixername, "USB Mixer"); @@ -2275,6 +2276,16 @@ int snd_usb_create_mixer(struct snd_usb_audio *chip, int ctrlif, return -ENOMEM; } + host_iface = &usb_ifnum_to_if(chip->dev, ctrlif)->altsetting[0]; + protocol = host_iface->desc.bInterfaceProtocol; + + /* FIXME! */ + if (protocol != UAC_VERSION_1) { + snd_printk(KERN_WARNING "mixer interface protocol 0x%02x not yet supported\n", + protocol); + return 0; + } + if ((err = snd_usb_mixer_controls(mixer)) < 0 || (err = snd_usb_mixer_status_create(mixer)) < 0) goto _error; |