Skip to content

Instantly share code, notes, and snippets.

@f0ff886f
Created April 10, 2014 10:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save f0ff886f/10363990 to your computer and use it in GitHub Desktop.
Save f0ff886f/10363990 to your computer and use it in GitHub Desktop.
From 85d30acf32f70cac11b873c48c2063d82857c390 Mon Sep 17 00:00:00 2001
From: Rowan Lewis <rl@nbsp.io>
Date: Wed, 9 Apr 2014 13:28:09 +0300
Subject: [PATCH] Added quirks for Zoom R16 device.
Not working as an output device yet, the device expects 24bit audio, but
appears to be sent 32bit instead.
---
sound/usb/quirks-table.h | 74 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 74 insertions(+)
diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h
index f5f0595..0789d16 100644
--- a/sound/usb/quirks-table.h
+++ b/sound/usb/quirks-table.h
@@ -3104,6 +3104,78 @@ YAMAHA_DEVICE(0x7010, "UB99"),
}
},
+/* ZOOM R16 in USB 2.0 mode */
+{
+ USB_DEVICE(0x1686, 0x00dd),
+ .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
+ },
+ /* PLAYBACK */
+ {
+ .ifnum = 1,
+ .type = QUIRK_AUDIO_FIXED_ENDPOINT,
+ .data = &(const struct audioformat) {
+ .formats = SNDRV_PCM_FMTBIT_S24_LE,
+ .channels = 2,
+ .iface = 0,
+ .altsetting = 1,
+ .altset_idx = 1,
+ .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
+ .endpoint = 0x03,
+ .ep_attr = 9,
+ .rates = SNDRV_PCM_RATE_44100 |
+ SNDRV_PCM_RATE_48000 |
+ SNDRV_PCM_RATE_88200 |
+ SNDRV_PCM_RATE_96000,
+ .rate_min = 44100,
+ .rate_max = 96000,
+ .nr_rates = 4,
+ .rate_table = (unsigned int[]) {
+ 44100, 48000, 88200, 96000
+ }
+ }
+ },
+ /* CAPTURE */
+ {
+ .ifnum = 2,
+ .type = QUIRK_AUDIO_FIXED_ENDPOINT,
+ .data = &(const struct audioformat) {
+ .formats = SNDRV_PCM_FMTBIT_S24_LE,
+ .channels = 8,
+ .iface = 0,
+ .altsetting = 1,
+ .altset_idx = 1,
+ .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
+ .endpoint = 0x84,
+ .ep_attr = 13,
+ .rates = SNDRV_PCM_RATE_44100 |
+ SNDRV_PCM_RATE_48000 |
+ SNDRV_PCM_RATE_88200 |
+ SNDRV_PCM_RATE_96000,
+ .rate_min = 44100,
+ .rate_max = 96000,
+ .nr_rates = 4,
+ .rate_table = (unsigned int[]) {
+ 44100, 48000, 88200, 96000
+ }
+ }
+ },
+ {
+ .ifnum = 3,
+ .type = QUIRK_MIDI_STANDARD_INTERFACE
+ },
+ {
+ .ifnum = .1
+ },
+ }
+ }
+},
+
{
/*
* Some USB MIDI devices don't have an audio control interface,
@@ -3131,4 +3203,6 @@ YAMAHA_DEVICE(0x7010, "UB99"),
}
},
+
+
#undef USB_DEVICE_VENDOR_SPEC
--
1.9.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment