<div dir="ltr"><div>Hmm, I have been compiling my kernel for a couple of days now and no joy.  I have the information from lsusb -vv, cat /proc/asound/R16/stream0 / 1, etc but I'm a little confused about the terminology of quirks-table.h.<br>
</div><div>What is the difference between .ifnum and .iface?    is the first (ifnum) a reference to the usb bus?<br></div><div>When I put the working zoom-quirks.h through, I get capture on interface 1 and playback on interface 2 listed under one stream in cat /proc/asound/R16/stream0 , when I try the zoom-quirks.h that I include below, I get two playback streams, one listed at /proc/asound/R16/stream0 and the other at /proc/asound/R16/stream1<br>
<br></div><div>Notice that I have put a bunch of sample formats so that the correct one can be selected.  I don't think that this covers the problem though if you read in my excerpt from kern.log, it complains that ep 3 can set freq.<br>
<br></div><div>here is the zoom-quirks.h quirks table.<br><br>{<br>/* ZOOM R16 in USB 2.0 mode */<br>USB_DEVICE(0x1686, 0x00dd),<br>.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {<br>.ifnum = QUIRK_ANY_INTERFACE,<br>
.type = QUIRK_COMPOSITE,<br>.data = (const struct snd_usb_audio_quirk[]) {<br>      {<br>    .ifnum = 0,<br>    .type = QUIRK_IGNORE_INTERFACE<br>      },<br><br>      {<br>    .ifnum = 1,<br>    .type = QUIRK_AUDIO_STANDARD_INTERFACE<br>
      },<br><br>      {<br>    .ifnum = 2,<br>        .type = QUIRK_AUDIO_FIXED_ENDPOINT,<br>        .data = & (const struct audioformat) {<br>      .formats = (SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S8 |<br>               SNDRV_PCM_FMTBIT_U16_LE | SNDRV_PCM_FMTBIT_S16_LE |<br>
               SNDRV_PCM_FMTBIT_U16_BE | SNDRV_PCM_FMTBIT_S16_BE |<br>               SNDRV_PCM_FMTBIT_U24_LE | SNDRV_PCM_FMTBIT_S24_LE |<br>               SNDRV_PCM_FMTBIT_U24_BE | SNDRV_PCM_FMTBIT_S24_BE |<br>               SNDRV_PCM_FMTBIT_U24_3LE | SNDRV_PCM_FMTBIT_S24_3LE |<br>
               SNDRV_PCM_FMTBIT_U24_3BE | SNDRV_PCM_FMTBIT_S24_3BE |<br>               SNDRV_PCM_FMTBIT_U32_LE | SNDRV_PCM_FMTBIT_S32_LE |<br>               SNDRV_PCM_FMTBIT_U32_BE | SNDRV_PCM_FMTBIT_S32_BE),<br>      .channels = 2,<br>
      .iface = 2,<br>      .altsetting = 1,<br>      .altset_idx = 1,<br>      .attributes = 0,<br>      .endpoint = 0x03, /*PLAYBACK*/<br>      .ep_attr = USB_ENDPOINT_XFER_ISOC,<br>      .rates = (SNDRV_PCM_RATE_44100 |<br>
                   SNDRV_PCM_RATE_48000 |<br>                   SNDRV_PCM_RATE_88200 |<br>                   SNDRV_PCM_RATE_96000),<br>          .rate_min = 44100,<br>          .rate_max = 96000,<br>          .nr_rates = 4,<br>
          .rate_table = (unsigned int[]) {<br>                     44100, 48000, 88200, 96000<br>               }<br>        }<br>      }, <br><br>      {<br>    .ifnum = 3,<br>    .type = QUIRK_MIDI_STANDARD_INTERFACE<br>
      },<br><br>      {<br>     .ifnum = 4,<br>     .type = QUIRK_AUDIO_FIXED_ENDPOINT,<br>     .data = & (const struct audioformat) {<br>        .formats = (SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S8 |<br>               SNDRV_PCM_FMTBIT_U16_LE | SNDRV_PCM_FMTBIT_S16_LE |<br>
               SNDRV_PCM_FMTBIT_U16_BE | SNDRV_PCM_FMTBIT_S16_BE |<br>               SNDRV_PCM_FMTBIT_U24_LE | SNDRV_PCM_FMTBIT_S24_LE |<br>               SNDRV_PCM_FMTBIT_U24_BE | SNDRV_PCM_FMTBIT_S24_BE |<br>               SNDRV_PCM_FMTBIT_U24_3LE | SNDRV_PCM_FMTBIT_S24_3LE |<br>
               SNDRV_PCM_FMTBIT_U24_3BE | SNDRV_PCM_FMTBIT_S24_3BE |<br>               SNDRV_PCM_FMTBIT_U32_LE | SNDRV_PCM_FMTBIT_S32_LE |<br>               SNDRV_PCM_FMTBIT_U32_BE | SNDRV_PCM_FMTBIT_S32_BE),<br>        .channels = 8,<br>
        .iface = 1,<br>        .altsetting = 1,<br>        .altset_idx = 1,<br>        .attributes = 0,<br>        .endpoint = 0x84, /*CAPTURE*/<br>        .ep_attr = USB_ENDPOINT_XFER_ISOC,<br>        .rates = (SNDRV_PCM_RATE_44100 |<br>
        SNDRV_PCM_RATE_48000 |<br>        SNDRV_PCM_RATE_88200 |<br>        SNDRV_PCM_RATE_96000),<br>        .rate_min = 44100,<br>        .rate_max = 96000,<br>        .nr_rates = 4,<br>        .rate_table = (unsigned int[]) {<br>
        44100, 48000, 88200, 96000<br>      }<br>    }<br>      },<br><br><br><br>      {<br>    .ifnum = .1<br>      },<br><br><br>    }<br><br>  }<br><br>},<br><br><br></div><div>here is  the excerpt from kern.log<br><br>
