Skip to content

Commit

Permalink
ssp: mclk/bclk turned off unexpectedly
Browse files Browse the repository at this point in the history
The implementation does not take the state of both directions into
consideration. If host opens both TX/RX PCM devices then close one PCM
device, the ssp driver will close the mclk/bclk immediately regardless
the state of the other PCM device.

Signed-off-by: Brent Lu <brent.lu@intel.com>
  • Loading branch information
brentlu authored and lgirdwood committed Sep 6, 2021
1 parent ad402bc commit 287a5f9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/drivers/intel/ssp/ssp.c
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,14 @@ static int ssp_set_config_tplg(struct dai *dai, struct ipc_config_dai *common_co
}
break;
case SOF_DAI_CONFIG_FLAGS_HW_FREE:
/* disable SSP port if no users */
if (ssp->state[SOF_IPC_STREAM_CAPTURE] != COMP_STATE_PREPARE ||
ssp->state[SOF_IPC_STREAM_PLAYBACK] != COMP_STATE_PREPARE) {
dai_info(dai, "ssp_set_config(): hw_free stage: ignore since there is still user",
dai->index);
break;
}

if (ssp->params.clks_control & SOF_DAI_INTEL_SSP_CLKCTRL_BCLK_ES) {
dai_info(dai, "ssp_set_config(): hw_free stage: releasing BCLK clocks for SSP%d...",
dai->index);
Expand Down

0 comments on commit 287a5f9

Please sign in to comment.