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 6EEB9322743; Mon, 18 Aug 2025 13:22:11 +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=1755523331; cv=none; b=KyqEyrb2ttOmcVbCWCYCN/cNRincjwVAit+/IzPMUTvQtJEmUhM0uoDtkM1BQ1A83vJWHnmINMidPNEIAtyDrzDmaOiPsMYvR2SVq9YwNxHMPX8t/Rt5/UCHv0OvSqECe2kGe8+s1Um8HF6nBCqsAZlyIq91lLfRlTLO9+Et7QY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755523331; c=relaxed/simple; bh=xp9n3wES+isGyag9jQ6uNrgxe00OfH65hYMB1kcLilo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CsIQJtlm/9BUHd93Fvhu0hdU/zEAKUPBrUhAUgHYq6Emzqb4Sm9mciHQ8hDmGzbJfEdxGLCawYc6xQ9YknCduJ1dXYJJ3h1CWm+TvmnORGDfZ9lQ+os4cG3/Zy/lG2SwfVi7heHzzTcKNJFQWFEBTR/ybSspu0mVIxnVSWlvRek= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=0TzQfVwf; 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="0TzQfVwf" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DDD19C4CEEB; Mon, 18 Aug 2025 13:22:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1755523331; bh=xp9n3wES+isGyag9jQ6uNrgxe00OfH65hYMB1kcLilo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0TzQfVwf/wTkF0xwjZbiR7rJnGkQj+EZVQwUXX7Ebw6e/SI4pgn5QFnG/gNIMejBj IAwzxhwBRlcaopLhxfq1LwpGFLSP1NV/JLP+Sxy6CStixTCN+falgkgZLqgJJ1ai+V FA6o9vKmIbA89F3JtFfedKPw0Ajmzlrb9Uhl9HQU= 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 6.15 138/515] ASoC: soc-dapm: set bias_level if snd_soc_dapm_set_bias_level() was successed Date: Mon, 18 Aug 2025 14:42:04 +0200 Message-ID: <20250818124503.703315900@linuxfoundation.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250818124458.334548733@linuxfoundation.org> References: <20250818124458.334548733@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 6.15-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 b7818388984e..227f86752b1e 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -739,6 +739,10 @@ static int snd_soc_dapm_set_bias_level(struct snd_soc_dapm_context *dapm, out: trace_snd_soc_bias_level_done(dapm, level); + /* success */ + if (ret == 0) + snd_soc_dapm_init_bias_level(dapm, level); + return ret; } -- 2.39.5