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 bxt_desc = {
0023     .machines       = snd_soc_acpi_intel_bxt_machines,
0024     .use_acpi_target_states = true,
0025     .resindex_lpe_base  = 0,
0026     .resindex_pcicfg_base   = -1,
0027     .resindex_imr_base  = -1,
0028     .irqindex_host_ipc  = -1,
0029     .chip_info = &apl_chip_info,
0030     .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4),
0031     .ipc_default        = SOF_IPC,
0032     .default_fw_path = {
0033         [SOF_IPC] = "intel/sof",
0034         [SOF_INTEL_IPC4] = "intel/avs/apl",
0035     },
0036     .default_tplg_path = {
0037         [SOF_IPC] = "intel/sof-tplg",
0038         [SOF_INTEL_IPC4] = "intel/avs-tplg",
0039     },
0040     .default_fw_filename = {
0041         [SOF_IPC] = "sof-apl.ri",
0042         [SOF_INTEL_IPC4] = "dsp_basefw.bin",
0043     },
0044     .nocodec_tplg_filename = "sof-apl-nocodec.tplg",
0045     .ops = &sof_apl_ops,
0046     .ops_init = sof_apl_ops_init,
0047     .ops_free = hda_ops_free,
0048 };
0049 
0050 static const struct sof_dev_desc glk_desc = {
0051     .machines       = snd_soc_acpi_intel_glk_machines,
0052     .use_acpi_target_states = true,
0053     .resindex_lpe_base  = 0,
0054     .resindex_pcicfg_base   = -1,
0055     .resindex_imr_base  = -1,
0056     .irqindex_host_ipc  = -1,
0057     .chip_info = &apl_chip_info,
0058     .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4),
0059     .ipc_default        = SOF_IPC,
0060     .default_fw_path = {
0061         [SOF_IPC] = "intel/sof",
0062         [SOF_INTEL_IPC4] = "intel/avs/glk",
0063     },
0064     .default_tplg_path = {
0065         [SOF_IPC] = "intel/sof-tplg",
0066         [SOF_INTEL_IPC4] = "intel/avs-tplg",
0067     },
0068     .default_fw_filename = {
0069         [SOF_IPC] = "sof-glk.ri",
0070         [SOF_INTEL_IPC4] = "dsp_basefw.bin",
0071     },
0072     .nocodec_tplg_filename = "sof-glk-nocodec.tplg",
0073     .ops = &sof_apl_ops,
0074     .ops_init = sof_apl_ops_init,
0075 };
0076 
0077 /* PCI IDs */
0078 static const struct pci_device_id sof_pci_ids[] = {
0079     { PCI_DEVICE(0x8086, 0x5a98), /* BXT-P (ApolloLake) */
0080         .driver_data = (unsigned long)&bxt_desc},
0081     { PCI_DEVICE(0x8086, 0x1a98),/* BXT-T */
0082         .driver_data = (unsigned long)&bxt_desc},
0083     { PCI_DEVICE(0x8086, 0x3198), /* GeminiLake */
0084         .driver_data = (unsigned long)&glk_desc},
0085     { 0, }
0086 };
0087 MODULE_DEVICE_TABLE(pci, sof_pci_ids);
0088 
0089 /* pci_driver definition */
0090 static struct pci_driver snd_sof_pci_intel_apl_driver = {
0091     .name = "sof-audio-pci-intel-apl",
0092     .id_table = sof_pci_ids,
0093     .probe = hda_pci_intel_probe,
0094     .remove = sof_pci_remove,
0095     .shutdown = sof_pci_shutdown,
0096     .driver = {
0097         .pm = &sof_pci_pm,
0098     },
0099 };
0100 module_pci_driver(snd_sof_pci_intel_apl_driver);
0101 
0102 MODULE_LICENSE("Dual BSD/GPL");
0103 MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_HDA_COMMON);
0104 MODULE_IMPORT_NS(SND_SOC_SOF_PCI_DEV);