From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 C5E6135AAC8; Tue, 26 Aug 2025 14:36:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756219013; cv=none; b=qhQnXiSm2fErgaCBdpt8Rx1bWTLcvIFbBXZOaqf1Wg9rpV+2nd9RrZDVcisWRuFcQu+i7pusw7M/s3+grn0s297zjUuu57mZfydsAzl8qYuiRv4N8H2cL77Hqpc36PTVvaBDbwmv74wxF8JqjHR/Zq4SmkyQkoPzRtx4v8TkIyU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756219013; c=relaxed/simple; bh=VYb8AFKSx8YJARe6Upsdj2S+Rm0thMw2YRzFBtMtw9M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XHQ1Y+7wjLBMcYoqhytwF9q6OxLw3GWxGSLQ8NAqO33hlUqMTTly5M/cmxBmE+FUZYMWXe6/E6qdD57XE+jOMBzOmK2w8R5U6+uqv75TjUva2n6FEIWddXH6G2LfaHa47ICnntawJTe6U04FHC9vc1l/YdRbua8NOFUJ/UI3DWU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=tzLH3olX; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="tzLH3olX" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 59777C4CEF1; Tue, 26 Aug 2025 14:36:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1756219013; bh=VYb8AFKSx8YJARe6Upsdj2S+Rm0thMw2YRzFBtMtw9M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tzLH3olXvT0uem/zBHSKehc707r+TYSxx1d104mpcc8gSPJI7zQHAtWRVX2jt13ap YUjXelQxHX8QUzdfimp/t8b025F0vW+DkVdA1f1c2J5JDPiEk5TL9FgJagjtSVKxR6 aFVCM4inEzcJ/dssrxO9PVbTQkwY5iIYAI56A9nE= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Kuninori Morimoto , Mark Brown , Sasha Levin Subject: [PATCH 5.4 188/403] ASoC: soc-dapm: set bias_level if snd_soc_dapm_set_bias_level() was successed Date: Tue, 26 Aug 2025 13:08:34 +0200 Message-ID: <20250826110912.070673029@linuxfoundation.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250826110905.607690791@linuxfoundation.org> References: <20250826110905.607690791@linuxfoundation.org> User-Agent: quilt/0.68 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 5.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Kuninori Morimoto [ Upstream commit f40ecc2743652c0b0f19935f81baf57c601eb7f0 ] ASoC has 2 functions to set bias level. (A) snd_soc_dapm_force_bias_level() (B) snd_soc_dapm_set_bias_level() snd_soc_dapm_force_bias_level() (A) will set dapm->bias_level (a) if successed. (A) int snd_soc_dapm_force_bias_level(...) { ... if (ret == 0) (a) dapm->bias_level = level; ... } snd_soc_dapm_set_bias_level() (B) is also a function that sets bias_level. It will call snd_soc_dapm_force_bias_level() (A) inside, but doesn't set dapm->bias_level by itself. One note is that (A) might not be called. (B) static int snd_soc_dapm_set_bias_level(...) { ... ret = snd_soc_card_set_bias_level(...); ... if (dapm != &card->dapm) (A) ret = snd_soc_dapm_force_bias_level(...); ... ret = snd_soc_card_set_bias_level_post(...); ... } dapm->bias_level will be set if (A) was called, but might not be set if (B) was called, even though it calles set_bias_level() function. We should set dapm->bias_level if we calls snd_soc_dapm_set_bias_level() (B), too. Signed-off-by: Kuninori Morimoto Link: https://patch.msgid.link/87qzyn4g4h.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/soc-dapm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 9f764d92469e..6142ce468c3b 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -741,6 +741,10 @@ static int snd_soc_dapm_set_bias_level(struct snd_soc_dapm_context *dapm, out: trace_snd_soc_bias_level_done(card, level); + /* success */ + if (ret == 0) + snd_soc_dapm_init_bias_level(dapm, level); + return ret; } -- 2.39.5