Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2635421pxa; Mon, 17 Aug 2020 15:04:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzFoYXGkf4YGhwEl9UYX/gPNfTMHy6dmpwrs6TCShpp9QIdolU8M6Qdx6sYE9OAFD4lbECa X-Received: by 2002:a17:906:80c:: with SMTP id e12mr17522324ejd.128.1597701852652; Mon, 17 Aug 2020 15:04:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597701852; cv=none; d=google.com; s=arc-20160816; b=vnuigHaMPJndNjkucrv51mjcR10AIOtWEI0N4XmuJh/SN7pNttndlzTVNIQ0ISO96v rhx64wr6JyRGN7KHeGNcfY/GJqnRg5dJXAvftayKyp3xFUCCm4WoHs9vWMAZYb1fNcp7 OecOaXpIV/ipdUM5pKSl8q/FoUwmfKP5VrsryN4HvAJJ2yIzxHvUj2zC3jS3ZN35vUlV rveWM32d9OFPC0GbYpsv9PEc1DbkYInzkfLm5px8svWluhk0Tk4gXTCjIs/pHPT/CmMT TamO1LqsR+p+FWbpBuCVTX71SkmLrSGYS/eBLEW4wSMPpAsn4YQtAtiSxiK5lwOZs4o0 7UIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=DelmQzYY95PlEhHlNb8Eo54aMKmdxrZORrr1Y9o2Gg0=; b=NHMuWUTQLF+iNysVikWd6LP9FLip76xRlGgYgfdpYmHhlCaUszN69LoPlww5Lz3O1u vtm+klkA3MamNUYzu1xXLPImWhoxlPSu9u04gr2FoyE5hU5O4hC9hC3dE64G2ic084cP qx3aKBEcXS+Rir5yZ87QhMBUAmsIMLK/EPg8FTKH0ms5zRGfr+Cp83Sg4N4tqpX/aDAX rSI89Dj0apbSOKz7Bt30+vsTWFcx9bxLx13t8B/UGZItxy5Vu//qpDwbVgYgRnkVHYPo 6HvQs7sG1nTLaIRtdd+AMTum2vN8SA25lTRcifVQMc3BGkZht7Cd7NxoNhE/Yk2niFLf gvhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=avsa6ZDi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qc24si12297681ejb.398.2020.08.17.15.03.49; Mon, 17 Aug 2020 15:04:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=avsa6ZDi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387624AbgHQPnN (ORCPT + 99 others); Mon, 17 Aug 2020 11:43:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:44926 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730188AbgHQPhX (ORCPT ); Mon, 17 Aug 2020 11:37:23 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E12BE23120; Mon, 17 Aug 2020 15:37:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597678639; bh=RPEiQDy6a3Jp0/Ow1vYnPqNQ//IIH6hyciHaIjsqhoE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=avsa6ZDi/p0b8Vzaeo3rD4HYjxsNNfwo9SNa4kLqHtuqzM8s1AmyFlERjRVJQ+Wze m3Ul3ibg3XlHJuWj6qMNVEz7dZw0ozbyPp7B0GsT6y0J8sZrQOt6IpL6joxFCObCdk 4I6xu8edythlOJ60c4AY12p1J+01NBf2NFmJzu8Q= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hui Wang , Takashi Iwai , Kai-Heng Feng Subject: [PATCH 5.8 403/464] ALSA: hda - reverse the setting value in the micmute_led_set Date: Mon, 17 Aug 2020 17:15:56 +0200 Message-Id: <20200817143853.084754257@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200817143833.737102804@linuxfoundation.org> References: <20200817143833.737102804@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hui Wang commit 404690649e6a52ee39817168f2d984726412e091 upstream. Before the micmute_led_set() is introduced, the function of alc_gpio_micmute_update() will set the gpio value with the !micmute_led.led_value, and the machines have the correct micmute led status. After the micmute_led_set() is introduced, it sets the gpio value with !!micmute_led.led_value, so the led status is not correct anymore, we need to set micmute_led_polarity = 1 to workaround it. Now we fix the micmute_led_set() and remove micmute_led_polarity = 1. Fixes: 87dc36482cab ("ALSA: hda/realtek - Add LED class support for micmute LED") Reported-and-suggested-by: Kai-Heng Feng Cc: Signed-off-by: Hui Wang Link: https://lore.kernel.org/r/20200811122430.6546-1-hui.wang@canonical.com Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/pci/hda/patch_realtek.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -4118,7 +4118,7 @@ static int micmute_led_set(struct led_cl struct alc_spec *spec = codec->spec; alc_update_gpio_led(codec, spec->gpio_mic_led_mask, - spec->micmute_led_polarity, !!brightness); + spec->micmute_led_polarity, !brightness); return 0; } @@ -4173,8 +4173,6 @@ static void alc285_fixup_hp_gpio_led(str { struct alc_spec *spec = codec->spec; - spec->micmute_led_polarity = 1; - alc_fixup_hp_gpio_led(codec, action, 0x04, 0x01); } @@ -4426,7 +4424,6 @@ static void alc233_fixup_lenovo_line2_mi { struct alc_spec *spec = codec->spec; - spec->micmute_led_polarity = 1; alc_fixup_hp_gpio_led(codec, action, 0, 0x04); if (action == HDA_FIXUP_ACT_PRE_PROBE) { spec->init_amp = ALC_INIT_DEFAULT;