Skip to contentSkip to conversation

Zoom R16 (USB), will a quirk make it work

DISCUSSION Jani Frilander 2 participants 6 messages Feb 2, 2010 – Feb 3, 2010

lore
Share & tools
lore
#0 lore raw

Hi.

I have a Zoom R16 which audio interface part doesn't work with linux.

lsusb -v:
Bus 001 Device 004: ID 1686:00dd ZOOM Corporation
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 255 Vendor Specific Class
bDeviceSubClass 0
bDeviceProtocol 255
bMaxPacketSize0 64
idVendor 0x1686 ZOOM Corporation
idProduct 0x00dd
bcdDevice 0.02

 iManufacturer           1 ZOOM Corporation
 iProduct                2 R16
 iSerial                 3 0
 bNumConfigurations      1
 Configuration Descriptor:
   bLength                 9
   bDescriptorType         2
   wTotalLength          259
   bNumInterfaces          4
   bConfigurationValue     1
   iConfiguration          0
   bmAttributes         0x80
     (Bus Powered)
   MaxPower              480mA
   Interface Descriptor:
     bLength                 9
     bDescriptorType         4
     bInterfaceNumber        0
     bAlternateSetting       0
     bNumEndpoints           0
     bInterfaceClass       255 Vendor Specific Class
     bInterfaceSubClass      1
     bInterfaceProtocol      0
     iInterface              0
     ** UNRECOGNIZED:  0b 24 01 00 01 35 00 03 01 02 03
     ** UNRECOGNIZED:  0c 24 02 05 01 01 00 02 03 00 00 00
     ** UNRECOGNIZED:  09 24 03 08 01 03 00 05 00
     ** UNRECOGNIZED:  0c 24 02 09 01 02 00 08 00 00 00 00
     ** UNRECOGNIZED:  09 24 03 0c 01 01 00 09 00
   Interface Descriptor:
     bLength                 9
     bDescriptorType         4
     bInterfaceNumber        1
     bAlternateSetting       0
     bNumEndpoints           0
     bInterfaceClass       255 Vendor Specific Class
     bInterfaceSubClass      2
     bInterfaceProtocol      0
     iInterface              0
   Interface Descriptor:
     bLength                 9
     bDescriptorType         4
     bInterfaceNumber        1
     bAlternateSetting       1
     bNumEndpoints           1
     bInterfaceClass       255 Vendor Specific Class
     bInterfaceSubClass      2
     bInterfaceProtocol      0
     iInterface              0
     ** UNRECOGNIZED:  07 24 01 05 01 01 00
     ** UNRECOGNIZED:  14 24 02 01 02 04 18 04 44 ac 00 80 bb 00 88

58 01 00 77 01
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x03 EP 3 OUT
bmAttributes 9
Transfer Type Isochronous
Synch Type Adaptive
Usage Type Data
wMaxPacketSize 0x006c 1x 108 bytes
bInterval 1
Interface Descriptor:

     bLength                 9
     bDescriptorType         4
     bInterfaceNumber        2
     bAlternateSetting       0
     bNumEndpoints           0
     bInterfaceClass       255 Vendor Specific Class
     bInterfaceSubClass      2
     bInterfaceProtocol      0
     iInterface              0
   Interface Descriptor:
     bLength                 9
     bDescriptorType         4
     bInterfaceNumber        2
     bAlternateSetting       1
     bNumEndpoints           1
     bInterfaceClass       255 Vendor Specific Class
     bInterfaceSubClass      2
     bInterfaceProtocol      0
     iInterface              0
     ** UNRECOGNIZED:  07 24 01 0c 01 01 00
     ** UNRECOGNIZED:  14 24 02 01 08 04 18 04 44 ac 00 80 bb 00 88

58 01 00 77 01
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x84 EP 4 IN
bmAttributes 13
Transfer Type Isochronous
Synch Type Synchronous
Usage Type Data
wMaxPacketSize 0x01a0 1x 416 bytes
bInterval 1
Interface Descriptor:

     bLength                 9
     bDescriptorType         4
     bInterfaceNumber        3
     bAlternateSetting       0
     bNumEndpoints           2
     bInterfaceClass       255 Vendor Specific Class
     bInterfaceSubClass      3
     bInterfaceProtocol      0
     iInterface              0
     ** UNRECOGNIZED:  07 24 01 00 01 41 00
     ** UNRECOGNIZED:  06 24 02 01 01 00
     ** UNRECOGNIZED:  06 24 02 02 02 00
     ** UNRECOGNIZED:  09 24 03 01 03 01 02 01 00
     ** UNRECOGNIZED:  09 24 03 02 04 01 01 01 00
     Endpoint Descriptor:
       bLength                 7
       bDescriptorType         5
       bEndpointAddress     0x01  EP 1 OUT
       bmAttributes            2
         Transfer Type            Bulk
         Synch Type               None
         Usage Type               Data
       wMaxPacketSize     0x0040  1x 64 bytes
       bInterval               0
     Endpoint Descriptor:
       bLength                 7
       bDescriptorType         5
       bEndpointAddress     0x82  EP 2 IN
       bmAttributes            2
         Transfer Type            Bulk
         Synch Type               None
         Usage Type               Data
       wMaxPacketSize     0x0040  1x 64 bytes
       bInterval               0

Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 255 Vendor Specific Class
bDeviceSubClass 0
bDeviceProtocol 255
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0001
Self Powered

