Re: re Zoom R16

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
What is the difference between .ifnum and .iface?    is the first (ifnum) a reference to the usb bus?
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

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.

here is the zoom-quirks.h quirks table.

{
/* 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 = "" struct snd_usb_audio_quirk[]) {
      {
    .ifnum = 0,
    .type = QUIRK_IGNORE_INTERFACE
      },

      {
    .ifnum = 1,
    .type = QUIRK_AUDIO_STANDARD_INTERFACE
      },

      {
    .ifnum = 2,
        .type = QUIRK_AUDIO_FIXED_ENDPOINT,
        .data = "" (const struct audioformat) {
      .formats = (SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S8 |
               SNDRV_PCM_FMTBIT_U16_LE | SNDRV_PCM_FMTBIT_S16_LE |
               SNDRV_PCM_FMTBIT_U16_BE | SNDRV_PCM_FMTBIT_S16_BE |
               SNDRV_PCM_FMTBIT_U24_LE | SNDRV_PCM_FMTBIT_S24_LE |
               SNDRV_PCM_FMTBIT_U24_BE | SNDRV_PCM_FMTBIT_S24_BE |
               SNDRV_PCM_FMTBIT_U24_3LE | SNDRV_PCM_FMTBIT_S24_3LE |
               SNDRV_PCM_FMTBIT_U24_3BE | SNDRV_PCM_FMTBIT_S24_3BE |
               SNDRV_PCM_FMTBIT_U32_LE | SNDRV_PCM_FMTBIT_S32_LE |
               SNDRV_PCM_FMTBIT_U32_BE | SNDRV_PCM_FMTBIT_S32_BE),
      .channels = 2,
      .iface = 2,
      .altsetting = 1,
      .altset_idx = 1,
      .attributes = 0,
      .endpoint = 0x03, /*PLAYBACK*/
      .ep_attr = USB_ENDPOINT_XFER_ISOC,
      .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 = 4,
     .type = QUIRK_AUDIO_FIXED_ENDPOINT,
     .data = "" (const struct audioformat) {
        .formats = (SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S8 |
               SNDRV_PCM_FMTBIT_U16_LE | SNDRV_PCM_FMTBIT_S16_LE |
               SNDRV_PCM_FMTBIT_U16_BE | SNDRV_PCM_FMTBIT_S16_BE |
               SNDRV_PCM_FMTBIT_U24_LE | SNDRV_PCM_FMTBIT_S24_LE |
               SNDRV_PCM_FMTBIT_U24_BE | SNDRV_PCM_FMTBIT_S24_BE |
               SNDRV_PCM_FMTBIT_U24_3LE | SNDRV_PCM_FMTBIT_S24_3LE |
               SNDRV_PCM_FMTBIT_U24_3BE | SNDRV_PCM_FMTBIT_S24_3BE |
               SNDRV_PCM_FMTBIT_U32_LE | SNDRV_PCM_FMTBIT_S32_LE |
               SNDRV_PCM_FMTBIT_U32_BE | SNDRV_PCM_FMTBIT_S32_BE),
        .channels = 8,
        .iface = 1,
        .altsetting = 1,
        .altset_idx = 1,
        .attributes = 0,
        .endpoint = 0x84, /*CAPTURE*/
        .ep_attr = USB_ENDPOINT_XFER_ISOC,
        .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
      },


    }

  }

},


here is  the excerpt from kern.log

Mar 10 09:35:17 super-R720 kernel: [   98.846039] usb 1-1: new high-speed USB device number 4 using ehci-pci
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
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
Mar 10 09:35:17 super-R720 kernel: [   98.975307] usb 1-1: New USB device found, idVendor=1686, idProduct=00dd
Mar 10 09:35:17 super-R720 kernel: [   98.975310] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Mar 10 09:35:17 super-R720 kernel: [   98.975312] usb 1-1: Product: R16
Mar 10 09:35:17 super-R720 kernel: [   98.975314] usb 1-1: Manufacturer: ZOOM Corporation
Mar 10 09:35:17 super-R720 kernel: [   98.975316] usb 1-1: SerialNumber: 0
Mar 10 09:35:22 super-R720 kernel: [  104.032341] 4:1:1: cannot get freq at ep 0x3
Mar 10 09:35:27 super-R720 kernel: [  109.033070] usbcore: registered new interface driver snd-usb-audio

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?

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.
Otherwise the bitrate descriptors are listed around about here:
www.cs.fsu.edu/~baker/devices/lxr/http/source/linux/include/sound/asound.h#L203


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


On Fri, Mar 7, 2014 at 2:04 PM, jmancine [via Linux Audio] <[hidden email]> wrote:
Still no duplex.  In fact, no playback.

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.

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


If you reply to this email, your message will be added to the discussion below:
http://linux-audio.4202.n7.nabble.com/re-Zoom-R16-tp87487p89731.html
To unsubscribe from re Zoom R16, click here.
NAML



--
James Stewart Miller Bsc(hons) Psych.


View this message in context: Re: re Zoom R16
Sent from the linux-audio-user mailing list archive at Nabble.com.
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@xxxxxxxxxxxxxxxxxxxx
http://lists.linuxaudio.org/listinfo/linux-audio-user

[Index of Archives]     [Linux Sound]     [ALSA Users]     [Pulse Audio]     [ALSA Devel]     [Sox Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux