soc-acpi-intel-cnl-match.c 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * soc-acpi-intel-cnl-match.c - tables and support for CNL ACPI enumeration.
  4. *
  5. * Copyright (c) 2018, Intel Corporation.
  6. *
  7. */
  8. #include <sound/soc-acpi.h>
  9. #include <sound/soc-acpi-intel-match.h>
  10. #include "../skylake/skl.h"
  11. #include "soc-acpi-intel-sdw-mockup-match.h"
  12. static const struct snd_soc_acpi_codecs essx_83x6 = {
  13. .num_codecs = 3,
  14. .codecs = { "ESSX8316", "ESSX8326", "ESSX8336"},
  15. };
  16. static struct skl_machine_pdata cnl_pdata = {
  17. .use_tplg_pcm = true,
  18. };
  19. struct snd_soc_acpi_mach snd_soc_acpi_intel_cnl_machines[] = {
  20. {
  21. .id = "INT34C2",
  22. .drv_name = "cnl_rt274",
  23. .fw_filename = "intel/dsp_fw_cnl.bin",
  24. .pdata = &cnl_pdata,
  25. .sof_tplg_filename = "sof-cnl-rt274.tplg",
  26. },
  27. {
  28. .comp_ids = &essx_83x6,
  29. .drv_name = "sof-essx8336",
  30. /* cnl and cml are identical */
  31. .sof_tplg_filename = "sof-cml-es8336", /* the tplg suffix is added at run time */
  32. .tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_SSP_NUMBER |
  33. SND_SOC_ACPI_TPLG_INTEL_SSP_MSB |
  34. SND_SOC_ACPI_TPLG_INTEL_DMIC_NUMBER,
  35. },
  36. {},
  37. };
  38. EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_cnl_machines);
  39. static const struct snd_soc_acpi_endpoint single_endpoint = {
  40. .num = 0,
  41. .aggregated = 0,
  42. .group_position = 0,
  43. .group_id = 0,
  44. };
  45. static const struct snd_soc_acpi_adr_device rt5682_2_adr[] = {
  46. {
  47. .adr = 0x000220025D568200ull,
  48. .num_endpoints = 1,
  49. .endpoints = &single_endpoint,
  50. .name_prefix = "rt5682"
  51. }
  52. };
  53. static const struct snd_soc_acpi_link_adr up_extreme_rt5682_2[] = {
  54. {
  55. .mask = BIT(2),
  56. .num_adr = ARRAY_SIZE(rt5682_2_adr),
  57. .adr_d = rt5682_2_adr,
  58. },
  59. {}
  60. };
  61. struct snd_soc_acpi_mach snd_soc_acpi_intel_cnl_sdw_machines[] = {
  62. {
  63. .link_mask = BIT(2),
  64. .links = up_extreme_rt5682_2,
  65. .drv_name = "sof_sdw",
  66. .sof_tplg_filename = "sof-cnl-rt5682-sdw2.tplg"
  67. },
  68. {
  69. .link_mask = GENMASK(3, 0),
  70. .links = sdw_mockup_headset_2amps_mic,
  71. .drv_name = "sof_sdw",
  72. .sof_tplg_filename = "sof-cml-rt711-rt1308-rt715.tplg",
  73. },
  74. {
  75. .link_mask = BIT(0) | BIT(1) | BIT(3),
  76. .links = sdw_mockup_headset_1amp_mic,
  77. .drv_name = "sof_sdw",
  78. .sof_tplg_filename = "sof-cml-rt711-rt1308-mono-rt715.tplg",
  79. },
  80. {}
  81. };
  82. EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_cnl_sdw_machines);