Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp7088100rwp; Tue, 18 Jul 2023 09:51:11 -0700 (PDT) X-Google-Smtp-Source: APBJJlFyiIt9U6JTxzvGQ6jj/vtqfnP1pHjEYRyvfqbH97TqtNq0ImZpo+85cGX1IJVCps5lRSF5 X-Received: by 2002:a05:6a20:4415:b0:134:76d5:d3fd with SMTP id ce21-20020a056a20441500b0013476d5d3fdmr11536578pzb.0.1689699071348; Tue, 18 Jul 2023 09:51:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689699071; cv=none; d=google.com; s=arc-20160816; b=abuPMh0PC5sGC/G2E81NusYryimGmqfuqli8HRZPx6NVqlAzTxakXEMdqNya8iE2Z5 ipSIuvMMc5cCplj/OE3s+nOlxaLd3st7JUDgROR5xeExMl2ok4m2Otb/NoyXuXfTjE3J 2wKv5NNAWpM7ARZ9GNmehTKmbouHm/tUBG3XOJj+r6YtbiPX3B8Dx13TNjyricG5hc0b rwO/AEs6DG/4yBUUpGcKwpfMjMCBFIs3xc75M0uV0YCP3GZ/iBvRnZBHPqlLQ5T8X064 JAyJRXrMXhzpXSRqpXPcdQeE7wZy4zT9IWjKZiPxNVXNdNZHJM3ZCMzAXJJNeJgBZY28 N/Lg== 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=feicZGNGud63Lnqry1TGIJTFZIVPPbQxUwpkxeZkwmg=; fh=OjyyiLSiS0TDeKjge63eRmjZKEIWZHzLoilgjqH6K+I=; b=VefnXK/vU7W/aNIwY3DC3HERtlh7odZH3pc8z1+rS+ihpPtboNInMA3IS57s8SRFVK ijcegce5lHjCjxHwGyreJdN1sJOI/m/BVkokTtX0UmUs/cYxfaqMcT7V1HfovthdtWpY ODQy83ryx8uRg1G7+nVG6bWSYd2En+YKe9wH23hlbT95iTPdHF+gi0mBobKa+JzknP/H kEqiAVBjLDPbIt4GdAGv+DumRkgT2Uh17u+bW8JDb8xvHQl7R2sa4ZCkse/uPJiQR/oT zT7EjeuS7zmaEUlUebNBt5EYlWxodi558W9VAb1N2da2YjfKtc2BAohY5KqAHOpjr2cR Rggw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=QrnuwjkJ; 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 w18-20020a056a0014d200b006823a64b0a6si1799326pfu.350.2023.07.18.09.50.56; Tue, 18 Jul 2023 09:51:11 -0700 (PDT) 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=QrnuwjkJ; 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 S230379AbjGRQNx (ORCPT + 99 others); Tue, 18 Jul 2023 12:13:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229525AbjGRQNw (ORCPT ); Tue, 18 Jul 2023 12:13:52 -0400 Received: from mout.web.de (mout.web.de [212.227.17.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 341CEB5 for ; Tue, 18 Jul 2023 09:13:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1689696825; x=1690301625; i=l.guzenko@web.de; bh=VjNdHOZe3GALSSGYevbzgHCx2G8OebZvwIUZOt1cIKo=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=QrnuwjkJtZL9oKy6aTlPjqB+N92UpeRs0M9bz41oTRCyDUsWAEdlIe/OSDRbV0agG+Dcm3B TrsiLKYkiJVCTSrw9a4UtfDzmeFbcvN7Lt1aD56AxLPr8IXH7e6BkxoVe6CaxD2NMd+LNTKH7 22lpR5V+ytPZWFwz/W1ciX3lN2L0zaIg47jiUB35UwyoYpJE2NRrPaMZ62V8pzOo/KPhTQgIl 7+bZQiAqSNpashm8ag8DUqKgBSttuvmvpO9NP/C2598XmA5qMGkMcV4nVJakLLp7DvKBKdWao lutX5+VvJJxpc9TwBqFqxjOkfqZwVVfU0fE/WlHgHEn+KSjmz0Ig== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from localhost.localdomain ([77.182.132.112]) by smtp.web.de (mrweb106 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MNwjS-1qbEkD3G4u-00OSQN; Tue, 18 Jul 2023 18:13:45 +0200 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 LED on HP Laptop 15s-eq2xxx Date: Tue, 18 Jul 2023 18:12:41 +0200 Message-ID: <20230718161241.393181-1-l.guzenko@web.de> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:DGklsXVs+hixHTI07SfvyepRZoxqPQu3mj/6ZVw59n5r+JYqcwN PHeG9uYF3ri+EsPs5HzC1mG/uFM9dJdZLc7U7fdT2TXJcd7+zFVhNKkSyD3OZNit/Pu6JRH FaoLQrJrSsOO+m1lkueCSGgJwlUOSuhoG5hMr09AzBeOTjqPAPXtigyrqprDt5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-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Laptop 15s-eq2xxx uses ALC236 codec and controls the mute LED using COEF 0x07 index 1. No existing quirk covers this configuration. Adds a new quirk and enables it for the device. Signed-off-by: Luka Guzenko =2D-- sound/pci/hda/patch_realtek.c | 23 ++++++++++++++++++++++- 1 file changed, 20 insertions(+) diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 308ec7034cc9..e8a836596bfb 100644 =2D-- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -4623,6 +4623,21 @@ static void alc236_fixup_hp_mute_led_coefbit(struct= hda_codec *codec, } } +static void alc236_fixup_hp_mute_led_coefbit2(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->mute_led_polarity =3D 0; + spec->mute_led_coef.idx =3D 0x07; + spec->mute_led_coef.mask =3D 1; + spec->mute_led_coef.on =3D 1; + spec->mute_led_coef.off =3D 0; + snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set); + } +} + /* turn on/off mic-mute LED per capture hook by coef bit */ static int coef_micmute_led_set(struct led_classdev *led_cdev, enum led_brightness brightness) @@ -7133,6 +7148,7 @@ enum { ALC285_FIXUP_HP_GPIO_LED, ALC285_FIXUP_HP_MUTE_LED, ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED, + ALC236_FIXUP_HP_MUTE_LED_COEFBIT2, ALC236_FIXUP_HP_GPIO_LED, ALC236_FIXUP_HP_MUTE_LED, ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF, @@ -8556,6 +8572,10 @@ static const struct hda_fixup alc269_fixups[] =3D { .type =3D HDA_FIXUP_FUNC, .v.func =3D alc285_fixup_hp_spectre_x360_mute_led, }, + [ALC236_FIXUP_HP_MUTE_LED_COEFBIT2] =3D { + .type =3D HDA_FIXUP_FUNC, + .v.func =3D alc236_fixup_hp_mute_led_coefbit2, + }, [ALC236_FIXUP_HP_GPIO_LED] =3D { .type =3D HDA_FIXUP_FUNC, .v.func =3D alc236_fixup_hp_gpio_led, @@ -9440,6 +9460,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[]= =3D { SND_PCI_QUIRK(0x103c, 0x886d, "HP ZBook Fury 17.3 Inch G8 Mobile Worksta= tion PC", ALC285_FIXUP_HP_GPIO_AMP_INIT), SND_PCI_QUIRK(0x103c, 0x8870, "HP ZBook Fury 15.6 Inch G8 Mobile Worksta= tion PC", ALC285_FIXUP_HP_GPIO_AMP_INIT), SND_PCI_QUIRK(0x103c, 0x8873, "HP ZBook Studio 15.6 Inch G8 Mobile Works= tation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT), + SND_PCI_QUIRK(0x103c, 0x887a, "HP Laptop 15s-eq2xxx", ALC236_FIXUP_HP_MU= TE_LED_COEFBIT2), SND_PCI_QUIRK(0x103c, 0x888d, "HP ZBook Power 15.6 inch G8 Mobile Workst= ation PC", ALC236_FIXUP_HP_GPIO_LED), SND_PCI_QUIRK(0x103c, 0x8895, "HP EliteBook 855 G8 Notebook PC", ALC285_= FIXUP_HP_SPEAKERS_MICMUTE_LED), SND_PCI_QUIRK(0x103c, 0x8896, "HP EliteBook 855 G8 Notebook PC", ALC285_= FIXUP_HP_MUTE_LED), =2D- 2.41.0