0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #include <linux/module.h>
0012 #include <linux/pci.h>
0013 #include <sound/soc-acpi.h>
0014 #include <sound/soc-acpi-intel-match.h>
0015 #include <sound/sof.h>
0016 #include "../ops.h"
0017 #include "../sof-pci-dev.h"
0018
0019
0020 #include "hda.h"
0021
0022 static const struct sof_dev_desc cnl_desc = {
0023 .machines = snd_soc_acpi_intel_cnl_machines,
0024 .alt_machines = snd_soc_acpi_intel_cnl_sdw_machines,
0025 .use_acpi_target_states = true,
0026 .resindex_lpe_base = 0,
0027 .resindex_pcicfg_base = -1,
0028 .resindex_imr_base = -1,
0029 .irqindex_host_ipc = -1,
0030 .chip_info = &cnl_chip_info,
0031 .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4),
0032 .ipc_default = SOF_IPC,
0033 .default_fw_path = {
0034 [SOF_IPC] = "intel/sof",
0035 [SOF_INTEL_IPC4] = "intel/avs/cnl",
0036 },
0037 .default_tplg_path = {
0038 [SOF_IPC] = "intel/sof-tplg",
0039 [SOF_INTEL_IPC4] = "intel/avs-tplg",
0040 },
0041 .default_fw_filename = {
0042 [SOF_IPC] = "sof-cnl.ri",
0043 [SOF_INTEL_IPC4] = "dsp_basefw.bin",
0044 },
0045 .nocodec_tplg_filename = "sof-cnl-nocodec.tplg",
0046 .ops = &sof_cnl_ops,
0047 .ops_init = sof_cnl_ops_init,
0048 };
0049
0050 static const struct sof_dev_desc cfl_desc = {
0051 .machines = snd_soc_acpi_intel_cfl_machines,
0052 .alt_machines = snd_soc_acpi_intel_cfl_sdw_machines,
0053 .use_acpi_target_states = true,
0054 .resindex_lpe_base = 0,
0055 .resindex_pcicfg_base = -1,
0056 .resindex_imr_base = -1,
0057 .irqindex_host_ipc = -1,
0058 .chip_info = &cnl_chip_info,
0059 .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4),
0060 .ipc_default = SOF_IPC,
0061 .default_fw_path = {
0062 [SOF_IPC] = "intel/sof",
0063 [SOF_INTEL_IPC4] = "intel/avs/cnl",
0064 },
0065 .default_tplg_path = {
0066 [SOF_IPC] = "intel/sof-tplg",
0067 [SOF_INTEL_IPC4] = "intel/avs-tplg",
0068 },
0069 .default_fw_filename = {
0070 [SOF_IPC] = "sof-cfl.ri",
0071 [SOF_INTEL_IPC4] = "dsp_basefw.bin",
0072 },
0073 .nocodec_tplg_filename = "sof-cnl-nocodec.tplg",
0074 .ops = &sof_cnl_ops,
0075 .ops_init = sof_cnl_ops_init,
0076 .ops_free = hda_ops_free,
0077 };
0078
0079 static const struct sof_dev_desc cml_desc = {
0080 .machines = snd_soc_acpi_intel_cml_machines,
0081 .alt_machines = snd_soc_acpi_intel_cml_sdw_machines,
0082 .use_acpi_target_states = true,
0083 .resindex_lpe_base = 0,
0084 .resindex_pcicfg_base = -1,
0085 .resindex_imr_base = -1,
0086 .irqindex_host_ipc = -1,
0087 .chip_info = &cnl_chip_info,
0088 .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4),
0089 .ipc_default = SOF_IPC,
0090 .default_fw_path = {
0091 [SOF_IPC] = "intel/sof",
0092 [SOF_INTEL_IPC4] = "intel/avs/cnl",
0093 },
0094 .default_tplg_path = {
0095 [SOF_IPC] = "intel/sof-tplg",
0096 [SOF_INTEL_IPC4] = "intel/avs-tplg",
0097 },
0098 .default_fw_filename = {
0099 [SOF_IPC] = "sof-cml.ri",
0100 [SOF_INTEL_IPC4] = "dsp_basefw.bin",
0101 },
0102 .nocodec_tplg_filename = "sof-cnl-nocodec.tplg",
0103 .ops = &sof_cnl_ops,
0104 .ops_init = sof_cnl_ops_init,
0105 };
0106
0107
0108 static const struct pci_device_id sof_pci_ids[] = {
0109 { PCI_DEVICE(0x8086, 0x9dc8),
0110 .driver_data = (unsigned long)&cnl_desc},
0111 { PCI_DEVICE(0x8086, 0xa348),
0112 .driver_data = (unsigned long)&cfl_desc},
0113 { PCI_DEVICE(0x8086, 0x02c8),
0114 .driver_data = (unsigned long)&cml_desc},
0115 { PCI_DEVICE(0x8086, 0x06c8),
0116 .driver_data = (unsigned long)&cml_desc},
0117 { PCI_DEVICE(0x8086, 0xa3f0),
0118 .driver_data = (unsigned long)&cml_desc},
0119 { 0, }
0120 };
0121 MODULE_DEVICE_TABLE(pci, sof_pci_ids);
0122
0123
0124 static struct pci_driver snd_sof_pci_intel_cnl_driver = {
0125 .name = "sof-audio-pci-intel-cnl",
0126 .id_table = sof_pci_ids,
0127 .probe = hda_pci_intel_probe,
0128 .remove = sof_pci_remove,
0129 .shutdown = sof_pci_shutdown,
0130 .driver = {
0131 .pm = &sof_pci_pm,
0132 },
0133 };
0134 module_pci_driver(snd_sof_pci_intel_cnl_driver);
0135
0136 MODULE_LICENSE("Dual BSD/GPL");
0137 MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_HDA_COMMON);
0138 MODULE_IMPORT_NS(SND_SOC_SOF_PCI_DEV);