Re: [LAU] Dual Delta Setup

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Fons Adriaensen <fons@...>
Cc: <linux-audio-user@...>
Date: Sunday, December 30, 2012 - 11:51 pm

On Sun, Dec 30, 2012 at 3:33 PM, Fons Adriaensen wrote:

We were discussing this on the JACK mailing list for a while, and I
eventually brought this up with the ALSA developers, but the
discussion didn't really go anywhere.

The (not-working) solution in ALSA is to use a 'multi' device. The
problem is that the multi device returns poll descriptors for only one
device, and makes the assumption that when a period of data is
available on one device, there is a period of data available on the
other synced devices as well. Unfortunately, in practice, this isn't
the case. While snd_pcm_link() links the start, stop, drain, pause,
suspend, resume, reset, and prepare operations, it doesn't make the
readiness of the master device's poll descriptor depend on the
readiness of the poll descriptors of the slave devices.

So, you get a situation where poll() returns because there's data on
the master device, but then the 'multi' device indicates there's no
data because it checks all of the devices and returns the minimum
value for the amount of data available, which JACK thinks is an xrun
because the ALSA driver's wait function returns 0 when anything less
than a period's worth of data is available, and a 0 result is
interpreted as an xrun. This results in tons and tons of xruns, as
JACK essentially busy waits until there is actually a period of data
available on all of the devices that make up the multi device.

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

blog - http://surfacepatterns.blogspot.com/
midisnoop - http://midisnoop.googlecode.com/
psinsights - http://psinsights.googlecode.com/
synthclone - http://synthclone.googlecode.com/
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-user

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[LAU] Dual Delta Setup, Ben Bell, (Sat Dec 29, 11:43 am)
Re: [LAU] Dual Delta Setup, drew Roberts, (Sat Dec 29, 6:29 pm)
Re: [LAU] Dual Delta Setup, Ben Bell, (Sun Dec 30, 2:22 pm)
Re: [LAU] Dual Delta Setup, Len Ovens, (Sun Dec 30, 4:55 pm)
Re: [LAU] Dual Delta Setup, Fons Adriaensen, (Sun Dec 30, 2:46 pm)
Re: [LAU] Dual Delta Setup, Ben Bell, (Sun Dec 30, 7:27 pm)
Re: [LAU] Dual Delta Setup, Fons Adriaensen, (Sun Dec 30, 11:33 pm)
Re: [LAU] Dual Delta Setup, Devin Anderson, (Sun Dec 30, 11:51 pm)
Re: [LAU] Dual Delta Setup, Len Ovens, (Mon Dec 31, 1:50 am)
Re: [LAU] Dual Delta Setup, Devin Anderson, (Mon Dec 31, 3:12 am)
Re: [LAU] Dual Delta Setup, Len Ovens, (Wed Jan 2, 11:35 pm)
Re: [LAU] Dual Delta Setup, Joe Hartley, (Thu Jan 3, 12:26 am)
Re: [LAU] Dual Delta Setup, Fons Adriaensen, (Thu Jan 3, 12:05 am)
Re: [LAU] Dual Delta Setup, Len Ovens, (Thu Jan 3, 3:15 am)
Re: [LAU] Dual Delta Setup, John Murphy, (Thu Jan 3, 5:04 am)
Re: [LAU] Dual Delta Setup, Len Ovens, (Mon Dec 31, 2:47 pm)
Re: [LAU] Dual Delta Setup, Paul Davis, (Mon Dec 31, 2:58 pm)
Re: [LAU] Dual Delta Setup, Len Ovens, (Mon Dec 31, 10:33 pm)
Re: [LAU] Dual Delta Setup, Paul Davis, (Tue Jan 1, 4:06 am)
Re: [LAU] Dual Delta Setup, Paul Davis, (Mon Dec 31, 2:03 am)
Re: [LAU] Dual Delta Setup, Devin Anderson, (Mon Dec 31, 2:40 am)
Re: [LAU] Dual Delta Setup, Fons Adriaensen, (Mon Dec 31, 9:24 am)
Re: [LAU] Dual Delta Setup, Paul Davis, (Sun Dec 30, 3:52 pm)
Re: [LAU] Dual Delta Setup, Fons Adriaensen, (Sun Dec 30, 4:27 pm)
Re: [LAU] Dual Delta Setup, Ben Bell, (Sat Dec 29, 10:35 pm)
Re: [LAU] Dual Delta Setup, Len Ovens, (Sat Dec 29, 6:23 pm)
Re: [LAU] Dual Delta Setup, Ben Bell, (Sat Dec 29, 10:31 pm)