Commit 1badabd9 authored by Mark Brown's avatar Mark Brown

ASoC: Add post-CODEC bias level callback for machine driver

Currently the machine driver can only do bias level configuration before
the CODEC bias level is brought up. This means that the machine cannot do
any configuration which depends on the CODEC bias level being maintained.
Provide a post-CODEC callback which allows the machine driver to do things
like enable the FLL on a CODEC which is brought down to BIAS_OFF when idle.
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
parent 28216bf4
...@@ -632,6 +632,8 @@ struct snd_soc_card { ...@@ -632,6 +632,8 @@ struct snd_soc_card {
/* callbacks */ /* callbacks */
int (*set_bias_level)(struct snd_soc_card *, int (*set_bias_level)(struct snd_soc_card *,
enum snd_soc_bias_level level); enum snd_soc_bias_level level);
int (*set_bias_level_post)(struct snd_soc_card *,
enum snd_soc_bias_level level);
long pmdown_time; long pmdown_time;
......
...@@ -162,6 +162,10 @@ static int snd_soc_dapm_set_bias_level(struct snd_soc_card *card, ...@@ -162,6 +162,10 @@ static int snd_soc_dapm_set_bias_level(struct snd_soc_card *card,
else else
dapm->bias_level = level; dapm->bias_level = level;
} }
if (ret == 0) {
if (card && card->set_bias_level_post)
ret = card->set_bias_level_post(card, level);
}
trace_snd_soc_bias_level_done(card, level); trace_snd_soc_bias_level_done(card, level);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment