From: Vitaly Rodionov <vitalyr@opensource.cirrus.com> To: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com> Cc: <alsa-devel@alsa-project.org>, <patches@opensource.cirrus.com>, <linux-kernel@vger.kernel.org>, Stefan Binding <sbinding@opensource.cirrus.com> Subject: [PATCH 1/2] ALSA: hda/cs8409: Prevent pops and clicks during suspend Date: Thu, 12 Aug 2021 19:34:32 +0100 [thread overview] Message-ID: <20210812183433.6330-1-vitalyr@opensource.cirrus.com> (raw) From: Stefan Binding <sbinding@opensource.cirrus.com> 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> --- sound/pci/hda/patch_cs8409.c | 6 ++++++ 1 file changed, 6 insertions(+) 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 }, -- 2.25.1
WARNING: multiple messages have this Message-ID (diff)
From: Vitaly Rodionov <vitalyr@opensource.cirrus.com> To: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com> Cc: patches@opensource.cirrus.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Stefan Binding <sbinding@opensource.cirrus.com> Subject: [PATCH 1/2] ALSA: hda/cs8409: Prevent pops and clicks during suspend Date: Thu, 12 Aug 2021 19:34:32 +0100 [thread overview] Message-ID: <20210812183433.6330-1-vitalyr@opensource.cirrus.com> (raw) From: Stefan Binding <sbinding@opensource.cirrus.com> 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> --- sound/pci/hda/patch_cs8409.c | 6 ++++++ 1 file changed, 6 insertions(+) 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 }, -- 2.25.1
next reply other threads:[~2021-08-12 18:35 UTC|newest] Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-08-12 18:34 Vitaly Rodionov [this message] 2021-08-12 18:34 ` [PATCH 1/2] ALSA: hda/cs8409: Prevent pops and clicks during suspend Vitaly Rodionov 2021-08-12 18:34 ` [PATCH 2/2] ALSA: hda/cs8409: Prevent pops and clicks during reboot Vitaly Rodionov 2021-08-12 18:34 ` Vitaly Rodionov 2021-08-13 6:10 ` Takashi Iwai 2021-08-13 6:10 ` Takashi Iwai 2021-08-14 6:41 ` Takashi Iwai 2021-08-14 6:41 ` Takashi Iwai 2021-08-17 11:28 ` Vitaly Rodionov 2021-08-17 11:28 ` Vitaly Rodionov 2021-08-17 12:16 ` Takashi Iwai 2021-08-17 12:16 ` Takashi Iwai 2021-08-25 18:04 ` Vitaly Rodionov 2021-08-26 6:03 ` Takashi Iwai 2021-08-26 6:03 ` Takashi Iwai 2021-08-26 10:49 ` Takashi Iwai 2021-08-26 10:49 ` Takashi Iwai 2021-08-26 10:56 ` Vitaly Rodionov 2021-08-26 10:56 ` Vitaly Rodionov [not found] ` <9a3c2f9e-e2a5-702f-bd3f-7348097a0500@opensource.cirrus.com> 2021-08-26 12:20 ` Takashi Iwai 2021-08-26 13:00 ` Vitaly Rodionov 2021-08-26 15:14 ` Vitaly Rodionov 2021-08-26 15:29 ` Takashi Iwai 2021-08-13 6:08 ` [PATCH 1/2] ALSA: hda/cs8409: Prevent pops and clicks during suspend Takashi Iwai 2021-08-13 6:08 ` Takashi Iwai
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210812183433.6330-1-vitalyr@opensource.cirrus.com \ --to=vitalyr@opensource.cirrus.com \ --cc=alsa-devel@alsa-project.org \ --cc=linux-kernel@vger.kernel.org \ --cc=patches@opensource.cirrus.com \ --cc=perex@perex.cz \ --cc=sbinding@opensource.cirrus.com \ --cc=tiwai@suse.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.