[alsa-devel] [PATCH] ALSA: usb-audio: Add a quirk for Nura's first gen headset
Martin Peres
martin.peres at free.fr
Tue Jan 16 09:58:44 CET 2018
On 14/01/18 18:05, Martin Peres wrote:
> The capture interface does not work, and the playback interface
> actually supports only 48kHz unlike what is advertised (44.1, 32, 22,
> 16, 8).
>
> The only unknown here is if there are other devices that use the same
> product ID, but given that this ID is currently unknown, I would assume
> it is specially allocated for the nura headset.
>
> Signed-off-by: Martin Peres <martin.peres at free.fr>
Cc: Stable <stable at vger.kernel.org>
Is there anything else I need to do? Get more testers maybe? I have
reported bugs here before (and had a nice interaction with Takashi Iwai)
but this is my first patch to this subsystem (I am an Intel/Nouveau/DRM
developer).
For more information on how I got to this patch:
http://www.mupuf.org/blog/2018/01/14/nura-headphones-on-linux/
> ---
> sound/usb/quirks-table.h | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 48 insertions(+)
>
> diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h
> index 8a59d4782a0f..50252046b01d 100644
> --- a/sound/usb/quirks-table.h
> +++ b/sound/usb/quirks-table.h
> @@ -3277,4 +3277,52 @@ AU0828_DEVICE(0x2040, 0x7270, "Hauppauge", "HVR-950Q"),
> }
> },
>
> +{
> + /*
> + * Nura's first gen headphones use Cambridge Silicon Radio's vendor
> + * ID, but it looks like the product ID actually is only for Nura.
> + * The capture interface does not work at all (even on Windows),
> + * and only the 48 kHz sample rate works for the playback interface.
> + */
> + USB_DEVICE(0x0a12, 0x1243),
> + .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_AUDIO_STANDARD_MIXER,
> + },
> + /* Capture */
> + {
> + .ifnum = 1,
> + .type = QUIRK_IGNORE_INTERFACE,
> + },
> + /* Playback */
> + {
> + .ifnum = 2,
> + .type = QUIRK_AUDIO_FIXED_ENDPOINT,
> + .data = &(const struct audioformat) {
> + .formats = SNDRV_PCM_FMTBIT_S16_LE,
> + .channels = 2,
> + .iface = 2,
> + .altsetting = 1,
> + .altset_idx = 1,
> + .attributes = UAC_EP_CS_ATTR_FILL_MAX |
> + UAC_EP_CS_ATTR_SAMPLE_RATE,
> + .endpoint = 0x03,
> + .ep_attr = USB_ENDPOINT_XFER_ISOC,
> + .rates = SNDRV_PCM_RATE_48000,
> + .rate_min = 48000,
> + .rate_max = 48000,
> + .nr_rates = 1,
> + .rate_table = (unsigned int[]) {
> + 48000
> + }
> + }
> + },
> + }
> + }
> +},
> +
> #undef USB_DEVICE_VENDOR_SPEC
>
More information about the Alsa-devel
mailing list