• Peter Ujfalusi's avatar
    ASoC: TWL4030: AIF/APLL fix in DAPM domain · 7b4c734e
    Peter Ujfalusi authored
    This patch orders the APLL and AIF power sequence in
    case of HiFi (audio in TWL4030 terms) playback/capture.
    
    We also need to make sure that the AIF is running during
    playback/capture, when there is no valid DAPM route
    available. For this purpose I introduce these virtual
    widgets:
    /* To have complete playback route all the time */
    DAPM_OUTPUT("Virtual HiFi OUT") /* Will keep AIF/APLL enabled */
    
    /* To have complete capture route all the time */
    DAPM_INPUT("Virtual HiFi IN") /* Will keep AIF/APLL enabled */
    
    /* To have complete playback route for the voice module */
    DAPM_OUTPUT("Virtual Voice OUT") /* Will keep APLL enabled */
    
    The DAPM_SUPPLY widgets for APLL and AIF are placed in a way,
    that during any audio activity the needed configuration of AIF
    and APLL will be enabled (playback, capture, analog loopback,
    digital loopback, and voice activity).
    
    The apll reference counting code has been lifted,
    and modified from Liam Girdwood's earlier patch.
    Signed-off-by: default avatarPeter Ujfalusi <peter.ujfalusi@nokia.com>
    Acked-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
    Signed-off-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
    7b4c734e
twl4030.c 71.6 KB