]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
ASoC: soc-card: add snd_soc_card_set_bias_level_post()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Thu, 28 May 2020 01:50:35 +0000 (10:50 +0900)
committerMark Brown <broonie@kernel.org>
Sat, 30 May 2020 01:11:40 +0000 (02:11 +0100)
Card related function should be implemented at soc-card now.
This patch adds it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87pnaozv2s.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/soc-card.h
sound/soc/soc-card.c
sound/soc/soc-dapm.c

index 81e0c239b2e86b36025bd5694c862941b6ba4e2a..e35f777fd8cc63a507b106a94af823fb90bead85 100644 (file)
@@ -31,6 +31,9 @@ int snd_soc_card_remove(struct snd_soc_card *card);
 int snd_soc_card_set_bias_level(struct snd_soc_card *card,
                                struct snd_soc_dapm_context *dapm,
                                enum snd_soc_bias_level level);
+int snd_soc_card_set_bias_level_post(struct snd_soc_card *card,
+                                    struct snd_soc_dapm_context *dapm,
+                                    enum snd_soc_bias_level level);
 
 /* device driver data */
 static inline void snd_soc_card_set_drvdata(struct snd_soc_card *card,
index dbcaa3d72dae23aebf0e680873b820ba9e09e0d0..5bc2832b35051ef1f46a55933635c162fa695c26 100644 (file)
@@ -191,3 +191,15 @@ int snd_soc_card_set_bias_level(struct snd_soc_card *card,
 
        return soc_card_ret(card, ret);
 }
+
+int snd_soc_card_set_bias_level_post(struct snd_soc_card *card,
+                                    struct snd_soc_dapm_context *dapm,
+                                    enum snd_soc_bias_level level)
+{
+       int ret = 0;
+
+       if (card && card->set_bias_level_post)
+               ret = card->set_bias_level_post(card, dapm, level);
+
+       return soc_card_ret(card, ret);
+}
index 5dc7849ecf41a7cd384337e62032380419f8895b..653a58c96e2432e5dabce035c734c76e27b12cba 100644 (file)
@@ -735,8 +735,7 @@ static int snd_soc_dapm_set_bias_level(struct snd_soc_dapm_context *dapm,
        if (ret != 0)
                goto out;
 
-       if (card && card->set_bias_level_post)
-               ret = card->set_bias_level_post(card, dapm, level);
+       ret = snd_soc_card_set_bias_level_post(card, dapm, level);
 out:
        trace_snd_soc_bias_level_done(card, level);