diff options
Diffstat (limited to 'sound/soc/tegra/tegra20_spdif.c')
-rw-r--r-- | sound/soc/tegra/tegra20_spdif.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/sound/soc/tegra/tegra20_spdif.c b/sound/soc/tegra/tegra20_spdif.c index 04771d14d343..5eaa12cdc6eb 100644 --- a/sound/soc/tegra/tegra20_spdif.c +++ b/sound/soc/tegra/tegra20_spdif.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <sound/pcm.h> | 32 | #include <sound/pcm.h> |
33 | #include <sound/pcm_params.h> | 33 | #include <sound/pcm_params.h> |
34 | #include <sound/soc.h> | 34 | #include <sound/soc.h> |
35 | #include <sound/dmaengine_pcm.h> | ||
35 | 36 | ||
36 | #include "tegra20_spdif.h" | 37 | #include "tegra20_spdif.h" |
37 | 38 | ||
@@ -182,6 +183,10 @@ static struct snd_soc_dai_driver tegra20_spdif_dai = { | |||
182 | .ops = &tegra20_spdif_dai_ops, | 183 | .ops = &tegra20_spdif_dai_ops, |
183 | }; | 184 | }; |
184 | 185 | ||
186 | static const struct snd_soc_component_driver tegra20_spdif_component = { | ||
187 | .name = DRV_NAME, | ||
188 | }; | ||
189 | |||
185 | static bool tegra20_spdif_wr_rd_reg(struct device *dev, unsigned int reg) | 190 | static bool tegra20_spdif_wr_rd_reg(struct device *dev, unsigned int reg) |
186 | { | 191 | { |
187 | switch (reg) { | 192 | switch (reg) { |
@@ -318,9 +323,9 @@ static int tegra20_spdif_platform_probe(struct platform_device *pdev) | |||
318 | } | 323 | } |
319 | 324 | ||
320 | spdif->playback_dma_data.addr = mem->start + TEGRA20_SPDIF_DATA_OUT; | 325 | spdif->playback_dma_data.addr = mem->start + TEGRA20_SPDIF_DATA_OUT; |
321 | spdif->playback_dma_data.wrap = 4; | 326 | spdif->capture_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; |
322 | spdif->playback_dma_data.width = 32; | 327 | spdif->capture_dma_data.maxburst = 4; |
323 | spdif->playback_dma_data.req_sel = dmareq->start; | 328 | spdif->playback_dma_data.slave_id = dmareq->start; |
324 | 329 | ||
325 | pm_runtime_enable(&pdev->dev); | 330 | pm_runtime_enable(&pdev->dev); |
326 | if (!pm_runtime_enabled(&pdev->dev)) { | 331 | if (!pm_runtime_enabled(&pdev->dev)) { |
@@ -329,7 +334,8 @@ static int tegra20_spdif_platform_probe(struct platform_device *pdev) | |||
329 | goto err_pm_disable; | 334 | goto err_pm_disable; |
330 | } | 335 | } |
331 | 336 | ||
332 | ret = snd_soc_register_dai(&pdev->dev, &tegra20_spdif_dai); | 337 | ret = snd_soc_register_component(&pdev->dev, &tegra20_spdif_component, |
338 | &tegra20_spdif_dai, 1); | ||
333 | if (ret) { | 339 | if (ret) { |
334 | dev_err(&pdev->dev, "Could not register DAI: %d\n", ret); | 340 | dev_err(&pdev->dev, "Could not register DAI: %d\n", ret); |
335 | ret = -ENOMEM; | 341 | ret = -ENOMEM; |
@@ -339,13 +345,13 @@ static int tegra20_spdif_platform_probe(struct platform_device *pdev) | |||
339 | ret = tegra_pcm_platform_register(&pdev->dev); | 345 | ret = tegra_pcm_platform_register(&pdev->dev); |
340 | if (ret) { | 346 | if (ret) { |
341 | dev_err(&pdev->dev, "Could not register PCM: %d\n", ret); | 347 | dev_err(&pdev->dev, "Could not register PCM: %d\n", ret); |
342 | goto err_unregister_dai; | 348 | goto err_unregister_component; |
343 | } | 349 | } |
344 | 350 | ||
345 | return 0; | 351 | return 0; |
346 | 352 | ||
347 | err_unregister_dai: | 353 | err_unregister_component: |
348 | snd_soc_unregister_dai(&pdev->dev); | 354 | snd_soc_unregister_component(&pdev->dev); |
349 | err_suspend: | 355 | err_suspend: |
350 | if (!pm_runtime_status_suspended(&pdev->dev)) | 356 | if (!pm_runtime_status_suspended(&pdev->dev)) |
351 | tegra20_spdif_runtime_suspend(&pdev->dev); | 357 | tegra20_spdif_runtime_suspend(&pdev->dev); |
@@ -366,7 +372,7 @@ static int tegra20_spdif_platform_remove(struct platform_device *pdev) | |||
366 | tegra20_spdif_runtime_suspend(&pdev->dev); | 372 | tegra20_spdif_runtime_suspend(&pdev->dev); |
367 | 373 | ||
368 | tegra_pcm_platform_unregister(&pdev->dev); | 374 | tegra_pcm_platform_unregister(&pdev->dev); |
369 | snd_soc_unregister_dai(&pdev->dev); | 375 | snd_soc_unregister_component(&pdev->dev); |
370 | 376 | ||
371 | clk_put(spdif->clk_spdif_out); | 377 | clk_put(spdif->clk_spdif_out); |
372 | 378 | ||