summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/rt5645.c
diff options
context:
space:
mode:
authorChris Chiu <chiu@endlessos.org>2021-01-11 13:41:41 +0800
committerMark Brown <broonie@kernel.org>2021-01-11 14:03:10 +0000
commit3ac2bfd52b7de6206b1e694a4e79a39d6106c961 (patch)
treeea0443d7a3bb8f52687dda3737f0abbb2306301b /sound/soc/codecs/rt5645.c
parent28c988492cf65626d06ae32d7f20f1596c080667 (diff)
downloadlinux-3ac2bfd52b7de6206b1e694a4e79a39d6106c961.tar.bz2
ASoC: rt5645: Enable internal microphone and JD on ECS EF20
On ECS EF20 series laptops, the internal mic is on DMIC2/IN2P. And they need the inv_hp_det to make jack detection to work as exoected. Signed-off-by: Chris Chiu <chiu@endlessos.org> Link: https://lore.kernel.org/r/20210111054141.4668-5-chiu@endlessos.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/rt5645.c')
-rw-r--r--sound/soc/codecs/rt5645.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c
index aaeb10c59334..63a7e052eaa0 100644
--- a/sound/soc/codecs/rt5645.c
+++ b/sound/soc/codecs/rt5645.c
@@ -3639,6 +3639,12 @@ static const struct rt5645_platform_data kahlee_platform_data = {
.jd_mode = 3,
};
+static const struct rt5645_platform_data ecs_ef20_platform_data = {
+ .dmic1_data_pin = RT5645_DMIC1_DISABLE,
+ .dmic2_data_pin = RT5645_DMIC_DATA_IN2P,
+ .inv_hp_pol = 1,
+};
+
static const struct acpi_gpio_params ef20_hp_detect = { 1, 0, false };
static const struct acpi_gpio_mapping cht_rt5645_ef20_gpios[] = {
@@ -3787,6 +3793,7 @@ static const struct dmi_system_id dmi_platform_data[] = {
.matches = {
DMI_MATCH(DMI_PRODUCT_NAME, "EF20"),
},
+ .driver_data = (void *)&ecs_ef20_platform_data,
},
{
.ident = "EF20EA",
@@ -3794,6 +3801,7 @@ static const struct dmi_system_id dmi_platform_data[] = {
.matches = {
DMI_MATCH(DMI_PRODUCT_NAME, "EF20EA"),
},
+ .driver_data = (void *)&ecs_ef20_platform_data,
},
{ }
};