From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81444C54EBE for ; Tue, 10 Jan 2023 08:38:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237862AbjAJIhs (ORCPT ); Tue, 10 Jan 2023 03:37:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235654AbjAJIhP (ORCPT ); Tue, 10 Jan 2023 03:37:15 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87FEB4C71C for ; Tue, 10 Jan 2023 00:36:39 -0800 (PST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 0F895678BF; Tue, 10 Jan 2023 08:36:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1673339798; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=xvS//62VSffaOVkPd7AJ+WkPm2q+fEQoyqXPxSgE+Tc=; b=sLt1j2De2qQT5zPcMyDikiQPYwPstDNGwUA+QwDZTjMdEHh/s5GuDx/XkgrLZrCN0jpYtm r9IgMiVSFfcsQZ38yWwqsGfJvg7nDXXdaY2zBLTgU+35YhzPWPBlPxV4zmtKh15WqGnSk3 JD9CWhXokfnH500EdukLWNyDmWJtlME= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1673339798; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=xvS//62VSffaOVkPd7AJ+WkPm2q+fEQoyqXPxSgE+Tc=; b=DZuJmvUtsJf4nJ5sVotgf+gUVorDRkWgCrx6j8e8mSNd7NpIaS3LmCPyRIX2wUu3KiDfVM q3zzuibEavQ5jADw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id E2BC01358A; Tue, 10 Jan 2023 08:36:37 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id OUC5NpUjvWOyFgAAMHmgww (envelope-from ); Tue, 10 Jan 2023 08:36:37 +0000 Date: Tue, 10 Jan 2023 09:36:37 +0100 Message-ID: <87k01ueqga.wl-tiwai@suse.de> From: Takashi Iwai To: Luka Guzenko Cc: tiwai@suse.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ALSA: hda/realtek: Enable mute/micmute LEDs on HP Spectre x360 13-aw0xxx In-Reply-To: <20230109235840.26452-1-l.guzenko@web.de> References: <20230109235840.26452-1-l.guzenko@web.de> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 10 Jan 2023 00:58:40 +0100, Luka Guzenko wrote: > > 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 > --- > 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 > --- 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 = codec->spec; > + > + if (action != HDA_FIXUP_ACT_PRE_PROBE) > + spec->micmute_led_polarity = 1; Is this condition correct? It's usually other way round; a flag is set up only once at parsing. thanks, Takashi