Skip to content

Commit f01b371

Browse files
Stefan Bindingtiwai
authored andcommitted
ALSA: hda: cs35l41: Use reset label to get GPIO for HP Zbook Fury 17 G9
This laptop has an incorrect setting in its _DSD for boost type, but the rest of the _DSD is correct, and we can still use the reset label to obtain the reset gpio. Also fix channel map so that amp 0 is right, and amp 1 is left. Fixes: 581523e ("ALSA: hda: cs35l41: Override the _DSD for HP Zbook Fury 17 G9 to correct boost type") Signed-off-by: Stefan Binding <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 970171a commit f01b371

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

sound/pci/hda/cs35l41_hda_property.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,16 @@ static int hp_vision_acpi_fix(struct cs35l41_hda *cs35l41, struct device *physde
5858

5959
cs35l41->index = id;
6060
cs35l41->channel_index = 0;
61-
cs35l41->reset_gpio = gpiod_get_index(physdev, NULL, 1, GPIOD_OUT_HIGH);
61+
62+
/*
63+
* This system has _DSD, it just contains an error, so we can still get the reset using
64+
* the "reset" label.
65+
*/
66+
cs35l41->reset_gpio = fwnode_gpiod_get_index(acpi_fwnode_handle(cs35l41->dacpi), "reset",
67+
cs35l41->index, GPIOD_OUT_LOW,
68+
"cs35l41-reset");
6269
cs35l41->speaker_id = -ENOENT;
63-
hw_cfg->spk_pos = cs35l41->index ? 1 : 0; // right:left
70+
hw_cfg->spk_pos = cs35l41->index ? 0 : 1; // right:left
6471
hw_cfg->gpio1.func = CS35L41_NOT_USED;
6572
hw_cfg->gpio1.valid = true;
6673
hw_cfg->gpio2.func = CS35L41_INTERRUPT;

0 commit comments

Comments
 (0)