Commit 957ce0c6b8a1 ("ASoC: soc-pcm: check symmetry after hw_params") moved the check for symmetry after we have set the cpu_dai's rate, channels and sample width to those in the params. The symmetry check verifies that the cpu dai's stored parameters are the same as those in the params. Since we have only just stored these parameters, this makes the symmetry checks always pass. Fix this by moving the symmetry check before we store the parameters, but after the parameters have been fixed up. Fixes: 957ce0c6b8a1 ("ASoC: soc-pcm: check symmetry after hw_params") Signed-off-by: Russell King <rmk+kernel@xxxxxxxxxxxxxxx> --- Not tested: this is something I stumbled over while reading the code. v2: also fixes the incorrect whitespace indentation copied from the original patch. sound/soc/soc-pcm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 08ee163504e8..2a4246dbe55f 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -1010,15 +1010,16 @@ 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; + /* store the parameters for each DAIs */ cpu_dai->rate = params_rate(params); cpu_dai->channels = params_channels(params); cpu_dai->sample_bits = snd_pcm_format_physical_width(params_format(params)); - ret = soc_pcm_params_symmetry(substream, params); - if (ret) - goto component_err; out: mutex_unlock(&rtd->pcm_mutex); return ret; -- 2.7.4 _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx https://mailman.alsa-project.org/mailman/listinfo/alsa-devel