XRUN handling with SND_PCM_MULTI
Hi,
This probably was discussed with the introduction of a pcm_multi device--how to maintain sample-synch.
One possability is when a XRUN is seen on one of the devices, reset that device alone. This breaks sample-synch, for example if half the channels didn't see a XRUN and the other half did, suddenly time has become discontiguous--the half that saw the XRUN is now "ahead" of the half that didn't when you replay the program material.
So do you want to:
1: silence the XRUNning card so that sample-synch is maintained
2: remove good data from the NON-XRUNning card(s)
3: ignore it
I can't figure out what currently happens--currently if two devices try to run snd_pcm_period_elapsed in interrupt context the machine will potentially deadlock as both interrupts try to take the spinlock, each waiting on the other to release it.
Thoughts are welcome.
_J
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Quoted 15 lines · Jeremy Hall
Hi,
This probably was discussed with the introduction of a
pcm_multidevice--how to maintain sample-synch.One possability is when a XRUN is seen on one of the devices, reset that device alone. This breaks sample-synch, for example if half the channels didn't see a XRUN and the other half did, suddenly time has become discontiguous--the half that saw the XRUN is now "ahead" of the half that didn't when you replay the program material.
So do you want to:
1: silence the XRUNning card so that sample-synch is maintained
Quoted 8 lines
2: remove good data from the NON-XRUNning card(s)
3: ignore it
I can't figure out what currently happens--currently if two devices try to run
snd_pcm_period_elapsedin interrupt context the machine will potentially deadlock as both interrupts try to take the spinlock, each waiting on the other to release it.
The deadlock is fixed in CVS. All linked streams will be in same state at same time. On other hand, the actual multi plugin doesn't handle clock drift, so if streams have different clock sources, there will be generated an error (XRUN) after some time.
Jaroslav
-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf