7 Mar
2011
7 Mar
'11
1:09 p.m.
On Mon, Mar 07, 2011 at 05:26:03PM +0530, Vaibhav Bedia wrote:
Currently the symmetric rate check is present in the snd_pcm_open() call. However this causes snd_pcm_open() to fail for the 2nd substream is the 2nd call to snd_pcm_open() is made before the 1st substream has set a non-zero rate by calling snd_pcm_hw_params().
Fix this by moving the call to snd_pcm_apply_symmetry() to soc_pcm_hw_params().
This means that applications won't be constrained by the current settings so can't automatically choose the required rate. ALSA is just fundamentally racy here, if you want to reliably open bidirectional streams you need to serialise the startup of the two directions.