[alsa-devel] [PATCH] ALSA: usb-audio: Add quirk for Focusrite Scarlett 18i6

Takashi Iwai tiwai at suse.de
Tue Nov 13 07:33:33 CET 2012


At Fri, 9 Nov 2012 20:20:23 +1100,
Martin Schwenke wrote:
> 
> Probing this device currently fails in snd_usb_audio_probe() because
> the call to snd_usb_create_mixer() fails.  This is due to unknown or
> non-standard interface descriptor subtypes in parse_audio_unit():
> 
>   usbaudio: unit 51: unexpected type 0x09
>   snd-usb-audio: probe of 1-8:1.0 failed with error -5
> 
> Some people are working around this by recompiling usb-audio with the
> call to snd_usb_create_mixer() commented out.  It would be nice to
> avoid that.
> 
> While the best idea would be to look into the mixer creation failure,
> a reasonable short-term solution is to use quirks to only probe the
> trouble-free interfaces.  This allows audio and MIDI interfaces to be
> used without any obvious issues.
> 
> Interface 0 is the main one to ignore.  It contains lots of
> control-fu, including the unexpected interface descriptor subtypes.
> Interface 5 is for firmware updates and I'm not sure how to get
> support for this.  Interface 3 is some sort of control interface that
> I don't understand:
> 
>     Interface Descriptor:
>       bLength                 9
>       bDescriptorType         4
>       bInterfaceNumber        3
>       bAlternateSetting       0
>       bNumEndpoints           0
>       bInterfaceClass         1 Audio
>       bInterfaceSubClass      1 Control Device
>       bInterfaceProtocol      0
>       iInterface              0
>       AudioControl Interface Descriptor:
>         bLength                 9
>         bDescriptorType        36
>         bDescriptorSubtype      1 (HEADER)
>         bcdADC               1.00
>         wTotalLength            9
>         bInCollection           1
>         baInterfaceNr( 0)       1
> 
> Signed-off-by: Martin Schwenke <martin at meltin.net>

Unfortunately your MUA broke lines so the patch cannot be applied
cleanly.  Please fix your MUA setup and resend, or use an attachment
if it doesn't work.


thanks,

Takashi

> ---
>  sound/usb/quirks-table.h |   52
> ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52
> insertions(+)
> 
> diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h
> index 88d8ceb..c9dde5f 100644
> --- a/sound/usb/quirks-table.h
> +++ b/sound/usb/quirks-table.h
> @@ -2882,6 +2882,58 @@ YAMAHA_DEVICE(0x7010, "UB99"),
>  
>  {
>  	/*
> +	 * Focusrite Scarlett 18i6
> +	 *
> +	 * Avoid mixer creation, which otherwise fails because some of
> +	 * the interface descriptor subtypes for interface 0 are
> +	 * unknown.  That should be fixed or worked-around but this at
> +	 * least allows the device to be used successfully with a DAW
> +	 * and an external mixer.  See comments below about other
> +	 * ignored interfaces.
> +	 */
> +	USB_DEVICE(0x1235, 0x8004),
> +	.driver_info = (unsigned long) & (const struct
> snd_usb_audio_quirk) {
> +		.vendor_name = "Focusrite",
> +		.product_name = "Scarlett 18i6",
> +		.ifnum = QUIRK_ANY_INTERFACE,
> +		.type = QUIRK_COMPOSITE,
> +		.data = & (const struct snd_usb_audio_quirk[]) {
> +			{
> +				/* InterfaceSubClass 1 (Control
> Device) */
> +				.ifnum = 0,
> +				.type = QUIRK_IGNORE_INTERFACE
> +			},
> +			{
> +				.ifnum = 1,
> +				.type = QUIRK_AUDIO_STANDARD_INTERFACE
> +			},
> +			{
> +				.ifnum = 2,
> +				.type = QUIRK_AUDIO_STANDARD_INTERFACE
> +			},
> +			{
> +				/* InterfaceSubClass 1 (Control
> Device) */
> +				.ifnum = 3,
> +				.type = QUIRK_IGNORE_INTERFACE
> +			},
> +			{
> +				.ifnum = 4,
> +				.type = QUIRK_MIDI_STANDARD_INTERFACE
> +			},
> +			{
> +				/* InterfaceSubClass 1 (Device
> Firmware Update) */
> +				.ifnum = 5,
> +				.type = QUIRK_IGNORE_INTERFACE
> +			},
> +			{
> +				.ifnum = -1
> +			}
> +		}
> +	}
> +},
> +
> +{
> +	/*
>  	 * Some USB MIDI devices don't have an audio control interface,
>  	 * so we have to grab MIDI streaming interfaces here.
>  	 */
> -- 
> 1.7.10.4
> 
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel at alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> 


More information about the Alsa-devel mailing list