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 A8441331220; Wed, 20 May 2026 17:28:32 +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=1779298113; cv=none; b=jQwudlmlTWN858F+fppoqN1ZzvrJ9P6WYh1TL1VcMWC+dXmp4DVEo2n6yflp/NR1yrXtJYZ8EGtta7UAmbOdjzMna2jamAENYJEB55qwkWkSVs4L97dYnVlnPUh+f8ZfoL+PzeVLVoIJdFOsh61BWMXdcDpjkzYCywsY2OEs5hE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779298113; c=relaxed/simple; bh=UUqQy026fFOrhQJp6I85I1Gvv//R+CtIdxE/6AAm2Dg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ce+L3J1fe64Sx1RweTJEUf0WSQAcH6ic3GirXp7GPFgYxoXNkn+yJ0+FJ5WnGv0uOaAqiVgiue/xNJ6svshcn//MdVFnlGTjBI2ZdnyhKV+dWaS4qxXMYZ5nVQWfauw8dxN522vyfbKZYg1R2ze8uUe4O6KClYMTrY0k+3XNQ0U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=F3loMTyX; 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="F3loMTyX" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 193931F000E9; Wed, 20 May 2026 17:28:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1779298112; bh=8l73zaEQkYggqg/Ru2A3idKr2NOl97glJ6dNlvLBqqM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=F3loMTyXqZGevUI776vI/yAp0VmGIJawAEa/ZHTvPqRHUJHO7ee1agLaUNASir5wp UgfVu9MFABT9Xgc3ouVC8/l/LkJLDj0pfhQMndBAzobX+Kyz7QpW6gcySmDgTCjv2+ 1fNRvn/MK2J+RWHSyw5E4SdfxBKQvK4I0jdKtPs0= 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.18 287/957] ASoC: fsl_micfil: Fix event generation in micfil_put_dc_remover_state() Date: Wed, 20 May 2026 18:12:50 +0200 Message-ID: <20260520162140.762484092@linuxfoundation.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260520162134.554764788@linuxfoundation.org> References: <20260520162134.554764788@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.18-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 36eefb7f0eb2f..980c6e1d9b1ce 100644 --- a/sound/soc/fsl/fsl_micfil.c +++ b/sound/soc/fsl/fsl_micfil.c @@ -272,6 +272,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 */ @@ -281,10 +285,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