Mar 10 09:35:17 super-R720 kernel: [   98.846039] usb 1-1: new high-speed USB device number 4 using ehci-pci<br>Mar 10 09:35:17 super-R720 kernel: [   98.974688] usb 1-1: config 1 interface 3 altsetting 0 bulk endpoint 0x1 has invalid maxpacket 64<br>
Mar 10 09:35:17 super-R720 kernel: [   98.974693] usb 1-1: config 1 interface 3 altsetting 0 bulk endpoint 0x82 has invalid maxpacket 64<br>Mar 10 09:35:17 super-R720 kernel: [   98.975307] usb 1-1: New USB device found, idVendor=1686, idProduct=00dd<br>
Mar 10 09:35:17 super-R720 kernel: [   98.975310] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3<br>Mar 10 09:35:17 super-R720 kernel: [   98.975312] usb 1-1: Product: R16<br>Mar 10 09:35:17 super-R720 kernel: [   98.975314] usb 1-1: Manufacturer: ZOOM Corporation<br>
Mar 10 09:35:17 super-R720 kernel: [   98.975316] usb 1-1: SerialNumber: 0<br>Mar 10 09:35:22 super-R720 kernel: [  104.032341] 4:1:1: cannot get freq at ep 0x3<br>Mar 10 09:35:27 super-R720 kernel: [  109.033070] usbcore: registered new interface driver snd-usb-audio<br>
<br></div><div>I'm fairly certain that I've got the wrong interface number but I have found it virtually impossible to find any documentation on the nomenclature used in quirks-table.h.  For instance what is the difference between ifnum and iface?<br>
<br></div><div>Also, I notice that several source code files, like stream.c for instance, have quirks built in to them, so perhaps I could explicitly set the sample rate format for the playback stream when the stream is created in the source code.<br>
</div><div>Otherwise the bitrate descriptors are listed around about here:<br><a href="http://www.cs.fsu.edu/~baker/devices/lxr/http/source/linux/include/sound/asound.h#L203" target="_top" rel="nofollow" link="external">www.cs.fsu.edu/~baker/devices/lxr/http/source/linux/include/sound/asound.h#L203</a><br>
</div><div><br><br></div><div>I'm guessing that where a bit rate descriptor has the letter S it stands for signed and the one with U stands for unsigned, I don't know if that would make a difference.  My brief foray into the source code so far leaves me with the impression that I should be able to create both capture and playback on the same interface, using the alt setting, but how the format works for that is beyond me at the moment, although I plan to spend tomorrow morning reading through the source code!.<br>
</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Mar 7, 2014 at 2:04 PM, jmancine [via Linux Audio] <span dir="ltr"><<a href="/user/SendEmail.jtp?type=node&node=89770&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>></span> wrote:<br>
<blockquote style='border-left:2px solid #CCCCCC;padding:0 1em' class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

        Still no duplex.  In fact, no playback.
<br><br>I have narrowed the issue down to a problem with the nitrate being set to 32 instead of 24.  This happens despite specifically setting 24 in the .formats section of the quirk.  On the recording side it doesn't seem to matter because the device is doing the encoding at 24 and the PC is receiving at 32...not ideal, but it functions because 24 bits fit into 32.   But for playback, the PC is sending a 32 bit stream to a device that can only decode 24...and it crashes.
<br><br>If you go back through this thread, I posted the various settings I tried for .formats -- there are likely many that I have not tested.  Perhaps there is another way to force 24 bits

        
        
        
        <br>
        <br>
        <hr color="#cccccc" noshade size="1">
        <div style="color:#444;font:12px tahoma,geneva,helvetica,arial,sans-serif">
                <div style="font-weight:bold">If you reply to this email, your message will be added to the discussion below:</div>
                <a href="http://linux-audio.4202.n7.nabble.com/re-Zoom-R16-tp87487p89731.html" target="_blank" rel="nofollow" link="external">http://linux-audio.4202.n7.nabble.com/re-Zoom-R16-tp87487p89731.html</a>
        </div>
        <div style="color:#666;font:11px tahoma,geneva,helvetica,arial,sans-serif;margin-top:.4em;line-height:1.5em">
                
                To unsubscribe from re Zoom R16, <a href="" target="_blank" rel="nofollow" link="external">click here</a>.<br>

                <a href="http://linux-audio.4202.n7.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" rel="nofollow" style="font:9px serif" target="_blank" link="external">NAML</a>
        </div></blockquote></div><br><br clear="all"><br>-- <br>James Stewart Miller Bsc(hons) Psych.<br><div style="padding:0px;margin-left:0px;margin-top:0px;overflow:hidden;word-wrap:break-word;color:black;font-size:10px;text-align:left;line-height:130%">
</div><div style="padding:0px;margin-left:0px;margin-top:0px;overflow:hidden;word-wrap:break-word;color:black;font-size:10px;text-align:left;line-height:130%"></div><div style="padding:0px;margin-left:0px;margin-top:0px;overflow:hidden;word-wrap:break-word;color:black;font-size:10px;text-align:left;line-height:130%">
</div>
</div>


        
        
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://linux-audio.4202.n7.nabble.com/re-Zoom-R16-tp87487p89770.html">Re: re Zoom R16</a><br/>
Sent from the <a href="http://linux-audio.4202.n7.nabble.com/linux-audio-user-f5.html">linux-audio-user mailing list archive</a> at Nabble.com.<br/>