summaryrefslogtreecommitdiff
path: root/sound/soc/soc-pcm.c
AgeCommit message (Collapse)AuthorFilesLines
2011-10-14ASoC: core: Add flag to ignore pmdown_time at pcm_closePeter Ujfalusi1-4/+11
With this flag codec drivers can indicate that it is desired to ignore the pmdown_time for DAPM shutdown sequence when playback stream is stopped. The DAPM sequence will be executed without delay in this case. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-21ASoC: soc-core: symmetry checking for each DAIs separatelyDong Aisheng1-15/+25
The orginal code does not cover the case that one DAI such as codec may be shared between other two DAIs(CPU). When do symmetry checking, altough the codec DAI requires symmetry, the two CPU DAIs may still be configured to run on different rates. We change to check each DAI's state separately instead of only checking the dai link to prevent this issue. Signed-off-by: Dong Aisheng <b29396@freescale.com> Tested-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-17Merge branch 'for-3.1' into for-3.2Mark Brown1-0/+3
2011-08-17ASoC: Fix check for symmetric rate enforcementSascha Hauer1-0/+3
The ASoC core tries to not enforce symmetric rates when two streams open simultaneously. It does so by checking rtd->rate being zero. This works exactly once after booting because it is not set to zero again when the streams close. Fix this by setting rtd->rate when no active stream is left. [This leads to lots of warnings about not enforcing the symmetry in some situations as there's a race in the userspace API where we know we've got two applications but don't know what rates they want to set. -- broonie ] Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-15ASoC: soc-pcm: Remove unused global mutexAxel Lin1-2/+0
Since commit b8c0dab9bf3373010e857a8d3f1b594c60a348dd "ASoC: core - PCM mutex per rtd", the global pcm_mutex is not being used any more. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-09ASoC: pcm - rename snd_codec_close() to snd_pcm_close().Liam Girdwood1-2/+2
Make sure we follow naming convention for all PCM ops. Signed-off-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-09ASoC: core - PCM mutex per rtdLiam Girdwood1-14/+14
In preparation for the new ASoC Dynamic PCM support (AKA DSP support). The new ASoC Dynamic PCM core allows DAIs to be dynamically re-routed at runtime between the PCM device end (or Frontend - FE) and the physical DAI (Backend - BE) using regular kcontrols (just like a hardware CODEC routes audio in the analog domain). The Dynamic PCM core therefore must be able to call PCM operations for both the Frontend and Backend(s) DAIs at the same time. Currently we have a global pcm_mutex that is used to serialise the ASoC PCM operations. This patch removes the global mutex and adds a mutex per RTD allowing the PCM operations to be reentrant and allow control of more than one DAI at at time. e.g. a frontend PCM hw_params() could configure multiple backend DAI hw_params() with similar or different hw parameters at the same time. Signed-off-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-09ASoC: core - Separate out PCM operations into new file.Liam Girdwood1-0/+639
In preparation for Dynamic PCM support (AKA DSP support). There will be future patches that add support to allow PCMs to be dynamically routed to multiple DAIs at startup and also during stream runtime. This patch moves the ASoC core PCM operaitions into a new file called soc-pcm.c. This will in simplify the ASoC core features into distinct files. Signed-off-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>