From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796382320; b=vtjpdzty5kU86lfVmzJp1QVeX6PuSjlZCdwcemhUYn8qju5Uxx3VwGEaWSYnATHSyrfk 0KRZHfTWmWSPyIXXEcFjFaDISwJPE87gYdW0E22kJxapoQo6Qxas7JFjSdOaCkse4XhK/ WbIbdFqCs4PnmyovD3S8sMqv7wySTN8tEQgPsbD5UzbsGWb/a8mkj+VA79Yx+T8Vu5sso uezqFuVzrIFb48emIYEMHjc0FxfNmzqAai592LiEe4wjPAvdA7iRbNH6+VNE6c2kJQrR1 CWyp71bTxbiTcapyb7MLF6FVSDAei0O0r3FG4Qgp9/DRwgnM27snVm+LwAd2NkmWl4A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796382320; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=aY6nuzY77rBRysxktnokRrUqcfIRlWAkhqGHUAqE5Bc=; b=WZTcKPz7bQurHJ+YevqncMM8L67XreQvE5su8TH9p+Bi3ZjaGZUnrdIlIqI//vEb0Fnn rS8DxkeTy+ncOMByjRCiQ2ABhNk9Cb59FZHpxPSZvpA7M4AiSzij48JDInl23vRkP1a7v ync1MByS6lH6QoyXrXfeUiTMY65ECvDJS3bo8hVp2cXiZ0y73Hg67vBjJK1NygC3f2MFn iLDnLFUBaS6+woK28S+2Fc+/1a2LzbxGnQirY/KedKRoX4itnoP3hORoNwaAPoZxYy2+v y3kNsZGH7eVDb/MxmKyE377J5u/PQ4m9n34iLtIQdf2PRumTa3vVvba7IE9lWq1Imxw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=fMWp1TzS; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8F6B8606A322; Fri, 4 Dec 2026 11:05:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=fMWp1TzS Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0741D1F0092C; Fri, 4 Dec 2026 11:05:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796382320; bh=aY6nuzY77rBRysxktnokRrUqcfIRlWAkhqGHUAqE5Bc=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=fMWp1TzSkPjaJN4ZqhahD2N3h1pFt8xwZqk7P0OZU6f1pJmZ4pOw8+87w+p8p4/EP /FPxe5V7mDasi3DYiLRm5aRwH9uf0oYfpwBqaHjALHv6KadingwekLxl8OxOgXQzt1 i5DOX2UXROFJyoDOlhLlv6/+t2se7l39mS96VNo4= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Chen Yuxi , Charles Keepax , Sebastian Krzyszkowiak , Mark Brown Subject: [PATCH 6.18 401/703] ASoC: wm8962: Fix broken headset button caused by wrong guard constant Date: Fri, 4 Dec 2026 19:05:00 +0900 Message-ID: <20261204100638.494074232@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100627.522266145@linuxfoundation.org> References: <20261204100627.522266145@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Chen Yuxi commit fd3b0fc97ea72d027359e7603a1224703cec1864 upstream. Commit e59075211902 ("ASoC: wm8962: Don't report a microphone if it's shorted to ground on plug") guards the mic short report by testing wm8962->mic_status against WM8962_MICDET_STS. But mic_status stores the reported jack status, composed of SND_JACK_MICROPHONE and SND_JACK_BTN_0, which never has WM8962_MICDET_STS set. The guard is therefore always true, so every mic short event reports nothing. Pressing the button on a TRRS headset shorts the mic pin to ground, which used to be reported as SND_JACK_BTN_0. After that commit the button press is silently dropped, breaking the headset button on all wm8962 boards using the mic detect path. Test mic_status against SND_JACK_MICROPHONE instead, restoring the intended behaviour: suppress the report only when no microphone was previously detected, i.e. a TRS plug in a TRRS socket. Fixes: e59075211902 ("ASoC: wm8962: Don't report a microphone if it's shorted to ground on plug") Cc: stable@vger.kernel.org Signed-off-by: Chen Yuxi Reviewed-by: Charles Keepax Reviewed-by: Sebastian Krzyszkowiak Link: https://patch.msgid.link/20261117070516.3861828-1-chenyuxi19@huawei.com Signed-off-by: Mark Brown Signed-off-by: Greg Kroah-Hartman --- sound/soc/codecs/wm8962.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/sound/soc/codecs/wm8962.c +++ b/sound/soc/codecs/wm8962.c @@ -3083,7 +3083,7 @@ static void wm8962_mic_work(struct work_ /* Don't report a microphone if it's shorted right after * plugging in, as this may be a TRS plug in a TRRS socket. */ - if (!(wm8962->mic_status & WM8962_MICDET_STS)) + if (!(wm8962->mic_status & SND_JACK_MICROPHONE)) status = 0; }