Skip to content

Commit d41278e

Browse files
morimotobroonie
authored andcommitted
ASoC: soc-card: add snd_soc_card_set_bias_level_post()
Card related function should be implemented at soc-card now. This patch adds it. Signed-off-by: Kuninori Morimoto <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 39caefd commit d41278e

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

include/sound/soc-card.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ int snd_soc_card_remove(struct snd_soc_card *card);
3131
int snd_soc_card_set_bias_level(struct snd_soc_card *card,
3232
struct snd_soc_dapm_context *dapm,
3333
enum snd_soc_bias_level level);
34+
int snd_soc_card_set_bias_level_post(struct snd_soc_card *card,
35+
struct snd_soc_dapm_context *dapm,
36+
enum snd_soc_bias_level level);
3437

3538
/* device driver data */
3639
static inline void snd_soc_card_set_drvdata(struct snd_soc_card *card,

sound/soc/soc-card.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,3 +191,15 @@ int snd_soc_card_set_bias_level(struct snd_soc_card *card,
191191

192192
return soc_card_ret(card, ret);
193193
}
194+
195+
int snd_soc_card_set_bias_level_post(struct snd_soc_card *card,
196+
struct snd_soc_dapm_context *dapm,
197+
enum snd_soc_bias_level level)
198+
{
199+
int ret = 0;
200+
201+
if (card && card->set_bias_level_post)
202+
ret = card->set_bias_level_post(card, dapm, level);
203+
204+
return soc_card_ret(card, ret);
205+
}

sound/soc/soc-dapm.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -735,8 +735,7 @@ static int snd_soc_dapm_set_bias_level(struct snd_soc_dapm_context *dapm,
735735
if (ret != 0)
736736
goto out;
737737

738-
if (card && card->set_bias_level_post)
739-
ret = card->set_bias_level_post(card, dapm, level);
738+
ret = snd_soc_card_set_bias_level_post(card, dapm, level);
740739
out:
741740
trace_snd_soc_bias_level_done(card, level);
742741

0 commit comments

Comments
 (0)