]>
Commit | Line | Data |
---|---|---|
55fb8835 GKH |
1 | From 54947cd64c1b8290f64bb2958e343c07270e3a58 Mon Sep 17 00:00:00 2001 |
2 | From: Takashi Iwai <tiwai@suse.de> | |
3 | Date: Mon, 3 Dec 2018 10:44:15 +0100 | |
4 | Subject: ALSA: hda/realtek - Fix speaker output regression on Thinkpad T570 | |
5 | ||
6 | From: Takashi Iwai <tiwai@suse.de> | |
7 | ||
8 | commit 54947cd64c1b8290f64bb2958e343c07270e3a58 upstream. | |
9 | ||
10 | We've got a regression report for some Thinkpad models (at least | |
11 | T570s) which shows the too low speaker output volume. The bisection | |
12 | leaded to the commit 61fcf8ece9b6 ("ALSA: hda/realtek - Enable Thinkpad | |
13 | Dock device for ALC298 platform"), and it's basically adding the two | |
14 | pin configurations for the dock, and looks harmless. | |
15 | ||
16 | The real culprit seems, though, that the DAC assignment for the | |
17 | speaker pin is implicitly assumed on these devices, i.e. pin NID 0x14 | |
18 | to be coupled with DAC NID 0x03. When more pins are configured by the | |
19 | commit above, the auto-parser changes the DAC assignment, and this | |
20 | resulted in the regression. | |
21 | ||
22 | As a workaround, just provide the fixed pin / DAC mapping table for | |
23 | this Thinkpad fixup function. It's no generic solution, but the | |
24 | problem itself is pretty much device-specific, so must be good | |
25 | enough. | |
26 | ||
27 | Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1554304 | |
28 | Fixes: 61fcf8ece9b6 ("ALSA: hda/realtek - Enable Thinkpad Dock device for ALC298 platform") | |
29 | Cc: <stable@vger.kernel.org> | |
30 | Reported-and-tested-by: Jeremy Cline <jcline@redhat.com> | |
31 | Signed-off-by: Takashi Iwai <tiwai@suse.de> | |
32 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
33 | ||
34 | --- | |
35 | sound/pci/hda/patch_realtek.c | 9 +++++++++ | |
36 | 1 file changed, 9 insertions(+) | |
37 | ||
38 | --- a/sound/pci/hda/patch_realtek.c | |
39 | +++ b/sound/pci/hda/patch_realtek.c | |
40 | @@ -4863,9 +4863,18 @@ static void alc_fixup_tpt470_dock(struct | |
41 | { 0x19, 0x21a11010 }, /* dock mic */ | |
42 | { } | |
43 | }; | |
44 | + /* Assure the speaker pin to be coupled with DAC NID 0x03; otherwise | |
45 | + * the speaker output becomes too low by some reason on Thinkpads with | |
46 | + * ALC298 codec | |
47 | + */ | |
48 | + static hda_nid_t preferred_pairs[] = { | |
49 | + 0x14, 0x03, 0x17, 0x02, 0x21, 0x02, | |
50 | + 0 | |
51 | + }; | |
52 | struct alc_spec *spec = codec->spec; | |
53 | ||
54 | if (action == HDA_FIXUP_ACT_PRE_PROBE) { | |
55 | + spec->gen.preferred_dacs = preferred_pairs; | |
56 | spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP; | |
57 | snd_hda_apply_pincfgs(codec, pincfgs); | |
58 | } else if (action == HDA_FIXUP_ACT_INIT) { |