summaryrefslogtreecommitdiff
path: root/sound/pci
diff options
context:
space:
mode:
authorStefan Binding <sbinding@opensource.cirrus.com>2021-08-12 19:34:32 +0100
committerTakashi Iwai <tiwai@suse.de>2021-08-13 08:07:59 +0200
commit1a04830169d00cde48e13072a1ed2222784a958b (patch)
treec74a37f17384d78dbde6cf4a013d97bed0473009 /sound/pci
parent0c4aa67735b754b735b85edfc909163f9289fcc2 (diff)
ALSA: hda/cs8409: Prevent pops and clicks during suspend
Some of the register values set for type detection cause pops during suspend, ensure these are cleaned up after type detection completes, as well ensuring that these are cleared when we suspend. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210812183433.6330-1-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/patch_cs8409.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_cs8409.c b/sound/pci/hda/patch_cs8409.c
index 272497b6cfcb..9db16b6292f4 100644
--- a/sound/pci/hda/patch_cs8409.c
+++ b/sound/pci/hda/patch_cs8409.c
@@ -708,6 +708,10 @@ static int cs42l42_jack_unsol_event(struct sub_codec *cs42l42)
cs42l42->mic_jack_in = 1;
}
}
+ /* Configure the HSDET mode. */
+ cs8409_i2c_write(cs42l42, 0x1120, 0x80);
+ /* Enable the HPOUT ground clamp and configure the HP pull-down */
+ cs8409_i2c_write(cs42l42, 0x1F06, 0x02);
/* Re-Enable Tip Sense Interrupt */
cs8409_i2c_write(cs42l42, 0x1320, 0xF3);
} else {
@@ -756,6 +760,8 @@ static void cs42l42_suspend(struct sub_codec *cs42l42)
unsigned int gpio_data;
int reg_cdc_status = 0;
const struct cs8409_i2c_param cs42l42_pwr_down_seq[] = {
+ { 0x1F06, 0x02 },
+ { 0x1129, 0x00 },
{ 0x2301, 0x3F },
{ 0x2302, 0x3F },
{ 0x2303, 0x3F },