[alsa-devel] [PATCH] ALSA: usb-audio: fix automatic Roland/Yamaha MIDI detection
Takashi Iwai
tiwai at suse.de
Mon Aug 12 11:41:16 CEST 2013
At Sun, 11 Aug 2013 14:13:13 +0200,
Clemens Ladisch wrote:
>
> 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 at superlative.org>
> Signed-off-by: Clemens Ladisch <clemens at ladisch.de>
Thanks, applied.
Takashi
> ---
> sound/usb/quirks.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> --- 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,
> if (altsd->bNumEndpoints < 1)
> return -ENODEV;
> epd = get_endpoint(alts, 0);
> - if (!usb_endpoint_xfer_bulk(epd) ||
> + if (!usb_endpoint_xfer_bulk(epd) &&
> !usb_endpoint_xfer_int(epd))
> return -ENODEV;
>
> switch (USB_ID_VENDOR(chip->usb_id)) {
> case 0x0499: /* Yamaha */
> err = create_yamaha_midi_quirk(chip, iface, driver, alts);
> - if (err < 0 && err != -ENODEV)
> + if (err != -ENODEV)
> return err;
> break;
> case 0x0582: /* Roland */
> err = create_roland_midi_quirk(chip, iface, driver, alts);
> - if (err < 0 && err != -ENODEV)
> + if (err != -ENODEV)
> return err;
> break;
> }
>
More information about the Alsa-devel
mailing list