]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ASoC: bcm2835: Enforce full symmetry
authorMatthias Reichl <hias@horus.com>
Wed, 8 Nov 2017 20:03:32 +0000 (21:03 +0100)
committerMark Brown <broonie@kernel.org>
Fri, 10 Nov 2017 21:26:03 +0000 (21:26 +0000)
bcm2835's configuration registers can't be changed when a stream
is running, which means asymmetric configurations aren't supported.

Channel and rate symmetry are already enforced by constraints
but samplebits had been missed.

As hw_params doesn't check for symmetry constraints by itself
and just returns success if a stream is running this led to
situations where asymmetric configurations were seeming to
succeed but of course didn't work because the hardware wasn't
configured at all.

Fix this by adding the missing samplerate symmetry constraint.

Signed-off-by: Matthias Reichl <hias@horus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/bcm/bcm2835-i2s.c

index f4b778ed350b6d98a6d521af472e7e23f21f4cf2..111b4ef7ce35da1c060783cfaaea9437ecbecf1c 100644 (file)
@@ -737,7 +737,8 @@ static struct snd_soc_dai_driver bcm2835_i2s_dai = {
                                | SNDRV_PCM_FMTBIT_S32_LE
                },
        .ops = &bcm2835_i2s_dai_ops,
-       .symmetric_rates = 1
+       .symmetric_rates = 1,
+       .symmetric_samplebits = 1,
 };
 
 static bool bcm2835_i2s_volatile_reg(struct device *dev, unsigned int reg)