kernel-5.15/0416-ASoC-Intel-sof_es8336-Add-a-quirk-for-Huawei-Mateboo.patch
Mikhail Novosyolov 1c8af1cc2e Reformat Aquarius sound as backports from upstream, automate quirk
Also update configs (added Kconfig entry from patches)
2022-09-07 17:14:09 +03:00

45 lines
1.5 KiB
Diff

From fe676f7c92783813348d12ee2baf6b3bbac8bedb Mon Sep 17 00:00:00 2001
From: Mauro Carvalho Chehab <mchehab@kernel.org>
Date: Thu, 7 Apr 2022 20:49:59 +0200
Subject: [PATCH 416/424] ASoC: Intel: sof_es8336: Add a quirk for Huawei
Matebook D15
Based on experimental tests, Huawei Matebook D15 actually uses
both gpio0 and gpio1: the first one controls the speaker, while
the other one controls the headphone.
Also, the headset is mapped as MIC1, instead of MIC2.
So, add a quirk for it.
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/d678aef9fc9a07aced611aa7cb8c9b800c649e5a.1649357263.git.mchehab@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/intel/boards/sof_es8336.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/sound/soc/intel/boards/sof_es8336.c b/sound/soc/intel/boards/sof_es8336.c
index c71842be9..9d617831d 100644
--- a/sound/soc/intel/boards/sof_es8336.c
+++ b/sound/soc/intel/boards/sof_es8336.c
@@ -304,6 +304,15 @@ static const struct dmi_system_id sof_es8336_quirk_table[] = {
},
.driver_data = (void *)(SOF_ES8336_SPEAKERS_EN_GPIO1_QUIRK)
},
+ {
+ .callback = sof_es8336_quirk_cb,
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "HUAWEI"),
+ DMI_MATCH(DMI_BOARD_NAME, "BOHB-WAX9-PCB-B2"),
+ },
+ .driver_data = (void *)(SOF_ES8336_HEADPHONE_GPIO |
+ SOC_ES8336_HEADSET_MIC1)
+ },
{}
};
--
2.35.2