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 8F74B369D6A; Wed, 20 May 2026 16:41:59 +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=1779295320; cv=none; b=Yyr89cjT2pkwkqF84n8eHWhc0sDaeTduTN2+tmCgNCTkeSgAUiLZLwU6d3kBEraNvDUvGjFk4tIpLabdtzxV8bZGt3fF5GQSWmBYuns3k9i6zBJHs3qNYm9JELRD37Jk7AA8g1P+HqGxxVs3niFQa6rY/WoXy5E9W/mZ7QEA0k0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779295320; c=relaxed/simple; bh=wWZhFXM64cizbM3yVBxkJtDpBUJ2sDYzi85a+o/qOEM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QvN6NAFXyujW0NKn1SvzZjD5ayJSlUPw+RfaJ8dbZcd5UOc5pgBjtnSOg/a4RDQ25lm1X5WZVqGwiMMDa16Ru2LwlNbxwoN9vPb/PGB566yh3DcTjnejAYCu3ofDi9+H3P91ChkoA65YrCsqw8eGZgrV3oale3qD/aBB5GeqXDY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=c2tDf4aC; 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="c2tDf4aC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EED791F000E9; Wed, 20 May 2026 16:41:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1779295319; bh=9iSJvZt+vVTXwCpsUx4fjN/g4+CkRqeMYZkYTqIBHNc=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=c2tDf4aC50KoriE7BHisYxag/JiIlGaGJkOD7R38kWPocBSRkIunk7dNNASEI8DEP /1AGvFLse79TpN22bhUo2cCMTjXGDBwK+4IyXChtmZ5rCBAALU7605wIui7Zy6Ew4k Ggpw4UqMPuEXs6mVIIS52feXjXc/VZCDXstpcaN0= 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 0373/1146] ASoC: fsl_micfil: Fix event generation in micfil_put_dc_remover_state() Date: Wed, 20 May 2026 18:10:23 +0200 Message-ID: <20260520162156.642543249@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: patches@lists.linux.dev 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 7d2bd35100de370dc326b250e8f6b66bee06a2f3 ] ALSA controls should return 1 if the value in the control changed but the control put operation micfil_put_dc_remover_state() only returns 0 or a negative error code, causing ALSA to not generate any change events. return the value of snd_soc_component_update_bits() directly, as it has the capability of return check status of changed or not. Also enable pm runtime before calling the function snd_soc_component_update_bits() to make the regmap cache data align with the value in hardware. Fixes: 29dbfeecab85 ("ASoC: fsl_micfil: Add Hardware Voice Activity Detector support") Signed-off-by: Shengjiu Wang Link: https://patch.msgid.link/20260401094226.2900532-6-shengjiu.wang@nxp.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/fsl/fsl_micfil.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sound/soc/fsl/fsl_micfil.c b/sound/soc/fsl/fsl_micfil.c index 0cfdd6343291a..983805bbaae27 100644 --- a/sound/soc/fsl/fsl_micfil.c +++ b/sound/soc/fsl/fsl_micfil.c @@ -351,6 +351,10 @@ static int micfil_put_dc_remover_state(struct snd_kcontrol *kcontrol, if (val < 0 || val > 3) return -EINVAL; + ret = pm_runtime_resume_and_get(comp->dev); + if (ret) + return ret; + micfil->dc_remover = val; /* Calculate total value for all channels */ @@ -360,10 +364,10 @@ static int micfil_put_dc_remover_state(struct snd_kcontrol *kcontrol, /* Update DC Remover mode for all channels */ ret = snd_soc_component_update_bits(comp, REG_MICFIL_DC_CTRL, MICFIL_DC_CTRL_CONFIG, reg_val); - if (ret < 0) - return ret; - return 0; + pm_runtime_put_autosuspend(comp->dev); + + return ret; } static int micfil_get_dc_remover_state(struct snd_kcontrol *kcontrol, -- 2.53.0