Skip to content

Commit 399c01a

Browse files
committed
ALSA: hda/realtek - Add a model for Thinkpad T570 without DAC workaround
We fixed the regression of the speaker volume for some Thinkpad models (e.g. T570) by the commit 54947cd ("ALSA: hda/realtek - Fix speaker output regression on Thinkpad T570"). Essentially it fixes the DAC / pin pairing by a static table. It was confirmed and merged to stable kernel later. Now, interestingly, we got another regression report for the very same model (T570) about the similar problem, and the commit above was the culprit. That is, by some reason, there are devices that prefer the DAC1, and another device DAC2! Unfortunately those have the same ID and we have no idea what can differentiate, in this patch, a new fixup model "tpt470-dock-fix" is provided, so that users with such a machine can apply it manually. When model=tpt470-dock-fix option is passed to snd-hda-intel module, it avoids the fixed DAC pairing and the DAC1 is assigned to the speaker like the earlier versions. Fixes: 54947cd ("ALSA: hda/realtek - Fix speaker output regression on Thinkpad T570") BugLink: https://apibugzilla.suse.com/show_bug.cgi?id=1172017 Cc: <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent fb8cd64 commit 399c01a

File tree

1 file changed

+26
-10
lines changed

1 file changed

+26
-10
lines changed

sound/pci/hda/patch_realtek.c

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5484,18 +5484,9 @@ static void alc_fixup_tpt470_dock(struct hda_codec *codec,
54845484
{ 0x19, 0x21a11010 }, /* dock mic */
54855485
{ }
54865486
};
5487-
/* Assure the speaker pin to be coupled with DAC NID 0x03; otherwise
5488-
* the speaker output becomes too low by some reason on Thinkpads with
5489-
* ALC298 codec
5490-
*/
5491-
static const hda_nid_t preferred_pairs[] = {
5492-
0x14, 0x03, 0x17, 0x02, 0x21, 0x02,
5493-
0
5494-
};
54955487
struct alc_spec *spec = codec->spec;
54965488

54975489
if (action == HDA_FIXUP_ACT_PRE_PROBE) {
5498-
spec->gen.preferred_dacs = preferred_pairs;
54995490
spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP;
55005491
snd_hda_apply_pincfgs(codec, pincfgs);
55015492
} else if (action == HDA_FIXUP_ACT_INIT) {
@@ -5508,6 +5499,23 @@ static void alc_fixup_tpt470_dock(struct hda_codec *codec,
55085499
}
55095500
}
55105501

5502+
static void alc_fixup_tpt470_dacs(struct hda_codec *codec,
5503+
const struct hda_fixup *fix, int action)
5504+
{
5505+
/* Assure the speaker pin to be coupled with DAC NID 0x03; otherwise
5506+
* the speaker output becomes too low by some reason on Thinkpads with
5507+
* ALC298 codec
5508+
*/
5509+
static const hda_nid_t preferred_pairs[] = {
5510+
0x14, 0x03, 0x17, 0x02, 0x21, 0x02,
5511+
0
5512+
};
5513+
struct alc_spec *spec = codec->spec;
5514+
5515+
if (action == HDA_FIXUP_ACT_PRE_PROBE)
5516+
spec->gen.preferred_dacs = preferred_pairs;
5517+
}
5518+
55115519
static void alc_shutup_dell_xps13(struct hda_codec *codec)
55125520
{
55135521
struct alc_spec *spec = codec->spec;
@@ -6063,6 +6071,7 @@ enum {
60636071
ALC700_FIXUP_INTEL_REFERENCE,
60646072
ALC274_FIXUP_DELL_BIND_DACS,
60656073
ALC274_FIXUP_DELL_AIO_LINEOUT_VERB,
6074+
ALC298_FIXUP_TPT470_DOCK_FIX,
60666075
ALC298_FIXUP_TPT470_DOCK,
60676076
ALC255_FIXUP_DUMMY_LINEOUT_VERB,
60686077
ALC255_FIXUP_DELL_HEADSET_MIC,
@@ -6994,12 +7003,18 @@ static const struct hda_fixup alc269_fixups[] = {
69947003
.chained = true,
69957004
.chain_id = ALC274_FIXUP_DELL_BIND_DACS
69967005
},
6997-
[ALC298_FIXUP_TPT470_DOCK] = {
7006+
[ALC298_FIXUP_TPT470_DOCK_FIX] = {
69987007
.type = HDA_FIXUP_FUNC,
69997008
.v.func = alc_fixup_tpt470_dock,
70007009
.chained = true,
70017010
.chain_id = ALC293_FIXUP_LENOVO_SPK_NOISE
70027011
},
7012+
[ALC298_FIXUP_TPT470_DOCK] = {
7013+
.type = HDA_FIXUP_FUNC,
7014+
.v.func = alc_fixup_tpt470_dacs,
7015+
.chained = true,
7016+
.chain_id = ALC298_FIXUP_TPT470_DOCK_FIX
7017+
},
70037018
[ALC255_FIXUP_DUMMY_LINEOUT_VERB] = {
70047019
.type = HDA_FIXUP_PINS,
70057020
.v.pins = (const struct hda_pintbl[]) {
@@ -7638,6 +7653,7 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
76387653
{.id = ALC292_FIXUP_TPT440_DOCK, .name = "tpt440-dock"},
76397654
{.id = ALC292_FIXUP_TPT440, .name = "tpt440"},
76407655
{.id = ALC292_FIXUP_TPT460, .name = "tpt460"},
7656+
{.id = ALC298_FIXUP_TPT470_DOCK_FIX, .name = "tpt470-dock-fix"},
76417657
{.id = ALC298_FIXUP_TPT470_DOCK, .name = "tpt470-dock"},
76427658
{.id = ALC233_FIXUP_LENOVO_MULTI_CODECS, .name = "dual-codecs"},
76437659
{.id = ALC700_FIXUP_INTEL_REFERENCE, .name = "alc700-ref"},

0 commit comments

Comments
 (0)