Skip to content

Commit 3268bcf

Browse files
committed
ASoC: SOF: Intel: use power_down_dsp op in hda_dsp_remove
Use power_down_dsp op to differentiate power down sequences in platforms. Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
1 parent e52897b commit 3268bcf

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

sound/soc/sof/intel/hda.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,6 +1150,7 @@ int hda_dsp_remove(struct snd_sof_dev *sdev)
11501150
struct hdac_bus *bus = sof_to_bus(sdev);
11511151
struct pci_dev *pci = to_pci_dev(sdev->dev);
11521152
struct nhlt_acpi_table *nhlt = hda->nhlt;
1153+
int ret;
11531154

11541155
if (nhlt)
11551156
intel_nhlt_free(nhlt);
@@ -1176,8 +1177,15 @@ int hda_dsp_remove(struct snd_sof_dev *sdev)
11761177
SOF_HDA_INT_CTRL_EN | SOF_HDA_INT_GLOBAL_EN, 0);
11771178

11781179
/* disable cores */
1179-
if (chip)
1180-
hda_dsp_core_reset_power_down(sdev, chip->host_managed_cores_mask);
1180+
if (chip && chip->power_down_dsp) {
1181+
ret = chip->power_down_dsp(sdev);
1182+
if (!ret) {
1183+
dev_err(sdev->dev, "error: power_down_dsp op returns %d\n", ret);
1184+
/* Even with the error, no return. dsp need to be disabled.
1185+
* Need to go through to the end of the function.
1186+
*/
1187+
}
1188+
}
11811189

11821190
/* disable DSP */
11831191
snd_sof_dsp_update_bits(sdev, HDA_DSP_PP_BAR, SOF_HDA_REG_PP_PPCTL,

0 commit comments

Comments
 (0)