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 72B833EAC82; Wed, 20 May 2026 18:08:24 +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=1779300505; cv=none; b=MKpvSZ6dHsQmGj5EEQXj1SKQg+YxBbHeNNEOi5ljo5eIPPaPd/ew80GT555e7egnrt1Y1jMz28VpoLaCUTmBdF1h5pAGX1x6IjhJ5tNCL0qFhH4FHACd0tm/4+B2J8UpGLJceLeZGKKKu8sIjm0V6pDSgJ7wVX4TUVh0247z6Ns= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779300505; c=relaxed/simple; bh=1xSigHlKD3rFfmMzmU1EJNy/KvZFSqV8zii2j3ukQgg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AiIgyrWqAPAuBwnHADSCsZpE4mS14wkDbjXs6ClatrZeS/vk3NYznOTxDM4Js/Ii0lMYB4TMphdW8T6W3mb8RAG9YS9VlqTKsWJFEtAkzJ/rw8CQGkdtCKYvNVwcTJHeImbHVW3KB+CPUMcIUIVmgAiCu7Lw5jtkXVPnSErRTSg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=MgHtnLy/; 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="MgHtnLy/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DA58E1F000E9; Wed, 20 May 2026 18:08:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1779300504; bh=sVhQa4VPjQ27u3GpH9ts5mgNFMeJHfDxeNT6VsRRxkM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=MgHtnLy/CU/2dPu539jbS5VH8wKh0A8+uDsNy3fzbcIi4jL89fqz6Dhyp9+MaytQl F4yIi4i1ZbjVutmcE4rZbeoA1wueu/NwKEXpHfyjscaIkW7f3Xx9rMiJ6UMA+bNjJg aJAuHOEAlAwhBvuRbEu8agAB9PcCvXgiL0pIT6EA= 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 199/666] ASoC: fsl_micfil: Fix event generation in hwvad_put_enable() Date: Wed, 20 May 2026 18:16:50 +0200 Message-ID: <20260520162115.516612713@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: patches@lists.linux.dev 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 59b9061824f2179fe133e2636203548eaba3e528 ] ALSA controls should return 1 if the value in the control changed but the control put operation hwvad_put_enable() 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 vad_enabled variable. Fixes: 29dbfeecab85 ("ASoC: fsl_micfil: Add Hardware Voice Activity Detector support") Signed-off-by: Shengjiu Wang Link: https://patch.msgid.link/20260401094226.2900532-3-shengjiu.wang@nxp.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/fsl/fsl_micfil.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sound/soc/fsl/fsl_micfil.c b/sound/soc/fsl/fsl_micfil.c index a52e30aa6e086..6fc94cafc9da8 100644 --- a/sound/soc/fsl/fsl_micfil.c +++ b/sound/soc/fsl/fsl_micfil.c @@ -277,10 +277,15 @@ static int hwvad_put_enable(struct snd_kcontrol *kcontrol, unsigned int *item = ucontrol->value.enumerated.item; struct fsl_micfil *micfil = snd_soc_component_get_drvdata(comp); int val = snd_soc_enum_item_to_val(e, item[0]); + bool change = false; + if (val < 0 || val > 1) + return -EINVAL; + + change = (micfil->vad_enabled != val); micfil->vad_enabled = val; - return 0; + return change; } static int hwvad_get_enable(struct snd_kcontrol *kcontrol, -- 2.53.0