amd-acp63-acpi-match.c 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * amd-acp63-acpi-match.c - tables and support for ACP 6.3 platform
  4. * ACPI enumeration.
  5. *
  6. * Copyright 2024 Advanced Micro Devices, Inc.
  7. */
  8. #include <sound/soc-acpi.h>
  9. #include "../mach-config.h"
  10. static const struct snd_soc_acpi_endpoint single_endpoint = {
  11. .num = 0,
  12. .aggregated = 0,
  13. .group_position = 0,
  14. .group_id = 0
  15. };
  16. static const struct snd_soc_acpi_endpoint spk_l_endpoint = {
  17. .num = 0,
  18. .aggregated = 1,
  19. .group_position = 0,
  20. .group_id = 1
  21. };
  22. static const struct snd_soc_acpi_endpoint spk_r_endpoint = {
  23. .num = 0,
  24. .aggregated = 1,
  25. .group_position = 1,
  26. .group_id = 1
  27. };
  28. static const struct snd_soc_acpi_adr_device rt711_rt1316_group_adr[] = {
  29. {
  30. .adr = 0x000030025D071101ull,
  31. .num_endpoints = 1,
  32. .endpoints = &single_endpoint,
  33. .name_prefix = "rt711"
  34. },
  35. {
  36. .adr = 0x000030025D131601ull,
  37. .num_endpoints = 1,
  38. .endpoints = &spk_l_endpoint,
  39. .name_prefix = "rt1316-1"
  40. },
  41. {
  42. .adr = 0x000032025D131601ull,
  43. .num_endpoints = 1,
  44. .endpoints = &spk_r_endpoint,
  45. .name_prefix = "rt1316-2"
  46. },
  47. };
  48. static const struct snd_soc_acpi_adr_device rt714_adr[] = {
  49. {
  50. .adr = 0x130025d071401ull,
  51. .num_endpoints = 1,
  52. .endpoints = &single_endpoint,
  53. .name_prefix = "rt714"
  54. }
  55. };
  56. static const struct snd_soc_acpi_link_adr acp63_4_in_1_sdca[] = {
  57. { .mask = BIT(0),
  58. .num_adr = ARRAY_SIZE(rt711_rt1316_group_adr),
  59. .adr_d = rt711_rt1316_group_adr,
  60. },
  61. {
  62. .mask = BIT(1),
  63. .num_adr = ARRAY_SIZE(rt714_adr),
  64. .adr_d = rt714_adr,
  65. },
  66. {}
  67. };
  68. struct snd_soc_acpi_mach snd_soc_acpi_amd_acp63_sof_sdw_machines[] = {
  69. {
  70. .link_mask = BIT(0) | BIT(1),
  71. .links = acp63_4_in_1_sdca,
  72. .drv_name = "amd_sof_sdw",
  73. .sof_tplg_filename = "sof-acp_6_3-rt711-l0-rt1316-l0-rt714-l1.tplg",
  74. .fw_filename = "sof-acp_6_3.ri",
  75. },
  76. {},
  77. };
  78. EXPORT_SYMBOL(snd_soc_acpi_amd_acp63_sof_sdw_machines);
  79. MODULE_DESCRIPTION("AMD ACP6.3 tables and support for ACPI enumeration");
  80. MODULE_LICENSE("GPL");
  81. MODULE_AUTHOR("Vijendar.Mukunda@amd.com");