diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-04-23 14:25:29 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-04-23 14:25:29 -0400 |
commit | 5561f17f2629cdacf5bc43e0f839ca6434db2c20 (patch) | |
tree | c0e1acfcc969c81d5d072ee3b512a934d99a7ec2 /sound/soc/pxa | |
parent | 423a5e0fd46de6bd92c52b2ef136856929eeb649 (diff) | |
parent | d486fea6babfe3ff0c382c9e4baf18f535fcee7d (diff) |
Merge remote-tracking branch 'asoc/topic/davinci' into asoc-next
Diffstat (limited to 'sound/soc/pxa')
-rw-r--r-- | sound/soc/pxa/mmp-pcm.c | 33 | ||||
-rw-r--r-- | sound/soc/pxa/mmp-sspa.c | 9 | ||||
-rw-r--r-- | sound/soc/pxa/pxa-ssp.c | 9 | ||||
-rw-r--r-- | sound/soc/pxa/pxa2xx-ac97.c | 11 | ||||
-rw-r--r-- | sound/soc/pxa/pxa2xx-i2s.c | 9 |
5 files changed, 33 insertions, 38 deletions
diff --git a/sound/soc/pxa/mmp-pcm.c b/sound/soc/pxa/mmp-pcm.c index 190eb0bccf5f..6c3980252bf6 100644 --- a/sound/soc/pxa/mmp-pcm.c +++ b/sound/soc/pxa/mmp-pcm.c | |||
@@ -118,9 +118,8 @@ static int mmp_pcm_open(struct snd_pcm_substream *substream) | |||
118 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 118 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
119 | struct platform_device *pdev = to_platform_device(rtd->platform->dev); | 119 | struct platform_device *pdev = to_platform_device(rtd->platform->dev); |
120 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; | 120 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; |
121 | struct mmp_dma_data *dma_data; | 121 | struct mmp_dma_data dma_data; |
122 | struct resource *r; | 122 | struct resource *r; |
123 | int ret; | ||
124 | 123 | ||
125 | r = platform_get_resource(pdev, IORESOURCE_DMA, substream->stream); | 124 | r = platform_get_resource(pdev, IORESOURCE_DMA, substream->stream); |
126 | if (!r) | 125 | if (!r) |
@@ -128,33 +127,11 @@ static int mmp_pcm_open(struct snd_pcm_substream *substream) | |||
128 | 127 | ||
129 | snd_soc_set_runtime_hwparams(substream, | 128 | snd_soc_set_runtime_hwparams(substream, |
130 | &mmp_pcm_hardware[substream->stream]); | 129 | &mmp_pcm_hardware[substream->stream]); |
131 | dma_data = devm_kzalloc(&pdev->dev, | ||
132 | sizeof(struct mmp_dma_data), GFP_KERNEL); | ||
133 | if (dma_data == NULL) | ||
134 | return -ENOMEM; | ||
135 | 130 | ||
136 | dma_data->dma_res = r; | 131 | dma_data.dma_res = r; |
137 | dma_data->ssp_id = cpu_dai->id; | 132 | dma_data.ssp_id = cpu_dai->id; |
138 | 133 | ||
139 | ret = snd_dmaengine_pcm_open(substream, filter, dma_data); | 134 | return snd_dmaengine_pcm_open(substream, filter, &dma_data); |
140 | if (ret) { | ||
141 | devm_kfree(&pdev->dev, dma_data); | ||
142 | return ret; | ||
143 | } | ||
144 | |||
145 | snd_dmaengine_pcm_set_data(substream, dma_data); | ||
146 | return 0; | ||
147 | } | ||
148 | |||
149 | static int mmp_pcm_close(struct snd_pcm_substream *substream) | ||
150 | { | ||
151 | struct mmp_dma_data *dma_data = snd_dmaengine_pcm_get_data(substream); | ||
152 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | ||
153 | struct platform_device *pdev = to_platform_device(rtd->platform->dev); | ||
154 | |||
155 | snd_dmaengine_pcm_close(substream); | ||
156 | devm_kfree(&pdev->dev, dma_data); | ||
157 | return 0; | ||
158 | } | 135 | } |
159 | 136 | ||
160 | static int mmp_pcm_mmap(struct snd_pcm_substream *substream, | 137 | static int mmp_pcm_mmap(struct snd_pcm_substream *substream, |
@@ -171,7 +148,7 @@ static int mmp_pcm_mmap(struct snd_pcm_substream *substream, | |||
171 | 148 | ||
172 | struct snd_pcm_ops mmp_pcm_ops = { | 149 | struct snd_pcm_ops mmp_pcm_ops = { |
173 | .open = mmp_pcm_open, | 150 | .open = mmp_pcm_open, |
174 | .close = mmp_pcm_close, | 151 | .close = snd_dmaengine_pcm_close, |
175 | .ioctl = snd_pcm_lib_ioctl, | 152 | .ioctl = snd_pcm_lib_ioctl, |
176 | .hw_params = mmp_pcm_hw_params, | 153 | .hw_params = mmp_pcm_hw_params, |
177 | .trigger = snd_dmaengine_pcm_trigger, | 154 | .trigger = snd_dmaengine_pcm_trigger, |
diff --git a/sound/soc/pxa/mmp-sspa.c b/sound/soc/pxa/mmp-sspa.c index 9140c4abafbc..a64779980177 100644 --- a/sound/soc/pxa/mmp-sspa.c +++ b/sound/soc/pxa/mmp-sspa.c | |||
@@ -405,6 +405,10 @@ struct snd_soc_dai_driver mmp_sspa_dai = { | |||
405 | .ops = &mmp_sspa_dai_ops, | 405 | .ops = &mmp_sspa_dai_ops, |
406 | }; | 406 | }; |
407 | 407 | ||
408 | static const struct snd_soc_component_driver mmp_sspa_component = { | ||
409 | .name = "mmp-sspa", | ||
410 | }; | ||
411 | |||
408 | static int asoc_mmp_sspa_probe(struct platform_device *pdev) | 412 | static int asoc_mmp_sspa_probe(struct platform_device *pdev) |
409 | { | 413 | { |
410 | struct sspa_priv *priv; | 414 | struct sspa_priv *priv; |
@@ -450,7 +454,8 @@ static int asoc_mmp_sspa_probe(struct platform_device *pdev) | |||
450 | priv->dai_fmt = (unsigned int) -1; | 454 | priv->dai_fmt = (unsigned int) -1; |
451 | platform_set_drvdata(pdev, priv); | 455 | platform_set_drvdata(pdev, priv); |
452 | 456 | ||
453 | return snd_soc_register_dai(&pdev->dev, &mmp_sspa_dai); | 457 | return snd_soc_register_component(&pdev->dev, &mmp_sspa_component, |
458 | &mmp_sspa_dai, 1); | ||
454 | } | 459 | } |
455 | 460 | ||
456 | static int asoc_mmp_sspa_remove(struct platform_device *pdev) | 461 | static int asoc_mmp_sspa_remove(struct platform_device *pdev) |
@@ -460,7 +465,7 @@ static int asoc_mmp_sspa_remove(struct platform_device *pdev) | |||
460 | clk_disable(priv->audio_clk); | 465 | clk_disable(priv->audio_clk); |
461 | clk_put(priv->audio_clk); | 466 | clk_put(priv->audio_clk); |
462 | clk_put(priv->sysclk); | 467 | clk_put(priv->sysclk); |
463 | snd_soc_unregister_dai(&pdev->dev); | 468 | snd_soc_unregister_component(&pdev->dev); |
464 | return 0; | 469 | return 0; |
465 | } | 470 | } |
466 | 471 | ||
diff --git a/sound/soc/pxa/pxa-ssp.c b/sound/soc/pxa/pxa-ssp.c index d3eb0c2eec77..6f4dd7543e82 100644 --- a/sound/soc/pxa/pxa-ssp.c +++ b/sound/soc/pxa/pxa-ssp.c | |||
@@ -794,14 +794,19 @@ static struct snd_soc_dai_driver pxa_ssp_dai = { | |||
794 | .ops = &pxa_ssp_dai_ops, | 794 | .ops = &pxa_ssp_dai_ops, |
795 | }; | 795 | }; |
796 | 796 | ||
797 | static const struct snd_soc_component_driver pxa_ssp_component = { | ||
798 | .name = "pxa-ssp", | ||
799 | }; | ||
800 | |||
797 | static int asoc_ssp_probe(struct platform_device *pdev) | 801 | static int asoc_ssp_probe(struct platform_device *pdev) |
798 | { | 802 | { |
799 | return snd_soc_register_dai(&pdev->dev, &pxa_ssp_dai); | 803 | return snd_soc_register_component(&pdev->dev, &pxa_ssp_component, |
804 | &pxa_ssp_dai, 1); | ||
800 | } | 805 | } |
801 | 806 | ||
802 | static int asoc_ssp_remove(struct platform_device *pdev) | 807 | static int asoc_ssp_remove(struct platform_device *pdev) |
803 | { | 808 | { |
804 | snd_soc_unregister_dai(&pdev->dev); | 809 | snd_soc_unregister_component(&pdev->dev); |
805 | return 0; | 810 | return 0; |
806 | } | 811 | } |
807 | 812 | ||
diff --git a/sound/soc/pxa/pxa2xx-ac97.c b/sound/soc/pxa/pxa2xx-ac97.c index 4b0a009bd683..57ea8e6c5488 100644 --- a/sound/soc/pxa/pxa2xx-ac97.c +++ b/sound/soc/pxa/pxa2xx-ac97.c | |||
@@ -47,6 +47,7 @@ struct snd_ac97_bus_ops soc_ac97_ops = { | |||
47 | .warm_reset = pxa2xx_ac97_warm_reset, | 47 | .warm_reset = pxa2xx_ac97_warm_reset, |
48 | .reset = pxa2xx_ac97_cold_reset, | 48 | .reset = pxa2xx_ac97_cold_reset, |
49 | }; | 49 | }; |
50 | EXPORT_SYMBOL_GPL(soc_ac97_ops); | ||
50 | 51 | ||
51 | static struct pxa2xx_pcm_dma_params pxa2xx_ac97_pcm_stereo_out = { | 52 | static struct pxa2xx_pcm_dma_params pxa2xx_ac97_pcm_stereo_out = { |
52 | .name = "AC97 PCM Stereo out", | 53 | .name = "AC97 PCM Stereo out", |
@@ -232,7 +233,9 @@ static struct snd_soc_dai_driver pxa_ac97_dai_driver[] = { | |||
232 | }, | 233 | }, |
233 | }; | 234 | }; |
234 | 235 | ||
235 | EXPORT_SYMBOL_GPL(soc_ac97_ops); | 236 | static const struct snd_soc_component_driver pxa_ac97_component = { |
237 | .name = "pxa-ac97", | ||
238 | }; | ||
236 | 239 | ||
237 | static int pxa2xx_ac97_dev_probe(struct platform_device *pdev) | 240 | static int pxa2xx_ac97_dev_probe(struct platform_device *pdev) |
238 | { | 241 | { |
@@ -245,13 +248,13 @@ static int pxa2xx_ac97_dev_probe(struct platform_device *pdev) | |||
245 | * driver to do interesting things with the clocking to get us up | 248 | * driver to do interesting things with the clocking to get us up |
246 | * and running. | 249 | * and running. |
247 | */ | 250 | */ |
248 | return snd_soc_register_dais(&pdev->dev, pxa_ac97_dai_driver, | 251 | return snd_soc_register_component(&pdev->dev, &pxa_ac97_component, |
249 | ARRAY_SIZE(pxa_ac97_dai_driver)); | 252 | pxa_ac97_dai_driver, ARRAY_SIZE(pxa_ac97_dai_driver)); |
250 | } | 253 | } |
251 | 254 | ||
252 | static int pxa2xx_ac97_dev_remove(struct platform_device *pdev) | 255 | static int pxa2xx_ac97_dev_remove(struct platform_device *pdev) |
253 | { | 256 | { |
254 | snd_soc_unregister_dais(&pdev->dev, ARRAY_SIZE(pxa_ac97_dai_driver)); | 257 | snd_soc_unregister_component(&pdev->dev); |
255 | return 0; | 258 | return 0; |
256 | } | 259 | } |
257 | 260 | ||
diff --git a/sound/soc/pxa/pxa2xx-i2s.c b/sound/soc/pxa/pxa2xx-i2s.c index 6b1a06f67564..f7ca71664112 100644 --- a/sound/soc/pxa/pxa2xx-i2s.c +++ b/sound/soc/pxa/pxa2xx-i2s.c | |||
@@ -360,14 +360,19 @@ static struct snd_soc_dai_driver pxa_i2s_dai = { | |||
360 | .symmetric_rates = 1, | 360 | .symmetric_rates = 1, |
361 | }; | 361 | }; |
362 | 362 | ||
363 | static const struct snd_soc_component_driver pxa_i2s_component = { | ||
364 | .name = "pxa-i2s", | ||
365 | }; | ||
366 | |||
363 | static int pxa2xx_i2s_drv_probe(struct platform_device *pdev) | 367 | static int pxa2xx_i2s_drv_probe(struct platform_device *pdev) |
364 | { | 368 | { |
365 | return snd_soc_register_dai(&pdev->dev, &pxa_i2s_dai); | 369 | return snd_soc_register_component(&pdev->dev, &pxa_i2s_component, |
370 | &pxa_i2s_dai, 1); | ||
366 | } | 371 | } |
367 | 372 | ||
368 | static int pxa2xx_i2s_drv_remove(struct platform_device *pdev) | 373 | static int pxa2xx_i2s_drv_remove(struct platform_device *pdev) |
369 | { | 374 | { |
370 | snd_soc_unregister_dai(&pdev->dev); | 375 | snd_soc_unregister_component(&pdev->dev); |
371 | return 0; | 376 | return 0; |
372 | } | 377 | } |
373 | 378 | ||