1 // SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) 2 // 3 // This file is provided under a dual BSD/GPLv2 license. When using or 4 // redistributing this file, you may do so under either license. 5 // 6 // Copyright(c) 2018 Intel Corporation. All rights reserved. 7 // 8 // Author: Liam Girdwood <liam.r.girdwood@linux.intel.com> 9 // 10 11 #include <linux/module.h> 12 #include <linux/pci.h> 13 #include <sound/soc-acpi.h> 14 #include <sound/soc-acpi-intel-match.h> 15 #include <sound/sof.h> 16 #include "../ops.h" 17 #include "../sof-pci-dev.h" 18 19 /* platform specific devices */ 20 #include "hda.h" 21 22 static const struct sof_dev_desc cnl_desc = { 23 .machines = snd_soc_acpi_intel_cnl_machines, 24 .alt_machines = snd_soc_acpi_intel_cnl_sdw_machines, 25 .use_acpi_target_states = true, 26 .resindex_lpe_base = 0, 27 .resindex_pcicfg_base = -1, 28 .resindex_imr_base = -1, 29 .irqindex_host_ipc = -1, 30 .chip_info = &cnl_chip_info, 31 .default_fw_path = { 32 [SOF_IPC] = "intel/sof", 33 }, 34 .default_tplg_path = { 35 [SOF_IPC] = "intel/sof-tplg", 36 }, 37 .default_fw_filename = "sof-cnl.ri", 38 .nocodec_tplg_filename = "sof-cnl-nocodec.tplg", 39 .ops = &sof_cnl_ops, 40 }; 41 42 static const struct sof_dev_desc cfl_desc = { 43 .machines = snd_soc_acpi_intel_cfl_machines, 44 .alt_machines = snd_soc_acpi_intel_cfl_sdw_machines, 45 .use_acpi_target_states = true, 46 .resindex_lpe_base = 0, 47 .resindex_pcicfg_base = -1, 48 .resindex_imr_base = -1, 49 .irqindex_host_ipc = -1, 50 .chip_info = &cnl_chip_info, 51 .default_fw_path = { 52 [SOF_IPC] = "intel/sof", 53 }, 54 .default_tplg_path = { 55 [SOF_IPC] = "intel/sof-tplg", 56 }, 57 .default_fw_filename = "sof-cfl.ri", 58 .nocodec_tplg_filename = "sof-cnl-nocodec.tplg", 59 .ops = &sof_cnl_ops, 60 }; 61 62 static const struct sof_dev_desc cml_desc = { 63 .machines = snd_soc_acpi_intel_cml_machines, 64 .alt_machines = snd_soc_acpi_intel_cml_sdw_machines, 65 .use_acpi_target_states = true, 66 .resindex_lpe_base = 0, 67 .resindex_pcicfg_base = -1, 68 .resindex_imr_base = -1, 69 .irqindex_host_ipc = -1, 70 .chip_info = &cnl_chip_info, 71 .default_fw_path = { 72 [SOF_IPC] = "intel/sof", 73 }, 74 .default_tplg_path = { 75 [SOF_IPC] = "intel/sof-tplg", 76 }, 77 .default_fw_filename = "sof-cml.ri", 78 .nocodec_tplg_filename = "sof-cnl-nocodec.tplg", 79 .ops = &sof_cnl_ops, 80 }; 81 82 /* PCI IDs */ 83 static const struct pci_device_id sof_pci_ids[] = { 84 { PCI_DEVICE(0x8086, 0x9dc8), /* CNL-LP */ 85 .driver_data = (unsigned long)&cnl_desc}, 86 { PCI_DEVICE(0x8086, 0xa348), /* CNL-H */ 87 .driver_data = (unsigned long)&cfl_desc}, 88 { PCI_DEVICE(0x8086, 0x02c8), /* CML-LP */ 89 .driver_data = (unsigned long)&cml_desc}, 90 { PCI_DEVICE(0x8086, 0x06c8), /* CML-H */ 91 .driver_data = (unsigned long)&cml_desc}, 92 { PCI_DEVICE(0x8086, 0xa3f0), /* CML-S */ 93 .driver_data = (unsigned long)&cml_desc}, 94 { 0, } 95 }; 96 MODULE_DEVICE_TABLE(pci, sof_pci_ids); 97 98 /* pci_driver definition */ 99 static struct pci_driver snd_sof_pci_intel_cnl_driver = { 100 .name = "sof-audio-pci-intel-cnl", 101 .id_table = sof_pci_ids, 102 .probe = hda_pci_intel_probe, 103 .remove = sof_pci_remove, 104 .shutdown = sof_pci_shutdown, 105 .driver = { 106 .pm = &sof_pci_pm, 107 }, 108 }; 109 module_pci_driver(snd_sof_pci_intel_cnl_driver); 110 111 MODULE_LICENSE("Dual BSD/GPL"); 112 MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_HDA_COMMON); 113 MODULE_IMPORT_NS(SND_SOC_SOF_PCI_DEV); 114