Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3024457ybt; Mon, 29 Jun 2020 13:12:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzvmBFAFJ9dN/xng08eqeYEvZFWz1bSbNLk6SQpZiInK75z0HPcUZVVc2iCzbidVmhcuagp X-Received: by 2002:a17:907:2094:: with SMTP id pv20mr10434838ejb.512.1593461550659; Mon, 29 Jun 2020 13:12:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593461550; cv=none; d=google.com; s=arc-20160816; b=dnk/2TSkqapEOAz5aezKNdw7iLsbf5zKi6HVFUUkVpsLPDnyyDVnfMAhfxoycnbHx+ oFoRBcKW+MYs+/EHdWdFuHh9onLm6+rZBQimDZhl/hbwsyWwWwQmxbztn41hRWBlKydF rJGQRbjD74NswuT2ha+nAZSyWfBb+BqZvxEJFBD1Jdz2q9JQMVbVWecEW6l2arqkgE7V pPr3RRXgT8Lw8m2+PZB2kZBwYMcq2IhACrZEbpGGZ9xqNPUwFGigzBac8ncAJW14JeFs OhrFwwvio7eZUGy32txWZA9aPqK2oukNiiTwHY67DjeM3XR7VrYlCda35EtB3SEtEnOa XJuA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ovB/5NCx90c5t9fGm457oRyRJm6+3KFKjIXyRtfE7jQ=; b=xEI2+CV8dotJaLSyNZh5Gv8/6IRPWum32DGcVEATQMrmwN3fqyMyHYi522j85NBl1j SSaJsCtfreDYQ5M9YZ0h9/3fRNWIcDgTE29U6iA1NGvEN/xCgEUrSRp9K+kevGYoBTPj 2TkmcWS0LuyvvL8nNvmHjCJ04Qfmd2CiFedw7vW0yqZaMuu64XhwdB03/LaRfMnP1STD GwzQ9DmQMHQviNX+HG1GWKnyb30IQAF4I9TykUS6mh+/Y4N+R6YKsRmS309CCA+aQsw9 FCAtPhwWfTEjF3zoLumi6HDn7r0ucc5WqFfWhrCHk5Q2Rs6Y3M3K5vvakvpOrpxM3HfC XUyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wKytuCT9; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b22si309320edn.212.2020.06.29.13.12.07; Mon, 29 Jun 2020 13:12:30 -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=wKytuCT9; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729259AbgF2UKk (ORCPT + 99 others); Mon, 29 Jun 2020 16:10:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:40562 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732905AbgF2TaW (ORCPT ); Mon, 29 Jun 2020 15:30:22 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5DE3D23EF6; Mon, 29 Jun 2020 15:35:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593444918; bh=emakqb68zynqWff8gOjBLPusUCIxEvi60xO/MerYsEo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wKytuCT95Mc71k11VFW9gNDgDSK6JtSAfqnafmB2jpQ7O9subuTdLHA6UpeGiIUbp 4GWy/wyuBtMJ3ONQqa5FHFvxDNuF90ZMcB4PJwXOAnEq0j6WQbH74GkVRIN5Q21qGr dYiUbnZc2ZQdCArceBg9N4/omIUXpYkWc4xAPRPE= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Kai-Heng Feng , Takashi Iwai , Sasha Levin Subject: [PATCH 4.19 014/131] ALSA: hda/realtek: Enable mute LED on an HP system Date: Mon, 29 Jun 2020 11:33:05 -0400 Message-Id: <20200629153502.2494656-15-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200629153502.2494656-1-sashal@kernel.org> References: <20200629153502.2494656-1-sashal@kernel.org> MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.131-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-4.19.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 4.19.131-rc1 X-KernelTest-Deadline: 2020-07-01T15:34+00:00 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kai-Heng Feng [ Upstream commit f5a88b0accc24c4a9021247d7a3124f90aa4c586 ] The system in question uses ALC285, and it uses GPIO 0x04 to control its mute LED. The mic mute LED can be controlled by GPIO 0x01, however the system uses DMIC so we should use that to control mic mute LED. Signed-off-by: Kai-Heng Feng Cc: Link: https://lore.kernel.org/r/20200327044626.29582-1-kai.heng.feng@canonical.com Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin --- sound/pci/hda/patch_realtek.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 9847be4349e60..3103f990299c9 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -3918,6 +3918,12 @@ static void alc269_fixup_hp_gpio_led(struct hda_codec *codec, alc_fixup_hp_gpio_led(codec, action, 0x08, 0x10); } +static void alc285_fixup_hp_gpio_led(struct hda_codec *codec, + const struct hda_fixup *fix, int action) +{ + alc_fixup_hp_gpio_led(codec, action, 0x04, 0x00); +} + static void alc286_fixup_hp_gpio_led(struct hda_codec *codec, const struct hda_fixup *fix, int action) { @@ -5748,6 +5754,7 @@ enum { ALC294_FIXUP_SPK2_TO_DAC1, ALC294_FIXUP_ASUS_DUAL_SPK, ALC294_FIXUP_ASUS_HPE, + ALC285_FIXUP_HP_GPIO_LED, }; static const struct hda_fixup alc269_fixups[] = { @@ -6847,6 +6854,10 @@ static const struct hda_fixup alc269_fixups[] = { .chained = true, .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC }, + [ALC285_FIXUP_HP_GPIO_LED] = { + .type = HDA_FIXUP_FUNC, + .v.func = alc285_fixup_hp_gpio_led, + }, }; static const struct snd_pci_quirk alc269_fixup_tbl[] = { @@ -6991,6 +7002,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x103c, 0x83b9, "HP Spectre x360", ALC269_FIXUP_HP_MUTE_LED_MIC3), SND_PCI_QUIRK(0x103c, 0x8497, "HP Envy x360", ALC269_FIXUP_HP_MUTE_LED_MIC3), SND_PCI_QUIRK(0x103c, 0x84e7, "HP Pavilion 15", ALC269_FIXUP_HP_MUTE_LED_MIC3), + SND_PCI_QUIRK(0x103c, 0x8736, "HP", ALC285_FIXUP_HP_GPIO_LED), SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC), SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300), SND_PCI_QUIRK(0x1043, 0x106d, "Asus K53BE", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), -- 2.25.1