]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: soc-pcm: check symmetry before hw_params
authorShengjiu Wang <shengjiu.wang@nxp.com>
Tue, 12 Nov 2019 10:46:42 +0000 (18:46 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 20 Nov 2019 17:16:27 +0000 (17:16 +0000)
commitb1b70c6cd8fc09474eb8245fb0a3d401188ddaac
treeb74d83e539eba2c4299142089697514ae8841ee6
parente1e79c1a97daaa446ecea561aafb8452eddcebe6
ASoC: soc-pcm: check symmetry before hw_params

This reverts commit cafa592e42071 (ASoC: soc-pcm: check symmetry after
hw_params).

That commit cause soc_pcm_params_symmetry can't take effect.
cpu_dai->rate, cpu_dai->channels and cpu_dai->sample_bits
are updated in the middle of soc_pcm_hw_params, so move
soc_pcm_params_symmetry to the end of soc_pcm_hw_params is
not a good solution, for judgement of symmetry in the function
is always true.

FIXME:
According to the comments of that commit, I think the case
described in the commit should disable symmetric_rates
in Back-End, rather than changing the position of
soc_pcm_params_symmetry.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1573555602-5403-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-pcm.c