Add Alsa support for Roland Edirol UA-4FX in Advanced mode (for MIDI support and sample rates of 48 kHz and 96 kHz) usbaudio.c, usbquirks.h Signed-off-by: david.c.hubbard@gmail.com =================================================================== diff -u sound/usb/usbaudio.c.00 sound/usb/usbaudio.c --- sound/usb/usbaudio.c.00 2007-11-28 02:13:10.000000000 -0700 +++ sound/usb/usbaudio.c 2007-11-28 02:44:47.000000000 -0700 @@ -2930,7 +2930,7 @@ } /* - * Create a stream for an Edirol UA-700/UA-25 interface. The only way + * Create a stream for an Edirol UA-700/UA-25/UA-4FX interface. The only way * to detect the sample rate is by looking at wMaxPacketSize. */ static int create_ua700_ua25_quirk(struct snd_usb_audio *chip, @@ -2950,8 +2950,11 @@ struct audioformat *fp; int stream, err; - /* both PCM and MIDI interfaces have 2 altsettings */ - if (iface->num_altsetting != 2) + /* both PCM and MIDI interfaces have 2 altsettings, + * except UA-4FX at 48 kHz, PCM interface has 3 altsettings */ + if (iface->num_altsetting != 2 && + (chip->usb_id != USB_ID(0x0582, 0x00a3) || + iface->num_altsetting != 3)) return -ENXIO; alts = &iface->altsetting[1]; altsd = get_iface_desc(alts); diff -u sound/usb/usbquirks.h.00 sound/usb/usbquirks.h --- sound/usb/usbquirks.h.00 2007-11-28 02:15:11.000000000 -0700 +++ sound/usb/usbquirks.h 2007-11-28 02:17:51.000000000 -0700 @@ -1311,6 +1311,37 @@ } }, /* TODO: add Edirol MD-P1 support */ +{ /* + * This quirk is for the "Advanced" modes of the Edirol UA-4FX. + * If the switch is not in an advanced setting, the UA-4FX has + * ID 0x0582/0x00a4 and is standard compliant (no quirks), but + * offers only 16-bit PCM at 44.1 kHz and no MIDI. + */ + USB_DEVICE_VENDOR_SPEC(0x0582, 0x00a3), + .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { + .vendor_name = "EDIROL", + .product_name = "UA-4FX", + .ifnum = QUIRK_ANY_INTERFACE, + .type = QUIRK_COMPOSITE, + .data = (const struct snd_usb_audio_quirk[]) { + { + .ifnum = 0, + .type = QUIRK_AUDIO_EDIROL_UA700_UA25 + }, + { + .ifnum = 1, + .type = QUIRK_AUDIO_EDIROL_UA700_UA25 + }, + { + .ifnum = 2, + .type = QUIRK_AUDIO_EDIROL_UA700_UA25 + }, + { + .ifnum = -1 + } + } + } +}, { /* Roland SH-201 */ USB_DEVICE(0x0582, 0x00ad),