Skip to content

Commit 89533cb

Browse files
brentlumwasko
authored andcommitted
ssp: mclk/bclk turned off unexpectedly
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>
1 parent 64dae31 commit 89533cb

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

  • src/drivers/intel/ssp

src/drivers/intel/ssp/ssp.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -755,6 +755,14 @@ static int ssp_set_config(struct dai *dai,
755755
}
756756
break;
757757
case SOF_DAI_CONFIG_FLAGS_HW_FREE:
758+
/* disable SSP port if no users */
759+
if (ssp->state[SOF_IPC_STREAM_CAPTURE] != COMP_STATE_PREPARE ||
760+
ssp->state[SOF_IPC_STREAM_PLAYBACK] != COMP_STATE_PREPARE) {
761+
dai_info(dai, "ssp_set_config(): hw_free stage: ignore since there is still user",
762+
dai->index);
763+
break;
764+
}
765+
758766
if (ssp->params.clks_control & SOF_DAI_INTEL_SSP_CLKCTRL_BCLK_ES) {
759767
dai_info(dai, "ssp_set_config(): hw_free stage: releasing BCLK clocks for SSP%d...",
760768
dai->index);

0 commit comments

Comments
 (0)