[alsa-devel] [PATCH] ALSA: ASoC: move dma_data from snd_soc_dai to snd_soc_pcm_stream
jhnikula at gmail.com
Fri Mar 19 10:14:27 CET 2010
On Fri, 19 Mar 2010 08:56:40 +0200
Peter Ujfalusi <peter.ujfalusi at nokia.com> wrote:
> At least the OMAP code should not be affected by the bug, that you have with the
> pxa-ssp. I think the bug could be also fixed within the pxa code, since the
> whole thing goes down to inconsistent memory management within the pxa code.
> Having said that, I do think having separate dma_data for each streams is a
> really good idea.
> One thing that I can think of in OMAP case, where this could fix a nasty race
> condition is (have never seen it, but it is in theory possible):
> Also in duplex case, when the second hw_param gets called after the first
> omap_mcbsp_hw_params, and before the omap_pcm_hw_params for the first stream.
> The second omap_mcbsp_hw_params will override the dma_data, thus we would set
> bogus parameters for the first stream.
There shouldn't be this kind of race in OMAP since the soc_pcm_hw_params
protects the hw_params calls with a mutex and the omap_pcm_hw_params
takes a copy from parameters passed from DAI driver's hw_params.
But yes, I agree that the stream specific dma_data is good idea.
> For the omap-mcbsp.c and omap-pcm.c changes:
> Acked-by: Peter Ujfalusi <peter.ujfalusi at nokia.com>
Acked-by: Jarkko Nikula <jhnikula at gmail.com>
More information about the Alsa-devel