ASoC: soc-pcm: cleanup soc_pcm_apply_symmetry()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Fri, 15 Jan 2021 04:56:35 +0000 (13:56 +0900)
committerMark Brown <broonie@kernel.org>
Thu, 21 Jan 2021 12:38:21 +0000 (12:38 +0000)
commitfac110cbcddec115c7d4b79d7491aebebbe44469
tree7c47f5ee1abb339813363fe9c1210d4006a1da4f
parentfa31a2c787aeaf61d02b2a57bd9765ca5e67d949
ASoC: soc-pcm: cleanup soc_pcm_apply_symmetry()

soc_pcm_apply_symmetry() want to call snd_pcm_hw_constraint_single()
for rate/channel/sample_bits, but, it needs many condition checks.
These are very similar but different, thus, it needs to have very
verbose code.
This patch use macro for it and make code more simple.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87a6tan6sm.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-pcm.c