• Peter Ujfalusi's avatar
    ASoC: tlv320aic31xx: Fix master mode clock I2S bus clocks · d460b3f8
    Peter Ujfalusi authored
    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: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
    Reviewed-by: default avatarJyri Sarha <jsarha@ti.com>
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    d460b3f8
tlv320aic31xx.c 43.5 KB