ASoC: sun8i-codec: Constrain to compatible sample rates
authorSamuel Holland <samuel@sholland.org>
Wed, 14 Oct 2020 06:19:35 +0000 (01:19 -0500)
committerMark Brown <broonie@kernel.org>
Mon, 26 Oct 2020 14:57:00 +0000 (14:57 +0000)
commit15b45912341e884a16322792525db7a2b2b9a1f9
treefa30fd0232f5fc86c0114d608eb4377f87f65b2e
parent6c5326bebd4041a21c77b2b96461a97b7f4e39ee
ASoC: sun8i-codec: Constrain to compatible sample rates

While another stream is active, only allow userspace to use sample rates
that are compatible with the current SYSCLK frequency. This ensures the
actual sample rate will always match what is given in hw_params.

Acked-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Link: https://lore.kernel.org/r/20201014061941.4306-12-samuel@sholland.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sunxi/sun8i-codec.c