From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6EE103F8F4; Mon, 1 Apr 2024 16:26:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711988789; cv=none; b=qgYwEjwyPwBq+BI1nsd9Mgx4WRFu7jRs0rSV3/LOTrgpppOTA8njrryNspBkiMWrxYyk9W15jMTVUCBSXJCVMUbtJ1wIjHtIKbVwAb7iNqLWoz3tuOkHmrlozTE+kfVvVzbCDdDMFzM27gVyT3r5diWv6lKku/O2GDyN7bP8YLg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711988789; c=relaxed/simple; bh=F0wlZ9fWo6JR6wZS6WUDCS8YiSs06u0d/0DF5TfS1XU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ItCPVSSPGeotZM9UjaptDllFKpuM9tLofmigPBMasPVa8nSd9Q84B6tsuwXVKcpg8hxUAglT5C5lTctokub7JxcAVbGt/iW5mWTXf+GbYa0xhWkX7JQapCK5AOi0OaWSy2WvanXZj4HxEkR6kteYNlJ2TAQAihDoANVbsIAEz4A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=0jxOOI6k; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="0jxOOI6k" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C98C0C433F1; Mon, 1 Apr 2024 16:26:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1711988789; bh=F0wlZ9fWo6JR6wZS6WUDCS8YiSs06u0d/0DF5TfS1XU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0jxOOI6k6I8pMBvHjf9i2OkiP0o9RyNlTl3pembtPa/7eAanea7EHdlEeGWw6dVjF UTxD6ehDqDXkUEY7hPPGHALkD6Q8aVMjjYNKSpooaPPehSEFmk7PrnpATU0ES4WBf6 PwyJChOcDe6I1Kj8tyHmafjprPB5KLyKNQEPbpwM= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Kailang Yang , Takashi Iwai Subject: [PATCH 6.7 260/432] ALSA: hda/realtek - Fix headset Mic no show at resume back for Lenovo ALC897 platform Date: Mon, 1 Apr 2024 17:44:07 +0200 Message-ID: <20240401152600.903966038@linuxfoundation.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240401152553.125349965@linuxfoundation.org> References: <20240401152553.125349965@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.7-stable review patch. If anyone has any objections, please let me know. ------------------ From: Kailang Yang commit d397b6e56151099cf3b1f7bfccb204a6a8591720 upstream. Headset Mic will no show at resume back. This patch will fix this issue. Fixes: d7f32791a9fc ("ALSA: hda/realtek - Add headset Mic support for Lenovo ALC897 platform") Cc: Signed-off-by: Kailang Yang Link: https://lore.kernel.org/r/4713d48a372e47f98bba0c6120fd8254@realtek.com Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/pci/hda/patch_realtek.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -11735,8 +11735,7 @@ static void alc897_hp_automute_hook(stru snd_hda_gen_hp_automute(codec, jack); vref = spec->gen.hp_jack_present ? (PIN_HP | AC_PINCTL_VREF_100) : PIN_HP; - snd_hda_codec_write(codec, 0x1b, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, - vref); + snd_hda_set_pin_ctl(codec, 0x1b, vref); } static void alc897_fixup_lenovo_headset_mic(struct hda_codec *codec, @@ -11745,6 +11744,10 @@ static void alc897_fixup_lenovo_headset_ struct alc_spec *spec = codec->spec; if (action == HDA_FIXUP_ACT_PRE_PROBE) { spec->gen.hp_automute_hook = alc897_hp_automute_hook; + spec->no_shutup_pins = 1; + } + if (action == HDA_FIXUP_ACT_PROBE) { + snd_hda_set_pin_ctl_cache(codec, 0x1a, PIN_IN | AC_PINCTL_VREF_100); } }