From: Panu Matilainen <pmatilai@laiskiainen.org>
To: Ricard Wanderlof <ricard.wanderlof@axis.com>
Cc: Takashi Iwai <tiwai@suse.de>,
"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Subject: Re: Zoom R16/24 playback slient
Date: Tue, 6 Oct 2015 12:40:15 +0300 [thread overview]
Message-ID: <561396FF.70804@laiskiainen.org> (raw)
In-Reply-To: <alpine.DEB.2.02.1510060847350.19610@lnxricardw1.se.axis.com>
On 10/06/2015 10:02 AM, Ricard Wanderlof wrote:
>
> On Wed, 30 Sep 2015, Panu Matilainen wrote:
>
>> My memory is a bit hazy on the details, but the automatically detected
>> SNDRV_PCM_FMTBIT_S32 (which iirc means the actual 24bit values are
>> carried in 32bit chunks) seems to be the right thing for the device,
>> forcing it to something else just makes things worse. IIRC. The delay
>> was a key part, but not enough.
>>
>> Another finding from my last round in the spring I do remember clearly,
>> is that enabling both the input and output interfaces makes things hang
>> up (timeouts and nothing really works). But if you disable the input
>> interface and enable the output interface, you get an apparently working
>> playback stream. Only no sound comes out. If you disable the output and
>> enable input, capture itself works fine.
>
> Having dived into this, and looking carefully at the data produced by the
> Windows driver, it appears that what's happening is that the driver stuffs
> a 32-bit length specifier at the start of each isochronous data packet.
>
> So, for instance, instead of transferring the sample data
>
> 00 12 bf 34 00 98 87 76 00 3c 24 35 00 86 75 64 .. .. (40 bytes)
>
> the Zoom driver would send:
>
> 28 00 00 00 00 12 bf 34 00 98 87 76 00 3c 24 35 00 86 75 64 ... (44 bytes)
>
> No wonder the Zoom gets confused when it gets sent ordinary sample data,
> and tries to interpret the first sample value as a length.
>
> There doesn't seem to be anything in the ALSA USB driver to do this, and
> I'm thinking it's Zoom specific (perhaps to overcome some deficiency in
> the hardware (or USB firmware) in the R16?).
FWIW, while poking around the source I spotted this in sound/usb/midi.c:
/*
* Novation USB MIDI protocol: number of data bytes is in the first byte
* (when receiving) (+1!) or in the second byte (when sending); data begins
* at the third byte.
*/
Just goes to show such quirks are not previously unheard-of. It's MIDI
so the details differ, but perhaps a similar approach could be used for
PCM too.
- Panu -
prev parent reply other threads:[~2015-10-06 9:40 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-29 20:19 Zoom R16/24 playback slient Ricard Wanderlof
2015-09-30 6:43 ` Panu Matilainen
2015-09-30 8:05 ` Ricard Wanderlof
2015-09-30 8:34 ` Panu Matilainen
2015-09-30 11:27 ` Ricard Wanderlof
2015-09-30 21:44 ` Ricard Wanderlof
2015-10-02 6:51 ` Ricard Wanderlof
2015-09-30 9:45 ` Panu Matilainen
2015-10-06 6:47 ` Ricard Wanderlof
2015-10-06 7:16 ` Panu Matilainen
2015-10-06 8:16 ` Ricard Wanderlof
2015-10-07 10:05 ` Keith A. Milner
2015-10-06 7:02 ` Ricard Wanderlof
2015-10-06 7:40 ` Panu Matilainen
2015-10-06 8:18 ` Ricard Wanderlof
2015-10-07 7:53 ` Ricard Wanderlof
2015-10-07 8:44 ` Panu Matilainen
2015-10-06 9:40 ` Panu Matilainen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=561396FF.70804@laiskiainen.org \
--to=pmatilai@laiskiainen.org \
--cc=alsa-devel@alsa-project.org \
--cc=ricard.wanderlof@axis.com \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.