I have added following lines to usbquirks.h:
/* Zoom R16 */
{
.match_flags = USB_DEVICE_ID_MATCH_DEVICE, .idVendor = 0x1686,
.idProduct = 0x00dd, .bInterfaceClass = USB_CLASS_AUDIO,
},

But it doesn't work.

If I try to play a
file with mplayer:

$ mplayer -msglevel ao=9 -ao alsa:device=hw=2 piisi.mp3
MPlayer UNKNOWN-4.4.1 (C) 2000-2009 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing piisi.mp3.
Audio only file format detected.
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 44100 Hz, 2 ch, s16le, 128.0 kbit/9.07% (ratio: 16000->176400) Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
Trying preferred audio driver 'alsa', options 'device=hw=2'
alsa-init: requested format: 44100 Hz, 2 channels, 9
alsa-init: using ALSA 1.0.20
alsa-init: setup for 1/2 channel(s)
alsa-init: using device hw:2
alsa-init: pcm opened in blocking mode
[AO_ALSA] Format s16le is not supported by hardware, trying default. [AO_ALSA] Unable to set format: Invalid argument
Failed to initialize audio driver 'alsa:device=hw=2'
Could not open/initialize audio device -> no sound.
Audio: no sound
Video: no video

$ cat /proc/asound/cards
 0 [Audigy         ]: Audigy - SB Audigy 1 [SB0090]
                     SB Audigy 1 [SB0090] (rev.3, serial:0x511102) at
0x9c00, irq 17
 1 [NVidia         ]: HDA-Intel - HDA NVidia
                     HDA NVidia at 0xfe024000 irq 27
 2 [R16            ]: USB-Audio - R16
                     ZOOM Corporation R16 at usb-0000:00:0b.1-6, high speed
$ ls /dev/snd/
by-id      controlC2  midiC0D0  midiC2D0  pcmC0D2c  pcmC1D0p  seq
by-path    hwC0D0     midiC0D1  pcmC0D0c  pcmC0D2p  pcmC1D1p  timer
controlC0  hwC0D2     midiC0D2  pcmC0D0p  pcmC0D3p  pcmC2D0c
controlC1  hwC1D0     midiC0D3  pcmC0D1c  pcmC1D0c  pcmC2D0p

What can i do to make it work? I have a wireshark log of a winxp session. Does it help a bit?

http://sites.google.com/site/zoomr16linux/zoomwire.bz2

Thanks for any advice.

Sincerely, Jani Frilander

#1 lore raw
Quoted 3 lines · Jani Frilander

I have a Zoom R16 which audio interface part doesn't work with linux.

lsusb -v:

Thanks. Please try the following quirk entry:

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

If I try to play a file with mplayer:

$ mplayer -msglevel ao=9 -ao alsa:device=hw=2 piisi.mp3
...
[AO_ALSA] Format s16le is not supported by hardware, trying default.

I don't know why there was an audio device at all (in theory, your quirk entry shouldn't have worked), but the device supports only 24-bit samples, so use "plughw" instead of "hw" (or better "default" for software mixing).

HTH
Clemens

#2 lore raw

2010/2/2 Clemens Ladisch <[email protected]>:

Quoted 6 lines

Thanks.  Please try the following quirk entry:

HTH

Recompiled, rebooted and plugged the device. dmesg trace:

