From 4fbbd76abd224d8a914cc9435d0c69bcbad43bf0 Mon Sep 17 00:00:00 2001 From: Jeremy Cline Date: Mon, 3 Dec 2018 12:00:16 -0500 Subject: [PATCH] Fix very quiet speakers on the Thinkpad T570 (rhbz 1554304) --- ...peaker-output-regression-on-Thinkpad.patch | 59 +++++++++++++++++++ kernel.spec | 6 ++ 2 files changed, 65 insertions(+) create mode 100644 ALSA-hda-realtek-Fix-speaker-output-regression-on-Thinkpad.patch diff --git a/ALSA-hda-realtek-Fix-speaker-output-regression-on-Thinkpad.patch b/ALSA-hda-realtek-Fix-speaker-output-regression-on-Thinkpad.patch new file mode 100644 index 000000000..6bf0997a1 --- /dev/null +++ b/ALSA-hda-realtek-Fix-speaker-output-regression-on-Thinkpad.patch @@ -0,0 +1,59 @@ +From 54947cd64c1b8290f64bb2958e343c07270e3a58 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Mon, 3 Dec 2018 10:44:15 +0100 +Subject: [PATCH] ALSA: hda/realtek - Fix speaker output regression on Thinkpad + T570 + +We've got a regression report for some Thinkpad models (at least +T570s) which shows the too low speaker output volume. The bisection +leaded to the commit 61fcf8ece9b6 ("ALSA: hda/realtek - Enable Thinkpad +Dock device for ALC298 platform"), and it's basically adding the two +pin configurations for the dock, and looks harmless. + +The real culprit seems, though, that the DAC assignment for the +speaker pin is implicitly assumed on these devices, i.e. pin NID 0x14 +to be coupled with DAC NID 0x03. When more pins are configured by the +commit above, the auto-parser changes the DAC assignment, and this +resulted in the regression. + +As a workaround, just provide the fixed pin / DAC mapping table for +this Thinkpad fixup function. It's no generic solution, but the +problem itself is pretty much device-specific, so must be good +enough. + +Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1554304 +Fixes: 61fcf8ece9b6 ("ALSA: hda/realtek - Enable Thinkpad Dock device for ALC298 platform") +Cc: +Reported-and-tested-by: Jeremy Cline +Signed-off-by: Takashi Iwai +Signed-off-by: Jeremy Cline +--- + sound/pci/hda/patch_realtek.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c +index 06f93032d0cc..802f1f1b3a19 100644 +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -4988,9 +4988,18 @@ static void alc_fixup_tpt470_dock(struct hda_codec *codec, + { 0x19, 0x21a11010 }, /* dock mic */ + { } + }; ++ /* Assure the speaker pin to be coupled with DAC NID 0x03; otherwise ++ * the speaker output becomes too low by some reason on Thinkpads with ++ * ALC298 codec ++ */ ++ static hda_nid_t preferred_pairs[] = { ++ 0x14, 0x03, 0x17, 0x02, 0x21, 0x02, ++ 0 ++ }; + struct alc_spec *spec = codec->spec; + + if (action == HDA_FIXUP_ACT_PRE_PROBE) { ++ spec->gen.preferred_dacs = preferred_pairs; + spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP; + snd_hda_apply_pincfgs(codec, pincfgs); + } else if (action == HDA_FIXUP_ACT_INIT) { +-- +2.19.2 + diff --git a/kernel.spec b/kernel.spec index 56cd5bf0d..57a7f9aa0 100644 --- a/kernel.spec +++ b/kernel.spec @@ -643,6 +643,9 @@ Patch515: PCI-Fix-incorrect-value-returned-from-pcie_get_speed.patch # rhbz 1645070 patch queued upstream for merging into 4.21 Patch516: asus-fx503-keyb.patch +# rbhz 1554304 patch in the sound tree and Cc'd for stable +Patch517: ALSA-hda-realtek-Fix-speaker-output-regression-on-Thinkpad.patch + # END OF PATCH DEFINITIONS %endif @@ -1894,6 +1897,9 @@ fi # # %changelog +* Mon Dec 03 2018 Jeremy Cline +- Fix very quiet speakers on the Thinkpad T570 (rhbz 1554304) + * Mon Dec 3 2018 Hans de Goede - Fix non functional hotkeys on Asus FX503VD (#1645070)