linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] ALSA: usb-audio: Add support for Akai MPC Element USB MIDI controller
@ 2015-01-08  5:34 Paul Bonser
  2015-01-08 21:56 ` [alsa-devel] " Clemens Ladisch
  0 siblings, 1 reply; 6+ messages in thread
From: Paul Bonser @ 2015-01-08  5:34 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai; +Cc: alsa-devel, linux-kernel

From: Paul Bonser <misterpib@gmail.com>

The Akai MPC Element incorrectly reports its bInterfaceClass as 255, but
otherwise implements the USB MIDI spec correctly.

This adds a quirks-table.h entry which allows the device to be
recognized as a standard USB MIDI device.

Signed-off-by: Paul Bonser <misterpib@gmail.com>
---
diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h
index 8590a32..e869b6c 100644
--- a/sound/usb/quirks-table.h
+++ b/sound/usb/quirks-table.h
@@ -2516,6 +2516,28 @@ YAMAHA_DEVICE(0x7010, "UB99"),
 	}
 },

+{
+	/* Akai MPC Element */
+	USB_DEVICE(0x09e8, 0x0021),
+	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
+		.ifnum = QUIRK_ANY_INTERFACE,
+		.type = QUIRK_COMPOSITE,
+		.data = & (const struct snd_usb_audio_quirk[]) {
+			{
+				.ifnum = 0,
+				.type = QUIRK_IGNORE_INTERFACE
+			},
+			{
+				.ifnum = 1,
+				.type = QUIRK_MIDI_STANDARD_INTERFACE
+			},
+			{
+				.ifnum = -1
+			}
+		}
+	}
+},
+
 /* TerraTec devices */
 {
 	USB_DEVICE_VENDOR_SPEC(0x0ccd, 0x0012),

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [alsa-devel] [PATCH v2] ALSA: usb-audio: Add support for Akai MPC Element USB MIDI controller
  2015-01-08  5:34 [PATCH v2] ALSA: usb-audio: Add support for Akai MPC Element USB MIDI controller Paul Bonser
@ 2015-01-08 21:56 ` Clemens Ladisch
  2015-01-09  0:46   ` Paul Bonser
  0 siblings, 1 reply; 6+ messages in thread
From: Clemens Ladisch @ 2015-01-08 21:56 UTC (permalink / raw)
  To: Paul Bonser, Jaroslav Kysela, Takashi Iwai; +Cc: alsa-devel, linux-kernel

Paul Bonser wrote:
> The Akai MPC Element incorrectly reports its bInterfaceClass as 255, but
> otherwise implements the USB MIDI spec correctly.
>
> This adds a quirks-table.h entry which allows the device to be
> recognized as a standard USB MIDI device.
>
> Signed-off-by: Paul Bonser <misterpib@gmail.com>
> ---
> diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h
> index 8590a32..e869b6c 100644
> --- a/sound/usb/quirks-table.h
> +++ b/sound/usb/quirks-table.h
> @@ -2516,6 +2516,28 @@ YAMAHA_DEVICE(0x7010, "UB99"),
>  	}
>  },
>
> +{
> +	/* Akai MPC Element */
> +	USB_DEVICE(0x09e8, 0x0021),
> +	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
> +		.ifnum = QUIRK_ANY_INTERFACE,
> +		.type = QUIRK_COMPOSITE,
> +		.data = & (const struct snd_usb_audio_quirk[]) {
> +			{
> +				.ifnum = 0,
> +				.type = QUIRK_IGNORE_INTERFACE
> +			},
> +			{
> +				.ifnum = 1,
> +				.type = QUIRK_MIDI_STANDARD_INTERFACE
> +			},
> +			{
> +				.ifnum = -1
> +			}
> +		}
> +	}
> +},

Why a composite quirk?  Does a single quirk entry not work?


Regards,
Clemens

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [alsa-devel] [PATCH v2] ALSA: usb-audio: Add support for Akai MPC Element USB MIDI controller
  2015-01-08 21:56 ` [alsa-devel] " Clemens Ladisch
@ 2015-01-09  0:46   ` Paul Bonser
  2015-01-09  8:48     ` Clemens Ladisch
  0 siblings, 1 reply; 6+ messages in thread
From: Paul Bonser @ 2015-01-09  0:46 UTC (permalink / raw)
  To: Clemens Ladisch, Jaroslav Kysela, Takashi Iwai; +Cc: alsa-devel, linux-kernel

