* Patch "ALSA: hda - Shutdown CX20722 on reboot/free to avoid spurious noises" has been added to the 4.1-stable tree
@ 2015-09-11 22:17 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2015-09-11 22:17 UTC (permalink / raw)
To: david.henningsson, gregkh, tiwai; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
ALSA: hda - Shutdown CX20722 on reboot/free to avoid spurious noises
to the 4.1-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
alsa-hda-shutdown-cx20722-on-reboot-free-to-avoid-spurious-noises.patch
and it can be found in the queue-4.1 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From f6b28e4ded45bb91bc4cd115d55e35badedfce5f Mon Sep 17 00:00:00 2001
From: David Henningsson <david.henningsson@canonical.com>
Date: Fri, 21 Aug 2015 09:42:35 +0200
Subject: ALSA: hda - Shutdown CX20722 on reboot/free to avoid spurious noises
From: David Henningsson <david.henningsson@canonical.com>
commit f6b28e4ded45bb91bc4cd115d55e35badedfce5f upstream.
On shutdown/reboot of CX20722, first shut down all EAPDs, then
shut down the afg node to D3.
Failure to do so can lead to spurious noises from the internal speaker
directly after reboot (and before the codec is reinitialized again, i e
in BIOS setup or GRUB menus).
BugLink: https://bugs.launchpad.net/bugs/1487345
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/pci/hda/patch_conexant.c | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -200,12 +200,33 @@ static int cx_auto_init(struct hda_codec
return 0;
}
-#define cx_auto_free snd_hda_gen_free
+static void cx_auto_reboot_notify(struct hda_codec *codec)
+{
+ struct conexant_spec *spec = codec->spec;
+
+ if (codec->core.vendor_id != 0x14f150f2)
+ return;
+
+ /* Turn the CX20722 codec into D3 to avoid spurious noises
+ from the internal speaker during (and after) reboot */
+ cx_auto_turn_eapd(codec, spec->num_eapds, spec->eapds, false);
+
+ snd_hda_codec_set_power_to_all(codec, codec->core.afg, AC_PWRST_D3);
+ snd_hda_codec_write(codec, codec->core.afg, 0,
+ AC_VERB_SET_POWER_STATE, AC_PWRST_D3);
+}
+
+static void cx_auto_free(struct hda_codec *codec)
+{
+ cx_auto_reboot_notify(codec);
+ snd_hda_gen_free(codec);
+}
static const struct hda_codec_ops cx_auto_patch_ops = {
.build_controls = cx_auto_build_controls,
.build_pcms = snd_hda_gen_build_pcms,
.init = cx_auto_init,
+ .reboot_notify = cx_auto_reboot_notify,
.free = cx_auto_free,
.unsol_event = snd_hda_jack_unsol_event,
#ifdef CONFIG_PM
Patches currently in stable-queue which might be from david.henningsson@canonical.com are
queue-4.1/alsa-hda-shutdown-cx20722-on-reboot-free-to-avoid-spurious-noises.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-09-11 22:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-11 22:17 Patch "ALSA: hda - Shutdown CX20722 on reboot/free to avoid spurious noises" has been added to the 4.1-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).