• Ranjani Sridharan's avatar
    ASoC: SOF: ipc4-pcm: reset all pipelines during FE DAI hw_free · 225f37b5
    Ranjani Sridharan authored
    Do not reset pipelines during the stop/suspend triggers in the BE DAI
    ops as the BE DAI pipeline needs to be left in the PAUSED state. It should
    only be reset during hw_free. This simplification is already done for
    the FE pipelines and the DAI trigger only toggles the states between
    PAUSED and RUNNING.
    
    But because the FE DAI hw_free is invoked first and all the pipelines are
    freed during this op, we need to make sure that the BE DAI pipeline also
    gets reset before it is freed. So do not skip the pipelines that have the
    skip_during_fe_trigger flag set when resetting pipelines.
    
    Also, because the pipeline state changes are split between the FE and BE
    DAI ops now, protect the BE DAI pipeline state changes with the
    pipeline_state_mutex as well.
    
    Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com
    Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
    Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com
    Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com
    Link: https://lore.kernel.org/r/20230515112022.30297-3-peter.ujfalusi@linux.intel.com
    Signed-off-by: Mark Brown <broonie@kernel.org
    225f37b5
ipc4-pcm.c 25.2 KB