pci-apl.c 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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 bxt_desc = {
  20. .machines = snd_soc_acpi_intel_bxt_machines,
  21. .use_acpi_target_states = true,
  22. .resindex_lpe_base = 0,
  23. .resindex_pcicfg_base = -1,
  24. .resindex_imr_base = -1,
  25. .irqindex_host_ipc = -1,
  26. .chip_info = &apl_chip_info,
  27. .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4),
  28. .ipc_default = SOF_IPC,
  29. .default_fw_path = {
  30. [SOF_IPC] = "intel/sof",
  31. [SOF_INTEL_IPC4] = "intel/avs/apl",
  32. },
  33. .default_tplg_path = {
  34. [SOF_IPC] = "intel/sof-tplg",
  35. [SOF_INTEL_IPC4] = "intel/avs-tplg",
  36. },
  37. .default_fw_filename = {
  38. [SOF_IPC] = "sof-apl.ri",
  39. [SOF_INTEL_IPC4] = "dsp_basefw.bin",
  40. },
  41. .nocodec_tplg_filename = "sof-apl-nocodec.tplg",
  42. .ops = &sof_apl_ops,
  43. .ops_init = sof_apl_ops_init,
  44. .ops_free = hda_ops_free,
  45. };
  46. static const struct sof_dev_desc glk_desc = {
  47. .machines = snd_soc_acpi_intel_glk_machines,
  48. .use_acpi_target_states = true,
  49. .resindex_lpe_base = 0,
  50. .resindex_pcicfg_base = -1,
  51. .resindex_imr_base = -1,
  52. .irqindex_host_ipc = -1,
  53. .chip_info = &apl_chip_info,
  54. .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4),
  55. .ipc_default = SOF_IPC,
  56. .default_fw_path = {
  57. [SOF_IPC] = "intel/sof",
  58. [SOF_INTEL_IPC4] = "intel/avs/glk",
  59. },
  60. .default_tplg_path = {
  61. [SOF_IPC] = "intel/sof-tplg",
  62. [SOF_INTEL_IPC4] = "intel/avs-tplg",
  63. },
  64. .default_fw_filename = {
  65. [SOF_IPC] = "sof-glk.ri",
  66. [SOF_INTEL_IPC4] = "dsp_basefw.bin",
  67. },
  68. .nocodec_tplg_filename = "sof-glk-nocodec.tplg",
  69. .ops = &sof_apl_ops,
  70. .ops_init = sof_apl_ops_init,
  71. .ops_free = hda_ops_free,
  72. };
  73. /* PCI IDs */
  74. static const struct pci_device_id sof_pci_ids[] = {
  75. { PCI_DEVICE(0x8086, 0x5a98), /* BXT-P (ApolloLake) */
  76. .driver_data = (unsigned long)&bxt_desc},
  77. { PCI_DEVICE(0x8086, 0x1a98),/* BXT-T */
  78. .driver_data = (unsigned long)&bxt_desc},
  79. { PCI_DEVICE(0x8086, 0x3198), /* GeminiLake */
  80. .driver_data = (unsigned long)&glk_desc},
  81. { 0, }
  82. };
  83. MODULE_DEVICE_TABLE(pci, sof_pci_ids);
  84. /* pci_driver definition */
  85. static struct pci_driver snd_sof_pci_intel_apl_driver = {
  86. .name = "sof-audio-pci-intel-apl",
  87. .id_table = sof_pci_ids,
  88. .probe = hda_pci_intel_probe,
  89. .remove = sof_pci_remove,
  90. .shutdown = sof_pci_shutdown,
  91. .driver = {
  92. .pm = &sof_pci_pm,
  93. },
  94. };
  95. module_pci_driver(snd_sof_pci_intel_apl_driver);
  96. MODULE_LICENSE("Dual BSD/GPL");
  97. MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_HDA_COMMON);
  98. MODULE_IMPORT_NS(SND_SOC_SOF_PCI_DEV);