pci-ptl.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) 2024 Intel Corporation.
  7. //
  8. #include <linux/module.h>
  9. #include <linux/pci.h>
  10. #include <sound/soc-acpi.h>
  11. #include <sound/soc-acpi-intel-match.h>
  12. #include <sound/sof.h>
  13. #include "../ops.h"
  14. #include "../sof-pci-dev.h"
  15. /* platform specific devices */
  16. #include "hda.h"
  17. #include "mtl.h"
  18. static const struct sof_dev_desc ptl_desc = {
  19. .use_acpi_target_states = true,
  20. .machines = snd_soc_acpi_intel_ptl_machines,
  21. .alt_machines = snd_soc_acpi_intel_ptl_sdw_machines,
  22. .resindex_lpe_base = 0,
  23. .resindex_pcicfg_base = -1,
  24. .resindex_imr_base = -1,
  25. .irqindex_host_ipc = -1,
  26. .chip_info = &ptl_chip_info,
  27. .ipc_supported_mask = BIT(SOF_IPC_TYPE_4),
  28. .ipc_default = SOF_IPC_TYPE_4,
  29. .dspless_mode_supported = true,
  30. .default_fw_path = {
  31. [SOF_IPC_TYPE_4] = "intel/sof-ipc4/ptl",
  32. },
  33. .default_lib_path = {
  34. [SOF_IPC_TYPE_4] = "intel/sof-ipc4-lib/ptl",
  35. },
  36. .default_tplg_path = {
  37. [SOF_IPC_TYPE_4] = "intel/sof-ipc4-tplg",
  38. },
  39. .default_fw_filename = {
  40. [SOF_IPC_TYPE_4] = "sof-ptl.ri",
  41. },
  42. .nocodec_tplg_filename = "sof-ptl-nocodec.tplg",
  43. .ops = &sof_lnl_ops,
  44. .ops_init = sof_lnl_ops_init,
  45. };
  46. /* PCI IDs */
  47. static const struct pci_device_id sof_pci_ids[] = {
  48. { PCI_DEVICE_DATA(INTEL, HDA_PTL, &ptl_desc) }, /* PTL */
  49. { PCI_DEVICE_DATA(INTEL, HDA_PTL_H, &ptl_desc) }, /* PTL-H */
  50. { 0, }
  51. };
  52. MODULE_DEVICE_TABLE(pci, sof_pci_ids);
  53. /* pci_driver definition */
  54. static struct pci_driver snd_sof_pci_intel_ptl_driver = {
  55. .name = "sof-audio-pci-intel-ptl",
  56. .id_table = sof_pci_ids,
  57. .probe = hda_pci_intel_probe,
  58. .remove = sof_pci_remove,
  59. .shutdown = sof_pci_shutdown,
  60. .driver = {
  61. .pm = &sof_pci_pm,
  62. },
  63. };
  64. module_pci_driver(snd_sof_pci_intel_ptl_driver);
  65. MODULE_LICENSE("Dual BSD/GPL");
  66. MODULE_DESCRIPTION("SOF support for PantherLake platforms");
  67. MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_HDA_GENERIC);
  68. MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_HDA_COMMON);
  69. MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_LNL);
  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);