Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp8381203rwl; Tue, 10 Jan 2023 12:44:49 -0800 (PST) X-Google-Smtp-Source: AMrXdXvHbsYsd1PLZLCuCY9iQ+xS5vlbS+s94AUwtVUwpV7/BK6iwUehX2k2qkM9n6m/rY/XMJtx X-Received: by 2002:a05:6a20:9f86:b0:b3:bf50:9168 with SMTP id mm6-20020a056a209f8600b000b3bf509168mr50884211pzb.38.1673383489489; Tue, 10 Jan 2023 12:44:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673383489; cv=none; d=google.com; s=arc-20160816; b=jY5gMR5YbOVgs4r6qD8R8hY/VTaK1yi4CN74YIEzG/xoY9ou0MumwOKNF0RMLE3Byq 3yXt7h11ahRQIr7Ngefv+n+tAs6Bz8iOBiP6JvxJwBoRMEzx2APZCOzRW7T12KosxgvG UVd1433A/pQzHWgFoFBRcUu6NWZvEn7HYMF60eu76DabfYXVM4dnGZP/mq8ha1fWYbSj ci1J1+Ihk9LOwHQL0ee3bHBqKD7WWXhMEVo59I/phLUFFpLpRwADghFYXg73b6Kr88FQ cgIMXvYtN8kRhfaYyrKpPW1EJ/TrW4N2pG8ap08bwIe911mq09asYopNIm8QHhfqV4xg REIQ== 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=V3dBjXPvSWvoe5gX1kv8qdzVwlUo4hdbrwXYtADazIg=; b=Qb6Dm5pZ3tlsdmUR+TOadydFlIn34VwlCnL4ym3qZ7UqmFpFCOzT+7kp3I88vuNUQx DREr3BO94HXQ3zp0VJCfrWOypoeWjaILs8X0aJQ/eVVVrkXc9oidGGgIVswdc1/43w4Z lJ5BBpb1tnME6tbHGO47sgbnczlPKF0j+Q/uV/PpJKrwimOuhTacO45HpZcKzC0Cd+G5 X8042d9/Rw0epyOOhv4t8w5WcLDK9SAT22b3+YktnXQqH8jK7JwJ+PVTfkhhOSkEpfy7 9VX7BMGFfBZSS47cn4snl6wZjfgfdgHeVCMuzh3IvtZvUdkIi7p4twfzk0RNoz2v9XDV BzdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=ZTVHezLY; 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 f30-20020a63101e000000b004b4103b6f9esi4806788pgl.305.2023.01.10.12.44.42; Tue, 10 Jan 2023 12:44:49 -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=ZTVHezLY; 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 S233998AbjAJUdQ (ORCPT + 53 others); Tue, 10 Jan 2023 15:33:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235428AbjAJUc0 (ORCPT ); Tue, 10 Jan 2023 15:32:26 -0500 X-Greylist: delayed 304 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 10 Jan 2023 12:30:51 PST Received: from mout.web.de (mout.web.de [212.227.15.14]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2EC0254 for ; Tue, 10 Jan 2023 12:30:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1673382650; bh=MEejYbw8dcDa3DUGUZRzzPL8AkL59tjy8R6jRGsfjOY=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=ZTVHezLYVcWvMFYAtqEdtmMUYDRtmCD9AbXijM+oSU965xmX69sHt3I9nCQ5SkbJQ OZ7vMx4HNGSpBqhY3djvUsE2JRoiM5tA9uxdAhC1ZnWQXQ1tcOGAqk2T9Z/NLmHD13 m7yz2ItySPFmcugzjCHQHrDdoopC7jQDcmQD5z97Mp2jAzG/Oebiu0+vp8alB6RS/H 3vDh/Ix/fVWVmEMEeoYDULfae4Bfi36si6oUbNWJ0T0XwobstjHlp5NtbAYirINb4P L1m0x9SMZiDUdwf9hpJ1Lwg5JO8hK/3np00LmMkJEDsWOW4b+Cge6AfZtxBShhliNu j+vRHqey7ymQw== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from luka-spectre.fritz.box ([93.129.44.167]) by smtp.web.de (mrweb005 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MVJRb-1pNHnc0G4l-00SRYv; Tue, 10 Jan 2023 21:25:43 +0100 From: Luka Guzenko To: tiwai@suse.com Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Luka Guzenko Subject: [PATCH v2] ALSA: hda/realtek: Enable mute/micmute LEDs on HP Spectre x360 13-aw0xxx Date: Tue, 10 Jan 2023 21:25:14 +0100 Message-Id: <20230110202514.2792-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:/szKTTJvCAPwW11ClrWP49WM+KH1T+Wcs9r+r+84lKyxX0LdTXO 90IyXQGm0GYJeqnkDxdxpxozHnsD7+xNQzqndUF01e/WtN/qjDpbEAwESEOOW32GCcXUTeV 31cOopdhgcwya7/U4cSjqR2YcML2grX5HXcMO0Kxqp5xX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Gk5LtRlGyNpzvMdS+AAtaUk= X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,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. Signed-off-by: Luka Guzenko =2D-- V1 -> V2: Inverted the conditional statement in alc285_fixup_hp_gpio_micmute_led as suggested by Takashi Iwai 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..dc4b07a0c240 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=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