pci-lnl.c 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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 or
  4. // redistributing this file, you may do so under either license.
  5. //
  6. // Copyright(c) 2023 Intel Corporation
  7. //
  8. // Author: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
  9. //
  10. #include <linux/module.h>
  11. #include <linux/pci.h>
  12. #include <sound/soc-acpi.h>
  13. #include <sound/soc-acpi-intel-match.h>
  14. #include <sound/sof.h>
  15. #include "../ops.h"
  16. #include "../sof-pci-dev.h"
  17. /* platform specific devices */
  18. #include "hda.h"
  19. #include "mtl.h"
  20. static const struct sof_dev_desc lnl_desc = {
  21. .use_acpi_target_states = true,
  22. .machines = snd_soc_acpi_intel_lnl_machines,
  23. .alt_machines = snd_soc_acpi_intel_lnl_sdw_machines,
  24. .resindex_lpe_base = 0,
  25. .resindex_pcicfg_base = -1,
  26. .resindex_imr_base = -1,
  27. .irqindex_host_ipc = -1,
  28. .chip_info = &lnl_chip_info,
  29. .ipc_supported_mask = BIT(SOF_IPC_TYPE_4),
  30. .ipc_default = SOF_IPC_TYPE_4,
  31. .dspless_mode_supported = true,
  32. .default_fw_path = {
  33. [SOF_IPC_TYPE_4] = "intel/sof-ipc4/lnl",
  34. },
  35. .default_lib_path = {
  36. [SOF_IPC_TYPE_4] = "intel/sof-ipc4-lib/lnl",
  37. },
  38. .default_tplg_path = {
  39. [SOF_IPC_TYPE_4] = "intel/sof-ipc4-tplg",
  40. },
  41. .default_fw_filename = {
  42. [SOF_IPC_TYPE_4] = "sof-lnl.ri",
  43. },
  44. .nocodec_tplg_filename = "sof-lnl-nocodec.tplg",
  45. .ops = &sof_lnl_ops,
  46. .ops_init = sof_lnl_ops_init,
  47. };
  48. /* PCI IDs */
  49. static const struct pci_device_id sof_pci_ids[] = {
  50. { PCI_DEVICE_DATA(INTEL, HDA_LNL_P, &lnl_desc) }, /* LNL-P */
  51. { 0, }
  52. };
  53. MODULE_DEVICE_TABLE(pci, sof_pci_ids);
  54. /* pci_driver definition */
  55. static struct pci_driver snd_sof_pci_intel_lnl_driver = {
  56. .name = "sof-audio-pci-intel-lnl",
  57. .id_table = sof_pci_ids,
  58. .probe = hda_pci_intel_probe,
  59. .remove = sof_pci_remove,
  60. .shutdown = sof_pci_shutdown,
  61. .driver = {
  62. .pm = &sof_pci_pm,
  63. },
  64. };
  65. module_pci_driver(snd_sof_pci_intel_lnl_driver);
  66. MODULE_LICENSE("Dual BSD/GPL");
  67. MODULE_DESCRIPTION("SOF support for LunarLake platforms");
  68. MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_HDA_GENERIC);
  69. MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_HDA_COMMON);
  70. MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_MTL);
  71. MODULE_IMPORT_NS(SND_SOC_SOF_HDA_MLINK);
  72. MODULE_IMPORT_NS(SND_SOC_SOF_PCI_DEV);