On 01/08/2015 03:56 PM, Clemens Ladisch wrote:
> Paul Bonser wrote:
>> The Akai MPC Element incorrectly reports its bInterfaceClass as 255, but
>> otherwise implements the USB MIDI spec correctly.
>>
>> This adds a quirks-table.h entry which allows the device to be
>> recognized as a standard USB MIDI device.
>>
>> Signed-off-by: Paul Bonser <misterpib@gmail.com>
>> ---
>> diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h
>> index 8590a32..e869b6c 100644
>> --- a/sound/usb/quirks-table.h
>> +++ b/sound/usb/quirks-table.h
>> @@ -2516,6 +2516,28 @@ YAMAHA_DEVICE(0x7010, "UB99"),
>>  	}
>>  },
>>
>> +{
>> +	/* Akai MPC Element */
>> +	USB_DEVICE(0x09e8, 0x0021),
>> +	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
>> +		.ifnum = QUIRK_ANY_INTERFACE,
>> +		.type = QUIRK_COMPOSITE,
>> +		.data = & (const struct snd_usb_audio_quirk[]) {
>> +			{
>> +				.ifnum = 0,
>> +				.type = QUIRK_IGNORE_INTERFACE
>> +			},
>> +			{
>> +				.ifnum = 1,
>> +				.type = QUIRK_MIDI_STANDARD_INTERFACE
>> +			},
>> +			{
>> +				.ifnum = -1
>> +			}
>> +		}
>> +	}
>> +},
> 
> Why a composite quirk?  Does a single quirk entry not work?

A single quirk entry results in an error message in dmesg:
"snd-usb-audio: probe of 3-2:1.0 failed with error -5"

Adding the QUIRK_IGNORE_INTERFACE stops that.

> 
> 
> Regards,
> Clemens
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [alsa-devel] [PATCH v2] ALSA: usb-audio: Add support for Akai MPC Element USB MIDI controller
  2015-01-09  0:46   ` Paul Bonser
@ 2015-01-09  8:48     ` Clemens Ladisch
  2015-01-09 10:26       ` Takashi Iwai
  0 siblings, 1 reply; 6+ messages in thread
From: Clemens Ladisch @ 2015-01-09  8:48 UTC (permalink / raw)
  To: Paul Bonser, Jaroslav Kysela, Takashi Iwai; +Cc: alsa-devel, linux-kernel

Paul Bonser wrote:
> On 01/08/2015 03:56 PM, Clemens Ladisch wrote:
>> Paul Bonser wrote:
>>> The Akai MPC Element incorrectly reports its bInterfaceClass as 255, but
>>> otherwise implements the USB MIDI spec correctly.
>>>
>>> This adds a quirks-table.h entry which allows the device to be
>>> recognized as a standard USB MIDI device.
>>>
>>> +++ b/sound/usb/quirks-table.h
>>> +{
>>> +	/* Akai MPC Element */
>>> +	USB_DEVICE(0x09e8, 0x0021),
>>> +	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
>>> +		.ifnum = QUIRK_ANY_INTERFACE,
>>> +		.type = QUIRK_COMPOSITE,
>>> +		.data = & (const struct snd_usb_audio_quirk[]) {
>>> +			{
>>> +				.ifnum = 0,
>>> +				.type = QUIRK_IGNORE_INTERFACE
>>> +			},
>>> +			{
>>> +				.ifnum = 1,
>>> +				.type = QUIRK_MIDI_STANDARD_INTERFACE
>>> +			},
>>> +			{
>>> +				.ifnum = -1
>>> +			}
>>> +		}
>>> +	}
>>> +},
>>
>> Why a composite quirk?  Does a single quirk entry not work?
>
> A single quirk entry results in an error message in dmesg:
> "snd-usb-audio: probe of 3-2:1.0 failed with error -5"

That message is normal for unhandled interfaces.

Does it actually prevent the device from working?


Regards,
Clemens

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [alsa-devel] [PATCH v2] ALSA: usb-audio: Add support for Akai MPC Element USB MIDI controller
  2015-01-09  8:48     ` Clemens Ladisch
@ 2015-01-09 10:26       ` Takashi Iwai
  2015-01-09 15:11         ` Paul Bonser
  0 siblings, 1 reply; 6+ messages in thread
From: Takashi Iwai @ 2015-01-09 10:26 UTC (permalink / raw)
  To: Clemens Ladisch; +Cc: Paul Bonser, Jaroslav Kysela, alsa-devel, linux-kernel

