diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2007-08-21 08:56:54 +0200 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2007-10-16 15:59:19 +0200 |
commit | 076639f6aca365d83a01ee48343f13ec62b23af1 (patch) | |
tree | 5615c3e0eff946566c21e2668652f5e5fd0a3111 /sound | |
parent | a6a712aeb17ff30206ae1bc827d50497d884602a (diff) | |
download | op-kernel-dev-076639f6aca365d83a01ee48343f13ec62b23af1.zip op-kernel-dev-076639f6aca365d83a01ee48343f13ec62b23af1.tar.gz |
[ALSA] usb-audio: allow low speed MIDI devices
Allow low speed MIDI devices because newer devices from ESI do not
support full speed.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/usb/usbaudio.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c index cbe8b33..e1558a6 100644 --- a/sound/usb/usbaudio.c +++ b/sound/usb/usbaudio.c @@ -2840,6 +2840,10 @@ static int snd_usb_create_streams(struct snd_usb_audio *chip, int ctrlif) /* skip non-supported classes */ continue; } + if (snd_usb_get_speed(dev) == USB_SPEED_LOW) { + snd_printk(KERN_ERR "low speed audio streaming not supported\n"); + continue; + } if (! parse_audio_endpoints(chip, j)) { usb_set_interface(dev, j, 0); /* reset the current interface */ usb_driver_claim_interface(&usb_audio_driver, iface, (void *)-1L); @@ -3382,7 +3386,8 @@ static int snd_usb_audio_create(struct usb_device *dev, int idx, *rchip = NULL; - if (snd_usb_get_speed(dev) != USB_SPEED_FULL && + if (snd_usb_get_speed(dev) != USB_SPEED_LOW && + snd_usb_get_speed(dev) != USB_SPEED_FULL && snd_usb_get_speed(dev) != USB_SPEED_HIGH) { snd_printk(KERN_ERR "unknown device speed %d\n", snd_usb_get_speed(dev)); return -ENXIO; @@ -3456,7 +3461,9 @@ static int snd_usb_audio_create(struct usb_device *dev, int idx, usb_make_path(dev, card->longname + len, sizeof(card->longname) - len); strlcat(card->longname, - snd_usb_get_speed(dev) == USB_SPEED_FULL ? ", full speed" : ", high speed", + snd_usb_get_speed(dev) == USB_SPEED_LOW ? ", low speed" : + snd_usb_get_speed(dev) == USB_SPEED_FULL ? ", full speed" : + ", high speed", sizeof(card->longname)); snd_usb_audio_create_proc(chip); |