pci-icl.c 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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) 2018-2021 Intel Corporation. All rights reserved.
  7. //
  8. // Author: Liam Girdwood <[email protected]>
  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. static const struct sof_dev_desc icl_desc = {
  20. .machines = snd_soc_acpi_intel_icl_machines,
  21. .alt_machines = snd_soc_acpi_intel_icl_sdw_machines,
  22. .use_acpi_target_states = true,
  23. .resindex_lpe_base = 0,
  24. .resindex_pcicfg_base = -1,
  25. .resindex_imr_base = -1,
  26. .irqindex_host_ipc = -1,
  27. .chip_info = &icl_chip_info,
  28. .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4),
  29. .ipc_default = SOF_IPC,
  30. .default_fw_path = {
  31. [SOF_IPC] = "intel/sof",
  32. [SOF_INTEL_IPC4] = "intel/avs/icl",
  33. },
  34. .default_tplg_path = {
  35. [SOF_IPC] = "intel/sof-tplg",
  36. [SOF_INTEL_IPC4] = "intel/avs-tplg",
  37. },
  38. .default_fw_filename = {
  39. [SOF_IPC] = "sof-icl.ri",
  40. [SOF_INTEL_IPC4] = "dsp_basefw.bin",
  41. },
  42. .nocodec_tplg_filename = "sof-icl-nocodec.tplg",
  43. .ops = &sof_icl_ops,
  44. .ops_init = sof_icl_ops_init,
  45. .ops_free = hda_ops_free,
  46. };
  47. static const struct sof_dev_desc jsl_desc = {
  48. .machines = snd_soc_acpi_intel_jsl_machines,
  49. .use_acpi_target_states = true,
  50. .resindex_lpe_base = 0,
  51. .resindex_pcicfg_base = -1,
  52. .resindex_imr_base = -1,
  53. .irqindex_host_ipc = -1,
  54. .chip_info = &jsl_chip_info,
  55. .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4),
  56. .ipc_default = SOF_IPC,
  57. .default_fw_path = {
  58. [SOF_IPC] = "intel/sof",
  59. [SOF_INTEL_IPC4] = "intel/avs/jsl",
  60. },
  61. .default_tplg_path = {
  62. [SOF_IPC] = "intel/sof-tplg",
  63. [SOF_INTEL_IPC4] = "intel/avs-tplg",
  64. },
  65. .default_fw_filename = {
  66. [SOF_IPC] = "sof-jsl.ri",
  67. [SOF_INTEL_IPC4] = "dsp_basefw.bin",
  68. },
  69. .nocodec_tplg_filename = "sof-jsl-nocodec.tplg",
  70. .ops = &sof_cnl_ops,
  71. .ops_init = sof_cnl_ops_init,
  72. .ops_free = hda_ops_free,
  73. };
  74. /* PCI IDs */
  75. static const struct pci_device_id sof_pci_ids[] = {
  76. { PCI_DEVICE(0x8086, 0x34C8), /* ICL-LP */
  77. .driver_data = (unsigned long)&icl_desc},
  78. { PCI_DEVICE(0x8086, 0x3dc8), /* ICL-H */
  79. .driver_data = (unsigned long)&icl_desc},
  80. { PCI_DEVICE(0x8086, 0x38c8), /* ICL-N */
  81. .driver_data = (unsigned long)&jsl_desc},
  82. { PCI_DEVICE(0x8086, 0x4dc8), /* JSL-N */
  83. .driver_data = (unsigned long)&jsl_desc},
  84. { 0, }
  85. };
  86. MODULE_DEVICE_TABLE(pci, sof_pci_ids);
  87. /* pci_driver definition */
  88. static struct pci_driver snd_sof_pci_intel_icl_driver = {
  89. .name = "sof-audio-pci-intel-icl",
  90. .id_table = sof_pci_ids,
  91. .probe = hda_pci_intel_probe,
  92. .remove = sof_pci_remove,
  93. .shutdown = sof_pci_shutdown,
  94. .driver = {
  95. .pm = &sof_pci_pm,
  96. },
  97. };
  98. module_pci_driver(snd_sof_pci_intel_icl_driver);
  99. MODULE_LICENSE("Dual BSD/GPL");
  100. MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_HDA_COMMON);
  101. MODULE_IMPORT_NS(SND_SOC_SOF_PCI_DEV);