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 4E6D826A0B3; Tue, 8 Apr 2025 12:06:20 +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=1744113980; cv=none; b=h7LBUE4LUu9lf0Kj6SiD71uHVL4ERbVULBnp3O6q0MBFDr7RTYB7CUtfuixCHgf/4phNOZp8DDq9shFQ7FMoaBbtxkJ5WQmsV6FMaVd1Ebe7MWlzI5Lb6hcnE7t/xli5FF6GHyfBT+K7+2QpWMRaybsX0WQk7RCBO0GtTCImwwc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744113980; c=relaxed/simple; bh=Q+6q9soffcI2bjry5z74yPePfVMJaOBSHo3P1Z2WQxY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hqbPe0Kw9hNLOp1NkZe8adyfPUWiRlZamBGzna74MkrEUGA4OXetCirgmD4q11iHrfVkEGk1Ax0m0DOzhmF/Detqjwm7dA7Z/IMM/JnabbC1so+TyhaRXkem9Lw819uZ9D3sIAU7pCoVtN4c+EmMgNTDHz9W0aONssWYunOGCqU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=EnL4CuKT; 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="EnL4CuKT" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D2CEBC4CEE5; Tue, 8 Apr 2025 12:06:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1744113980; bh=Q+6q9soffcI2bjry5z74yPePfVMJaOBSHo3P1Z2WQxY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EnL4CuKTdmBe48tSfKHI6SMOXP2ZpGSgKckkxFJPVRqTB2XMQZ5J04b5kPb7cmnC2 J/ozh7c1BmWkRX3sYPJYoA2I7JGYMMMjO8O0dilYAVGGOvdpPAB5qJvMSgxWJsCyDT rYjFB8MhiW/Tmob3Z34ECssCPtxpc21jfVrcxSu8= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Takashi Iwai , Sasha Levin , Oleg Gorobets Subject: [PATCH 5.4 092/154] ALSA: hda/realtek: Always honor no_shutup_pins Date: Tue, 8 Apr 2025 12:50:33 +0200 Message-ID: <20250408104818.271815833@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250408104815.295196624@linuxfoundation.org> References: <20250408104815.295196624@linuxfoundation.org> User-Agent: quilt/0.68 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 5.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Takashi Iwai [ Upstream commit 5a0c72c1da3cbc0cd4940a95d1be2830104c6edf ] The workaround for Dell machines to skip the pin-shutup for mic pins introduced alc_headset_mic_no_shutup() that is replaced from the generic snd_hda_shutup_pins() for certain codecs. The problem is that the call is done unconditionally even if spec->no_shutup_pins is set. This seems causing problems on other platforms like Lenovo. This patch corrects the behavior and the driver honors always spec->no_shutup_pins flag and skips alc_headset_mic_no_shutup() if it's set. Fixes: dad3197da7a3 ("ALSA: hda/realtek - Fixup headphone noise via runtime suspend") Reported-and-tested-by: Oleg Gorobets Link: https://patch.msgid.link/20250315143020.27184-1-tiwai@suse.de Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin --- sound/pci/hda/patch_realtek.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 93bb7c5922e78..2e7b45f5f8b18 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -519,6 +519,9 @@ static void alc_shutup_pins(struct hda_codec *codec) { struct alc_spec *spec = codec->spec; + if (spec->no_shutup_pins) + return; + switch (codec->core.vendor_id) { case 0x10ec0236: case 0x10ec0256: @@ -534,8 +537,7 @@ static void alc_shutup_pins(struct hda_codec *codec) alc_headset_mic_no_shutup(codec); break; default: - if (!spec->no_shutup_pins) - snd_hda_shutup_pins(codec); + snd_hda_shutup_pins(codec); break; } } -- 2.39.5