ASoC: soc-pcm: only apply symmetry if more than one stream is active
PATCH 1/1 ASoC: soc-pcm: only apply symmetry if more than one stream is active
ALSA documentation indicates that the hw_params() (and prepare()) callbacks can be made multiple times during the life of an individual stream. It is not specified whether hw_free() will be called, nor is it specified whether the parameters will be the same as the last call.
Since symmetry is supposed to be applied between different streams, apply symmetry only when we have more than one activation of the CPU DAI.
Signed-off-by Russell King <[email protected]>
---
Untested, depends on "ASoC: soc-pcm: make symmetry work again"
sound/soc/soc-pcm.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
sound/soc/soc-pcm.c +5 -3
@@ -1010,9 +1010,11 @@ static int soc_pcm_hw_params(struct snd_pcm_substream *substream, } component =NULL ; - ret =soc_pcm_params_symmetry (substream, params); -if (ret) - goto component_err; +if (cpu_dai->active >1 ) { + ret =soc_pcm_params_symmetry (substream, params); +if (ret) + goto component_err; + }/* store the parameters for each DAIs */ cpu_dai->rate =params_rate (params);
Signature · 1 line
2.7.4