Commit 1e9d662d authored by Jaroslav Kysela's avatar Jaroslav Kysela

[ALSA] don't use broken legacy interfaces on M-Audio Quattro/Omnistudio

USB generic driver
Interfaces 0-2 of M-Audio Quattro/Omnistudio devices duplicate functionality
of interfaces 3-5 and cause errors when used with those.  Add a quirk to
tell the driver not to use them.
Signed-off-by: default avatarClemens Ladisch <clemens@ladisch.de>
parent 56a42949
...@@ -2980,6 +2980,8 @@ static int snd_usb_create_quirk(snd_usb_audio_t *chip, ...@@ -2980,6 +2980,8 @@ static int snd_usb_create_quirk(snd_usb_audio_t *chip,
return create_ua700_ua25_quirk(chip, iface); return create_ua700_ua25_quirk(chip, iface);
case QUIRK_AUDIO_EDIROL_UA1000: case QUIRK_AUDIO_EDIROL_UA1000:
return create_ua1000_quirk(chip, iface); return create_ua1000_quirk(chip, iface);
case QUIRK_IGNORE_INTERFACE:
return 0;
default: default:
snd_printd(KERN_ERR "invalid quirk type %d\n", quirk->type); snd_printd(KERN_ERR "invalid quirk type %d\n", quirk->type);
return -ENXIO; return -ENXIO;
......
...@@ -157,6 +157,7 @@ struct snd_usb_audio { ...@@ -157,6 +157,7 @@ struct snd_usb_audio {
#define QUIRK_MIDI_STANDARD_INTERFACE 6 #define QUIRK_MIDI_STANDARD_INTERFACE 6
#define QUIRK_AUDIO_EDIROL_UA700_UA25 7 #define QUIRK_AUDIO_EDIROL_UA700_UA25 7
#define QUIRK_AUDIO_EDIROL_UA1000 8 #define QUIRK_AUDIO_EDIROL_UA1000 8
#define QUIRK_IGNORE_INTERFACE 9
typedef struct snd_usb_audio_quirk snd_usb_audio_quirk_t; typedef struct snd_usb_audio_quirk snd_usb_audio_quirk_t;
typedef struct snd_usb_midi_endpoint_info snd_usb_midi_endpoint_info_t; typedef struct snd_usb_midi_endpoint_info snd_usb_midi_endpoint_info_t;
...@@ -190,6 +191,8 @@ struct snd_usb_midi_endpoint_info { ...@@ -190,6 +191,8 @@ struct snd_usb_midi_endpoint_info {
/* for QUIRK_AUDIO_EDIROL_UA700_UA25/UA1000, data is NULL */ /* for QUIRK_AUDIO_EDIROL_UA700_UA25/UA1000, data is NULL */
/* for QUIRK_IGNORE_INTERFACE, data is null */
/* /*
*/ */
......
...@@ -875,6 +875,22 @@ YAMAHA_DEVICE(0x7010, "UB99"), ...@@ -875,6 +875,22 @@ YAMAHA_DEVICE(0x7010, "UB99"),
* Ignore them. The other interfaces can do 24 bits, * Ignore them. The other interfaces can do 24 bits,
* but captured samples are big-endian (see usbaudio.c). * but captured samples are big-endian (see usbaudio.c).
*/ */
{
.ifnum = 0,
.type = QUIRK_IGNORE_INTERFACE
},
{
.ifnum = 1,
.type = QUIRK_IGNORE_INTERFACE
},
{
.ifnum = 2,
.type = QUIRK_IGNORE_INTERFACE
},
{
.ifnum = 3,
.type = QUIRK_IGNORE_INTERFACE
},
{ {
.ifnum = 4, .ifnum = 4,
.type = QUIRK_AUDIO_STANDARD_INTERFACE .type = QUIRK_AUDIO_STANDARD_INTERFACE
...@@ -883,6 +899,10 @@ YAMAHA_DEVICE(0x7010, "UB99"), ...@@ -883,6 +899,10 @@ YAMAHA_DEVICE(0x7010, "UB99"),
.ifnum = 5, .ifnum = 5,
.type = QUIRK_AUDIO_STANDARD_INTERFACE .type = QUIRK_AUDIO_STANDARD_INTERFACE
}, },
{
.ifnum = 6,
.type = QUIRK_IGNORE_INTERFACE
},
{ {
.ifnum = 7, .ifnum = 7,
.type = QUIRK_AUDIO_STANDARD_INTERFACE .type = QUIRK_AUDIO_STANDARD_INTERFACE
...@@ -936,11 +956,56 @@ YAMAHA_DEVICE(0x7010, "UB99"), ...@@ -936,11 +956,56 @@ YAMAHA_DEVICE(0x7010, "UB99"),
.driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
.vendor_name = "M-Audio", .vendor_name = "M-Audio",
.product_name = "OmniStudio", .product_name = "OmniStudio",
.ifnum = 9, .ifnum = QUIRK_ANY_INTERFACE,
.type = QUIRK_MIDI_MIDIMAN, .type = QUIRK_COMPOSITE,
.data = & (const snd_usb_midi_endpoint_info_t) { .data = & (const snd_usb_audio_quirk_t[]) {
.out_cables = 0x0001, {
.in_cables = 0x0001 .ifnum = 0,
.type = QUIRK_IGNORE_INTERFACE
},
{
.ifnum = 1,
.type = QUIRK_IGNORE_INTERFACE
},
{
.ifnum = 2,
.type = QUIRK_IGNORE_INTERFACE
},
{
.ifnum = 3,
.type = QUIRK_IGNORE_INTERFACE
},
{
.ifnum = 4,
.type = QUIRK_AUDIO_STANDARD_INTERFACE
},
{
.ifnum = 5,
.type = QUIRK_AUDIO_STANDARD_INTERFACE
},
{
.ifnum = 6,
.type = QUIRK_IGNORE_INTERFACE
},
{
.ifnum = 7,
.type = QUIRK_AUDIO_STANDARD_INTERFACE
},
{
.ifnum = 8,
.type = QUIRK_AUDIO_STANDARD_INTERFACE
},
{
.ifnum = 9,
.type = QUIRK_MIDI_MIDIMAN,
.data = & (const snd_usb_midi_endpoint_info_t) {
.out_cables = 0x0001,
.in_cables = 0x0001
}
},
{
.ifnum = -1
}
} }
} }
}, },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment