Re: [Jack-Devel] ALSA PCM multi plugin and xruns

PrevNext  Index
DateSat, 08 Dec 2012 16:51:41 -0800
From Devin Anderson <[hidden] at gmail dot com>
ToJack devel <[hidden] at lists dot jackaudio dot org>
In-Reply-ToDevin Anderson Re: [Jack-Devel] ALSA PCM multi plugin and xruns
Follow-UpDevin Anderson Re: [Jack-Devel] ALSA PCM multi plugin and xruns
On Sat, Dec 8, 2012 at 3:57 AM, Devin Anderson
<[hidden]> wrote:

> I read through the ALSA multi plugin source a bit.  I now see that
> poll descriptors are only returned for one device (the *master*
> device), while the amount of available samples is calculated by
> looking at all the slave devices and returning the minimum amount of
> samples available.  This leads me to believe that the poll descriptors
> indicate that there is data available on the master device, but there
> isn't any data available on one of the other slave devices.

It turns out I'm wrong about this.

I added some errors messages to the multi plugin in alsa-lib, and have
found that:

1.) Both of the Layla 3Gs have the same amount of frames available
regardless of whether the xrun onslaught is happening.  So, when 32 is
reported back as the amount of frames available, both of the devices
have 32 frames available, despite the period size being 256.
2.) When one device has an *actual* xrun (e.g.
`snd_pcm_multi_avail_update` returns -EPIPE), the other one does too.
I haven't been able to generate a situation where only one device
generates an xrun.

This makes me think that the Layla 3Gs are synced, even though
`snd_pcm_avail_update` is returning a value such that
(snd_pcm_avail_update() % PERIOD_SIZE) != 0.  I'm confused about this.

Also, I've found that this situation can happen without an xrun.  For
example, the xrun onslaught sometimes happens immediately after I
start JACK.

If anyone has any ideas on what might be happening or where I should
dig next, please let me know.

Thanks,

-- 
Devin Anderson
surfacepatterns (at) gmail (dot) com

blog - http://surfacepatterns.blogspot.com/
psinsights - http://psinsights.googlecode.com/
synthclone - http://synthclone.googlecode.com/
PrevNext  Index

1355014309.14390_0.ltw:2, <CAG7zqTp=ouOqqqTraaG4=7Fzbyj851zBj11=BnkYLoJnTn6Krw at mail dot gmail dot com>