aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/soc/sh/rcar/core.c23
-rw-r--r--sound/soc/sh/rcar/rsnd.h6
2 files changed, 29 insertions, 0 deletions
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
index 7316d10e4649..e8e585de7251 100644
--- a/sound/soc/sh/rcar/core.c
+++ b/sound/soc/sh/rcar/core.c
@@ -842,6 +842,7 @@ static int rsnd_probe(struct platform_device *pdev)
842 struct rcar_snd_info *info; 842 struct rcar_snd_info *info;
843 struct rsnd_priv *priv; 843 struct rsnd_priv *priv;
844 struct device *dev = &pdev->dev; 844 struct device *dev = &pdev->dev;
845 struct rsnd_dai *rdai;
845 int (*probe_func[])(struct platform_device *pdev, 846 int (*probe_func[])(struct platform_device *pdev,
846 struct rsnd_priv *priv) = { 847 struct rsnd_priv *priv) = {
847 rsnd_gen_probe, 848 rsnd_gen_probe,
@@ -880,6 +881,16 @@ static int rsnd_probe(struct platform_device *pdev)
880 return ret; 881 return ret;
881 } 882 }
882 883
884 for_each_rsnd_dai(rdai, priv, i) {
885 ret = rsnd_dai_call(rdai, &rdai->playback, probe);
886 if (ret)
887 return ret;
888
889 ret = rsnd_dai_call(rdai, &rdai->capture, probe);
890 if (ret)
891 return ret;
892 }
893
883 /* 894 /*
884 * asoc register 895 * asoc register
885 */ 896 */
@@ -912,9 +923,21 @@ exit_snd_soc:
912static int rsnd_remove(struct platform_device *pdev) 923static int rsnd_remove(struct platform_device *pdev)
913{ 924{
914 struct rsnd_priv *priv = dev_get_drvdata(&pdev->dev); 925 struct rsnd_priv *priv = dev_get_drvdata(&pdev->dev);
926 struct rsnd_dai *rdai;
927 int ret, i;
915 928
916 pm_runtime_disable(&pdev->dev); 929 pm_runtime_disable(&pdev->dev);
917 930
931 for_each_rsnd_dai(rdai, priv, i) {
932 ret = rsnd_dai_call(rdai, &rdai->playback, remove);
933 if (ret)
934 return ret;
935
936 ret = rsnd_dai_call(rdai, &rdai->capture, remove);
937 if (ret)
938 return ret;
939 }
940
918 /* 941 /*
919 * remove each module 942 * remove each module
920 */ 943 */
diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
index 9205f96da2f4..db20b3721953 100644
--- a/sound/soc/sh/rcar/rsnd.h
+++ b/sound/soc/sh/rcar/rsnd.h
@@ -167,6 +167,12 @@ enum rsnd_mod_type {
167 167
168struct rsnd_mod_ops { 168struct rsnd_mod_ops {
169 char *name; 169 char *name;
170 int (*probe)(struct rsnd_mod *mod,
171 struct rsnd_dai *rdai,
172 struct rsnd_dai_stream *io);
173 int (*remove)(struct rsnd_mod *mod,
174 struct rsnd_dai *rdai,
175 struct rsnd_dai_stream *io);
170 int (*init)(struct rsnd_mod *mod, 176 int (*init)(struct rsnd_mod *mod,
171 struct rsnd_dai *rdai, 177 struct rsnd_dai *rdai,
172 struct rsnd_dai_stream *io); 178 struct rsnd_dai_stream *io);