From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 D14D23E95A4; Wed, 20 May 2026 18:08:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779300518; cv=none; b=u/fivqV+f/b6ykiQ5bcBcsAXKjo1zl3JTy/IAma6JW8eEPU9KDde83DqY5HSL6aFsetxDas3Bn7sz/mmu4ynrOrJUAj/7xwyudM3zgkFFevhbm2XhoTwdS7yeUxJMufAaa+NcF2r3fsLqJaY09b66VVfEaHrrrfQ2yDkATq7xEc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779300518; c=relaxed/simple; bh=yi7m/HX0p+SDKymdpCfbWs8eWXeYHGA1TyUzr61fhF8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hglaH2yji14X3F3LokbypYtk82IPt5VuNmB6k4MLhBrzcpiU1cSf35Y61OB+hkrPqLdLFriCA/4S17hrTaMASvfxsolldrhUBVs8e+cpUHZJJU0AaFb7P2Xtpf0n/O4lVD73r97Q3atfhdu4vaGyxM+y39o+RD45IdQ5ZNt4/XQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=m+PatkDC; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="m+PatkDC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 044C41F000E9; Wed, 20 May 2026 18:08:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1779300517; bh=kyqqVM1nPbDS6h1/NukDexMYuXjoKCKS/hVkrnp1fYI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=m+PatkDCAGcCnzSLXrnCWoEMVR5ymRox7aLwiD4AkRW6VIkFXCtMYDVBZdjhnlqz+ 4Nx1mud1vPYFlYpXtC2vGW4zSH6ziV3Va8fSQ//An1FOjhPrzooHJ+OMS7VAuqBS+3 uQYCETyKuw1adekGpwIgQaLUm5LMr2MkqcmR0Q20= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Shengjiu Wang , Mark Brown , Sasha Levin Subject: [PATCH 6.12 203/666] ASoC: fsl_xcvr: Fix event generation in fsl_xcvr_arc_mode_put() Date: Wed, 20 May 2026 18:16:54 +0200 Message-ID: <20260520162115.606160570@linuxfoundation.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260520162111.222830634@linuxfoundation.org> References: <20260520162111.222830634@linuxfoundation.org> User-Agent: quilt/0.69 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.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Shengjiu Wang [ Upstream commit 1b61c8103c9317a9c37fe544c2d83cee1c281149 ] ALSA controls should return 1 if the value in the control changed but the control put operation fsl_xcvr_arc_mode_put() only returns 0 or a negative error code, causing ALSA to not generate any change events. Add a suitable check in the function before updating the arc_mode variable. Fixes: 28564486866f ("ASoC: fsl_xcvr: Add XCVR ASoC CPU DAI driver") Signed-off-by: Shengjiu Wang Link: https://patch.msgid.link/20260401094226.2900532-8-shengjiu.wang@nxp.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/fsl/fsl_xcvr.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sound/soc/fsl/fsl_xcvr.c b/sound/soc/fsl/fsl_xcvr.c index 656a4d619cdf1..cae42d919f930 100644 --- a/sound/soc/fsl/fsl_xcvr.c +++ b/sound/soc/fsl/fsl_xcvr.c @@ -108,10 +108,17 @@ static int fsl_xcvr_arc_mode_put(struct snd_kcontrol *kcontrol, struct fsl_xcvr *xcvr = snd_soc_dai_get_drvdata(dai); struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; unsigned int *item = ucontrol->value.enumerated.item; + int val = snd_soc_enum_item_to_val(e, item[0]); + int ret; - xcvr->arc_mode = snd_soc_enum_item_to_val(e, item[0]); + if (val < 0 || val > 1) + return -EINVAL; - return 0; + ret = (xcvr->arc_mode != val); + + xcvr->arc_mode = val; + + return ret; } static int fsl_xcvr_arc_mode_get(struct snd_kcontrol *kcontrol, -- 2.53.0