pci-skl.c 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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-2022 Intel Corporation. All rights reserved.
  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. static struct sof_dev_desc skl_desc = {
  18. .machines = snd_soc_acpi_intel_skl_machines,
  19. .resindex_lpe_base = 0,
  20. .resindex_pcicfg_base = -1,
  21. .resindex_imr_base = -1,
  22. .chip_info = &skl_chip_info,
  23. .irqindex_host_ipc = -1,
  24. .ipc_supported_mask = BIT(SOF_INTEL_IPC4),
  25. .ipc_default = SOF_INTEL_IPC4,
  26. .default_fw_path = {
  27. [SOF_INTEL_IPC4] = "intel/avs/skl",
  28. },
  29. .default_tplg_path = {
  30. [SOF_INTEL_IPC4] = "intel/avs-tplg",
  31. },
  32. .default_fw_filename = {
  33. [SOF_INTEL_IPC4] = "dsp_basefw.bin",
  34. },
  35. .nocodec_tplg_filename = "sof-skl-nocodec.tplg",
  36. .ops = &sof_skl_ops,
  37. .ops_init = sof_skl_ops_init,
  38. .ops_free = hda_ops_free,
  39. };
  40. static struct sof_dev_desc kbl_desc = {
  41. .machines = snd_soc_acpi_intel_kbl_machines,
  42. .resindex_lpe_base = 0,
  43. .resindex_pcicfg_base = -1,
  44. .resindex_imr_base = -1,
  45. .chip_info = &skl_chip_info,
  46. .irqindex_host_ipc = -1,
  47. .ipc_supported_mask = BIT(SOF_INTEL_IPC4),
  48. .ipc_default = SOF_INTEL_IPC4,
  49. .default_fw_path = {
  50. [SOF_INTEL_IPC4] = "intel/avs/kbl",
  51. },
  52. .default_tplg_path = {
  53. [SOF_INTEL_IPC4] = "intel/avs-tplg",
  54. },
  55. .default_fw_filename = {
  56. [SOF_INTEL_IPC4] = "dsp_basefw.bin",
  57. },
  58. .nocodec_tplg_filename = "sof-kbl-nocodec.tplg",
  59. .ops = &sof_skl_ops,
  60. .ops_init = sof_skl_ops_init,
  61. .ops_free = hda_ops_free,
  62. };
  63. /* PCI IDs */
  64. static const struct pci_device_id sof_pci_ids[] = {
  65. /* Sunrise Point-LP */
  66. { PCI_DEVICE(0x8086, 0x9d70), .driver_data = (unsigned long)&skl_desc},
  67. /* KBL */
  68. { PCI_DEVICE(0x8086, 0x9d71), .driver_data = (unsigned long)&kbl_desc},
  69. { 0, }
  70. };
  71. MODULE_DEVICE_TABLE(pci, sof_pci_ids);
  72. /* pci_driver definition */
  73. static struct pci_driver snd_sof_pci_intel_skl_driver = {
  74. .name = "sof-audio-pci-intel-skl",
  75. .id_table = sof_pci_ids,
  76. .probe = hda_pci_intel_probe,
  77. .remove = sof_pci_remove,
  78. .shutdown = sof_pci_shutdown,
  79. .driver = {
  80. .pm = &sof_pci_pm,
  81. },
  82. };
  83. module_pci_driver(snd_sof_pci_intel_skl_driver);
  84. MODULE_LICENSE("Dual BSD/GPL");
  85. MODULE_IMPORT_NS(SND_SOC_SOF_INTEL_HDA_COMMON);
  86. MODULE_IMPORT_NS(SND_SOC_SOF_PCI_DEV);