mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 11:03:43 +02:00
ASoC: SOF: Intel: only detect codecs when HDA DSP
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>: SDW codecs use the global HDaudio WAKEEN/STS to detect wakes since LNL. But the wakeen is handled in the SDW driver. We should filter the bus->codec_mask to only include HDA and IDISP codecs to avoid clearing the wakeen status before it is handled.
This commit is contained in:
commit
4c14b076e8
|
|
@ -260,9 +260,6 @@ void hda_codec_detect_mask(struct snd_sof_dev *sdev)
|
|||
sof_debug_check_flag(SOF_DBG_FORCE_NOCODEC))
|
||||
return;
|
||||
|
||||
/* Accept unsolicited responses */
|
||||
snd_hdac_chip_updatel(bus, GCTL, AZX_GCTL_UNSOL, AZX_GCTL_UNSOL);
|
||||
|
||||
/* detect codecs */
|
||||
if (!bus->codec_mask) {
|
||||
bus->codec_mask = snd_hdac_chip_readw(bus, STATESTS);
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ int hda_dsp_ctrl_clock_power_gating(struct snd_sof_dev *sdev, bool enable)
|
|||
}
|
||||
EXPORT_SYMBOL_NS(hda_dsp_ctrl_clock_power_gating, "SND_SOC_SOF_INTEL_HDA_COMMON");
|
||||
|
||||
int hda_dsp_ctrl_init_chip(struct snd_sof_dev *sdev)
|
||||
int hda_dsp_ctrl_init_chip(struct snd_sof_dev *sdev, bool detect_codec)
|
||||
{
|
||||
struct hdac_bus *bus = sof_to_bus(sdev);
|
||||
struct hdac_stream *stream;
|
||||
|
|
@ -220,7 +220,11 @@ int hda_dsp_ctrl_init_chip(struct snd_sof_dev *sdev)
|
|||
}
|
||||
usleep_range(1000, 1200);
|
||||
|
||||
hda_codec_detect_mask(sdev);
|
||||
/* Accept unsolicited responses */
|
||||
snd_hdac_chip_updatel(bus, GCTL, AZX_GCTL_UNSOL, AZX_GCTL_UNSOL);
|
||||
|
||||
if (detect_codec)
|
||||
hda_codec_detect_mask(sdev);
|
||||
|
||||
/* clear stream status */
|
||||
list_for_each_entry(stream, &bus->stream_list, list) {
|
||||
|
|
|
|||
|
|
@ -870,7 +870,7 @@ static int hda_resume(struct snd_sof_dev *sdev, bool runtime_resume)
|
|||
snd_sof_pci_update_bits(sdev, PCI_TCSEL, 0x07, 0);
|
||||
|
||||
/* reset and start hda controller */
|
||||
ret = hda_dsp_ctrl_init_chip(sdev);
|
||||
ret = hda_dsp_ctrl_init_chip(sdev, false);
|
||||
if (ret < 0) {
|
||||
dev_err(sdev->dev,
|
||||
"error: failed to start controller after resume\n");
|
||||
|
|
|
|||
|
|
@ -616,7 +616,7 @@ static int hda_init_caps(struct snd_sof_dev *sdev)
|
|||
dev_dbg(sdev->dev, "PP capability, will probe DSP later.\n");
|
||||
|
||||
/* Init HDA controller after i915 init */
|
||||
ret = hda_dsp_ctrl_init_chip(sdev);
|
||||
ret = hda_dsp_ctrl_init_chip(sdev, true);
|
||||
if (ret < 0) {
|
||||
dev_err(bus->dev, "error: init chip failed with ret: %d\n",
|
||||
ret);
|
||||
|
|
|
|||
|
|
@ -757,7 +757,7 @@ void hda_dsp_ctrl_ppcap_int_enable(struct snd_sof_dev *sdev, bool enable);
|
|||
int hda_dsp_ctrl_link_reset(struct snd_sof_dev *sdev, bool reset);
|
||||
void hda_dsp_ctrl_misc_clock_gating(struct snd_sof_dev *sdev, bool enable);
|
||||
int hda_dsp_ctrl_clock_power_gating(struct snd_sof_dev *sdev, bool enable);
|
||||
int hda_dsp_ctrl_init_chip(struct snd_sof_dev *sdev);
|
||||
int hda_dsp_ctrl_init_chip(struct snd_sof_dev *sdev, bool detect_codec);
|
||||
void hda_dsp_ctrl_stop_chip(struct snd_sof_dev *sdev);
|
||||
/*
|
||||
* HDA bus operations.
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user