diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2013-08-11 08:13:13 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-08-12 05:42:28 -0400 |
commit | aa773bfe8f860173752258c9ba4bf51060fb0d07 (patch) | |
tree | c7a61c31b6c2d6ba807a7d1708b4ff33a77b8517 /sound/usb | |
parent | 4c2aee0032b70083dafebd733ed9c774633b2fa3 (diff) |
ALSA: usb-audio: fix automatic Roland/Yamaha MIDI detection
Commit aafe77cc45a5 (ALSA: usb-audio: add support for many Roland/Yamaha
devices) had several logic errors that prevented create_auto_midi_quirk
from enumerating any MIDI ports.
Reported-by: Keith A. Milner <maillist@superlative.org>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb')
-rw-r--r-- | sound/usb/quirks.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c index 1bc45e71f1fe..0df9ede99dfd 100644 --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c | |||
@@ -319,19 +319,19 @@ static int create_auto_midi_quirk(struct snd_usb_audio *chip, | |||
319 | if (altsd->bNumEndpoints < 1) | 319 | if (altsd->bNumEndpoints < 1) |
320 | return -ENODEV; | 320 | return -ENODEV; |
321 | epd = get_endpoint(alts, 0); | 321 | epd = get_endpoint(alts, 0); |
322 | if (!usb_endpoint_xfer_bulk(epd) || | 322 | if (!usb_endpoint_xfer_bulk(epd) && |
323 | !usb_endpoint_xfer_int(epd)) | 323 | !usb_endpoint_xfer_int(epd)) |
324 | return -ENODEV; | 324 | return -ENODEV; |
325 | 325 | ||
326 | switch (USB_ID_VENDOR(chip->usb_id)) { | 326 | switch (USB_ID_VENDOR(chip->usb_id)) { |
327 | case 0x0499: /* Yamaha */ | 327 | case 0x0499: /* Yamaha */ |
328 | err = create_yamaha_midi_quirk(chip, iface, driver, alts); | 328 | err = create_yamaha_midi_quirk(chip, iface, driver, alts); |
329 | if (err < 0 && err != -ENODEV) | 329 | if (err != -ENODEV) |
330 | return err; | 330 | return err; |
331 | break; | 331 | break; |
332 | case 0x0582: /* Roland */ | 332 | case 0x0582: /* Roland */ |
333 | err = create_roland_midi_quirk(chip, iface, driver, alts); | 333 | err = create_roland_midi_quirk(chip, iface, driver, alts); |
334 | if (err < 0 && err != -ENODEV) | 334 | if (err != -ENODEV) |
335 | return err; | 335 | return err; |
336 | break; | 336 | break; |
337 | } | 337 | } |