Commit 3ac2bfd5 authored by Chris Chiu's avatar Chris Chiu Committed by Mark Brown

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: default avatarChris Chiu <chiu@endlessos.org>
Link: https://lore.kernel.org/r/20210111054141.4668-5-chiu@endlessos.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 28c98849
...@@ -3639,6 +3639,12 @@ static const struct rt5645_platform_data kahlee_platform_data = { ...@@ -3639,6 +3639,12 @@ static const struct rt5645_platform_data kahlee_platform_data = {
.jd_mode = 3, .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_params ef20_hp_detect = { 1, 0, false };
static const struct acpi_gpio_mapping cht_rt5645_ef20_gpios[] = { static const struct acpi_gpio_mapping cht_rt5645_ef20_gpios[] = {
...@@ -3787,6 +3793,7 @@ static const struct dmi_system_id dmi_platform_data[] = { ...@@ -3787,6 +3793,7 @@ static const struct dmi_system_id dmi_platform_data[] = {
.matches = { .matches = {
DMI_MATCH(DMI_PRODUCT_NAME, "EF20"), DMI_MATCH(DMI_PRODUCT_NAME, "EF20"),
}, },
.driver_data = (void *)&ecs_ef20_platform_data,
}, },
{ {
.ident = "EF20EA", .ident = "EF20EA",
...@@ -3794,6 +3801,7 @@ static const struct dmi_system_id dmi_platform_data[] = { ...@@ -3794,6 +3801,7 @@ static const struct dmi_system_id dmi_platform_data[] = {
.matches = { .matches = {
DMI_MATCH(DMI_PRODUCT_NAME, "EF20EA"), DMI_MATCH(DMI_PRODUCT_NAME, "EF20EA"),
}, },
.driver_data = (void *)&ecs_ef20_platform_data,
}, },
{ } { }
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment