Skip to content

Commit 52a7dc2

Browse files
committed
Merge tag 'sound-4.20-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "Only usual suspects here: a few more fixups for Realtek HD-audio on various PCs, including a regression fix in the previous fix for Lenovo X1 Carbon, as well as a typo fix in the recent Fireface patch" * tag 'sound-4.20-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/realtek: Enable audio jacks of ASUS UX433FN/UX333FA with ALC294 ALSA: hda/realtek: Enable audio jacks of ASUS UX533FD with ALC294 ALSA: hda/realtek: ALC294 mic and headset-mode fixups for ASUS X542UN ALSA: fireface: fix reference to wrong register for clock configuration ALSA: hda/realtek - Fix the mute LED regresion on Lenovo X1 Carbon ALSA: hda/realtek - Fixed headphone issue for ALC700
2 parents 67f2a93 + 0bea4cc commit 52a7dc2

File tree

2 files changed

+78
-1
lines changed

2 files changed

+78
-1
lines changed

sound/firewire/fireface/ff-protocol-ff400.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ static int ff400_get_clock(struct snd_ff *ff, unsigned int *rate,
3030
int err;
3131

3232
err = snd_fw_transaction(ff->unit, TCODE_READ_QUADLET_REQUEST,
33-
FF400_SYNC_STATUS, &reg, sizeof(reg), 0);
33+
FF400_CLOCK_CONFIG, &reg, sizeof(reg), 0);
3434
if (err < 0)
3535
return err;
3636
data = le32_to_cpu(reg);

sound/pci/hda/patch_realtek.c

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5520,6 +5520,9 @@ enum {
55205520
ALC285_FIXUP_LENOVO_HEADPHONE_NOISE,
55215521
ALC295_FIXUP_HP_AUTO_MUTE,
55225522
ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE,
5523+
ALC294_FIXUP_ASUS_MIC,
5524+
ALC294_FIXUP_ASUS_HEADSET_MIC,
5525+
ALC294_FIXUP_ASUS_SPK,
55235526
};
55245527

55255528
static const struct hda_fixup alc269_fixups[] = {
@@ -6392,6 +6395,8 @@ static const struct hda_fixup alc269_fixups[] = {
63926395
[ALC285_FIXUP_LENOVO_HEADPHONE_NOISE] = {
63936396
.type = HDA_FIXUP_FUNC,
63946397
.v.func = alc285_fixup_invalidate_dacs,
6398+
.chained = true,
6399+
.chain_id = ALC269_FIXUP_THINKPAD_ACPI
63956400
},
63966401
[ALC295_FIXUP_HP_AUTO_MUTE] = {
63976402
.type = HDA_FIXUP_FUNC,
@@ -6406,6 +6411,36 @@ static const struct hda_fixup alc269_fixups[] = {
64066411
.chained = true,
64076412
.chain_id = ALC269_FIXUP_HEADSET_MIC
64086413
},
6414+
[ALC294_FIXUP_ASUS_MIC] = {
6415+
.type = HDA_FIXUP_PINS,
6416+
.v.pins = (const struct hda_pintbl[]) {
6417+
{ 0x13, 0x90a60160 }, /* use as internal mic */
6418+
{ 0x19, 0x04a11120 }, /* use as headset mic, without its own jack detect */
6419+
{ }
6420+
},
6421+
.chained = true,
6422+
.chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
6423+
},
6424+
[ALC294_FIXUP_ASUS_HEADSET_MIC] = {
6425+
.type = HDA_FIXUP_PINS,
6426+
.v.pins = (const struct hda_pintbl[]) {
6427+
{ 0x19, 0x01a1113c }, /* use as headset mic, without its own jack detect */
6428+
{ }
6429+
},
6430+
.chained = true,
6431+
.chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
6432+
},
6433+
[ALC294_FIXUP_ASUS_SPK] = {
6434+
.type = HDA_FIXUP_VERBS,
6435+
.v.verbs = (const struct hda_verb[]) {
6436+
/* Set EAPD high */
6437+
{ 0x20, AC_VERB_SET_COEF_INDEX, 0x40 },
6438+
{ 0x20, AC_VERB_SET_PROC_COEF, 0x8800 },
6439+
{ }
6440+
},
6441+
.chained = true,
6442+
.chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC
6443+
},
64096444
};
64106445

64116446
static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -6548,6 +6583,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
65486583
SND_PCI_QUIRK(0x1043, 0x12e0, "ASUS X541SA", ALC256_FIXUP_ASUS_MIC),
65496584
SND_PCI_QUIRK(0x1043, 0x13b0, "ASUS Z550SA", ALC256_FIXUP_ASUS_MIC),
65506585
SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_ASUS_ZENBOOK),
6586+
SND_PCI_QUIRK(0x1043, 0x14a1, "ASUS UX533FD", ALC294_FIXUP_ASUS_SPK),
65516587
SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A),
65526588
SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC),
65536589
SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW),
@@ -7155,6 +7191,14 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
71557191
SND_HDA_PIN_QUIRK(0x10ec0293, 0x1028, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE,
71567192
ALC292_STANDARD_PINS,
71577193
{0x13, 0x90a60140}),
7194+
SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_MIC,
7195+
{0x14, 0x90170110},
7196+
{0x1b, 0x90a70130},
7197+
{0x21, 0x04211020}),
7198+
SND_HDA_PIN_QUIRK(0x10ec0294, 0x1043, "ASUS", ALC294_FIXUP_ASUS_SPK,
7199+
{0x12, 0x90a60130},
7200+
{0x17, 0x90170110},
7201+
{0x21, 0x04211020}),
71587202
SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
71597203
ALC295_STANDARD_PINS,
71607204
{0x17, 0x21014020},
@@ -7227,6 +7271,37 @@ static void alc269_fill_coef(struct hda_codec *codec)
72277271
alc_update_coef_idx(codec, 0x4, 0, 1<<11);
72287272
}
72297273

7274+
static void alc294_hp_init(struct hda_codec *codec)
7275+
{
7276+
struct alc_spec *spec = codec->spec;
7277+
hda_nid_t hp_pin = spec->gen.autocfg.hp_pins[0];
7278+
int i, val;
7279+
7280+
if (!hp_pin)
7281+
return;
7282+
7283+
snd_hda_codec_write(codec, hp_pin, 0,
7284+
AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
7285+
7286+
msleep(100);
7287+
7288+
snd_hda_codec_write(codec, hp_pin, 0,
7289+
AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
7290+
7291+
alc_update_coef_idx(codec, 0x6f, 0x000f, 0);/* Set HP depop to manual mode */
7292+
alc_update_coefex_idx(codec, 0x58, 0x00, 0x8000, 0x8000); /* HP depop procedure start */
7293+
7294+
/* Wait for depop procedure finish */
7295+
val = alc_read_coefex_idx(codec, 0x58, 0x01);
7296+
for (i = 0; i < 20 && val & 0x0080; i++) {
7297+
msleep(50);
7298+
val = alc_read_coefex_idx(codec, 0x58, 0x01);
7299+
}
7300+
/* Set HP depop to auto mode */
7301+
alc_update_coef_idx(codec, 0x6f, 0x000f, 0x000b);
7302+
msleep(50);
7303+
}
7304+
72307305
/*
72317306
*/
72327307
static int patch_alc269(struct hda_codec *codec)
@@ -7352,6 +7427,7 @@ static int patch_alc269(struct hda_codec *codec)
73527427
spec->codec_variant = ALC269_TYPE_ALC294;
73537428
spec->gen.mixer_nid = 0; /* ALC2x4 does not have any loopback mixer path */
73547429
alc_update_coef_idx(codec, 0x6b, 0x0018, (1<<4) | (1<<3)); /* UAJ MIC Vref control by verb */
7430+
alc294_hp_init(codec);
73557431
break;
73567432
case 0x10ec0300:
73577433
spec->codec_variant = ALC269_TYPE_ALC300;
@@ -7363,6 +7439,7 @@ static int patch_alc269(struct hda_codec *codec)
73637439
spec->codec_variant = ALC269_TYPE_ALC700;
73647440
spec->gen.mixer_nid = 0; /* ALC700 does not have any loopback mixer path */
73657441
alc_update_coef_idx(codec, 0x4a, 1 << 15, 0); /* Combo jack auto trigger control */
7442+
alc294_hp_init(codec);
73667443
break;
73677444

73687445
}

0 commit comments

Comments
 (0)