Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp6997022rwl; Mon, 9 Jan 2023 16:23:06 -0800 (PST) X-Google-Smtp-Source: AMrXdXvd2dYo/pfSKH1JMKuc9wHGe6uLgRqgT+r5MBWkWHomRo49E0pAwT7at1hS0p9W/96LqGus X-Received: by 2002:a17:907:8c8e:b0:7c0:f2c5:ac3d with SMTP id td14-20020a1709078c8e00b007c0f2c5ac3dmr62290587ejc.15.1673310186001; Mon, 09 Jan 2023 16:23:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673310185; cv=none; d=google.com; s=arc-20160816; b=qHqLFlyYzVRGFM0d0lXnz8SgWGoXEQF2C0X7s4B3JB+uxQMmEAtE3b8MjPSpRSl4To /w/rl/ps7CT9SBMfAuqpcNY5KHfFytLeGnc8mv8XjPrSY8mtVReeYp80kkOvPKOFARMn upuivpvelwno5yMJ5Edu2ZsOotbkaAtCLmpOSlwmz8M4ZbvUkXtmTsmiGPy+q0C9pajG cieLf//EG+eSYhAPg9l3eL1msh0hZ8WFoypATlJ2X2Dx5H/jUIBqsK5oL7Ukh0QOsWj6 CzV5hFwaHkU4vC53aI6SSwEELR/rY5ydKQq0/L3xPFVYoNlvcJh5R1p3grVws9iSFpwa SxXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:ui-outboundreport:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=PQsZEmbs1y0Z9hgQHiC5tDr8HrF1qBB5F455Ipwaeyc=; b=BzcQBhkGFa2XaFUa46oE32kDm0DWIiOfiW0TFMiSfSoFSs8a26tB1WMoC199WXTIVb GWQTbFmy0e4K7hhB44vx+EYxj9UVPij/a5pTynk6udj304DDrcZAGaCbjdZtr6kdw3mj SLOGBnvZet/r430GHp8T1CWrJSqqqTzv1xYK236r14pXzcbW2VPrmXg57/JJvrtH7fiI 5s+boVoP19gApibdnIFwZJN28XW+ZtyvXkHVpkNArSfZjXHPd+aKA7xTvnBsBScIYjxL exYPrfpWVqw6stFod1HJuxalBVwCh3EgU8+TqJT5w8BoxbM30K+WKsW2uejTvli+b2JS dVBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=NbrIC3v4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=web.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id js5-20020a17090797c500b0084ce73e3b2csi10592160ejc.760.2023.01.09.16.22.53; Mon, 09 Jan 2023 16:23:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=NbrIC3v4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=web.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229969AbjAIX7G (ORCPT + 53 others); Mon, 9 Jan 2023 18:59:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231358AbjAIX7E (ORCPT ); Mon, 9 Jan 2023 18:59:04 -0500 Received: from mout.web.de (mout.web.de [212.227.15.4]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65E1E1B1D0 for ; Mon, 9 Jan 2023 15:59:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1673308738; bh=FMcjA51wpzoraSDLjxsaLpmF0naPwUP70E0dsefK2kE=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=NbrIC3v4a9JK1+VGa/iF+OJMNNgwwbr5/9+6WqgaTSYBnndWJ1QraPOFr/KNPucw8 WSqa6XlXlQfJ/Ozs2j0YXBWn43rpSeUVtotji1s3bVcvvvg91wvH1PdHoZEoDO3YoQ UBJ/QiBjEefElAcJuLUYfWHRVEXZOWrrdxNOEtQ+NLcjze47U69VnleNzn9qcy496c kTQmSQ1y48qinlUfm98mQGGh2Kzd1D9oO1Xy1Mr4cHg0vF1qFDRGl3Q5rh0J7HUI8b lTkHDMuvUg4vLcHPxtSxBhFILeNHBjtRY1EARUnXjNayua7CwALxfpPB4DzquYMxwn 9WJ3hWfwHmLVg== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from luka-spectre.fritz.box ([77.180.184.175]) by smtp.web.de (mrweb006 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MxYXF-1or3992FVh-00xcIG; Tue, 10 Jan 2023 00:58:58 +0100 From: Luka Guzenko To: tiwai@suse.com Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Luka Guzenko Subject: [PATCH] ALSA: hda/realtek: Enable mute/micmute LEDs on HP Spectre x360 13-aw0xxx Date: Tue, 10 Jan 2023 00:58:40 +0100 Message-Id: <20230109235840.26452-1-l.guzenko@web.de> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:XouvoeaEbNqWsNABGNhUZH/5qo2PXjBy/mxzbDIEJNW6259sGQg KSGr0Ds2MNYakBIeGzHn7hOdD79CoKopik/RnSF374hafAZGwP5U05njMd3x5PGbzf0kKSx au3xD3a2JTTmdoKWzZ4ilqh7cvoflxoHm4RwNhZYfRcgoCZLKGrfLjkzmY8OdDIKwpaGd/M L0+saHHyjiudMaIzMFvMQ== UI-OutboundReport: notjunk:1;M01:P0:1jhPLbLZR4k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ALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The HP Spectre x360 13-aw0xxx devices use the ALC285 codec with GPIO 0x04 controlling the micmute LED and COEF 0x0b index 8 controlling the mute LED= . A quirk was added to make these work as well as a fixup entry. Signed-off-by: Luka Guzenko =2D-- sound/pci/hda/patch_realtek.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 3794b522c222..6a76a2eddd3c 100644 =2D-- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -4644,6 +4644,16 @@ static void alc285_fixup_hp_coef_micmute_led(struct= hda_codec *codec, } } +static void alc285_fixup_hp_gpio_micmute_led(struct hda_codec *codec, + const struct hda_fixup *fix, int action) +{ + struct alc_spec *spec =3D codec->spec; + + if (action !=3D HDA_FIXUP_ACT_PRE_PROBE) + spec->micmute_led_polarity =3D 1; + alc_fixup_hp_gpio_led(codec, action, 0, 0x04); +} + static void alc236_fixup_hp_coef_micmute_led(struct hda_codec *codec, const struct hda_fixup *fix, int action) { @@ -4665,6 +4675,13 @@ static void alc285_fixup_hp_mute_led(struct hda_cod= ec *codec, alc285_fixup_hp_coef_micmute_led(codec, fix, action); } +static void alc285_fixup_hp_spectre_x360_mute_led(struct hda_codec *codec= , + const struct hda_fixup *fix, int action) +{ + alc285_fixup_hp_mute_led_coefbit(codec, fix, action); + alc285_fixup_hp_gpio_micmute_led(codec, fix, action); +} + static void alc236_fixup_hp_mute_led(struct hda_codec *codec, const struct hda_fixup *fix, int action) { @@ -7106,6 +7123,7 @@ enum { ALC285_FIXUP_ASUS_G533Z_PINS, ALC285_FIXUP_HP_GPIO_LED, ALC285_FIXUP_HP_MUTE_LED, + ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED, ALC236_FIXUP_HP_GPIO_LED, ALC236_FIXUP_HP_MUTE_LED, ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF, @@ -8486,6 +8504,10 @@ static const struct hda_fixup alc269_fixups[] =3D { .type =3D HDA_FIXUP_FUNC, .v.func =3D alc285_fixup_hp_mute_led, }, + [ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED] =3D { + .type =3D HDA_FIXUP_FUNC, + .v.func =3D alc285_fixup_hp_spectre_x360_mute_led, + }, [ALC236_FIXUP_HP_GPIO_LED] =3D { .type =3D HDA_FIXUP_FUNC, .v.func =3D alc236_fixup_hp_gpio_led, @@ -9327,6 +9349,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[]= =3D { SND_PCI_QUIRK(0x103c, 0x86c7, "HP Envy AiO 32", ALC274_FIXUP_HP_ENVY_GPI= O), SND_PCI_QUIRK(0x103c, 0x86e7, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_= HP_SPECTRE_X360_EB1), SND_PCI_QUIRK(0x103c, 0x86e8, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_= HP_SPECTRE_X360_EB1), + SND_PCI_QUIRK(0x103c, 0x86f9, "HP Spectre x360 13-aw0xxx", ALC285_FIXUP_= HP_SPECTRE_X360_MUTE_LED), SND_PCI_QUIRK(0x103c, 0x8716, "HP Elite Dragonfly G2 Notebook PC", ALC28= 5_FIXUP_HP_GPIO_AMP_INIT), SND_PCI_QUIRK(0x103c, 0x8720, "HP EliteBook x360 1040 G8 Notebook PC", A= LC285_FIXUP_HP_GPIO_AMP_INIT), SND_PCI_QUIRK(0x103c, 0x8724, "HP EliteBook 850 G7", ALC285_FIXUP_HP_GPI= O_LED), =2D- 2.39.0