This is a note to let you know that I've just added the patch titled ALSA: hda/realtek: Fix silent headphone output on ASUS UX430UA to the 5.12-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: alsa-hda-realtek-fix-silent-headphone-output-on-asus-ux430ua.patch and it can be found in the queue-5.12 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 8eedd3a70a70f51fa963f3ad7fa97afd0c75bd44 Mon Sep 17 00:00:00 2001 From: Takashi Iwai <tiwai@xxxxxxx> Date: Tue, 4 May 2021 10:20:57 +0200 Subject: ALSA: hda/realtek: Fix silent headphone output on ASUS UX430UA From: Takashi Iwai <tiwai@xxxxxxx> commit 8eedd3a70a70f51fa963f3ad7fa97afd0c75bd44 upstream. It was reported that the headphone output on ASUS UX430UA (SSID 1043:1740) with ALC295 codec is silent while the speaker works. After the investigation, it turned out that the DAC assignment has to be fixed on this machine; unlike others, it expects DAC 0x02 to be assigned to the speaker pin 0x07 while DAC 0x03 to headphone pin 0x21. This patch provides a fixup for the fixed DAC/pin mapping for this device. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=212933 Cc: <stable@xxxxxxxxxxxxxxx> Link: https://lore.kernel.org/r/20210504082057.6913-1-tiwai@xxxxxxx Signed-off-by: Takashi Iwai <tiwai@xxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- sound/pci/hda/patch_realtek.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -5720,6 +5720,18 @@ static void alc_fixup_tpt470_dacs(struct spec->gen.preferred_dacs = preferred_pairs; } +static void alc295_fixup_asus_dacs(struct hda_codec *codec, + const struct hda_fixup *fix, int action) +{ + static const hda_nid_t preferred_pairs[] = { + 0x17, 0x02, 0x21, 0x03, 0 + }; + struct alc_spec *spec = codec->spec; + + if (action == HDA_FIXUP_ACT_PRE_PROBE) + spec->gen.preferred_dacs = preferred_pairs; +} + static void alc_shutup_dell_xps13(struct hda_codec *codec) { struct alc_spec *spec = codec->spec; @@ -6520,6 +6532,7 @@ enum { ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST, ALC256_FIXUP_ACER_HEADSET_MIC, ALC285_FIXUP_IDEAPAD_S740_COEF, + ALC295_FIXUP_ASUS_DACS, }; static const struct hda_fixup alc269_fixups[] = { @@ -8047,6 +8060,10 @@ static const struct hda_fixup alc269_fix .chained = true, .chain_id = ALC269_FIXUP_THINKPAD_ACPI, }, + [ALC295_FIXUP_ASUS_DACS] = { + .type = HDA_FIXUP_FUNC, + .v.func = alc295_fixup_asus_dacs, + }, }; static const struct snd_pci_quirk alc269_fixup_tbl[] = { @@ -8245,6 +8262,7 @@ static const struct snd_pci_quirk alc269 SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_ASUS_ZENBOOK), SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A), SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC), + SND_PCI_QUIRK(0x1043, 0x1740, "ASUS UX430UA", ALC295_FIXUP_ASUS_DACS), SND_PCI_QUIRK(0x1043, 0x17d1, "ASUS UX431FL", ALC294_FIXUP_ASUS_DUAL_SPK), SND_PCI_QUIRK(0x1043, 0x1881, "ASUS Zephyrus S/M", ALC294_FIXUP_ASUS_GX502_PINS), SND_PCI_QUIRK(0x1043, 0x18b1, "Asus MJ401TA", ALC256_FIXUP_ASUS_HEADSET_MIC), Patches currently in stable-queue which might be from tiwai@xxxxxxx are queue-5.12/alsa-hda-realtek-fix-silent-headphone-output-on-asus-ux430ua.patch queue-5.12/alsa-hda-realtek-add-fixup-for-hp-omen-laptop.patch queue-5.12/alsa-intel8x0-don-t-update-period-unless-prepared.patch queue-5.12/alsa-hda-realtek-reset-eapd-coeff-to-default-value-for-alc287.patch queue-5.12/alsa-firewire-lib-fix-amdtp_packet-tracepoints-event-for-packet_index-field.patch queue-5.12/alsa-bebob-oxfw-fix-kconfig-entry-for-mackie-d.2-pro.patch queue-5.12/alsa-line6-fix-racy-initialization-of-line6-midi.patch queue-5.12/alsa-firewire-lib-fix-calculation-for-size-of-ir-context-payload.patch queue-5.12/alsa-hda-realtek-add-fixup-for-hp-spectre-x360-15-df0xxx.patch queue-5.12/alsa-dice-fix-stream-format-for-tc-electronic-konnekt-live-at-high-sampling-transfer-frequency.patch queue-5.12/alsa-dice-fix-stream-format-at-middle-sampling-rate-for-alesis-io-26.patch queue-5.12/alsa-firewire-lib-fix-check-for-the-size-of-isochronous-packet-payload.patch queue-5.12/alsa-usb-audio-validate-ms-endpoint-descriptors.patch queue-5.12/revert-alsa-sb8-add-a-check-for-request_region.patch queue-5.12/alsa-hda-fixup-headset-for-asus-gu502-laptop.patch queue-5.12/alsa-hda-realtek-add-some-clove-ssids-of-alc293.patch