diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-04-12 08:56:56 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-04-12 08:56:56 -0400 |
commit | 13419625774f9f3e65e07257ad2a7beb445e9942 (patch) | |
tree | e106f4be80e6c8f6cc3be861cd555718a3142ab7 /sound/soc/fsl | |
parent | 604c724ba38f6ecc82c9023bee692a7b2fb7e0ee (diff) | |
parent | 89cab4624a8c0ed81a1b74b6f8c884641cac5b9d (diff) |
Merge remote-tracking branch 'asoc/topic/component' into asoc-next
Diffstat (limited to 'sound/soc/fsl')
-rw-r--r-- | sound/soc/fsl/fsl_ssi.c | 11 | ||||
-rw-r--r-- | sound/soc/fsl/imx-ssi.c | 11 | ||||
-rw-r--r-- | sound/soc/fsl/mpc5200_psc_ac97.c | 8 | ||||
-rw-r--r-- | sound/soc/fsl/mpc5200_psc_i2s.c | 9 |
4 files changed, 29 insertions, 10 deletions
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index 7decbd9b2340..fe04c67f8fb8 100644 --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c | |||
@@ -574,6 +574,10 @@ static struct snd_soc_dai_driver fsl_ssi_dai_template = { | |||
574 | .ops = &fsl_ssi_dai_ops, | 574 | .ops = &fsl_ssi_dai_ops, |
575 | }; | 575 | }; |
576 | 576 | ||
577 | static const struct snd_soc_component_driver fsl_ssi_component = { | ||
578 | .name = "fsl-ssi", | ||
579 | }; | ||
580 | |||
577 | /* Show the statistics of a flag only if its interrupt is enabled. The | 581 | /* Show the statistics of a flag only if its interrupt is enabled. The |
578 | * compiler will optimze this code to a no-op if the interrupt is not | 582 | * compiler will optimze this code to a no-op if the interrupt is not |
579 | * enabled. | 583 | * enabled. |
@@ -782,7 +786,8 @@ static int fsl_ssi_probe(struct platform_device *pdev) | |||
782 | /* Register with ASoC */ | 786 | /* Register with ASoC */ |
783 | dev_set_drvdata(&pdev->dev, ssi_private); | 787 | dev_set_drvdata(&pdev->dev, ssi_private); |
784 | 788 | ||
785 | ret = snd_soc_register_dai(&pdev->dev, &ssi_private->cpu_dai_drv); | 789 | ret = snd_soc_register_component(&pdev->dev, &fsl_ssi_component, |
790 | &ssi_private->cpu_dai_drv, 1); | ||
786 | if (ret) { | 791 | if (ret) { |
787 | dev_err(&pdev->dev, "failed to register DAI: %d\n", ret); | 792 | dev_err(&pdev->dev, "failed to register DAI: %d\n", ret); |
788 | goto error_dev; | 793 | goto error_dev; |
@@ -835,7 +840,7 @@ done: | |||
835 | error_dai: | 840 | error_dai: |
836 | if (ssi_private->ssi_on_imx) | 841 | if (ssi_private->ssi_on_imx) |
837 | platform_device_unregister(ssi_private->imx_pcm_pdev); | 842 | platform_device_unregister(ssi_private->imx_pcm_pdev); |
838 | snd_soc_unregister_dai(&pdev->dev); | 843 | snd_soc_unregister_component(&pdev->dev); |
839 | 844 | ||
840 | error_dev: | 845 | error_dev: |
841 | dev_set_drvdata(&pdev->dev, NULL); | 846 | dev_set_drvdata(&pdev->dev, NULL); |
@@ -873,7 +878,7 @@ static int fsl_ssi_remove(struct platform_device *pdev) | |||
873 | clk_disable_unprepare(ssi_private->clk); | 878 | clk_disable_unprepare(ssi_private->clk); |
874 | clk_put(ssi_private->clk); | 879 | clk_put(ssi_private->clk); |
875 | } | 880 | } |
876 | snd_soc_unregister_dai(&pdev->dev); | 881 | snd_soc_unregister_component(&pdev->dev); |
877 | device_remove_file(&pdev->dev, &ssi_private->dev_attr); | 882 | device_remove_file(&pdev->dev, &ssi_private->dev_attr); |
878 | 883 | ||
879 | free_irq(ssi_private->irq, ssi_private); | 884 | free_irq(ssi_private->irq, ssi_private); |
diff --git a/sound/soc/fsl/imx-ssi.c b/sound/soc/fsl/imx-ssi.c index 810c7eeb7b03..4a26d88d7236 100644 --- a/sound/soc/fsl/imx-ssi.c +++ b/sound/soc/fsl/imx-ssi.c | |||
@@ -413,6 +413,10 @@ static struct snd_soc_dai_driver imx_ac97_dai = { | |||
413 | .ops = &imx_ssi_pcm_dai_ops, | 413 | .ops = &imx_ssi_pcm_dai_ops, |
414 | }; | 414 | }; |
415 | 415 | ||
416 | static const struct snd_soc_component_driver imx_component = { | ||
417 | .name = DRV_NAME, | ||
418 | }; | ||
419 | |||
416 | static void setup_channel_to_ac97(struct imx_ssi *imx_ssi) | 420 | static void setup_channel_to_ac97(struct imx_ssi *imx_ssi) |
417 | { | 421 | { |
418 | void __iomem *base = imx_ssi->base; | 422 | void __iomem *base = imx_ssi->base; |
@@ -591,7 +595,8 @@ static int imx_ssi_probe(struct platform_device *pdev) | |||
591 | 595 | ||
592 | platform_set_drvdata(pdev, ssi); | 596 | platform_set_drvdata(pdev, ssi); |
593 | 597 | ||
594 | ret = snd_soc_register_dai(&pdev->dev, dai); | 598 | ret = snd_soc_register_component(&pdev->dev, &imx_component, |
599 | dai, 1); | ||
595 | if (ret) { | 600 | if (ret) { |
596 | dev_err(&pdev->dev, "register DAI failed\n"); | 601 | dev_err(&pdev->dev, "register DAI failed\n"); |
597 | goto failed_register; | 602 | goto failed_register; |
@@ -632,7 +637,7 @@ failed_pdev_alloc: | |||
632 | failed_pdev_fiq_add: | 637 | failed_pdev_fiq_add: |
633 | platform_device_put(ssi->soc_platform_pdev_fiq); | 638 | platform_device_put(ssi->soc_platform_pdev_fiq); |
634 | failed_pdev_fiq_alloc: | 639 | failed_pdev_fiq_alloc: |
635 | snd_soc_unregister_dai(&pdev->dev); | 640 | snd_soc_unregister_component(&pdev->dev); |
636 | failed_register: | 641 | failed_register: |
637 | release_mem_region(res->start, resource_size(res)); | 642 | release_mem_region(res->start, resource_size(res)); |
638 | failed_get_resource: | 643 | failed_get_resource: |
@@ -650,7 +655,7 @@ static int imx_ssi_remove(struct platform_device *pdev) | |||
650 | platform_device_unregister(ssi->soc_platform_pdev); | 655 | platform_device_unregister(ssi->soc_platform_pdev); |
651 | platform_device_unregister(ssi->soc_platform_pdev_fiq); | 656 | platform_device_unregister(ssi->soc_platform_pdev_fiq); |
652 | 657 | ||
653 | snd_soc_unregister_dai(&pdev->dev); | 658 | snd_soc_unregister_component(&pdev->dev); |
654 | 659 | ||
655 | if (ssi->flags & IMX_SSI_USE_AC97) | 660 | if (ssi->flags & IMX_SSI_USE_AC97) |
656 | ac97_ssi = NULL; | 661 | ac97_ssi = NULL; |
diff --git a/sound/soc/fsl/mpc5200_psc_ac97.c b/sound/soc/fsl/mpc5200_psc_ac97.c index a4aec0488dd3..4141b35ef0bb 100644 --- a/sound/soc/fsl/mpc5200_psc_ac97.c +++ b/sound/soc/fsl/mpc5200_psc_ac97.c | |||
@@ -270,6 +270,9 @@ static struct snd_soc_dai_driver psc_ac97_dai[] = { | |||
270 | .ops = &psc_ac97_digital_ops, | 270 | .ops = &psc_ac97_digital_ops, |
271 | } }; | 271 | } }; |
272 | 272 | ||
273 | static const struct snd_soc_component_driver psc_ac97_component = { | ||
274 | .name = DRV_NAME, | ||
275 | }; | ||
273 | 276 | ||
274 | 277 | ||
275 | /* --------------------------------------------------------------------- | 278 | /* --------------------------------------------------------------------- |
@@ -287,7 +290,8 @@ static int psc_ac97_of_probe(struct platform_device *op) | |||
287 | if (rc != 0) | 290 | if (rc != 0) |
288 | return rc; | 291 | return rc; |
289 | 292 | ||
290 | rc = snd_soc_register_dais(&op->dev, psc_ac97_dai, ARRAY_SIZE(psc_ac97_dai)); | 293 | rc = snd_soc_register_component(&op->dev, &psc_ac97_component, |
294 | psc_ac97_dai, ARRAY_SIZE(psc_ac97_dai)); | ||
291 | if (rc != 0) { | 295 | if (rc != 0) { |
292 | dev_err(&op->dev, "Failed to register DAI\n"); | 296 | dev_err(&op->dev, "Failed to register DAI\n"); |
293 | return rc; | 297 | return rc; |
@@ -313,7 +317,7 @@ static int psc_ac97_of_probe(struct platform_device *op) | |||
313 | static int psc_ac97_of_remove(struct platform_device *op) | 317 | static int psc_ac97_of_remove(struct platform_device *op) |
314 | { | 318 | { |
315 | mpc5200_audio_dma_destroy(op); | 319 | mpc5200_audio_dma_destroy(op); |
316 | snd_soc_unregister_dais(&op->dev, ARRAY_SIZE(psc_ac97_dai)); | 320 | snd_soc_unregister_component(&op->dev); |
317 | return 0; | 321 | return 0; |
318 | } | 322 | } |
319 | 323 | ||
diff --git a/sound/soc/fsl/mpc5200_psc_i2s.c b/sound/soc/fsl/mpc5200_psc_i2s.c index b95b966f25a0..f4efaadb80a2 100644 --- a/sound/soc/fsl/mpc5200_psc_i2s.c +++ b/sound/soc/fsl/mpc5200_psc_i2s.c | |||
@@ -148,6 +148,10 @@ static struct snd_soc_dai_driver psc_i2s_dai[] = {{ | |||
148 | .ops = &psc_i2s_dai_ops, | 148 | .ops = &psc_i2s_dai_ops, |
149 | } }; | 149 | } }; |
150 | 150 | ||
151 | static const struct snd_soc_component_driver psc_i2s_component = { | ||
152 | .name = "mpc5200-i2s", | ||
153 | }; | ||
154 | |||
151 | /* --------------------------------------------------------------------- | 155 | /* --------------------------------------------------------------------- |
152 | * OF platform bus binding code: | 156 | * OF platform bus binding code: |
153 | * - Probe/remove operations | 157 | * - Probe/remove operations |
@@ -163,7 +167,8 @@ static int psc_i2s_of_probe(struct platform_device *op) | |||
163 | if (rc != 0) | 167 | if (rc != 0) |
164 | return rc; | 168 | return rc; |
165 | 169 | ||
166 | rc = snd_soc_register_dais(&op->dev, psc_i2s_dai, ARRAY_SIZE(psc_i2s_dai)); | 170 | rc = snd_soc_register_component(&op->dev, &psc_i2s_component, |
171 | psc_i2s_dai, ARRAY_SIZE(psc_i2s_dai)); | ||
167 | if (rc != 0) { | 172 | if (rc != 0) { |
168 | pr_err("Failed to register DAI\n"); | 173 | pr_err("Failed to register DAI\n"); |
169 | return rc; | 174 | return rc; |
@@ -208,7 +213,7 @@ static int psc_i2s_of_probe(struct platform_device *op) | |||
208 | static int psc_i2s_of_remove(struct platform_device *op) | 213 | static int psc_i2s_of_remove(struct platform_device *op) |
209 | { | 214 | { |
210 | mpc5200_audio_dma_destroy(op); | 215 | mpc5200_audio_dma_destroy(op); |
211 | snd_soc_unregister_dais(&op->dev, ARRAY_SIZE(psc_i2s_dai)); | 216 | snd_soc_unregister_component(&op->dev); |
212 | return 0; | 217 | return 0; |
213 | } | 218 | } |
214 | 219 | ||