96 lines · c
1// SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)2//3// This file is provided under a dual BSD/GPLv2 license. When using or4// redistributing this file, you may do so under either license.5//6// Copyright(c) 2018-2022 Intel Corporation7//8 9#include <linux/module.h>10#include <linux/pci.h>11#include <sound/soc-acpi.h>12#include <sound/soc-acpi-intel-match.h>13#include <sound/sof.h>14#include "../ops.h"15#include "../sof-pci-dev.h"16 17/* platform specific devices */18#include "hda.h"19 20static struct sof_dev_desc skl_desc = {21 .machines = snd_soc_acpi_intel_skl_machines,22 .resindex_lpe_base = 0,23 .resindex_pcicfg_base = -1,24 .resindex_imr_base = -1,25 .chip_info = &skl_chip_info,26 .irqindex_host_ipc = -1,27 .ipc_supported_mask = BIT(SOF_IPC_TYPE_4),28 .ipc_default = SOF_IPC_TYPE_4,29 .dspless_mode_supported = true, /* Only supported for HDaudio */30 .default_fw_path = {31 [SOF_IPC_TYPE_4] = "intel/avs/skl",32 },33 .default_tplg_path = {34 [SOF_IPC_TYPE_4] = "intel/avs-tplg",35 },36 .default_fw_filename = {37 [SOF_IPC_TYPE_4] = "dsp_basefw.bin",38 },39 .nocodec_tplg_filename = "sof-skl-nocodec.tplg",40 .ops = &sof_skl_ops,41 .ops_init = sof_skl_ops_init,42 .ops_free = hda_ops_free,43};44 45static struct sof_dev_desc kbl_desc = {46 .machines = snd_soc_acpi_intel_kbl_machines,47 .resindex_lpe_base = 0,48 .resindex_pcicfg_base = -1,49 .resindex_imr_base = -1,50 .chip_info = &skl_chip_info,51 .irqindex_host_ipc = -1,52 .ipc_supported_mask = BIT(SOF_IPC_TYPE_4),53 .ipc_default = SOF_IPC_TYPE_4,54 .dspless_mode_supported = true, /* Only supported for HDaudio */55 .default_fw_path = {56 [SOF_IPC_TYPE_4] = "intel/avs/kbl",57 },58 .default_tplg_path = {59 [SOF_IPC_TYPE_4] = "intel/avs-tplg",60 },61 .default_fw_filename = {62 [SOF_IPC_TYPE_4] = "dsp_basefw.bin",63 },64 .nocodec_tplg_filename = "sof-kbl-nocodec.tplg",65 .ops = &sof_skl_ops,66 .ops_init = sof_skl_ops_init,67 .ops_free = hda_ops_free,68};69 70/* PCI IDs */71static const struct pci_device_id sof_pci_ids[] = {72 { PCI_DEVICE_DATA(INTEL, HDA_SKL_LP, &skl_desc) },73 { PCI_DEVICE_DATA(INTEL, HDA_KBL_LP, &kbl_desc) },74 { 0, }75};76MODULE_DEVICE_TABLE(pci, sof_pci_ids);77 78/* pci_driver definition */79static struct pci_driver snd_sof_pci_intel_skl_driver = {80 .name = "sof-audio-pci-intel-skl",81 .id_table = sof_pci_ids,82 .probe = hda_pci_intel_probe,83 .remove = sof_pci_remove,84 .shutdown = sof_pci_shutdown,85 .driver = {86 .pm = &sof_pci_pm,87 },88};89module_pci_driver(snd_sof_pci_intel_skl_driver);90 91MODULE_LICENSE("Dual BSD/GPL");92MODULE_DESCRIPTION("SOF support for SkyLake platforms");93MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_HDA_GENERIC);94MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_HDA_COMMON);95MODULE_IMPORT_NS(SND_SOC_SOF_PCI_DEV);96