]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: da7219: Expose BCLK and WCLK control through CCF
authorAdam Thomson <Adam.Thomson.Opensource@diasemi.com>
Tue, 19 Mar 2019 17:49:31 +0000 (17:49 +0000)
committerMark Brown <broonie@kernel.org>
Thu, 21 Mar 2019 14:50:17 +0000 (14:50 +0000)
commit32d4531bc8b0d3be9c3012308406935fdcd1a851
tree681c1ff5bf7027128e4926aaf0845e3e1effb0ff
parentb3dbc219b2a58e10493081f167150b8e952e56fa
ASoC: da7219: Expose BCLK and WCLK control through CCF

For the purposes of platforms which use the codec as DAI clock
master for the CPU and other codec devices, there is the need to
not only expose the clock gating of BCLK and WCLK but also the
ability to set those rates without going through the ASoC APIs.

To make this possible, the previous CCF implementation in the
driver has been extended to separate BCLK and WCLK out. WCLK is
the parent clock to BCLK, and is also the clock gate for both.
BCLK in HW is a factor/multiplier of WCLK so derives from whatever
SR is chosen for WCLK, hence the need to make it a child of WCLK
for the purposes of CCF. Enabling/disabling either BCLK or WCLK
will result in clocks being ungated/gated accordingly. To simplify
matters, these clocks can only be configured if the codec is set
as master, otherwise CCF control is disallowed.

Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/da7219.h
sound/soc/codecs/da7219.c
sound/soc/codecs/da7219.h