aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2013-04-24 23:18:49 -0400
committerNitin Garg <nitin.garg@freescale.com>2014-04-16 09:00:41 -0400
commit4fa0a18e6404500b906af596997f093369086e85 (patch)
tree74f880accdd2b474d8060f5d9f03d6ec1f40beae
parent0f27460e9903677c81dda2cb1b662fb3b4e6564c (diff)
ASoC: fsl: remove use of imx-fiq-pcm-audio from imx-ssi
Commit 2bf9d4bbd0fa97ff6f214484f62fc8aca64d1d00 upstream. Rather than instantiating imx-fiq-pcm-audio to call imx_pcm_fiq_init(), imx-ssi can just directly call it to save the use of imx-fiq-pcm-audio. With this change, imx-ssi becomes not only a cpu DAI but also a platform device, so updates platform device setup in eukrea-tlv320, phycore-ac97 and wm1133-ev1 accordingly. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
-rw-r--r--sound/soc/fsl/eukrea-tlv320.c2
-rw-r--r--sound/soc/fsl/imx-ssi.c23
-rw-r--r--sound/soc/fsl/imx-ssi.h2
-rw-r--r--sound/soc/fsl/phycore-ac97.c2
-rw-r--r--sound/soc/fsl/wm1133-ev1.c2
5 files changed, 9 insertions, 22 deletions
diff --git a/sound/soc/fsl/eukrea-tlv320.c b/sound/soc/fsl/eukrea-tlv320.c
index 75ffdf0e2aad..9a4a0ca2c1de 100644
--- a/sound/soc/fsl/eukrea-tlv320.c
+++ b/sound/soc/fsl/eukrea-tlv320.c
@@ -80,7 +80,7 @@ static struct snd_soc_dai_link eukrea_tlv320_dai = {
80 .name = "tlv320aic23", 80 .name = "tlv320aic23",
81 .stream_name = "TLV320AIC23", 81 .stream_name = "TLV320AIC23",
82 .codec_dai_name = "tlv320aic23-hifi", 82 .codec_dai_name = "tlv320aic23-hifi",
83 .platform_name = "imx-fiq-pcm-audio.0", 83 .platform_name = "imx-ssi.0",
84 .codec_name = "tlv320aic23-codec.0-001a", 84 .codec_name = "tlv320aic23-codec.0-001a",
85 .cpu_dai_name = "imx-ssi.0", 85 .cpu_dai_name = "imx-ssi.0",
86 .ops = &eukrea_tlv320_snd_ops, 86 .ops = &eukrea_tlv320_snd_ops,
diff --git a/sound/soc/fsl/imx-ssi.c b/sound/soc/fsl/imx-ssi.c
index 034dd9b4a1a0..a8362be3cd18 100644
--- a/sound/soc/fsl/imx-ssi.c
+++ b/sound/soc/fsl/imx-ssi.c
@@ -590,18 +590,9 @@ static int imx_ssi_probe(struct platform_device *pdev)
590 goto failed_register; 590 goto failed_register;
591 } 591 }
592 592
593 ssi->soc_platform_pdev_fiq = platform_device_alloc("imx-fiq-pcm-audio", pdev->id); 593 ret = imx_pcm_fiq_init(pdev);
594 if (!ssi->soc_platform_pdev_fiq) { 594 if (ret)
595 ret = -ENOMEM; 595 goto failed_pcm_fiq;
596 goto failed_pdev_fiq_alloc;
597 }
598
599 platform_set_drvdata(ssi->soc_platform_pdev_fiq, ssi);
600 ret = platform_device_add(ssi->soc_platform_pdev_fiq);
601 if (ret) {
602 dev_err(&pdev->dev, "failed to add platform device\n");
603 goto failed_pdev_fiq_add;
604 }
605 596
606 ret = imx_pcm_dma_init(pdev); 597 ret = imx_pcm_dma_init(pdev);
607 if (ret) 598 if (ret)
@@ -610,10 +601,8 @@ static int imx_ssi_probe(struct platform_device *pdev)
610 return 0; 601 return 0;
611 602
612failed_pcm_dma: 603failed_pcm_dma:
613 platform_device_del(ssi->soc_platform_pdev_fiq); 604 imx_pcm_fiq_exit(pdev);
614failed_pdev_fiq_add: 605failed_pcm_fiq:
615 platform_device_put(ssi->soc_platform_pdev_fiq);
616failed_pdev_fiq_alloc:
617 snd_soc_unregister_component(&pdev->dev); 606 snd_soc_unregister_component(&pdev->dev);
618failed_register: 607failed_register:
619 release_mem_region(res->start, resource_size(res)); 608 release_mem_region(res->start, resource_size(res));
@@ -629,7 +618,7 @@ static int imx_ssi_remove(struct platform_device *pdev)
629 struct imx_ssi *ssi = platform_get_drvdata(pdev); 618 struct imx_ssi *ssi = platform_get_drvdata(pdev);
630 619
631 imx_pcm_dma_exit(pdev); 620 imx_pcm_dma_exit(pdev);
632 platform_device_unregister(ssi->soc_platform_pdev_fiq); 621 imx_pcm_fiq_exit(pdev);
633 622
634 snd_soc_unregister_component(&pdev->dev); 623 snd_soc_unregister_component(&pdev->dev);
635 624
diff --git a/sound/soc/fsl/imx-ssi.h b/sound/soc/fsl/imx-ssi.h
index b052fad8f6c7..d5003cefca8d 100644
--- a/sound/soc/fsl/imx-ssi.h
+++ b/sound/soc/fsl/imx-ssi.h
@@ -211,8 +211,6 @@ struct imx_ssi {
211 struct imx_dma_data filter_data_rx; 211 struct imx_dma_data filter_data_rx;
212 212
213 int enabled; 213 int enabled;
214
215 struct platform_device *soc_platform_pdev_fiq;
216}; 214};
217 215
218#endif /* _IMX_SSI_H */ 216#endif /* _IMX_SSI_H */
diff --git a/sound/soc/fsl/phycore-ac97.c b/sound/soc/fsl/phycore-ac97.c
index f8da6dd115ed..ae403c29688f 100644
--- a/sound/soc/fsl/phycore-ac97.c
+++ b/sound/soc/fsl/phycore-ac97.c
@@ -33,7 +33,7 @@ static struct snd_soc_dai_link imx_phycore_dai_ac97[] = {
33 .codec_dai_name = "wm9712-hifi", 33 .codec_dai_name = "wm9712-hifi",
34 .codec_name = "wm9712-codec", 34 .codec_name = "wm9712-codec",
35 .cpu_dai_name = "imx-ssi.0", 35 .cpu_dai_name = "imx-ssi.0",
36 .platform_name = "imx-fiq-pcm-audio.0", 36 .platform_name = "imx-ssi.0",
37 .ops = &imx_phycore_hifi_ops, 37 .ops = &imx_phycore_hifi_ops,
38 }, 38 },
39}; 39};
diff --git a/sound/soc/fsl/wm1133-ev1.c b/sound/soc/fsl/wm1133-ev1.c
index fe54a69073e5..fce63252bdbb 100644
--- a/sound/soc/fsl/wm1133-ev1.c
+++ b/sound/soc/fsl/wm1133-ev1.c
@@ -245,7 +245,7 @@ static struct snd_soc_dai_link wm1133_ev1_dai = {
245 .stream_name = "Audio", 245 .stream_name = "Audio",
246 .cpu_dai_name = "imx-ssi.0", 246 .cpu_dai_name = "imx-ssi.0",
247 .codec_dai_name = "wm8350-hifi", 247 .codec_dai_name = "wm8350-hifi",
248 .platform_name = "imx-fiq-pcm-audio.0", 248 .platform_name = "imx-ssi.0",
249 .codec_name = "wm8350-codec.0-0x1a", 249 .codec_name = "wm8350-codec.0-0x1a",
250 .init = wm1133_ev1_init, 250 .init = wm1133_ev1_init,
251 .ops = &wm1133_ev1_ops, 251 .ops = &wm1133_ev1_ops,