aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2015-10-03 01:58:54 +0100
committerBen Hutchings <ben@decadent.org.uk>2015-10-03 01:58:54 +0100
commit721a706deac59d73a1959b014b8917b137b7266f (patch)
tree09dc8df4ac57a92ee6538185e31bd5f53c80d4e1
parentb7435df5dba92cbcc02e00d1ae643a4b20a5123d (diff)
downloadkernel_replicant_linux-721a706deac59d73a1959b014b8917b137b7266f.tar.gz
kernel_replicant_linux-721a706deac59d73a1959b014b8917b137b7266f.tar.bz2
kernel_replicant_linux-721a706deac59d73a1959b014b8917b137b7266f.zip
[x86] ALSA: hda - Disable power_save_node for Thinkpads (Closes: #800694)
-rw-r--r--debian/changelog1
-rw-r--r--debian/patches/bugfix/x86/alsa-hda-disable-power_save_node-for-thinkpads.patch80
-rw-r--r--debian/patches/series1
3 files changed, 82 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 7c8c8b6fc447..e44058a8441a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
linux (4.2.1-3) UNRELEASED; urgency=medium
* ovl: conditionally use O_LARGEFILE in ovl_copy_up() (Closes: #800724)
+ * [x86] ALSA: hda - Disable power_save_node for Thinkpads (Closes: #800694)
-- Ben Hutchings <ben@decadent.org.uk> Sat, 03 Oct 2015 00:14:59 +0100
diff --git a/debian/patches/bugfix/x86/alsa-hda-disable-power_save_node-for-thinkpads.patch b/debian/patches/bugfix/x86/alsa-hda-disable-power_save_node-for-thinkpads.patch
new file mode 100644
index 000000000000..9438cbaae5a4
--- /dev/null
+++ b/debian/patches/bugfix/x86/alsa-hda-disable-power_save_node-for-thinkpads.patch
@@ -0,0 +1,80 @@
+From: Takashi Iwai <tiwai@suse.de>
+Date: Thu, 24 Sep 2015 17:36:51 +0200
+Subject: ALSA: hda - Disable power_save_node for Thinkpads
+Origin: https://git.kernel.org/linus/7f57d803ee03730d570dc59a9e3e4842b58dd5cc
+
+Lenovo Thinkpads with recent Realtek codecs seem suffering from click
+noises at power transition since the introduction of widget power
+saving in 4.1 kernel. Although this might be solved by some delays in
+appropriate points, as a quick workaround, just disable the
+power_save_node feature for now. The gain it gives is relatively
+small, and this makes the situation back to pre 4.1 time.
+
+This patch ended up with a bit more code changes than usual because
+the existing fixup for Thinkpads is highly chained. Instead of adding
+yet another chain, combine a few of them into a single fixup entry, as
+a gratis cleanup.
+
+Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=943982
+Cc: <stable@vger.kernel.org> # v4.1+
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+---
+ sound/pci/hda/patch_realtek.c | 31 +++++++++++++++++++------------
+ 1 file changed, 19 insertions(+), 12 deletions(-)
+
+diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
+index a75b561..afec6dc 100644
+--- a/sound/pci/hda/patch_realtek.c
++++ b/sound/pci/hda/patch_realtek.c
+@@ -4188,6 +4188,24 @@ static void alc_fixup_disable_aamix(struct hda_codec *codec,
+ }
+ }
+
++/* fixup for Thinkpad docks: add dock pins, avoid HP parser fixup */
++static void alc_fixup_tpt440_dock(struct hda_codec *codec,
++ const struct hda_fixup *fix, int action)
++{
++ static const struct hda_pintbl pincfgs[] = {
++ { 0x16, 0x21211010 }, /* dock headphone */
++ { 0x19, 0x21a11010 }, /* dock mic */
++ { }
++ };
++ struct alc_spec *spec = codec->spec;
++
++ if (action == HDA_FIXUP_ACT_PRE_PROBE) {
++ spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP;
++ codec->power_save_node = 0; /* avoid click noises */
++ snd_hda_apply_pincfgs(codec, pincfgs);
++ }
++}
++
+ static void alc_shutup_dell_xps13(struct hda_codec *codec)
+ {
+ struct alc_spec *spec = codec->spec;
+@@ -4562,7 +4580,6 @@ enum {
+ ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC,
+ ALC293_FIXUP_DELL1_MIC_NO_PRESENCE,
+ ALC292_FIXUP_TPT440_DOCK,
+- ALC292_FIXUP_TPT440_DOCK2,
+ ALC283_FIXUP_BXBT2807_MIC,
+ ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED,
+ ALC282_FIXUP_ASPIRE_V5_PINS,
+@@ -5029,17 +5046,7 @@ static const struct hda_fixup alc269_fixups[] = {
+ },
+ [ALC292_FIXUP_TPT440_DOCK] = {
+ .type = HDA_FIXUP_FUNC,
+- .v.func = alc269_fixup_pincfg_no_hp_to_lineout,
+- .chained = true,
+- .chain_id = ALC292_FIXUP_TPT440_DOCK2
+- },
+- [ALC292_FIXUP_TPT440_DOCK2] = {
+- .type = HDA_FIXUP_PINS,
+- .v.pins = (const struct hda_pintbl[]) {
+- { 0x16, 0x21211010 }, /* dock headphone */
+- { 0x19, 0x21a11010 }, /* dock mic */
+- { }
+- },
++ .v.func = alc_fixup_tpt440_dock,
+ .chained = true,
+ .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST
+ },
diff --git a/debian/patches/series b/debian/patches/series
index 549116cfb4ed..d7ee7976e620 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -100,3 +100,4 @@ bugfix/all/media-uvcvideo-disable-hardware-timestamps-by-defaul.patch
bugfix/all/sctp-fix-race-on-protocol-netns-initialization.patch
bugfix/mips/mips-pgtable-bits.h-correct-_page_global_shift-build.patch
bugfix/all/ovl-conditionally-use-o_largefile-in-ovl_copy_up.patch
+bugfix/x86/alsa-hda-disable-power_save_node-for-thinkpads.patch