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 A9F02188000; Tue, 26 Aug 2025 12:52:57 +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=1756212777; cv=none; b=oclKI24Wu1IQj2WXpSYlAJwJuLBQ7Ba4vrOZJiqUIJ+V95zNiKLB9PPaek6nQfZmtUa4SM46Pg0m44jG71RxEslYQrP3DF3I0KWOXrsshXJZ2NQ5ZwlwvIJF33daGavD3cke64RlPNGplxkOjkQLBY0iuEPf1eXIBg87JPRWF/o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756212777; c=relaxed/simple; bh=kq/kHp8s0006PVkqnfy2xOfC+NdYCZO6iilEilDHDUo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SQ1rnKEd0yoKSqe5MFocK9uFk6P6vuPO3YRegRNfbd+HGJ+9vKRskqXZwC0miq6hxblWP6VZx6oLvJniuqCZDARfaoIetjDVX7RDcwiSK/78Rn+A4k8qQj0/5gCamWOfO9ubOV/K/YLhcU7qVnAsSd7UBt/QL0vxnFy+GxiQDGQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=jq79vKBW; 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="jq79vKBW" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3F274C4CEF1; Tue, 26 Aug 2025 12:52:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1756212777; bh=kq/kHp8s0006PVkqnfy2xOfC+NdYCZO6iilEilDHDUo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jq79vKBWY6I9UzAZY8L3EGpLs+JTCSK6MG1xm+v8tNcXad4drSFZAmIeg2N8gPquu UN9/NScMa8kq9dQmTMP5LVoqAynuuV0tuf6y7dcYlh8c1jdt/urnpjFVhF4xBKGOaZ /JOFSrHQ7a9l7Esha2aq7R1srf0htWMoSW+HTWhk= 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.6 099/587] ASoC: soc-dapm: set bias_level if snd_soc_dapm_set_bias_level() was successed Date: Tue, 26 Aug 2025 13:04:08 +0200 Message-ID: <20250826110955.461386110@linuxfoundation.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250826110952.942403671@linuxfoundation.org> References: <20250826110952.942403671@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.6-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 7729f8f4d5e6..7facb7b2dba1 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -734,6 +734,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