ASoC: sun8i-codec: Enforce symmetric DAI parameters
authorSamuel Holland <samuel@sholland.org>
Wed, 14 Oct 2020 06:19:32 +0000 (01:19 -0500)
committerMark Brown <broonie@kernel.org>
Mon, 26 Oct 2020 14:56:57 +0000 (14:56 +0000)
The AIFs have a single register controlling DAI parameters in both
directions, including BCLK/LRCK divisor and word size. The DAIs produce
only noise or silence if any of these parameters is wrong. Therefore, we
need to enforce symmetry for these parameters, so starting a new
substream will not break an existing substream.

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

index 49e763d1891bc37ff30ad998d658ef14fcbea100..21104e6e889245e109cb8d0a297ad97abdd0da05 100644 (file)
@@ -425,6 +425,9 @@ static struct snd_soc_dai_driver sun8i_codec_dais[] = {
                        .rates          = SNDRV_PCM_RATE_8000_192000,
                        .formats        = SNDRV_PCM_FMTBIT_S16_LE,
                },
+               .symmetric_rates        = true,
+               .symmetric_channels     = true,
+               .symmetric_samplebits   = true,
        },
 };