From 91a1557041410fb303574ceb0494b23dd56a8db3 Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Wed, 5 Jun 2024 17:31:12 +0300 Subject: [PATCH] ASoC: SOF: Intel: hda-pcm: Follow the pause_supported flag to drop PAUSE support If the stream's pause_supported is false and the DMI_L1 is not forced via a module parameter then disable the pause push/release support for the PCM. Signed-off-by: Peter Ujfalusi --- sound/soc/sof/intel/hda-pcm.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sound/soc/sof/intel/hda-pcm.c b/sound/soc/sof/intel/hda-pcm.c index 9fb8521b896ba0..79c2ae7534f47b 100644 --- a/sound/soc/sof/intel/hda-pcm.c +++ b/sound/soc/sof/intel/hda-pcm.c @@ -240,6 +240,13 @@ int hda_dsp_pcm_open(struct snd_sof_dev *sdev, if (hda_always_enable_dmi_l1 && direction == SNDRV_PCM_STREAM_CAPTURE) runtime->hw.info &= ~SNDRV_PCM_INFO_PAUSE; + /* + * Follow the hint and disable the pause push/release support if the + * DMI_L1 is not forced by a module parameter + */ + if (!spcm->stream[substream->stream].pause_supported && !hda_always_enable_dmi_l1) + runtime->hw.info &= ~SNDRV_PCM_INFO_PAUSE; + if (hda_always_enable_dmi_l1 || direction == SNDRV_PCM_STREAM_PLAYBACK || spcm->stream[substream->stream].d0i3_compatible)