Skip to content

Commit

Permalink
intel: ssp: check mclk always-on quirk in ssp_remove
Browse files Browse the repository at this point in the history
Dynamic pipeline breaks mclk always-on feature by freeing dai
component in HW_FREE stage; the ssp_remove() will be called and
disables mclk unconditionally.

Signed-off-by: Brent Lu <[email protected]>
  • Loading branch information
brentlu committed Nov 17, 2023
1 parent 1e0fe65 commit f4d4988
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/drivers/intel/ssp/ssp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1195,9 +1195,18 @@ static int ssp_probe(struct dai *dai)

static int ssp_remove(struct dai *dai)
{
struct ssp_pdata *ssp = dai_get_drvdata(dai);

pm_runtime_put_sync(SSP_CLK, dai->index);

ssp_mclk_disable_unprepare(dai);
/*
* dai comp will be freed during HW_FREE stage if dynamic pipeline is
* enabled; need to check the MCLK_AON quirk to see if we need to keep
* MCLK on even when dai comp is going to be freed
*/
if (!(ssp->params.clks_control & SOF_DAI_INTEL_SSP_CLKCTRL_MCLK_AON))
ssp_mclk_disable_unprepare(dai);

ssp_bclk_disable_unprepare(dai);

/* Disable SSP power */
Expand Down

0 comments on commit f4d4988

Please sign in to comment.