At Fri, 09 Jan 2015 09:48:42 +0100,
Clemens Ladisch wrote:
> 
> Paul Bonser wrote:
> > On 01/08/2015 03:56 PM, Clemens Ladisch wrote:
> >> Paul Bonser wrote:
> >>> The Akai MPC Element incorrectly reports its bInterfaceClass as 255, but
> >>> otherwise implements the USB MIDI spec correctly.
> >>>
> >>> This adds a quirks-table.h entry which allows the device to be
> >>> recognized as a standard USB MIDI device.
> >>>
> >>> +++ b/sound/usb/quirks-table.h
> >>> +{
> >>> +	/* Akai MPC Element */
> >>> +	USB_DEVICE(0x09e8, 0x0021),
> >>> +	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
> >>> +		.ifnum = QUIRK_ANY_INTERFACE,
> >>> +		.type = QUIRK_COMPOSITE,
> >>> +		.data = & (const struct snd_usb_audio_quirk[]) {
> >>> +			{
> >>> +				.ifnum = 0,
> >>> +				.type = QUIRK_IGNORE_INTERFACE
> >>> +			},
> >>> +			{
> >>> +				.ifnum = 1,
> >>> +				.type = QUIRK_MIDI_STANDARD_INTERFACE
> >>> +			},
> >>> +			{
> >>> +				.ifnum = -1
> >>> +			}
> >>> +		}
> >>> +	}
> >>> +},
> >>
> >> Why a composite quirk?  Does a single quirk entry not work?
> >
> > A single quirk entry results in an error message in dmesg:
> > "snd-usb-audio: probe of 3-2:1.0 failed with error -5"
> 
> That message is normal for unhandled interfaces.

It's still not good to show a message, so using QUIRK_IGNORE_INTERFACE
is good enough as a workaround.  So I applied it as is to for-next
branch now.  Though...

> Does it actually prevent the device from working?

... it's still interesting why it needs a special handling.  If we
find out more and have a better fix, let's put on top of the current
patch.


thanks,

Takashi

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [alsa-devel] [PATCH v2] ALSA: usb-audio: Add support for Akai MPC Element USB MIDI controller
  2015-01-09 10:26       ` Takashi Iwai
@ 2015-01-09 15:11         ` Paul Bonser
  0 siblings, 0 replies; 6+ messages in thread
From: Paul Bonser @ 2015-01-09 15:11 UTC (permalink / raw)
  To: Takashi Iwai, Clemens Ladisch; +Cc: Jaroslav Kysela, alsa-devel, linux-kernel



On 01/09/2015 04:26 AM, Takashi Iwai wrote:
> At Fri, 09 Jan 2015 09:48:42 +0100,
> Clemens Ladisch wrote:
>>
>> Paul Bonser wrote:
>>> On 01/08/2015 03:56 PM, Clemens Ladisch wrote:
>>>> Paul Bonser wrote:
>>>>> The Akai MPC Element incorrectly reports its bInterfaceClass as 255, but
>>>>> otherwise implements the USB MIDI spec correctly.
>>>>>
>>>>> This adds a quirks-table.h entry which allows the device to be
>>>>> recognized as a standard USB MIDI device.
>>>>>
>>>>> +++ b/sound/usb/quirks-table.h
>>>>> +{
>>>>> +	/* Akai MPC Element */
>>>>> +	USB_DEVICE(0x09e8, 0x0021),
>>>>> +	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
>>>>> +		.ifnum = QUIRK_ANY_INTERFACE,
>>>>> +		.type = QUIRK_COMPOSITE,
>>>>> +		.data = & (const struct snd_usb_audio_quirk[]) {
>>>>> +			{
>>>>> +				.ifnum = 0,
>>>>> +				.type = QUIRK_IGNORE_INTERFACE
>>>>> +			},
>>>>> +			{
>>>>> +				.ifnum = 1,
>>>>> +				.type = QUIRK_MIDI_STANDARD_INTERFACE
>>>>> +			},
>>>>> +			{
>>>>> +				.ifnum = -1
>>>>> +			}
>>>>> +		}
>>>>> +	}
>>>>> +},
>>>>
>>>> Why a composite quirk?  Does a single quirk entry not work?
>>>
>>> A single quirk entry results in an error message in dmesg:
>>> "snd-usb-audio: probe of 3-2:1.0 failed with error -5"
>>
>> That message is normal for unhandled interfaces.
> 
> It's still not good to show a message, so using QUIRK_IGNORE_INTERFACE
> is good enough as a workaround.  So I applied it as is to for-next
> branch now.  Though...
> 
>> Does it actually prevent the device from working?
> 
> ... it's still interesting why it needs a special handling.  If we
> find out more and have a better fix, let's put on top of the current
> patch.

Interface 0 is the empty audio control interface (with no endpoints)
that standard USB MIDI devices have, but as with interface 1, it has its
bInterfaceClass set to 255 instead of 1.

As far as I can tell the error does not prevent the device itself from
working. I tried using QUIRK_AUDIO_STANDARD_INTERFACE and I believe it
had the same error. I'm guessing this is because it has no endpoints, so
the driver doesn't know what to do with it?

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-01-09 15:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-08  5:34 [PATCH v2] ALSA: usb-audio: Add support for Akai MPC Element USB MIDI controller Paul Bonser
2015-01-08 21:56 ` [alsa-devel] " Clemens Ladisch
2015-01-09  0:46   ` Paul Bonser
2015-01-09  8:48     ` Clemens Ladisch
2015-01-09 10:26       ` Takashi Iwai
2015-01-09 15:11         ` Paul Bonser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).