Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2093374ybb; Thu, 26 Mar 2020 21:47:34 -0700 (PDT) X-Google-Smtp-Source: ADFU+vumEfmwaJoSLB+isHSHI1ECHuFdKyzVfZ/naDCbTNIVxcsjvVGtSjDIMF2+OD5v4BctDQtV X-Received: by 2002:a05:6830:144e:: with SMTP id w14mr7364524otp.75.1585284454620; Thu, 26 Mar 2020 21:47:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585284454; cv=none; d=google.com; s=arc-20160816; b=KPsmv/KJKGnVyj6e7KCLgviqj43OIEpKHJJE7J8coHntYKY/HXYxHQMgmPzTgiS8+F umvyczkslolajmlhGN7tnfDOmSCEzaiAxLLCgBhiBQK+YRsO/fpGRPt9mdfXF1HzPvdQ 8zVJ4Yzlwt+2Mrf1xumNw22YAq1L14IL+XkGjXNidzb4fgox3elj1kHxcawgj/GG+rXn fMJQKxDFnPsH78FQ7oTspyqKqr9rt0qB15vtqie20/RaJRxl2SUoU6PiKUXxfP0JIc4t DBWFdHkPwhMb45F1QwFHJLZKdx9mI8ceAQsJOrtyu/wSBHAIPoI/Zq0rO2rfASu0rzXG pCWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=BwVaDinSu+59IfgFktNRRFd+GD+WVtvl2JDZBg2nBIc=; b=ymQadAKXgqrcb+86+wfdb1o+41hJN/ccCXv13Fptr5WOfWRAwBWJVCluQmGB0WQ+vY Pwu5zG9JWAchS2BEdRTcjuIy3yX8J/r1qMDcVYSBeGgcvCFmer55+PE3Q/OEtdvgxd5q KIvc5WmD+mqo+posY5Q5s8YfExkM0usIKaVWTf0pI0DMFc2501xuwMBmFRJFbrBZvwQC LISh2JV7jjoeT7oA/uqrdZ74cfVLf6XyuD1A1i8voawbdqhpbvg19ytaaW20FlF0y9qy U6sSB81w9iQQyUUFcOMRCv6eZ+t16ss8pJLkFtXqxeHIqAf1m11YA7xtDVsuk5M7MflH 50mQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r24si1773987otp.264.2020.03.26.21.47.21; Thu, 26 Mar 2020 21:47:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726360AbgC0Eq7 (ORCPT + 99 others); Fri, 27 Mar 2020 00:46:59 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:36352 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725904AbgC0Eq7 (ORCPT ); Fri, 27 Mar 2020 00:46:59 -0400 Received: from 61-220-137-37.hinet-ip.hinet.net ([61.220.137.37] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jHgtC-0001rT-9v; Fri, 27 Mar 2020 04:46:39 +0000 From: Kai-Heng Feng To: tiwai@suse.com Cc: Kai-Heng Feng , Jaroslav Kysela , Kailang Yang , Hui Wang , Jian-Hong Pan , Tomas Espeleta , Sergey Bostandzhyan , =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= , Chris Chiu , alsa-devel@alsa-project.org (moderated list:SOUND), linux-kernel@vger.kernel.org (open list) Subject: [PATCH] ALSA: hda/realtek: Enable mute LED on an HP system Date: Fri, 27 Mar 2020 12:46:25 +0800 Message-Id: <20200327044626.29582-1-kai.heng.feng@canonical.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The system in question uses ALC285, and it uses GPIO 0x04 to control its mute LED. The mic mute LED can be controlled by GPIO 0x01, however the system uses DMIC so we should use that to control mic mute LED. Signed-off-by: Kai-Heng Feng --- sound/pci/hda/patch_realtek.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 63e1a56f705b..1ad8c2e2d1af 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -4008,6 +4008,12 @@ static void alc269_fixup_hp_gpio_led(struct hda_codec *codec, alc_fixup_hp_gpio_led(codec, action, 0x08, 0x10); } +static void alc285_fixup_hp_gpio_led(struct hda_codec *codec, + const struct hda_fixup *fix, int action) +{ + alc_fixup_hp_gpio_led(codec, action, 0x04, 0x00); +} + static void alc286_fixup_hp_gpio_led(struct hda_codec *codec, const struct hda_fixup *fix, int action) { @@ -5923,6 +5929,7 @@ enum { ALC294_FIXUP_ASUS_DUAL_SPK, ALC285_FIXUP_THINKPAD_HEADSET_JACK, ALC294_FIXUP_ASUS_HPE, + ALC285_FIXUP_HP_GPIO_LED, }; static const struct hda_fixup alc269_fixups[] = { @@ -7061,6 +7068,10 @@ static const struct hda_fixup alc269_fixups[] = { .chained = true, .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC }, + [ALC285_FIXUP_HP_GPIO_LED] = { + .type = HDA_FIXUP_FUNC, + .v.func = alc285_fixup_hp_gpio_led, + }, }; static const struct snd_pci_quirk alc269_fixup_tbl[] = { @@ -7208,6 +7219,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x103c, 0x83b9, "HP Spectre x360", ALC269_FIXUP_HP_MUTE_LED_MIC3), SND_PCI_QUIRK(0x103c, 0x8497, "HP Envy x360", ALC269_FIXUP_HP_MUTE_LED_MIC3), SND_PCI_QUIRK(0x103c, 0x84e7, "HP Pavilion 15", ALC269_FIXUP_HP_MUTE_LED_MIC3), + SND_PCI_QUIRK(0x103c, 0x8736, "HP", ALC285_FIXUP_HP_GPIO_LED), SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC), SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300), SND_PCI_QUIRK(0x1043, 0x106d, "Asus K53BE", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), -- 2.17.1