diff options
author | Mark Brown <broonie@kernel.org> | 2021-02-17 19:52:26 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-02-17 19:52:26 +0100 |
commit | 0969db0d8d15caee41cd817154670c38d9ed7f61 (patch) | |
tree | 8ff546a65226e934d2b975ead545bb8bae54affc /sound/soc/sof/sof-pci-dev.c | |
parent | Merge remote-tracking branch 'asoc/for-5.11' into asoc-linus (diff) | |
parent | Merge series "ASoC: Intel: bytcr_rt5640: Add quirks for 4 more tablet / 2-in-... (diff) | |
download | linux-0969db0d8d15caee41cd817154670c38d9ed7f61.tar.xz linux-0969db0d8d15caee41cd817154670c38d9ed7f61.zip |
Merge remote-tracking branch 'asoc/for-5.12' into asoc-linus
Diffstat (limited to 'sound/soc/sof/sof-pci-dev.c')
-rw-r--r-- | sound/soc/sof/sof-pci-dev.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/sound/soc/sof/sof-pci-dev.c b/sound/soc/sof/sof-pci-dev.c index 9adf50b20a73..fd1f0d8c2853 100644 --- a/sound/soc/sof/sof-pci-dev.c +++ b/sound/soc/sof/sof-pci-dev.c @@ -220,7 +220,7 @@ static const struct sof_dev_desc icl_desc = { }; #endif -#if IS_ENABLED(CONFIG_SND_SOC_SOF_TIGERLAKE) +#if IS_ENABLED(CONFIG_SND_SOC_SOF_TIGERLAKE) || IS_ENABLED(CONFIG_SND_SOC_SOF_ALDERLAKE) static const struct sof_dev_desc tgl_desc = { .machines = snd_soc_acpi_intel_tgl_machines, .alt_machines = snd_soc_acpi_intel_tgl_sdw_machines, @@ -237,7 +237,9 @@ static const struct sof_dev_desc tgl_desc = { .nocodec_tplg_filename = "sof-tgl-nocodec.tplg", .ops = &sof_tgl_ops, }; +#endif +#if IS_ENABLED(CONFIG_SND_SOC_SOF_TIGERLAKE) static const struct sof_dev_desc tglh_desc = { .machines = snd_soc_acpi_intel_tgl_machines, .alt_machines = snd_soc_acpi_intel_tgl_sdw_machines, @@ -452,13 +454,19 @@ static void sof_pci_remove(struct pci_dev *pci) snd_sof_device_remove(&pci->dev); /* follow recommendation in pci-driver.c to increment usage counter */ - if (!(sof_pci_debug & SOF_PCI_DISABLE_PM_RUNTIME)) + if (snd_sof_device_probe_completed(&pci->dev) && + !(sof_pci_debug & SOF_PCI_DISABLE_PM_RUNTIME)) pm_runtime_get_noresume(&pci->dev); /* release pci regions and disable device */ 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) @@ -521,6 +529,8 @@ static const struct pci_device_id sof_pci_ids[] = { #if IS_ENABLED(CONFIG_SND_SOC_SOF_ALDERLAKE) { PCI_DEVICE(0x8086, 0x7ad0), .driver_data = (unsigned long)&adls_desc}, + { PCI_DEVICE(0x8086, 0x51c8), + .driver_data = (unsigned long)&tgl_desc}, #endif { 0, } }; @@ -532,6 +542,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, }, |