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 246C53BED1E; Wed, 20 May 2026 16:42:04 +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=1779295326; cv=none; b=jjNbgDCejgKtd+tMCFFqrfhMuR9fmcaQI6M+TOfZHmZHV30J4eHK+/AI0ZahHw3GwiyaJdeWzghqOqZNc+aZUsDE5UtcDTL/VBjKcw4kPJ5I5JqUc67db9QBztXhdFOaRHJeQXPc7TseDhpQpz4UT1Y7hzVuKvF4ckmoLdyY1Qw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779295326; c=relaxed/simple; bh=58NGNki0+mA4ZLAP9RQzkbYDAYuIF4eES1OcNah/ftY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=V1vdz7SWE0SQ8eqw7FiYDUpa6GNiLfizAH5VFhqQkvAByB1uYCQJpzRa7cMgGu3jCiQGYmhEDSV5YQ9ffYHJOqhCaCE9Y7wJxqrrVoQNogZG3rJEx4zPd73ld7+rtR75jrtOCcEm2C/AIXvCyL9Zvaxs4u/6DXPhKdYeG9JotHo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=bo5GmWVZ; 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="bo5GmWVZ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3CBC21F000E9; Wed, 20 May 2026 16:42:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1779295324; bh=kHZ0uVT1zLmPr7dwuj0OiVhDz369T1R0Ve1ykBQU0vg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=bo5GmWVZndGhBWep25MCEu5zAPNqAMbX7qp5VYq10KZ8rXRghrFHcVDlIU+iKnxut ejiZc1aKz+nGEliUlR1cifxhpt1HsqAgHdoM+cBX+Lp2MvoXYgEzHCGZh5b7OLL+Wa /3sxAdhUa5o2j7PyFJtn1ropWf5M10627mw+vyf4= 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 7.0 0375/1146] ASoC: fsl_xcvr: Fix event generation in fsl_xcvr_arc_mode_put() Date: Wed, 20 May 2026 18:10:25 +0200 Message-ID: <20260520162156.687263873@linuxfoundation.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260520162148.390695140@linuxfoundation.org> References: <20260520162148.390695140@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 7.0-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 a268fb81a2f86..008e45009c83f 100644 --- a/sound/soc/fsl/fsl_xcvr.c +++ b/sound/soc/fsl/fsl_xcvr.c @@ -115,10 +115,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