]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ASoC: es8328: Let device auto detect ratios in slave mode
authorRomain Perier <romain.perier@collabora.com>
Wed, 1 Mar 2017 09:11:05 +0000 (10:11 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 6 Mar 2017 10:40:15 +0000 (11:40 +0100)
commitae884ae78a238c36e4abfdb53d4659d5fca67433
tree3fb96b84c881ce0a534169585970452645edfc69
parentc1ae3cfa0e89fa1a7ecc4c99031f5e9ae99d9201
ASoC: es8328: Let device auto detect ratios in slave mode

In master mode, SCLK and LRCLK signals are generated by the CODEC when
any of the ADC/DAC are enabled. SCLK is derived from MCLK via a
programmable division set by BLK_DIV, LRCLK is derived from MCLK via
another programmable division set by ADCFsRatio/DACFsRatio.

In slave mode, SCLK and LRCLK signals are received as inputs and
supplied externally. LRCLK and SCLK must be synchronously derived from
MCLK with specific rates. The device can auto detect MCLK/LRCLK ratio
according to a predefined table. LRCLK/SCLK ratio is usually 64 (SCLK =
64 * LRCLK)

This commits adds support to let to device auto detect and decide which
ratio to use. The mclkdiv2 and BCLK_DIV ratio and put to zero.

Signed-off-by: Romain Perier <romain.perier@collabora.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/es8328.c