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 bxt_desc = {
23 .machines = snd_soc_acpi_intel_bxt_machines,
24 .use_acpi_target_states = true,
25 .resindex_lpe_base = 0,
26 .resindex_pcicfg_base = -1,
27 .resindex_imr_base = -1,
28 .irqindex_host_ipc = -1,
29 .chip_info = &apl_chip_info,
30 .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4),
31 .ipc_default = SOF_IPC,
32 .default_fw_path = {
33 [SOF_IPC] = "intel/sof",
34 [SOF_INTEL_IPC4] = "intel/avs/apl",
35 },
36 .default_tplg_path = {
37 [SOF_IPC] = "intel/sof-tplg",
38 [SOF_INTEL_IPC4] = "intel/avs-tplg",
39 },
40 .default_fw_filename = {
41 [SOF_IPC] = "sof-apl.ri",
42 [SOF_INTEL_IPC4] = "dsp_basefw.bin",
43 },
44 .nocodec_tplg_filename = "sof-apl-nocodec.tplg",
45 .ops = &sof_apl_ops,
46 .ops_init = sof_apl_ops_init,
47};
48
49static const struct sof_dev_desc glk_desc = {
50 .machines = snd_soc_acpi_intel_glk_machines,
51 .use_acpi_target_states = true,
52 .resindex_lpe_base = 0,
53 .resindex_pcicfg_base = -1,
54 .resindex_imr_base = -1,
55 .irqindex_host_ipc = -1,
56 .chip_info = &apl_chip_info,
57 .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4),
58 .ipc_default = SOF_IPC,
59 .default_fw_path = {
60 [SOF_IPC] = "intel/sof",
61 [SOF_INTEL_IPC4] = "intel/avs/glk",
62 },
63 .default_tplg_path = {
64 [SOF_IPC] = "intel/sof-tplg",
65 [SOF_INTEL_IPC4] = "intel/avs-tplg",
66 },
67 .default_fw_filename = {
68 [SOF_IPC] = "sof-glk.ri",
69 [SOF_INTEL_IPC4] = "dsp_basefw.bin",
70 },
71 .nocodec_tplg_filename = "sof-glk-nocodec.tplg",
72 .ops = &sof_apl_ops,
73 .ops_init = sof_apl_ops_init,
74};
75
76
77static const struct pci_device_id sof_pci_ids[] = {
78 { PCI_DEVICE(0x8086, 0x5a98),
79 .driver_data = (unsigned long)&bxt_desc},
80 { PCI_DEVICE(0x8086, 0x1a98),
81 .driver_data = (unsigned long)&bxt_desc},
82 { PCI_DEVICE(0x8086, 0x3198),
83 .driver_data = (unsigned long)&glk_desc},
84 { 0, }
85};
86MODULE_DEVICE_TABLE(pci, sof_pci_ids);
87
88
89static struct pci_driver snd_sof_pci_intel_apl_driver = {
90 .name = "sof-audio-pci-intel-apl",
91 .id_table = sof_pci_ids,
92 .probe = hda_pci_intel_probe,
93 .remove = sof_pci_remove,
94 .shutdown = sof_pci_shutdown,
95 .driver = {
96 .pm = &sof_pci_pm,
97 },
98};
99module_pci_driver(snd_sof_pci_intel_apl_driver);
100
101MODULE_LICENSE("Dual BSD/GPL");
102MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_HDA_COMMON);
103MODULE_IMPORT_NS(SND_SOC_SOF_PCI_DEV);
104