ASoC: davinci-mcasp: Set rule constraints if implicit BCLK divider is used
authorJyri Sarha <jsarha@ti.com>
Fri, 20 Mar 2015 11:31:08 +0000 (13:31 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 24 Mar 2015 17:19:43 +0000 (10:19 -0700)
commita75a053f1eefbbbbae0f7d6bf1ed12ce012112b7
tree12d884faf49d96e56b577061fabba3d10f28898b
parent66e618857ca46433741bf97ceca1b425387400b1
ASoC: davinci-mcasp: Set rule constraints if implicit BCLK divider is used

Set rule constraints to allow only combinations of sample-rate,
sample-format, and channels counts that can be played/captured with
reasonable sample-rate accuracy.

The logic with tdm-slots and serializers (=i2s data wires) goes like
this: The first wire will take all channels up to number of tdm-slots,
before following wires (if any) are used. If the first wire is used
fully, the remaining wires share the same clocks and the divider can
be calculated for the first wire.

Also, takes the number of tdm-slots into account when implicitly
selecting the BLCK divider.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/davinci/davinci-mcasp.c