-
-
Save steffengy/aa48549f40c37acf85de7a7f9a6c0475 to your computer and use it in GitHub Desktop.
--- ./cs35l41_hda_property.old.c 2024-04-03 15:32:51.000000000 +0200 | |
+++ ./cs35l41_hda_property.c 2024-04-03 20:27:58.179588400 +0200 | |
@@ -83,6 +83,7 @@ | |
{ "104317F3", 2, INTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 }, 0, 1, -1, 1000, 4500, 24 }, | |
{ "10431863", 2, INTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 }, 1, 2, 0, 1000, 4500, 24 }, | |
{ "104318D3", 2, EXTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 }, 0, 1, -1, 0, 0, 0 }, | |
+ { "10431A63", 2, EXTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 }, -1, 2, -1, 0, 0, 0 }, | |
{ "10431A83", 2, INTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 }, 0, 1, -1, 1000, 4500, 24 }, | |
{ "10431C9F", 2, INTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 }, 1, 2, 0, 1000, 4500, 24 }, | |
{ "10431CAF", 2, INTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 }, 1, 2, 0, 1000, 4500, 24 }, | |
@@ -229,7 +230,7 @@ | |
dsd_found = acpi_dev_has_props(cs35l41->dacpi); | |
- if (!dsd_found) { | |
+ // if (!dsd_found) { | |
ret = cs35l41_add_gpios(cs35l41, physdev, cfg->reset_gpio_index, | |
cfg->spkid_gpio_index, cfg->cs_gpio_index, | |
cfg->num_amps); | |
@@ -237,10 +238,10 @@ | |
dev_err(cs35l41->dev, "Error adding GPIO mapping: %d\n", ret); | |
return ret; | |
} | |
- } else if (cfg->reset_gpio_index >= 0 || cfg->spkid_gpio_index >= 0) { | |
+ /*} else if (cfg->reset_gpio_index >= 0 || cfg->spkid_gpio_index >= 0) { | |
dev_warn(cs35l41->dev, "Cannot add Reset/Speaker ID/SPI CS GPIO Mapping, " | |
"_DSD already exists.\n"); | |
- } | |
+ }*/ | |
if (cs35l41->control_bus == SPI) { | |
cs35l41->index = id; | |
@@ -420,6 +421,7 @@ | |
{ "CSC3551", "104317F3", generic_dsd_config }, | |
{ "CSC3551", "10431863", generic_dsd_config }, | |
{ "CSC3551", "104318D3", generic_dsd_config }, | |
+ { "CSC3551", "10431A63", generic_dsd_config }, | |
{ "CSC3551", "10431A83", generic_dsd_config }, | |
{ "CSC3551", "10431C9F", generic_dsd_config }, | |
{ "CSC3551", "10431CAF", generic_dsd_config }, |
Alright! That helps to know that both solutions would work. I agree on the kernel approach. I've e-mailed someone at Cirrus Logic that appears to deal with this file & firmware. Hopefully we get guidance : )
I've been hinted where to file a bug, so here it is: https://bugzilla.kernel.org/show_bug.cgi?id=218991
There are a bunch of patches that have been submitted over the weeks doing something very similar to what you're doing, for other laptops. So, that appears to be a classic issue!
FYI, that's someone from Cirrus Logic having created a Linux kernel patch and is now in the process of submitting it upstream. More details in https://bugzilla.kernel.org/show_bug.cgi?id=218991 . They've also freshly updated the firmware for this laptop.
@paul-ri Thanks!
Will also test when it lands, to me upstream requested patch looks good.
https://lore.kernel.org/lkml/20240703140802.27688-1-sbinding@opensource.cirrus.com/
Ah good find!
So far haven't taken the time to do so and unsure when/if I will - as wouldn't be upstreamed like this but with a less hacky patch.
My original hope was they'd just fix that in DSD shipped in bios eventually, but that seems unlikely.
In theory both variants should work, I personally think this one is less "invasive" and "simpler" in some ways.