Skip to content

Commit a3f5e1f

Browse files
committed
Merge tag 'sound-5.3-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "A collection of small HD-audio fixes: - A regression fix for Realtek codecs due to the recent initialization procedure change - A fix for potential endless loop at the quirk table lookup - Quirks for Lenovo, ASUS and HP machines" * tag 'sound-5.3-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/realtek - Fix the problem of two front mics on a ThinkCentre ALSA: hda/realtek - Enable internal speaker & headset mic of ASUS UX431FL ALSA: hda/realtek - Add quirk for HP Pavilion 15 ALSA: hda/realtek - Fix overridden device-specific initialization ALSA: hda - Fix potential endless loop at applying quirks
2 parents 19e4147 + 2a36c16 commit a3f5e1f

File tree

4 files changed

+22
-3
lines changed

4 files changed

+22
-3
lines changed

sound/pci/hda/hda_auto_parser.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -824,6 +824,8 @@ static void apply_fixup(struct hda_codec *codec, int id, int action, int depth)
824824
while (id >= 0) {
825825
const struct hda_fixup *fix = codec->fixup_list + id;
826826

827+
if (++depth > 10)
828+
break;
827829
if (fix->chained_before)
828830
apply_fixup(codec, fix->chain_id, action, depth + 1);
829831

@@ -863,8 +865,6 @@ static void apply_fixup(struct hda_codec *codec, int id, int action, int depth)
863865
}
864866
if (!fix->chained || fix->chained_before)
865867
break;
866-
if (++depth > 10)
867-
break;
868868
id = fix->chain_id;
869869
}
870870
}

sound/pci/hda/hda_generic.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6009,7 +6009,8 @@ int snd_hda_gen_init(struct hda_codec *codec)
60096009
if (spec->init_hook)
60106010
spec->init_hook(codec);
60116011

6012-
snd_hda_apply_verbs(codec);
6012+
if (!spec->skip_verbs)
6013+
snd_hda_apply_verbs(codec);
60136014

60146015
init_multi_out(codec);
60156016
init_extra_out(codec);

sound/pci/hda/hda_generic.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ struct hda_gen_spec {
243243
unsigned int indep_hp_enabled:1; /* independent HP enabled */
244244
unsigned int have_aamix_ctl:1;
245245
unsigned int hp_mic_jack_modes:1;
246+
unsigned int skip_verbs:1; /* don't apply verbs at snd_hda_gen_init() */
246247

247248
/* additional mute flags (only effective with auto_mute_via_amp=1) */
248249
u64 mute_bits;

sound/pci/hda/patch_realtek.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -837,9 +837,11 @@ static int alc_init(struct hda_codec *codec)
837837
if (spec->init_hook)
838838
spec->init_hook(codec);
839839

840+
spec->gen.skip_verbs = 1; /* applied in below */
840841
snd_hda_gen_init(codec);
841842
alc_fix_pll(codec);
842843
alc_auto_init_amp(codec, spec->init_amp);
844+
snd_hda_apply_verbs(codec); /* apply verbs here after own init */
843845

844846
snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_INIT);
845847

@@ -5797,6 +5799,7 @@ enum {
57975799
ALC286_FIXUP_ACER_AIO_HEADSET_MIC,
57985800
ALC256_FIXUP_ASUS_MIC_NO_PRESENCE,
57995801
ALC299_FIXUP_PREDATOR_SPK,
5802+
ALC294_FIXUP_ASUS_INTSPK_HEADSET_MIC,
58005803
};
58015804

58025805
static const struct hda_fixup alc269_fixups[] = {
@@ -6837,6 +6840,16 @@ static const struct hda_fixup alc269_fixups[] = {
68376840
{ }
68386841
}
68396842
},
6843+
[ALC294_FIXUP_ASUS_INTSPK_HEADSET_MIC] = {
6844+
.type = HDA_FIXUP_PINS,
6845+
.v.pins = (const struct hda_pintbl[]) {
6846+
{ 0x14, 0x411111f0 }, /* disable confusing internal speaker */
6847+
{ 0x19, 0x04a11150 }, /* use as headset mic, without its own jack detect */
6848+
{ }
6849+
},
6850+
.chained = true,
6851+
.chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
6852+
},
68406853
};
68416854

68426855
static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -6979,6 +6992,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
69796992
SND_PCI_QUIRK(0x103c, 0x82c0, "HP G3 mini premium", ALC221_FIXUP_HP_MIC_NO_PRESENCE),
69806993
SND_PCI_QUIRK(0x103c, 0x83b9, "HP Spectre x360", ALC269_FIXUP_HP_MUTE_LED_MIC3),
69816994
SND_PCI_QUIRK(0x103c, 0x8497, "HP Envy x360", ALC269_FIXUP_HP_MUTE_LED_MIC3),
6995+
SND_PCI_QUIRK(0x103c, 0x84e7, "HP Pavilion 15", ALC269_FIXUP_HP_MUTE_LED_MIC3),
69826996
SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC),
69836997
SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300),
69846998
SND_PCI_QUIRK(0x1043, 0x106d, "Asus K53BE", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
@@ -6995,6 +7009,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
69957009
SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_ASUS_ZENBOOK),
69967010
SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A),
69977011
SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC),
7012+
SND_PCI_QUIRK(0x1043, 0x17d1, "ASUS UX431FL", ALC294_FIXUP_ASUS_INTSPK_HEADSET_MIC),
69987013
SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW),
69997014
SND_PCI_QUIRK(0x1043, 0x1a30, "ASUS X705UD", ALC256_FIXUP_ASUS_MIC),
70007015
SND_PCI_QUIRK(0x1043, 0x1b13, "Asus U41SV", ALC269_FIXUP_INV_DMIC),
@@ -7072,6 +7087,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
70727087
SND_PCI_QUIRK(0x17aa, 0x312a, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
70737088
SND_PCI_QUIRK(0x17aa, 0x312f, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
70747089
SND_PCI_QUIRK(0x17aa, 0x313c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
7090+
SND_PCI_QUIRK(0x17aa, 0x3151, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC),
70757091
SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
70767092
SND_PCI_QUIRK(0x17aa, 0x3977, "IdeaPad S210", ALC283_FIXUP_INT_MIC),
70777093
SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo B50-70", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
@@ -8946,6 +8962,7 @@ static int patch_alc680(struct hda_codec *codec)
89468962
static const struct hda_device_id snd_hda_id_realtek[] = {
89478963
HDA_CODEC_ENTRY(0x10ec0215, "ALC215", patch_alc269),
89488964
HDA_CODEC_ENTRY(0x10ec0221, "ALC221", patch_alc269),
8965+
HDA_CODEC_ENTRY(0x10ec0222, "ALC222", patch_alc269),
89498966
HDA_CODEC_ENTRY(0x10ec0225, "ALC225", patch_alc269),
89508967
HDA_CODEC_ENTRY(0x10ec0231, "ALC231", patch_alc269),
89518968
HDA_CODEC_ENTRY(0x10ec0233, "ALC233", patch_alc269),

0 commit comments

Comments
 (0)