diff mbox series

[2/4] ASoC: Intel: bytcht_es8316: Dump basic _DSM information

Message ID 20231104142439.21983-3-hdegoede@redhat.com
State Superseded
Headers show
Series ASoC: Intel: bytcht_es8316: Determine quirks/routing through ACPI DSM | expand

Commit Message

Hans de Goede Nov. 4, 2023, 2:24 p.m. UTC
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

Instead of adding DMI quirks for each new tablet model which uses
the ESS8316 codec, the plan is to switch to querying the same ACPI
Device-Specific-Method (DSM) as Windows uses to determine things
like speaker and mic routing.

Call the new es83xx_dsm_dump() helper which logs various basic settings
which can be queried through the ACPI DSM method on the codec ACPI device,
this is intended to help with developing a DSM based solution to replace
most DMI quirks.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
[hdegoede@redhat.com: improve commit message]
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 sound/soc/intel/boards/Kconfig         | 1 +
 sound/soc/intel/boards/bytcht_es8316.c | 3 +++
 2 files changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/sound/soc/intel/boards/Kconfig b/sound/soc/intel/boards/Kconfig
index 3acd1aefda75..77dcb2701ebd 100644
--- a/sound/soc/intel/boards/Kconfig
+++ b/sound/soc/intel/boards/Kconfig
@@ -233,6 +233,7 @@  config SND_SOC_INTEL_BYT_CHT_ES8316_MACH
 	depends on GPIOLIB || COMPILE_TEST
 	select SND_SOC_ACPI
 	select SND_SOC_ES8316
+	select SND_SOC_INTEL_ES83XX_DSM_COMMON
 	help
 	  This adds support for ASoC machine driver for Intel(R) Baytrail &
 	  Cherrytrail platforms with ES8316 audio codec.
diff --git a/sound/soc/intel/boards/bytcht_es8316.c b/sound/soc/intel/boards/bytcht_es8316.c
index 8a0b0e864fbb..9a870bbae588 100644
--- a/sound/soc/intel/boards/bytcht_es8316.c
+++ b/sound/soc/intel/boards/bytcht_es8316.c
@@ -27,6 +27,7 @@ 
 #include <sound/pcm_params.h>
 #include <sound/soc.h>
 #include <sound/soc-acpi.h>
+#include "es83xx-dsm-common.h"
 #include "../atom/sst-atom-controls.h"
 #include "../common/soc-intel-quirks.h"
 
@@ -520,6 +521,8 @@  static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev)
 		return ret;
 	}
 
+	es83xx_dsm_dump(priv->codec_dev);
+
 	/* Check for BYTCR or other platform and setup quirks */
 	dmi_id = dmi_first_match(byt_cht_es8316_quirk_table);
 	if (dmi_id) {