1
2
3
4
5
6
7
8
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
20#include "hda.h"
21
22static const struct sof_dev_desc tgl_desc = {
23 .machines = snd_soc_acpi_intel_tgl_machines,
24 .alt_machines = snd_soc_acpi_intel_tgl_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 .resindex_dma_base = -1,
31 .chip_info = &tgl_chip_info,
32 .default_fw_path = "intel/sof",
33 .default_tplg_path = "intel/sof-tplg",
34 .default_fw_filename = "sof-tgl.ri",
35 .nocodec_tplg_filename = "sof-tgl-nocodec.tplg",
36 .ops = &sof_tgl_ops,
37};
38
39static const struct sof_dev_desc tglh_desc = {
40 .machines = snd_soc_acpi_intel_tgl_machines,
41 .alt_machines = snd_soc_acpi_intel_tgl_sdw_machines,
42 .use_acpi_target_states = true,
43 .resindex_lpe_base = 0,
44 .resindex_pcicfg_base = -1,
45 .resindex_imr_base = -1,
46 .irqindex_host_ipc = -1,
47 .resindex_dma_base = -1,
48 .chip_info = &tglh_chip_info,
49 .default_fw_path = "intel/sof",
50 .default_tplg_path = "intel/sof-tplg",
51 .default_fw_filename = "sof-tgl-h.ri",
52 .nocodec_tplg_filename = "sof-tgl-nocodec.tplg",
53 .ops = &sof_tgl_ops,
54};
55
56static const struct sof_dev_desc ehl_desc = {
57 .machines = snd_soc_acpi_intel_ehl_machines,
58 .use_acpi_target_states = true,
59 .resindex_lpe_base = 0,
60 .resindex_pcicfg_base = -1,
61 .resindex_imr_base = -1,
62 .irqindex_host_ipc = -1,
63 .resindex_dma_base = -1,
64 .chip_info = &ehl_chip_info,
65 .default_fw_path = "intel/sof",
66 .default_tplg_path = "intel/sof-tplg",
67 .default_fw_filename = "sof-ehl.ri",
68 .nocodec_tplg_filename = "sof-ehl-nocodec.tplg",
69 .ops = &sof_tgl_ops,
70};
71
72static const struct sof_dev_desc adls_desc = {
73 .machines = snd_soc_acpi_intel_adl_machines,
74 .alt_machines = snd_soc_acpi_intel_adl_sdw_machines,
75 .use_acpi_target_states = true,
76 .resindex_lpe_base = 0,
77 .resindex_pcicfg_base = -1,
78 .resindex_imr_base = -1,
79 .irqindex_host_ipc = -1,
80 .resindex_dma_base = -1,
81 .chip_info = &adls_chip_info,
82 .default_fw_path = "intel/sof",
83 .default_tplg_path = "intel/sof-tplg",
84 .default_fw_filename = "sof-adl-s.ri",
85 .nocodec_tplg_filename = "sof-adl-nocodec.tplg",
86 .ops = &sof_tgl_ops,
87};
88
89static const struct sof_dev_desc adl_desc = {
90 .machines = snd_soc_acpi_intel_adl_machines,
91 .alt_machines = snd_soc_acpi_intel_adl_sdw_machines,
92 .use_acpi_target_states = true,
93 .resindex_lpe_base = 0,
94 .resindex_pcicfg_base = -1,
95 .resindex_imr_base = -1,
96 .irqindex_host_ipc = -1,
97 .resindex_dma_base = -1,
98 .chip_info = &tgl_chip_info,
99 .default_fw_path = "intel/sof",
100 .default_tplg_path = "intel/sof-tplg",
101 .default_fw_filename = "sof-adl.ri",
102 .nocodec_tplg_filename = "sof-adl-nocodec.tplg",
103 .ops = &sof_tgl_ops,
104};
105
106
107static const struct pci_device_id sof_pci_ids[] = {
108 { PCI_DEVICE(0x8086, 0xa0c8),
109 .driver_data = (unsigned long)&tgl_desc},
110 { PCI_DEVICE(0x8086, 0x43c8),
111 .driver_data = (unsigned long)&tglh_desc},
112 { PCI_DEVICE(0x8086, 0x4b55),
113 .driver_data = (unsigned long)&ehl_desc},
114 { PCI_DEVICE(0x8086, 0x4b58),
115 .driver_data = (unsigned long)&ehl_desc},
116 { PCI_DEVICE(0x8086, 0x7ad0),
117 .driver_data = (unsigned long)&adls_desc},
118 { PCI_DEVICE(0x8086, 0x51c8),
119 .driver_data = (unsigned long)&adl_desc},
120 { PCI_DEVICE(0x8086, 0x51cc),
121 .driver_data = (unsigned long)&adl_desc},
122 { 0, }
123};
124MODULE_DEVICE_TABLE(pci, sof_pci_ids);
125
126
127static struct pci_driver snd_sof_pci_intel_tgl_driver = {
128 .name = "sof-audio-pci-intel-tgl",
129 .id_table = sof_pci_ids,
130 .probe = hda_pci_intel_probe,
131 .remove = sof_pci_remove,
132 .shutdown = sof_pci_shutdown,
133 .driver = {
134 .pm = &sof_pci_pm,
135 },
136};
137module_pci_driver(snd_sof_pci_intel_tgl_driver);
138
139MODULE_LICENSE("Dual BSD/GPL");
140MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_HDA_COMMON);
141MODULE_IMPORT_NS(SND_SOC_SOF_PCI_DEV);
142
143