aboutsummaryrefslogtreecommitdiff
path: root/sound/usb/usbaudio.c
diff options
context:
space:
mode:
authorPedro Lopez-Cabanillas <pedro.lopez.cabanillas@gmail.com>2008-10-07 20:54:18 +0200
committerJaroslav Kysela <perex@perex.cz>2008-10-10 13:41:57 +0200
commit59b3db6c69ae9eeed1d8fc3aee6b88272ba38ba8 (patch)
treed6b1339f3297ebb46b203e06a4f1416c325f779d /sound/usb/usbaudio.c
parent52948b3f7c481be2cd3a68d1db42dd6906bf853a (diff)
ALSA: usb-audio: dynamic detection of MIDI interfaces in uaxx-quirk
The MIDI interfaces have to be detected dynamically for Edirol devices ua-700, ua-25 and ua4-fx. This patch reverses the wrong changes made by my other patch in uaxx-quirk. Signed-off-by: Pedro Lopez-Cabanillas <pedro.lopez.cabanillas@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/usb/usbaudio.c')
-rw-r--r--sound/usb/usbaudio.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c
index 6e70ba4ee21..bbd70d5814a 100644
--- a/sound/usb/usbaudio.c
+++ b/sound/usb/usbaudio.c
@@ -3023,6 +3023,31 @@ static int create_uaxx_quirk(struct snd_usb_audio *chip,
alts = &iface->altsetting[1];
altsd = get_iface_desc(alts);
+ if (altsd->bNumEndpoints == 2) {
+ static const struct snd_usb_midi_endpoint_info ua700_ep = {
+ .out_cables = 0x0003,
+ .in_cables = 0x0003
+ };
+ static const struct snd_usb_audio_quirk ua700_quirk = {
+ .type = QUIRK_MIDI_FIXED_ENDPOINT,
+ .data = &ua700_ep
+ };
+ static const struct snd_usb_midi_endpoint_info uaxx_ep = {
+ .out_cables = 0x0001,
+ .in_cables = 0x0001
+ };
+ static const struct snd_usb_audio_quirk uaxx_quirk = {
+ .type = QUIRK_MIDI_FIXED_ENDPOINT,
+ .data = &uaxx_ep
+ };
+ if (chip->usb_id == USB_ID(0x0582, 0x002b))
+ return snd_usb_create_midi_interface(chip, iface,
+ &ua700_quirk);
+ else
+ return snd_usb_create_midi_interface(chip, iface,
+ &uaxx_quirk);
+ }
+
if (altsd->bNumEndpoints != 1)
return -ENXIO;