Skip to content

Commit d65892b

Browse files
author
Jyri Sarha
committed
ASoC: SOF: Intel: Force global capture hw mute according to DSP power
Force global capture hw mute to muted state when DSP is powered down. This is done by calling snd_ipc4_global_capture_hw_mute_force() from hda_dsp_set_power_state_ipc4(). Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
1 parent ac691ee commit d65892b

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

sound/soc/sof/intel/hda-dsp.c

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
#include "hda.h"
2727
#include "mtl.h"
2828
#include "hda-ipc.h"
29+
#ifdef CONFIG_SND_SOC_SOF_IPC4
30+
#include "../ipc4-priv.h"
31+
#endif
2932

3033
#define EXCEPT_MAX_HDR_SIZE 0x400
3134
#define HDA_EXT_ROM_STATUS_SIZE 8
@@ -752,11 +755,22 @@ int hda_dsp_set_power_state_ipc4(struct snd_sof_dev *sdev,
752755
const struct sof_dsp_power_state *target_state)
753756
{
754757
/* Return without doing anything if the DSP is already in the target state */
758+
int ret;
759+
755760
if (target_state->state == sdev->dsp_power_state.state &&
756761
target_state->substate == sdev->dsp_power_state.substate)
757762
return 0;
758763

759-
return hda_dsp_set_power_state(sdev, target_state);
764+
ret = hda_dsp_set_power_state(sdev, target_state);
765+
766+
#ifdef CONFIG_SND_SOC_SOF_IPC4
767+
if (ret >= 0)
768+
snd_ipc4_global_capture_hw_mute_force(sdev,
769+
target_state->state == SOF_DSP_PM_D3 ?
770+
true : false);
771+
#endif
772+
773+
return ret;
760774
}
761775
EXPORT_SYMBOL_NS(hda_dsp_set_power_state_ipc4, "SND_SOC_SOF_INTEL_HDA_COMMON");
762776

0 commit comments

Comments
 (0)