[LAU] re Zoom R16

Atte atte at youmail.dk
Sun Feb 23 18:18:27 UTC 2014


On 02/23/2014 05:52 PM, sub_acoustic wrote:
> Hi,
>
> Excuse my ignorance, but how to I recompile a kernel with the quirk? Or if
> you could direct me to the information
> I can't find any straightforward instructions anywhere...

Here's what I did:

1) placed the quirks in a file (/usr/src/zoom_quirks.h)

2) included it in the build by adding a line to 
/usr/src/linux/sound/usb/quirks_table.h:
#include "../../../zoom_quirks.h"

It might be more direct to add the the quirk intry directly in 
/usr/src/linux/sound/usb/quirks_table.h, but this way it survives across 
different kernel builds and is easier to fiddle with.

Here's the content of zoom_quirks.h (between ---begin--- and ---end---, 
remember the first character of the file is "{" the last is ",":

---begin---
{
     /* 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
             },
             {
                 .ifnum = 1,
                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
             },
             {
                 .ifnum = 2,
                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
             },
             {
                 .ifnum = 3,
                 .type = QUIRK_MIDI_STANDARD_INTERFACE
             },

             {
                 .ifnum = 4,
                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
                 .data = & (const struct audioformat) {
                     .formats = SNDRV_PCM_FMTBIT_S24_LE,
                     .channels = 8,
                     .iface = 1,
                     .altsetting = 1,
                     .altset_idx = 1,
                     .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
                     .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 = .1
             },


         }

     }

},
---end---

Hope that helps!
-- 
Atte

http://atte.dk   http://modlys.dk


More information about the Linux-audio-user mailing list