soc-acpi-intel-bxt-match.c 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * soc-acpi-intel-bxt-match.c - tables and support for BXT ACPI enumeration.
  4. *
  5. * Copyright (c) 2018, Intel Corporation.
  6. *
  7. */
  8. #include <linux/dmi.h>
  9. #include <sound/soc-acpi.h>
  10. #include <sound/soc-acpi-intel-match.h>
  11. enum {
  12. APL_RVP,
  13. };
  14. static const struct dmi_system_id apl_table[] = {
  15. {
  16. .matches = {
  17. DMI_MATCH(DMI_SYS_VENDOR, "Intel Corp."),
  18. DMI_MATCH(DMI_BOARD_NAME, "Apollolake RVP1A"),
  19. },
  20. .driver_data = (void *)(APL_RVP),
  21. },
  22. {}
  23. };
  24. static struct snd_soc_acpi_mach *apl_quirk(void *arg)
  25. {
  26. struct snd_soc_acpi_mach *mach = arg;
  27. const struct dmi_system_id *dmi_id;
  28. unsigned long apl_machine_id;
  29. dmi_id = dmi_first_match(apl_table);
  30. if (dmi_id) {
  31. apl_machine_id = (unsigned long)dmi_id->driver_data;
  32. if (apl_machine_id == APL_RVP)
  33. return NULL;
  34. }
  35. return mach;
  36. }
  37. static const struct snd_soc_acpi_codecs essx_83x6 = {
  38. .num_codecs = 3,
  39. .codecs = { "ESSX8316", "ESSX8326", "ESSX8336"},
  40. };
  41. static const struct snd_soc_acpi_codecs bxt_codecs = {
  42. .num_codecs = 1,
  43. .codecs = {"MX98357A"}
  44. };
  45. struct snd_soc_acpi_mach snd_soc_acpi_intel_bxt_machines[] = {
  46. {
  47. .id = "INT343A",
  48. .drv_name = "bxt_alc298s_i2s",
  49. .fw_filename = "intel/dsp_fw_bxtn.bin",
  50. .sof_tplg_filename = "sof-apl-rt298.tplg",
  51. },
  52. {
  53. .id = "DLGS7219",
  54. .drv_name = "bxt_da7219_mx98357a",
  55. .fw_filename = "intel/dsp_fw_bxtn.bin",
  56. .machine_quirk = snd_soc_acpi_codec_list,
  57. .quirk_data = &bxt_codecs,
  58. .sof_tplg_filename = "sof-apl-da7219.tplg",
  59. },
  60. {
  61. .id = "104C5122",
  62. .drv_name = "sof_pcm512x",
  63. .sof_tplg_filename = "sof-apl-pcm512x.tplg",
  64. },
  65. {
  66. .id = "1AEC8804",
  67. .drv_name = "sof-wm8804",
  68. .sof_tplg_filename = "sof-apl-wm8804.tplg",
  69. },
  70. {
  71. .id = "INT34C3",
  72. .drv_name = "bxt_tdf8532",
  73. .machine_quirk = apl_quirk,
  74. .sof_tplg_filename = "sof-apl-tdf8532.tplg",
  75. },
  76. {
  77. .comp_ids = &essx_83x6,
  78. .drv_name = "sof-essx8336",
  79. .sof_tplg_filename = "sof-apl-es8336", /* the tplg suffix is added at run time */
  80. .tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_SSP_NUMBER |
  81. SND_SOC_ACPI_TPLG_INTEL_SSP_MSB |
  82. SND_SOC_ACPI_TPLG_INTEL_DMIC_NUMBER,
  83. },
  84. {},
  85. };
  86. EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_bxt_machines);