Skip to content

Commit fff393d

Browse files
Stefan Bindingtiwai
authored andcommitted
ALSA: hda: cs35l41: Assert Reset prior to de-asserting in probe and system resume
To ensure we are in a known state, exiting from reset at the point of probe or in system resume, assert reset before we de-assert it. Since the BIOS may enter into a pre-boot environment to control the amps (for example for boot beep), we need to ensure we start from a known, reset state prior to probe or system resume. Signed-off-by: Stefan Binding <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent a7423e9 commit fff393d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sound/pci/hda/cs35l41_hda.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -840,6 +840,7 @@ static int cs35l41_system_resume(struct device *dev)
840840
}
841841

842842
if (cs35l41->reset_gpio) {
843+
gpiod_set_value_cansleep(cs35l41->reset_gpio, 0);
843844
usleep_range(2000, 2100);
844845
gpiod_set_value_cansleep(cs35l41->reset_gpio, 1);
845846
}
@@ -1693,6 +1694,7 @@ int cs35l41_hda_probe(struct device *dev, const char *device_name, int id, int i
16931694
}
16941695
}
16951696
if (cs35l41->reset_gpio) {
1697+
gpiod_set_value_cansleep(cs35l41->reset_gpio, 0);
16961698
usleep_range(2000, 2100);
16971699
gpiod_set_value_cansleep(cs35l41->reset_gpio, 1);
16981700
}

0 commit comments

Comments
 (0)