[PATCH 3/4] ASoC: SOF: sof-pci-dev: add .shutdown() callback
Kai Vehmanen
kai.vehmanen at linux.intel.com
Wed Jan 13 16:26:16 CET 2021
From: Keyon Jie <yang.jie at linux.intel.com>
Add the .shutdown() callback to the sof-pci-dev driver, to help to
handle shutting down specific tasks for SOF PCI platforms.
Signed-off-by: Keyon Jie <yang.jie at linux.intel.com>
Reviewed-by: Bard Liao <bard.liao at intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan at linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen at linux.intel.com>
---
sound/soc/sof/sof-pci-dev.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/sound/soc/sof/sof-pci-dev.c b/sound/soc/sof/sof-pci-dev.c
index 63b989e3ec40..5f53c3e76e6f 100644
--- a/sound/soc/sof/sof-pci-dev.c
+++ b/sound/soc/sof/sof-pci-dev.c
@@ -450,6 +450,11 @@ static void sof_pci_remove(struct pci_dev *pci)
pci_release_regions(pci);
}
+static void sof_pci_shutdown(struct pci_dev *pci)
+{
+ snd_sof_device_shutdown(&pci->dev);
+}
+
/* PCI IDs */
static const struct pci_device_id sof_pci_ids[] = {
#if IS_ENABLED(CONFIG_SND_SOC_SOF_MERRIFIELD)
@@ -523,6 +528,7 @@ static struct pci_driver snd_sof_pci_driver = {
.id_table = sof_pci_ids,
.probe = sof_pci_probe,
.remove = sof_pci_remove,
+ .shutdown = sof_pci_shutdown,
.driver = {
.pm = &sof_pci_pm,
},
--
2.29.2
More information about the Alsa-devel
mailing list