From 27ab1cc06532f59a7ecf1fd3f59aaac3f5e9da74 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Sat, 4 Dec 2010 12:41:04 +0000 Subject: 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: Mark Brown Acked-by: Liam Girdwood Cherry-picked from mainline kernel. Change-Id: Ib0a8533e3762dfc67ee21209a28e9a6603d31a37 Reviewed-on: http://git-master/r/23058 Tested-by: Sumit Bhattacharya Reviewed-by: Ravindra Lokhande Reviewed-by: Scott Peterson --- sound/soc/soc-dapm.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sound') diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 03cb7c05ebec..e8a8da0af044 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -152,6 +152,10 @@ static int snd_soc_dapm_set_bias_level(struct snd_soc_device *socdev, else codec->bias_level = level; } + if (ret == 0) { + if (card && card->set_bias_level_post) + ret = card->set_bias_level_post(card, level); + } return ret; } -- cgit v1.2.3