diff options
| author | Pedro Lopez-Cabanillas <pedro.lopez.cabanillas@gmail.com> | 2008-10-07 14:54:18 -0400 |
|---|---|---|
| committer | Jaroslav Kysela <perex@perex.cz> | 2008-10-10 07:41:57 -0400 |
| commit | 59b3db6c69ae9eeed1d8fc3aee6b88272ba38ba8 (patch) | |
| tree | d6b1339f3297ebb46b203e06a4f1416c325f779d | |
| parent | 52948b3f7c481be2cd3a68d1db42dd6906bf853a (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>
| -rw-r--r-- | sound/usb/usbaudio.c | 25 | ||||
| -rw-r--r-- | sound/usb/usbquirks.h | 18 |
2 files changed, 28 insertions, 15 deletions
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c index 6e70ba4ee21f..bbd70d5814a0 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, | |||
| 3023 | alts = &iface->altsetting[1]; | 3023 | alts = &iface->altsetting[1]; |
| 3024 | altsd = get_iface_desc(alts); | 3024 | altsd = get_iface_desc(alts); |
| 3025 | 3025 | ||
| 3026 | if (altsd->bNumEndpoints == 2) { | ||
| 3027 | static const struct snd_usb_midi_endpoint_info ua700_ep = { | ||
| 3028 | .out_cables = 0x0003, | ||
| 3029 | .in_cables = 0x0003 | ||
| 3030 | }; | ||
| 3031 | static const struct snd_usb_audio_quirk ua700_quirk = { | ||
| 3032 | .type = QUIRK_MIDI_FIXED_ENDPOINT, | ||
| 3033 | .data = &ua700_ep | ||
| 3034 | }; | ||
| 3035 | static const struct snd_usb_midi_endpoint_info uaxx_ep = { | ||
| 3036 | .out_cables = 0x0001, | ||
| 3037 | .in_cables = 0x0001 | ||
| 3038 | }; | ||
| 3039 | static const struct snd_usb_audio_quirk uaxx_quirk = { | ||
| 3040 | .type = QUIRK_MIDI_FIXED_ENDPOINT, | ||
| 3041 | .data = &uaxx_ep | ||
| 3042 | }; | ||
| 3043 | if (chip->usb_id == USB_ID(0x0582, 0x002b)) | ||
| 3044 | return snd_usb_create_midi_interface(chip, iface, | ||
| 3045 | &ua700_quirk); | ||
| 3046 | else | ||
| 3047 | return snd_usb_create_midi_interface(chip, iface, | ||
| 3048 | &uaxx_quirk); | ||
| 3049 | } | ||
| 3050 | |||
| 3026 | if (altsd->bNumEndpoints != 1) | 3051 | if (altsd->bNumEndpoints != 1) |
| 3027 | return -ENXIO; | 3052 | return -ENXIO; |
| 3028 | 3053 | ||
diff --git a/sound/usb/usbquirks.h b/sound/usb/usbquirks.h index 85532cf9dbf6..69689e79bf79 100644 --- a/sound/usb/usbquirks.h +++ b/sound/usb/usbquirks.h | |||
| @@ -870,11 +870,7 @@ YAMAHA_DEVICE(0x7010, "UB99"), | |||
| 870 | }, | 870 | }, |
| 871 | { | 871 | { |
| 872 | .ifnum = 3, | 872 | .ifnum = 3, |
| 873 | .type = QUIRK_MIDI_FIXED_ENDPOINT, | 873 | .type = QUIRK_AUDIO_EDIROL_UAXX |
| 874 | .data = & (const struct snd_usb_midi_endpoint_info) { | ||
| 875 | .out_cables = 0x0003, | ||
| 876 | .in_cables = 0x0003 | ||
| 877 | } | ||
| 878 | }, | 874 | }, |
| 879 | { | 875 | { |
| 880 | .ifnum = -1 | 876 | .ifnum = -1 |
| @@ -1216,11 +1212,7 @@ YAMAHA_DEVICE(0x7010, "UB99"), | |||
| 1216 | }, | 1212 | }, |
| 1217 | { | 1213 | { |
| 1218 | .ifnum = 2, | 1214 | .ifnum = 2, |
| 1219 | .type = QUIRK_MIDI_FIXED_ENDPOINT, | 1215 | .type = QUIRK_AUDIO_EDIROL_UAXX |
| 1220 | .data = & (const struct snd_usb_midi_endpoint_info) { | ||
| 1221 | .out_cables = 0x0001, | ||
| 1222 | .in_cables = 0x0001 | ||
| 1223 | } | ||
| 1224 | }, | 1216 | }, |
| 1225 | { | 1217 | { |
| 1226 | .ifnum = -1 | 1218 | .ifnum = -1 |
| @@ -1375,11 +1367,7 @@ YAMAHA_DEVICE(0x7010, "UB99"), | |||
| 1375 | }, | 1367 | }, |
| 1376 | { | 1368 | { |
| 1377 | .ifnum = 2, | 1369 | .ifnum = 2, |
| 1378 | .type = QUIRK_MIDI_FIXED_ENDPOINT, | 1370 | .type = QUIRK_AUDIO_EDIROL_UAXX |
| 1379 | .data = & (const struct snd_usb_midi_endpoint_info) { | ||
| 1380 | .out_cables = 0x0001, | ||
| 1381 | .in_cables = 0x0001 | ||
| 1382 | } | ||
| 1383 | }, | 1371 | }, |
| 1384 | { | 1372 | { |
| 1385 | .ifnum = -1 | 1373 | .ifnum = -1 |
