ASoC: set bias_level at if

Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:

ASoC has 2 functions to set bias level.

	(A) snd_soc_dapm_force_bias_level()
	(B) snd_soc_dapm_set_bias_level()

(A) sets dapm->bias_level, but (B) is not.
I think we should set it on both (A) and (B).
I think it is miss or bug, but Samsung is the only vendor that feels a
problem about this.

I think this patch (= [1/5]) is correct approach, but some non-samsung
vendor might get affect from this patch-set, so I added [RFC] on this
patch-set.

Furthermore, (B) cares both Card and Component, (A) cares Component only.
I guess it is the reason why it is called as "force" bias_level function.
(A) is used from each drivers, (B) is used from soc-dapm only.
I'm not 100% sure though, except special cases, each driver should use (B),
I guess ?
This commit is contained in:
Mark Brown 2025-07-14 11:34:08 +01:00
commit 5f120ccf28
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
5 changed files with 4 additions and 8 deletions

View File

@ -133,8 +133,6 @@ static int bells_set_bias_level_post(struct snd_soc_card *card,
break;
}
dapm->bias_level = level;
return 0;
}

View File

@ -95,8 +95,6 @@ static int littlemill_set_bias_level_post(struct snd_soc_card *card,
break;
}
dapm->bias_level = level;
return 0;
}

View File

@ -90,8 +90,6 @@ static int speyside_set_bias_level_post(struct snd_soc_card *card,
break;
}
card->dapm.bias_level = level;
return 0;
}

View File

@ -91,8 +91,6 @@ static int tobermory_set_bias_level_post(struct snd_soc_card *card,
break;
}
dapm->bias_level = level;
return 0;
}

View File

@ -1030,6 +1030,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;
}