Created
December 17, 2024 14:04
-
-
Save joeesteves/4f37e6d5483395506f97b88dcb213b23 to your computer and use it in GitHub Desktop.
Enable Lenovo Thinkpad e16 gen 2 amd ryzen 7735u mic on linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/sound/soc/amd/yc/acp6x-mach.c b/sound/soc/amd/yc/acp6x-mach.c | |
| index e38c5885dadf..5fe88af6c55c 100644 | |
| --- a/sound/soc/amd/yc/acp6x-mach.c | |
| +++ b/sound/soc/amd/yc/acp6x-mach.c | |
| @@ -241,6 +241,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = { | |
| DMI_MATCH(DMI_PRODUCT_NAME, "21M4"), | |
| } | |
| }, | |
| + { | |
| + .driver_data = &acp6x_card, | |
| + .matches = { | |
| + DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"), | |
| + DMI_MATCH(DMI_PRODUCT_NAME, "21M6"), | |
| + } | |
| + }, | |
| { | |
| .driver_data = &acp6x_card, | |
| .matches = { | |
| @@ -578,14 +585,19 @@ static int acp6x_probe(struct platform_device *pdev) | |
| handle = ACPI_HANDLE(pdev->dev.parent); | |
| ret = acpi_evaluate_integer(handle, "_WOV", NULL, &dmic_status); | |
| - if (!ACPI_FAILURE(ret)) | |
| + if (!ACPI_FAILURE(ret)) { | |
| wov_en = dmic_status; | |
| + if (!wov_en) | |
| + return -ENODEV; | |
| + } else { | |
| + /* Incase of ACPI method read failure then jump to check_dmi_entry */ | |
| + goto check_dmi_entry; | |
| + } | |
| - if (is_dmic_enable && wov_en) | |
| + if (is_dmic_enable) | |
| platform_set_drvdata(pdev, &acp6x_card); | |
| - else | |
| - return 0; | |
| +check_dmi_entry: | |
| /* check for any DMI overrides */ | |
| dmi_id = dmi_first_match(yc_acp_quirk_table); | |
| if (dmi_id) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment