From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5DAFC328610 for ; Thu, 30 Jul 2026 07:15:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785395726; cv=none; b=nASv31a+y1N7ahwnx1oDyas/l+amb1yotWeixQzjXAQfait/Yl1zJybqBjJUUKvmhSX5GL8GNkNhnEa+MyX+Pdeb1d3aLmrjG9pZHFmghKGKujVDIQS/kTrkgDZKx48IJNwx7rO+BBuBQGMqtks00gFzHTLGc8I8SIVYotAlDxI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785395726; c=relaxed/simple; bh=k+d4i9pRDlK17XALsLYuMMij5elx4Vzh4xdHOoVjquw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=WhP99WXuXKJ4ics7/3Uwx7Wmu8kGzconLbKbejdOzcNyeTQ0ld8ojvMEfgBwQb6hc88GrM+glBfF2AnRqEwrG4UYrOE4lRsVB/jefSeScJYT1DkFltDjFxJMeihvADUPwnw/1P1NfqdKbMW19HBc18U0urwAxbwwPiQkZkS8LCk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=J5RjX8gN; arc=none smtp.client-ip=209.85.214.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="J5RjX8gN" Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-2ceb096e675so22961615ad.0 for ; Thu, 30 Jul 2026 00:15:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785395723; x=1786000523; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=FljL6vPaykXZDvXxyzLURv+gVYAZ6DOFtR4WS2DRuXM=; b=J5RjX8gNHIDkMrhDYQBvJdiFIqYKEY1sGbNHGxR1UeODegfR/dviqMpCA0Q2SgeVmf GfufDdF7F9jwPLwuOEZUU7wgDpz7Gn3xKS/5CXTH/WaJjMpgNjrXfLaY+PNzzyLgj1VL tLqdxYawQ7D/j0CiQviOGehu7jh+6t4taGtYIbot4yC2TI0vmDvdNUzVuQn2AduLhUBe 1sBzyKtcqwDTvtNmlwhw4J3lb31ar2N8cl4UeXeiyi+T5Hm5NpqeKdGL/u0RND+rpLuP uvDMPfRsVMdBzUU0jQOoGVfLGSsxRvj8Z5XL2mA26Dr8DVVD5xk4+3nLSRA0dTdNAQR2 dFAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785395723; x=1786000523; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=FljL6vPaykXZDvXxyzLURv+gVYAZ6DOFtR4WS2DRuXM=; b=KzzwFoudaxOGAUgpz5kGDQrP9LjOqlgk1puGALPafu/dvoVljMRKN/2wjbMbI0uBHs 1jecRxJHDnAeOEZswHSGbEVeyoxGSWWrAON1NlyevGT3Yk2QFVfUp5lLjYsh/JlNLzMO gml4sx3j2PhF6tKE0hqHLeVwYIom9yIHCteLIRs0ss/qnnwZKEc9C9d5LIXGHyAxzt4w ET+TkpEOeE3/vrHaL5wR5RovIYOYM+IIC81ELVsWbdfwKMONp10/XG6jhDUV42oMo8HV CkTb+b0nRd7445sMVKw1JgpcpDDyH8DPQUZpOGY8Wn7KISnVmJKOMgoUGmjb7fXQJCsd 3dKg== X-Forwarded-Encrypted: i=1; AHgh+RrYnDDmIJWIuK2zRMQVxUVbzubgBZRbXt9qlIK5n/xtNsDjNUj7ObFXnVoWIW+KJptLyiK58tVTDHwOhTM=@vger.kernel.org X-Gm-Message-State: AOJu0YzwSmhwid+iIXErc7N5w7Vjjl5Ha7Z6kcNf8x5uju555L2UgWfV D0l833JQ3GnajkYjQi17OtHNP7MO4GgfXov+wtgRKDWGlP4katPUEuxr X-Gm-Gg: AR+sD11PvIfn2bU1gW+bldiCOwb6vblfouLmHe5w/Q82rTueam6vsp7D4oihhKkphZu xaFNrBBW+8QWSxaLx6S241MHheFzbBIQugdSpOaSe/sc9GhKy3HF1i9wmACGUP+EGNapVa2eY7D eFlQWb7eniBROQyPNRI4lykcRoPFSmwcAQP1iS9x/WcVviSWcOtsQyA5a52RtSFuCiMpHodWvVk lzc6paGz5SchumTf3pyknx4xBV0OIRTDraQozHn4dbuNf0vFzmSdVX5BIwA173gspLq66u3AzL+ yA2zYw3I+LmUKx3VduoVb/JoJRvbPt4E4OFMUlYTcWI/+8ZGo3KDBw1plRfPufef8wRUbFhxU33 TnEoF06DNL1sRay44paI4kRS5VagGzW9cl4iYLw2KuBehw3psL89NVbMTrB1l0FE6/lvwylaLvv nXR5gFWGYN8xN8TMrobDQFFZpgujF66OTyyp/MTmdnzk1bL140zLGCK1N6oRVY5m1hxg== X-Received: by 2002:a17:903:4b48:b0:2cc:f4d4:299f with SMTP id d9443c01a7336-2d035c8676fmr15611855ad.27.1785395722887; Thu, 30 Jul 2026 00:15:22 -0700 (PDT) Received: from archlinux-21vg ([202.201.11.13]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2d022bc9fe9sm21490945ad.51.2026.07.30.00.15.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Jul 2026 00:15:21 -0700 (PDT) From: Padhia Luo To: alsa-devel@alsa-project.org Cc: tiwai@suse.com, linux-kernel@vger.kernel.org, Padhia Luo Subject: [PATCH] ALSA: hda/realtek: Fix speaker mute LED on Lenovo ThinkBook 14 G8+ IPH Date: Thu, 30 Jul 2026 15:14:53 +0800 Message-ID: <20260730071453.19636-1-lcj20010426@gmail.com> X-Mailer: git-send-email 2.55.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On the ThinkBook 14 G8+ IPH (SSID 17aa:393e, ALC287) the F1 speaker mute LED never lights up, while the F4 mic mute LED works. Both LEDs are platform LEDs registered by lenovo-wmi-hotkey-utilities and default to the audio-mute / audio-micmute triggers, so the speaker LED only follows a control carrying SNDRV_CTL_ELEM_ACCESS_SPK_LED. No control on this machine has that flag set, so snd_ctl_led never attaches anything and /sys/class/sound/ctl-led/speaker/card0/list stays empty. The mic LED is unaffected because MIC_LED is set from the SOF topology on the DMIC control, which does not go through the codec fixups at all. The pin configuration of this machine matches the ThinkPad pin quirk that selects ALC285_FIXUP_THINKPAD_HEADSET_JACK - pin_config_match() masks out the sequence/association nibbles, so 0x14=0x90170120 still matches the 0x90170110 in the table. That fixup chains into ALC269_FIXUP_THINKPAD_ACPI, but hda_fixup_thinkpad_acpi() returns early because is_thinkpad() is false: a ThinkBook exposes neither LEN0068/LEN0268 nor IBM0068. Therefore snd_hda_gen_add_mute_led_cdev() is never called and spec->vmaster_mute_led stays 0. The vendor fallback SND_PCI_QUIRK_VENDOR(0x17aa, "Lenovo XPAD", ALC269_FIXUP_LENOVO_XPAD_ACPI) would have handled this correctly - the machine does expose LHK2019 and VPC2004, so is_ideapad() is true - but it never runs: the pin quirk has already set codec->fixup_id, and snd_hda_pick_fixup() returns immediately in that case. Add an SSID quirk selecting a fixup that keeps everything the machine currently gets (headset jack handling plus the X1 Gen7 DAC routing) and additionally runs the ideapad ACPI setup. It chains into ALC287_FIXUP_LENOVO_YOGA_PRO7, which already combines alc285_fixup_thinkpad_x1_gen7 with ALC269_FIXUP_LENOVO_XPAD_ACPI, so the resulting chain differs from the current one only by the added ideapad step and cannot regress the analog output or the headset jack. Tested on 7.1.5 on the affected machine: the speaker LED group is now populated at probe time without any userspace help, and the F1 LED follows the mute state. Compared against a boot with the previous fixup selection, the mixer control list (names and numids) and the registered jack input devices are identical. Note that the underlying mismatch is not specific to this SSID. Any Lenovo non-ThinkPad whose pins collide with a ThinkPad pin quirk loses its mute LED the same way. Letting hda_fixup_thinkpad_acpi() fall back to the ideapad check would cover the whole class at once, but that touches a helper shared with every ThinkPad, so this patch only fixes the machine that was actually tested. Signed-off-by: Padhia Luo --- sound/hda/codecs/realtek/alc269.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) --- a/sound/hda/codecs/realtek/alc269.c +++ b/sound/hda/codecs/realtek/alc269.c @@ -4077,6 +4077,7 @@ ALC298_FIXUP_LENOVO_C940_DUET7, ALC287_FIXUP_LENOVO_YOGA_BOOK_9I, ALC287_FIXUP_LENOVO_YOGA_PRO7, + ALC287_FIXUP_LENOVO_XPAD_HEADSET_JACK, ALC287_FIXUP_13S_GEN2_SPEAKERS, ALC256_FIXUP_SET_COEF_DEFAULTS, ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE, @@ -6109,6 +6110,16 @@ .chained = true, .chain_id = ALC269_FIXUP_LENOVO_XPAD_ACPI, }, + [ALC287_FIXUP_LENOVO_XPAD_HEADSET_JACK] = { + .type = HDA_FIXUP_FUNC, + .v.func = alc_fixup_headset_jack, + .chained = true, + /* Same as ALC285_FIXUP_THINKPAD_HEADSET_JACK, except that the + * mute LEDs are driven through ideapad_laptop rather than + * thinkpad_acpi. + */ + .chain_id = ALC287_FIXUP_LENOVO_YOGA_PRO7, + }, [ALC623_FIXUP_LENOVO_THINKSTATION_P340] = { .type = HDA_FIXUP_FUNC, .v.func = alc_fixup_no_shutup, @@ -7790,6 +7801,7 @@ SND_PCI_QUIRK(0x17aa, 0x3920, "Yoga S990-16 pro Quad VECO Quad", ALC287_FIXUP_TXNW2781_I2C), SND_PCI_QUIRK(0x17aa, 0x3929, "Thinkbook 13x Gen 5", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), SND_PCI_QUIRK(0x17aa, 0x392b, "Thinkbook 13x Gen 5", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), + SND_PCI_QUIRK(0x17aa, 0x393e, "Lenovo ThinkBook 14 G8+ IPH", ALC287_FIXUP_LENOVO_XPAD_HEADSET_JACK), HDA_CODEC_QUIRK(0x17aa, 0x394c, "Lenovo Yoga Slim 7 14AGP11", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN), SND_PCI_QUIRK(0x17aa, 0x3977, "IdeaPad S210", ALC283_FIXUP_INT_MIC), SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo B50-70", ALC269_FIXUP_DMIC_THINKPAD_ACPI),