linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sound: Add support for Creative BT-D1 via usb sound quirks
@ 2012-12-29 13:26 Alexander Schremmer
  2013-01-03  9:58 ` Takashi Iwai
  0 siblings, 1 reply; 4+ messages in thread
From: Alexander Schremmer @ 2012-12-29 13:26 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, alsa-devel; +Cc: linux-kernel

From: Alexander Schremmer <alex@alexanderweb.de>

Support the Creative BT-D1 Bluetooth USB audio device. Before this
patch, Linux had trouble finding the correct USB descriptors and bailed
out with these messages:

 no or invalid class specific endpoint descriptor

Now it still prints these messages on hotplug:

 snd-usb-audio: probe of ...:1.0 failed with error -5
 snd-usb-audio: probe of ...:1.2 failed with error -5
 snd-usb-audio: probe of ...:1.3 failed with error -5

But the device works correctly, including the HID support.

The patch is diff'ed against 3.8-rc1 but should apply to older kernels
as well.

Signed-off-by: Alexander Schremmer <alex@alexanderweb.de>

---
diff -uprN linux-3.8-rc1/sound/usb/quirks-table.h
linux-3.8-rc1-mod/sound/usb/quirks-table.h
--- linux-3.8-rc1/sound/usb/quirks-table.h      2012-12-22
02:19:00.000000000 +0100
+++ linux-3.8-rc1-mod/sound/usb/quirks-table.h  2012-12-26
11:41:28.000000000 +0100
@@ -50,6 +50,28 @@
        }
 },

+{
+       /* Creative BT-D1 */
+       USB_DEVICE(0x041e, 0x0005),
+       .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
+               .ifnum = 1,
+               .type = QUIRK_AUDIO_FIXED_ENDPOINT,
+               .data = &(const struct audioformat) {
+                       .formats = SNDRV_PCM_FMTBIT_S16_LE,
+                       .channels = 2,
+                       .iface = 1,
+                       .altsetting = 1,
+                       .altset_idx = 1,
+                       .endpoint = 0x03,
+                       .ep_attr = USB_ENDPOINT_XFER_ISOC,
+                       .attributes = 0,
+                       .rates = SNDRV_PCM_RATE_CONTINUOUS,
+                       .rate_min = 48000,
+                       .rate_max = 48000,
+               }
+       }
+},
+
 /* Creative/Toshiba Multimedia Center SB-0500 */
 {
        USB_DEVICE(0x041e, 0x3048),

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

* Re: [PATCH] sound: Add support for Creative BT-D1 via usb sound quirks
  2012-12-29 13:26 [PATCH] sound: Add support for Creative BT-D1 via usb sound quirks Alexander Schremmer
@ 2013-01-03  9:58 ` Takashi Iwai
  2013-01-03 11:59   ` Alexander Schremmer
  0 siblings, 1 reply; 4+ messages in thread
From: Takashi Iwai @ 2013-01-03  9:58 UTC (permalink / raw)
  To: Alexander Schremmer; +Cc: Jaroslav Kysela, alsa-devel, linux-kernel

At Sat, 29 Dec 2012 14:26:25 +0100,
Alexander Schremmer wrote:
> 
> From: Alexander Schremmer <alex@alexanderweb.de>
> 
> Support the Creative BT-D1 Bluetooth USB audio device. Before this
> patch, Linux had trouble finding the correct USB descriptors and bailed
> out with these messages:
> 
>  no or invalid class specific endpoint descriptor
> 
> Now it still prints these messages on hotplug:
> 
>  snd-usb-audio: probe of ...:1.0 failed with error -5
>  snd-usb-audio: probe of ...:1.2 failed with error -5
>  snd-usb-audio: probe of ...:1.3 failed with error -5
> 
> But the device works correctly, including the HID support.
> 
> The patch is diff'ed against 3.8-rc1 but should apply to older kernels
> as well.
> 
> Signed-off-by: Alexander Schremmer <alex@alexanderweb.de>

Thanks for the patch.  The changes look OK, but could you fix trivial
coding issues reported by scripts/checkpatch.pl and resend?


Takashi

> 
> ---
> diff -uprN linux-3.8-rc1/sound/usb/quirks-table.h
> linux-3.8-rc1-mod/sound/usb/quirks-table.h
> --- linux-3.8-rc1/sound/usb/quirks-table.h      2012-12-22
> 02:19:00.000000000 +0100
> +++ linux-3.8-rc1-mod/sound/usb/quirks-table.h  2012-12-26
> 11:41:28.000000000 +0100
> @@ -50,6 +50,28 @@
>         }
>  },
> 
> +{
> +       /* Creative BT-D1 */
> +       USB_DEVICE(0x041e, 0x0005),
> +       .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
> +               .ifnum = 1,
> +               .type = QUIRK_AUDIO_FIXED_ENDPOINT,
> +               .data = &(const struct audioformat) {
> +                       .formats = SNDRV_PCM_FMTBIT_S16_LE,
> +                       .channels = 2,
> +                       .iface = 1,
> +                       .altsetting = 1,
> +                       .altset_idx = 1,
> +                       .endpoint = 0x03,
> +                       .ep_attr = USB_ENDPOINT_XFER_ISOC,
> +                       .attributes = 0,
> +                       .rates = SNDRV_PCM_RATE_CONTINUOUS,
> +                       .rate_min = 48000,
> +                       .rate_max = 48000,
> +               }
> +       }
> +},
> +
>  /* Creative/Toshiba Multimedia Center SB-0500 */
>  {
>         USB_DEVICE(0x041e, 0x3048),
> 

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

* Re: [PATCH] sound: Add support for Creative BT-D1 via usb sound quirks
  2013-01-03  9:58 ` Takashi Iwai
