Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)
0002 //
0003 // This file is provided under a dual BSD/GPLv2 license.  When using or
0004 // redistributing this file, you may do so under either license.
0005 //
0006 // Copyright(c) 2018-2021 Intel Corporation. All rights reserved.
0007 //
0008 // Author: Liam Girdwood <liam.r.girdwood@linux.intel.com>
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 /* platform specific devices */
0020 #include "hda.h"
0021 
0022 static const struct sof_dev_desc icl_desc = {
0023     .machines               = snd_soc_acpi_intel_icl_machines,
0024     .alt_machines       = snd_soc_acpi_intel_icl_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 = &icl_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/icl",
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-icl.ri",
0043         [SOF_INTEL_IPC4] = "dsp_basefw.bin",
0044     },
0045     .nocodec_tplg_filename = "sof-icl-nocodec.tplg",
0046     .ops = &sof_icl_ops,
0047     .ops_init = sof_icl_ops_init,
0048     .ops_free = hda_ops_free,
0049 };
0050 
0051 static const struct sof_dev_desc jsl_desc = {
0052     .machines               = snd_soc_acpi_intel_jsl_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 = &jsl_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/jsl",
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-jsl.ri",
0071         [SOF_INTEL_IPC4] = "dsp_basefw.bin",
0072     },
0073     .nocodec_tplg_filename = "sof-jsl-nocodec.tplg",
0074     .ops = &sof_cnl_ops,
0075     .ops_init = sof_cnl_ops_init,
0076 };
0077 
0078 /* PCI IDs */
0079 static const struct pci_device_id sof_pci_ids[] = {
0080     { PCI_DEVICE(0x8086, 0x34C8), /* ICL-LP */
0081         .driver_data = (unsigned long)&icl_desc},
0082     { PCI_DEVICE(0x8086, 0x3dc8), /* ICL-H */
0083         .driver_data = (unsigned long)&icl_desc},
0084     { PCI_DEVICE(0x8086, 0x38c8), /* ICL-N */
0085         .driver_data = (unsigned long)&jsl_desc},
0086     { PCI_DEVICE(0x8086, 0x4dc8), /* JSL-N */
0087         .driver_data = (unsigned long)&jsl_desc},
0088     { 0, }
0089 };
0090 MODULE_DEVICE_TABLE(pci, sof_pci_ids);
0091 
0092 /* pci_driver definition */
0093 static struct pci_driver snd_sof_pci_intel_icl_driver = {
0094     .name = "sof-audio-pci-intel-icl",
0095     .id_table = sof_pci_ids,
0096     .probe = hda_pci_intel_probe,
0097     .remove = sof_pci_remove,
0098     .shutdown = sof_pci_shutdown,
0099     .driver = {
0100         .pm = &sof_pci_pm,
0101     },
0102 };
0103 module_pci_driver(snd_sof_pci_intel_icl_driver);
0104 
0105 MODULE_LICENSE("Dual BSD/GPL");
0106 MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_HDA_COMMON);
0107 MODULE_IMPORT_NS(SND_SOC_SOF_PCI_DEV);