ASoC: tlv320aic31xx: Fix master mode clock I2S bus clocks
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Wed, 14 Feb 2018 12:20:56 +0000 (14:20 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 14 Feb 2018 13:15:55 +0000 (13:15 +0000)
commitd460b3f861e18b9c826abe178b2db57c6dc6b3e4
treea9d1bdae8e380bbe39e1e83408b65583ea7dc22c
parentf2e6f95b4b1381fe81cdbdb70d2c50a85b770d8b
ASoC: tlv320aic31xx: Fix master mode clock I2S bus clocks

In the reset state of the codec we do not have complete playback or capture
routes.

The audio playback/capture will not work due to missing clock signals on
the I2S bus if PLL, MDAC/NDAC/DAC MADC/NADC/ADC is powered down.

To make sure that even if all output/input is disconnected the codec is
generating clocks, we need to have valid DAPM route in every case to power
up the must needed parts of the codec.

I have verified that switching DAC (during playback) or ADC (during
capture) will stop the I2S clocks, so the only solution is to connect the
'Off' routes as well to output/input.

The routes will be only added if the codec is clock master. In case the
role changes runtime, the applied routes are removed.

Tested on am43x-epos-evm with aic3111 codec in master mode.

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