@ 2013-01-03 11:59   ` Alexander Schremmer
  2013-01-04  9:56     ` Takashi Iwai
  0 siblings, 1 reply; 4+ messages in thread
From: Alexander Schremmer @ 2013-01-03 11:59 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: Jaroslav Kysela, alsa-devel, linux-kernel

On 03.01.2013 10:58, Takashi Iwai wrote:

> Thanks for the patch.  The changes look OK, but could you fix trivial
> coding issues reported by scripts/checkpatch.pl and resend?

Oops, my sending workflow ate the tabs, here it is again (hopefully now
working correctly):


From: Alexander Schremmer <alex@alexanderweb.de>

Support the Creative BT-D1 Bluetooth USB audio device. Before this
patch, Linux had trouble finding the correct USB descriptors and bailed
out with these messages:

 no or invalid class specific endpoint descriptor

Now it still prints these messages on hotplug:

 snd-usb-audio: probe of ...:1.0 failed with error -5
 snd-usb-audio: probe of ...:1.2 failed with error -5
 snd-usb-audio: probe of ...:1.3 failed with error -5

But the device works correctly, including the HID support.

The patch is diff'ed against 3.8-rc1 but should apply to older kernels
as well.

Signed-off-by: Alexander Schremmer <alex@alexanderweb.de>

---
diff -uprN linux-3.8-rc1/sound/usb/quirks-table.h
linux-3.8-rc1-mod/sound/usb/quirks-table.h
--- linux-3.8-rc1/sound/usb/quirks-table.h	2012-12-22 02:19:00.000000000
+0100
+++ linux-3.8-rc1-mod/sound/usb/quirks-table.h	2012-12-26
11:41:28.000000000 +0100
@@ -50,6 +50,28 @@
 	}
 },