[ 1874.615303] usb 1-6: new high speed USB device using ehci_hcd and address 3
[ 1874.951036] usb 1-6: config 1 interface 3 altsetting 0 bulk
endpoint 0x1 has invalid maxpacket 64
[ 1874.951047] usb 1-6: config 1 interface 3 altsetting 0 bulk
endpoint 0x82 has invalid maxpacket 64
[ 1874.952380] usb 1-6: configuration #1 chosen from 1 choice
[ 1876.044143] ALSA usbaudio.c:1293: 3:1:1: cannot get freq at ep 0x3
[ 1882.045108] ALSA usbaudio.c:1293: 3:2:1: cannot get freq at ep 0x84
[ 1887.045410] snd: bad kfree (called from ffffffffa0dbba4f)
[ 1887.045420] Pid: 3190, comm: modprobe Tainted: P
2.6.31-9-rt #152-Ubuntu
[ 1887.045425] Call Trace:
[ 1887.045464]  [<ffffffffa0aca28c>] snd_hidden_kfree+0x8c/0x90 [snd]
[ 1887.045492]  [<ffffffffa0dbba4f>] free_substream+0x4f/0x70 [snd_usb_audio]
[ 1887.045506]  [<ffffffffa0dbba96>] snd_usb_audio_pcm_free+0x26/0x70
[snd_usb_audio]
[ 1887.045530]  [<ffffffffa0b262e3>] snd_pcm_free+0x53/0x90 [snd_pcm]
[ 1887.045548]  [<ffffffffa0b2632d>] snd_pcm_dev_free+0xd/0x10 [snd_pcm]
[ 1887.045569]  [<ffffffffa0ad1ac9>] snd_device_free+0x79/0x160 [snd]
[ 1887.045587]  [<ffffffffa0ad1c14>] snd_device_free_all+0x64/0xa0 [snd]
[ 1887.045605]  [<ffffffffa0acae7e>] snd_card_do_free+0x3e/0x140 [snd]
[ 1887.045623]  [<ffffffffa0acbfa9>] snd_card_free+0xa9/0xd0 [snd]
[ 1887.045638]  [<ffffffffa0dbbda8>] ? snd_usb_create_quirk+0x18/0x50
[snd_usb_audio]
[ 1887.045655]  [<ffffffffa0dbe38b>] ?
create_composite_quirk+0x6b/0xb0 [snd_usb_audio]
[ 1887.045670]  [<ffffffffa0dc0845>] usb_audio_probe+0x775/0xad0 [snd_usb_audio]
[ 1887.045682]  [<ffffffff8118b579>] ? sysfs_addrm_finish+0x49/0x150
[ 1887.045689]  [<ffffffff8118b926>] ? __sysfs_add_one+0x26/0xf0
[ 1887.045696]  [<ffffffff8118ba17>] ? sysfs_add_one+0x27/0x150
[ 1887.045706]  [<ffffffff813ac747>] usb_probe_interface+0xb7/0x1a0
[ 1887.045714]  [<ffffffff81329037>] really_probe+0x67/0x170
[ 1887.045720]  [<ffffffff81329170>] ? __driver_attach+0x0/0xa0
[ 1887.045726]  [<ffffffff81329163>] driver_probe_device+0x23/0x30
[ 1887.045732]  [<ffffffff81329203>] __driver_attach+0x93/0xa0
[ 1887.045738]  [<ffffffff81329170>] ? __driver_attach+0x0/0xa0
[ 1887.045745]  [<ffffffff81328488>] bus_for_each_dev+0x68/0x90
[ 1887.045751]  [<ffffffff81328eb9>] driver_attach+0x19/0x20
[ 1887.045757]  [<ffffffff81328739>] bus_add_driver+0xc9/0x2e0
[ 1887.045763]  [<ffffffff813294f8>] driver_register+0x78/0x140
[ 1887.045772]  [<ffffffff81541047>] ? notifier_call_chain+0x47/0x90
[ 1887.045782]  [<ffffffff813abb4c>] usb_register_driver+0xdc/0x150
[ 1887.045796]  [<ffffffffa007c000>] ? snd_usb_audio_init+0x0/0x43
[snd_usb_audio]
[ 1887.045810]  [<ffffffffa007c041>] snd_usb_audio_init+0x41/0x43
[snd_usb_audio]
[ 1887.045821]  [<ffffffff8100a047>] do_one_initcall+0x37/0x1a0
[ 1887.045829]  [<ffffffff81097497>] sys_init_module+0xd7/0x230
[ 1887.045839]  [<ffffffff81012102>] system_call_fastpath+0x16/0x1b
[ 1887.045932] snd-usb-audio: probe of 1-6:1.0 failed with error -5
[ 1887.046056] usbcore: registered new interface driver snd-usb-audio
$ cat /proc/asound/cards
 0 [Audigy         ]: Audigy - SB Audigy 1 [SB0090]
                      SB Audigy 1 [SB0090] (rev.3, serial:0x511102) at
0x9c00, irq 17
 1 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xfe024000 irq 27

Alsa driver version is 1.0.22.1.

-Jani

#4 lore raw
In reply to Clemens Ladisch

2010/2/2 Clemens Ladisch <[email protected]>:

Quoted 9 lines

                       {
                               .ifnum = .1 #< Is this a typo? Should be -1? },

I don't know why there was an audio device at all (in theory, your quirk entry shouldn't have worked), but the device supports only 24-bit samples, so use "plughw" instead of "hw" (or better "default" for software mixing).

No sound with plughw.

-Jani

#5 lore raw

Current status of Zoom R16 quirk:

Control surface works, it sends midi events.

Audio doesn't work. When using plughw with aplay, no sound can be heard. Aplay just seems to play the file happily. Sample rate on the LCD changes accordingly.

When using plughw with mplayer, the device freezes. It reacts the USB-disconnect button anymore. Mplayer also starts playback happily, but no sound comes out.

I really would like to get this work. Thanks to everyone in advance.

-Jani F.