aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2013-03-22 03:54:50 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-03-26 17:57:55 -0400
commit0a09dfa04177df5a2e9eeeeaf527efd35c531d11 (patch)
tree799a97809b02d9789283d8c822ef946e130e9c80
parentf53179c026b11bef674d75154f5ea47ca3248ca9 (diff)
ASoC: switch over to use snd_soc_register_component() on sh4 siu
siu_dai.c is using snd_soc_register_dais(), even though array size of siu_i2s_dai is 1. OTOH, new API snd_soc_register_component() uses properly snd_soc_register_dai() (henceforth dai()) or snd_soc_register_dais() (henceforth dais()) via num_dai. Then, cpu_dai_name will be "siu-i2s-dai" if dais() was used, and it will be "siu-pcm-audio" if dai() was used. Therefore this patch fixup migor_dai :: cpu_dai_name too. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r--sound/soc/sh/migor.c2
-rw-r--r--sound/soc/sh/siu_dai.c11
2 files changed, 9 insertions, 4 deletions
diff --git a/sound/soc/sh/migor.c b/sound/soc/sh/migor.c
index 8526e1edaf45..5014a884afee 100644
--- a/sound/soc/sh/migor.c
+++ b/sound/soc/sh/migor.c
@@ -153,7 +153,7 @@ static int migor_dai_init(struct snd_soc_pcm_runtime *rtd)
153static struct snd_soc_dai_link migor_dai = { 153static struct snd_soc_dai_link migor_dai = {
154 .name = "wm8978", 154 .name = "wm8978",
155 .stream_name = "WM8978", 155 .stream_name = "WM8978",
156 .cpu_dai_name = "siu-i2s-dai", 156 .cpu_dai_name = "siu-pcm-audio",
157 .codec_dai_name = "wm8978-hifi", 157 .codec_dai_name = "wm8978-hifi",
158 .platform_name = "siu-pcm-audio", 158 .platform_name = "siu-pcm-audio",
159 .codec_name = "wm8978.0-001a", 159 .codec_name = "wm8978.0-001a",
diff --git a/sound/soc/sh/siu_dai.c b/sound/soc/sh/siu_dai.c
index 34facdc9e4ac..9dc24ffa892a 100644
--- a/sound/soc/sh/siu_dai.c
+++ b/sound/soc/sh/siu_dai.c
@@ -726,6 +726,10 @@ static struct snd_soc_dai_driver siu_i2s_dai = {
726 .ops = &siu_dai_ops, 726 .ops = &siu_dai_ops,
727}; 727};
728 728
729static const struct snd_soc_component_driver siu_i2s_component = {
730 .name = "siu-i2s",
731};
732
729static int siu_probe(struct platform_device *pdev) 733static int siu_probe(struct platform_device *pdev)
730{ 734{
731 const struct firmware *fw_entry; 735 const struct firmware *fw_entry;
@@ -783,7 +787,8 @@ static int siu_probe(struct platform_device *pdev)
783 dev_set_drvdata(&pdev->dev, info); 787 dev_set_drvdata(&pdev->dev, info);
784 788
785 /* register using ARRAY version so we can keep dai name */ 789 /* register using ARRAY version so we can keep dai name */
786 ret = snd_soc_register_dais(&pdev->dev, &siu_i2s_dai, 1); 790 ret = snd_soc_register_component(&pdev->dev, &siu_i2s_component,
791 &siu_i2s_dai, 1);
787 if (ret < 0) 792 if (ret < 0)
788 goto edaiinit; 793 goto edaiinit;
789 794
@@ -796,7 +801,7 @@ static int siu_probe(struct platform_device *pdev)
796 return ret; 801 return ret;
797 802
798esocregp: 803esocregp:
799 snd_soc_unregister_dai(&pdev->dev); 804 snd_soc_unregister_component(&pdev->dev);
800edaiinit: 805edaiinit:
801 iounmap(info->reg); 806 iounmap(info->reg);
802emapreg: 807emapreg:
@@ -823,7 +828,7 @@ static int siu_remove(struct platform_device *pdev)
823 pm_runtime_disable(&pdev->dev); 828 pm_runtime_disable(&pdev->dev);
824 829
825 snd_soc_unregister_platform(&pdev->dev); 830 snd_soc_unregister_platform(&pdev->dev);
826 snd_soc_unregister_dai(&pdev->dev); 831 snd_soc_unregister_component(&pdev->dev);
827 832
828 iounmap(info->reg); 833 iounmap(info->reg);
829 iounmap(info->yram); 834 iounmap(info->yram);