pci-icl.c 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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
  7. //
  8. // Author: Liam Girdwood <liam.r.girdwood@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. 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_TYPE_3) | BIT(SOF_IPC_TYPE_4),
  29. .ipc_default = SOF_IPC_TYPE_3,
  30. .dspless_mode_supported = true, /* Only supported for HDaudio */
  31. .default_fw_path = {
  32. [SOF_IPC_TYPE_3] = "intel/sof",
  33. [SOF_IPC_TYPE_4] = "intel/avs/icl",
  34. },
  35. .default_lib_path = {
  36. [SOF_IPC_TYPE_4] = "intel/avs-lib/icl",
  37. },
  38. .default_tplg_path = {
  39. [SOF_IPC_TYPE_3] = "intel/sof-tplg",
  40. [SOF_IPC_TYPE_4] = "intel/avs-tplg",
  41. },
  42. .default_fw_filename = {
  43. [SOF_IPC_TYPE_3] = "sof-icl.ri",
  44. [SOF_IPC_TYPE_4] = "dsp_basefw.bin",
  45. },
  46. .nocodec_tplg_filename = "sof-icl-nocodec.tplg",
  47. .ops = &sof_icl_ops,
  48. .ops_init = sof_icl_ops_init,
  49. .ops_free = hda_ops_free,
  50. };
  51. static const struct sof_dev_desc jsl_desc = {
  52. .machines = snd_soc_acpi_intel_jsl_machines,
  53. .use_acpi_target_states = true,
  54. .resindex_lpe_base = 0,
  55. .resindex_pcicfg_base = -1,
  56. .resindex_imr_base = -1,
  57. .irqindex_host_ipc = -1,
  58. .chip_info = &jsl_chip_info,
  59. .ipc_supported_mask = BIT(SOF_IPC_TYPE_3) | BIT(SOF_IPC_TYPE_4),
  60. .ipc_default = SOF_IPC_TYPE_3,
  61. .dspless_mode_supported = true, /* Only supported for HDaudio */
  62. .default_fw_path = {
  63. [SOF_IPC_TYPE_3] = "intel/sof",
  64. [SOF_IPC_TYPE_4] = "intel/avs/jsl",
  65. },
  66. .default_lib_path = {
  67. [SOF_IPC_TYPE_4] = "intel/avs-lib/jsl",
  68. },
  69. .default_tplg_path = {
  70. [SOF_IPC_TYPE_3] = "intel/sof-tplg",
  71. [SOF_IPC_TYPE_4] = "intel/avs-tplg",
  72. },
  73. .default_fw_filename = {
  74. [SOF_IPC_TYPE_3] = "sof-jsl.ri",
  75. [SOF_IPC_TYPE_4] = "dsp_basefw.bin",
  76. },
  77. .nocodec_tplg_filename = "sof-jsl-nocodec.tplg",
  78. .ops = &sof_cnl_ops,
  79. .ops_init = sof_cnl_ops_init,
  80. .ops_free = hda_ops_free,
  81. };
  82. /* PCI IDs */
  83. static const struct pci_device_id sof_pci_ids[] = {
  84. { PCI_DEVICE_DATA(INTEL, HDA_ICL_LP, &icl_desc) },
  85. { PCI_DEVICE_DATA(INTEL, HDA_ICL_H, &icl_desc) },
  86. { PCI_DEVICE_DATA(INTEL, HDA_ICL_N, &jsl_desc) },
  87. { PCI_DEVICE_DATA(INTEL, HDA_JSL_N, &jsl_desc) },
  88. { 0, }
  89. };
  90. MODULE_DEVICE_TABLE(pci, sof_pci_ids);
  91. /* pci_driver definition */
  92. static struct pci_driver snd_sof_pci_intel_icl_driver = {
  93. .name = "sof-audio-pci-intel-icl",
  94. .id_table = sof_pci_ids,
  95. .probe = hda_pci_intel_probe,
  96. .remove = sof_pci_remove,
  97. .shutdown = sof_pci_shutdown,
  98. .driver = {
  99. .pm = &sof_pci_pm,
  100. },
  101. };
  102. module_pci_driver(snd_sof_pci_intel_icl_driver);
  103. MODULE_LICENSE("Dual BSD/GPL");
  104. MODULE_DESCRIPTION("SOF support for IceLake platforms");
  105. MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_HDA_GENERIC);
  106. MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_HDA_COMMON);
  107. MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_CNL);
  108. MODULE_IMPORT_NS(SND_SOC_SOF_PCI_DEV);