+{
+	/* Creative BT-D1 */
+	USB_DEVICE(0x041e, 0x0005),
+	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
+		.ifnum = 1,
+		.type = QUIRK_AUDIO_FIXED_ENDPOINT,
+		.data = &(const struct audioformat) {
+			.formats = SNDRV_PCM_FMTBIT_S16_LE,
+			.channels = 2,
+			.iface = 1,
+			.altsetting = 1,
+			.altset_idx = 1,
+			.endpoint = 0x03,
+			.ep_attr = USB_ENDPOINT_XFER_ISOC,
+			.attributes = 0,
+			.rates = SNDRV_PCM_RATE_CONTINUOUS,
+			.rate_min = 48000,
+			.rate_max = 48000,
+		}
+	}
+},
+
 /* Creative/Toshiba Multimedia Center SB-0500 */
 {
 	USB_DEVICE(0x041e, 0x3048),


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

* Re: [PATCH] sound: Add support for Creative BT-D1 via usb sound quirks
  2013-01-03 11:59   ` Alexander Schremmer
@ 2013-01-04  9:56     ` Takashi Iwai
  0 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2013-01-04  9:56 UTC (permalink / raw)
  To: Alexander Schremmer; +Cc: Jaroslav Kysela, alsa-devel, linux-kernel

At Thu, 03 Jan 2013 12:59:07 +0100,
Alexander Schremmer wrote:
> 
> On 03.01.2013 10:58, Takashi Iwai wrote:
> 
> > Thanks for the patch.  The changes look OK, but could you fix trivial
> > coding issues reported by scripts/checkpatch.pl and resend?
> 
> Oops, my sending workflow ate the tabs, here it is again (hopefully now
> working correctly):
> 
> 
> From: Alexander Schremmer <alex@alexanderweb.de>
> 
> Support the Creative BT-D1 Bluetooth USB audio device. Before this
> patch, Linux had trouble finding the correct USB descriptors and bailed
> out with these messages:
> 
>  no or invalid class specific endpoint descriptor
> 
> Now it still prints these messages on hotplug:
> 
>  snd-usb-audio: probe of ...:1.0 failed with error -5
>  snd-usb-audio: probe of ...:1.2 failed with error -5
>  snd-usb-audio: probe of ...:1.3 failed with error -5
> 
> But the device works correctly, including the HID support.
> 
> The patch is diff'ed against 3.8-rc1 but should apply to older kernels
> as well.
> 
> Signed-off-by: Alexander Schremmer <alex@alexanderweb.de>

Thanks, applied.


Takashi

> 
> ---
> diff -uprN linux-3.8-rc1/sound/usb/quirks-table.h
> linux-3.8-rc1-mod/sound/usb/quirks-table.h
> --- linux-3.8-rc1/sound/usb/quirks-table.h	2012-12-22 02:19:00.000000000
> +0100
> +++ linux-3.8-rc1-mod/sound/usb/quirks-table.h	2012-12-26
> 11:41:28.000000000 +0100
> @@ -50,6 +50,28 @@
>  	}
>  },
> 
> +{
> +	/* Creative BT-D1 */
> +	USB_DEVICE(0x041e, 0x0005),
> +	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
> +		.ifnum = 1,
> +		.type = QUIRK_AUDIO_FIXED_ENDPOINT,
> +		.data = &(const struct audioformat) {
> +			.formats = SNDRV_PCM_FMTBIT_S16_LE,
> +			.channels = 2,
> +			.iface = 1,
> +			.altsetting = 1,
> +			.altset_idx = 1,
> +			.endpoint = 0x03,
> +			.ep_attr = USB_ENDPOINT_XFER_ISOC,
> +			.attributes = 0,
> +			.rates = SNDRV_PCM_RATE_CONTINUOUS,
> +			.rate_min = 48000,
> +			.rate_max = 48000,
> +		}
> +	}
> +},
> +
>  /* Creative/Toshiba Multimedia Center SB-0500 */
>  {
>  	USB_DEVICE(0x041e, 0x3048),
> 

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

end of thread, other threads:[~2013-01-04  9:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-29 13:26 [PATCH] sound: Add support for Creative BT-D1 via usb sound quirks Alexander Schremmer
2013-01-03  9:58 ` Takashi Iwai
2013-01-03 11:59   ` Alexander Schremmer
2013-01-04  9:56     ` Takashi Iwai

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).