From: Kai-Heng Feng <kai.heng.feng@canonical.com> To: tiwai@suse.com Cc: David_chen7@dell.com, "Kai-Heng Feng" <kai.heng.feng@canonical.com>, "Jaroslav Kysela" <perex@perex.cz>, "Kailang Yang" <kailang@realtek.com>, "Hui Wang" <hui.wang@canonical.com>, "Jian-Hong Pan" <jian-hong@endlessm.com>, "Tomas Espeleta" <tomas.espeleta@gmail.com>, "Thomas Hebb" <tommyhebb@gmail.com>, "Michał Mirosław" <mirq-linux@rere.qmqm.pl>, alsa-devel@alsa-project.org (moderated list:SOUND), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 2/2] ALSA: hda/realtek - Fix S3 pop noise on Dell Wyse Date: Sun, 3 May 2020 23:24:47 +0800 [thread overview] Message-ID: <20200503152449.22761-2-kai.heng.feng@canonical.com> (raw) In-Reply-To: <20200503152449.22761-1-kai.heng.feng@canonical.com> Commit 317d9313925c ("ALSA: hda/realtek - Set default power save node to 0") makes the ALC225 have pop noise on S3 resume and cold boot. The previous fix enable power save node universally for ALC225, however it makes some ALC225 systems unable to produce any sound. So let's only enable power save node for the affected Dell Wyse platform. Fixes: 317d9313925c ("ALSA: hda/realtek - Set default power save node to 0") BugLink: https://bugs.launchpad.net/bugs/1866357 Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> --- sound/pci/hda/patch_realtek.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index dedf0c17f198..c34b8843bb25 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -5893,6 +5893,15 @@ static void alc233_alc662_fixup_lenovo_dual_codecs(struct hda_codec *codec, } } +static void alc225_fixup_s3_pop_noise(struct hda_codec *codec, + const struct hda_fixup *fix, int action) +{ + if (action != HDA_FIXUP_ACT_PRE_PROBE) + return; + + codec->power_save_node = 1; +} + /* Forcibly assign NID 0x03 to HP/LO while NID 0x02 to SPK for EQ */ static void alc274_fixup_bind_dacs(struct hda_codec *codec, const struct hda_fixup *fix, int action) @@ -6082,6 +6091,7 @@ enum { ALC233_FIXUP_ACER_HEADSET_MIC, ALC294_FIXUP_LENOVO_MIC_LOCATION, ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE, + ALC225_FIXUP_S3_POP_NOISE, ALC700_FIXUP_INTEL_REFERENCE, ALC274_FIXUP_DELL_BIND_DACS, ALC274_FIXUP_DELL_AIO_LINEOUT_VERB, @@ -6969,6 +6979,12 @@ static const struct hda_fixup alc269_fixups[] = { { } }, .chained = true, + .chain_id = ALC225_FIXUP_S3_POP_NOISE + }, + [ALC225_FIXUP_S3_POP_NOISE] = { + .type = HDA_FIXUP_FUNC, + .v.func = alc225_fixup_s3_pop_noise, + .chained = true, .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC }, [ALC700_FIXUP_INTEL_REFERENCE] = { -- 2.17.1
WARNING: multiple messages have this Message-ID (diff)
From: Kai-Heng Feng <kai.heng.feng@canonical.com> To: tiwai@suse.com Cc: "moderated list:SOUND" <alsa-devel@alsa-project.org>, "Kailang Yang" <kailang@realtek.com>, "Tomas Espeleta" <tomas.espeleta@gmail.com>, "Thomas Hebb" <tommyhebb@gmail.com>, David_chen7@dell.com, "open list" <linux-kernel@vger.kernel.org>, "Hui Wang" <hui.wang@canonical.com>, "Kai-Heng Feng" <kai.heng.feng@canonical.com>, "Jian-Hong Pan" <jian-hong@endlessm.com>, "Michał Mirosław" <mirq-linux@rere.qmqm.pl> Subject: [PATCH 2/2] ALSA: hda/realtek - Fix S3 pop noise on Dell Wyse Date: Sun, 3 May 2020 23:24:47 +0800 [thread overview] Message-ID: <20200503152449.22761-2-kai.heng.feng@canonical.com> (raw) In-Reply-To: <20200503152449.22761-1-kai.heng.feng@canonical.com> Commit 317d9313925c ("ALSA: hda/realtek - Set default power save node to 0") makes the ALC225 have pop noise on S3 resume and cold boot. The previous fix enable power save node universally for ALC225, however it makes some ALC225 systems unable to produce any sound. So let's only enable power save node for the affected Dell Wyse platform. Fixes: 317d9313925c ("ALSA: hda/realtek - Set default power save node to 0") BugLink: https://bugs.launchpad.net/bugs/1866357 Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> --- sound/pci/hda/patch_realtek.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index dedf0c17f198..c34b8843bb25 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -5893,6 +5893,15 @@ static void alc233_alc662_fixup_lenovo_dual_codecs(struct hda_codec *codec, } } +static void alc225_fixup_s3_pop_noise(struct hda_codec *codec, + const struct hda_fixup *fix, int action) +{ + if (action != HDA_FIXUP_ACT_PRE_PROBE) + return; + + codec->power_save_node = 1; +} + /* Forcibly assign NID 0x03 to HP/LO while NID 0x02 to SPK for EQ */ static void alc274_fixup_bind_dacs(struct hda_codec *codec, const struct hda_fixup *fix, int action) @@ -6082,6 +6091,7 @@ enum { ALC233_FIXUP_ACER_HEADSET_MIC, ALC294_FIXUP_LENOVO_MIC_LOCATION, ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE, + ALC225_FIXUP_S3_POP_NOISE, ALC700_FIXUP_INTEL_REFERENCE, ALC274_FIXUP_DELL_BIND_DACS, ALC274_FIXUP_DELL_AIO_LINEOUT_VERB, @@ -6969,6 +6979,12 @@ static const struct hda_fixup alc269_fixups[] = { { } }, .chained = true, + .chain_id = ALC225_FIXUP_S3_POP_NOISE + }, + [ALC225_FIXUP_S3_POP_NOISE] = { + .type = HDA_FIXUP_FUNC, + .v.func = alc225_fixup_s3_pop_noise, + .chained = true, .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC }, [ALC700_FIXUP_INTEL_REFERENCE] = { -- 2.17.1
next prev parent reply other threads:[~2020-05-03 15:25 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-05-03 15:24 [PATCH 1/2] Revert "ALSA: hda/realtek: Fix pop noise on ALC225" Kai-Heng Feng 2020-05-03 15:24 ` Kai-Heng Feng 2020-05-03 15:24 ` Kai-Heng Feng [this message] 2020-05-03 15:24 ` [PATCH 2/2] ALSA: hda/realtek - Fix S3 pop noise on Dell Wyse Kai-Heng Feng 2020-05-03 19:02 ` Takashi Iwai 2020-05-03 19:02 ` Takashi Iwai 2020-05-03 19:02 ` [PATCH 1/2] Revert "ALSA: hda/realtek: Fix pop noise on ALC225" Takashi Iwai 2020-05-03 19:02 ` 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=20200503152449.22761-2-kai.heng.feng@canonical.com \ --to=kai.heng.feng@canonical.com \ --cc=David_chen7@dell.com \ --cc=alsa-devel@alsa-project.org \ --cc=hui.wang@canonical.com \ --cc=jian-hong@endlessm.com \ --cc=kailang@realtek.com \ --cc=linux-kernel@vger.kernel.org \ --cc=mirq-linux@rere.qmqm.pl \ --cc=perex@perex.cz \ --cc=tiwai@suse.com \ --cc=tomas.espeleta@gmail.com \ --cc=tommyhebb@gmail.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.