diff options
Diffstat (limited to 'sound/soc/tegra')
-rw-r--r-- | sound/soc/tegra/tegra20_ac97.c | 15 | ||||
-rw-r--r-- | sound/soc/tegra/tegra20_i2s.c | 15 | ||||
-rw-r--r-- | sound/soc/tegra/tegra20_spdif.c | 15 | ||||
-rw-r--r-- | sound/soc/tegra/tegra30_i2s.c | 15 | ||||
-rw-r--r-- | sound/soc/tegra/tegra_wm9712.c | 2 |
5 files changed, 41 insertions, 21 deletions
diff --git a/sound/soc/tegra/tegra20_ac97.c b/sound/soc/tegra/tegra20_ac97.c index 336dcdd3e8a4..b5cee92f82e8 100644 --- a/sound/soc/tegra/tegra20_ac97.c +++ b/sound/soc/tegra/tegra20_ac97.c | |||
@@ -248,6 +248,10 @@ static struct snd_soc_dai_driver tegra20_ac97_dai = { | |||
248 | .ops = &tegra20_ac97_dai_ops, | 248 | .ops = &tegra20_ac97_dai_ops, |
249 | }; | 249 | }; |
250 | 250 | ||
251 | static const struct snd_soc_component_driver tegra20_ac97_component = { | ||
252 | .name = DRV_NAME, | ||
253 | }; | ||
254 | |||
251 | static bool tegra20_ac97_wr_rd_reg(struct device *dev, unsigned int reg) | 255 | static bool tegra20_ac97_wr_rd_reg(struct device *dev, unsigned int reg) |
252 | { | 256 | { |
253 | switch (reg) { | 257 | switch (reg) { |
@@ -398,7 +402,8 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev) | |||
398 | ac97->playback_dma_data.width = 32; | 402 | ac97->playback_dma_data.width = 32; |
399 | ac97->playback_dma_data.req_sel = of_dma[1]; | 403 | ac97->playback_dma_data.req_sel = of_dma[1]; |
400 | 404 | ||
401 | ret = snd_soc_register_dais(&pdev->dev, &tegra20_ac97_dai, 1); | 405 | ret = snd_soc_register_component(&pdev->dev, &tegra20_ac97_component, |
406 | &tegra20_ac97_dai, 1); | ||
402 | if (ret) { | 407 | if (ret) { |
403 | dev_err(&pdev->dev, "Could not register DAI: %d\n", ret); | 408 | dev_err(&pdev->dev, "Could not register DAI: %d\n", ret); |
404 | ret = -ENOMEM; | 409 | ret = -ENOMEM; |
@@ -408,7 +413,7 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev) | |||
408 | ret = tegra_pcm_platform_register(&pdev->dev); | 413 | ret = tegra_pcm_platform_register(&pdev->dev); |
409 | if (ret) { | 414 | if (ret) { |
410 | dev_err(&pdev->dev, "Could not register PCM: %d\n", ret); | 415 | dev_err(&pdev->dev, "Could not register PCM: %d\n", ret); |
411 | goto err_unregister_dai; | 416 | goto err_unregister_component; |
412 | } | 417 | } |
413 | 418 | ||
414 | ret = tegra_asoc_utils_init(&ac97->util_data, &pdev->dev); | 419 | ret = tegra_asoc_utils_init(&ac97->util_data, &pdev->dev); |
@@ -434,8 +439,8 @@ err_asoc_utils_fini: | |||
434 | tegra_asoc_utils_fini(&ac97->util_data); | 439 | tegra_asoc_utils_fini(&ac97->util_data); |
435 | err_unregister_pcm: | 440 | err_unregister_pcm: |
436 | tegra_pcm_platform_unregister(&pdev->dev); | 441 | tegra_pcm_platform_unregister(&pdev->dev); |
437 | err_unregister_dai: | 442 | err_unregister_component: |
438 | snd_soc_unregister_dai(&pdev->dev); | 443 | snd_soc_unregister_component(&pdev->dev); |
439 | err_clk_put: | 444 | err_clk_put: |
440 | clk_put(ac97->clk_ac97); | 445 | clk_put(ac97->clk_ac97); |
441 | err: | 446 | err: |
@@ -447,7 +452,7 @@ static int tegra20_ac97_platform_remove(struct platform_device *pdev) | |||
447 | struct tegra20_ac97 *ac97 = dev_get_drvdata(&pdev->dev); | 452 | struct tegra20_ac97 *ac97 = dev_get_drvdata(&pdev->dev); |
448 | 453 | ||
449 | tegra_pcm_platform_unregister(&pdev->dev); | 454 | tegra_pcm_platform_unregister(&pdev->dev); |
450 | snd_soc_unregister_dai(&pdev->dev); | 455 | snd_soc_unregister_component(&pdev->dev); |
451 | 456 | ||
452 | tegra_asoc_utils_fini(&ac97->util_data); | 457 | tegra_asoc_utils_fini(&ac97->util_data); |
453 | 458 | ||
diff --git a/sound/soc/tegra/tegra20_i2s.c b/sound/soc/tegra/tegra20_i2s.c index caa772de5a18..8b1ceb82c86f 100644 --- a/sound/soc/tegra/tegra20_i2s.c +++ b/sound/soc/tegra/tegra20_i2s.c | |||
@@ -276,6 +276,10 @@ static const struct snd_soc_dai_driver tegra20_i2s_dai_template = { | |||
276 | .symmetric_rates = 1, | 276 | .symmetric_rates = 1, |
277 | }; | 277 | }; |
278 | 278 | ||
279 | static const struct snd_soc_component_driver tegra20_i2s_component = { | ||
280 | .name = DRV_NAME, | ||
281 | }; | ||
282 | |||
279 | static bool tegra20_i2s_wr_rd_reg(struct device *dev, unsigned int reg) | 283 | static bool tegra20_i2s_wr_rd_reg(struct device *dev, unsigned int reg) |
280 | { | 284 | { |
281 | switch (reg) { | 285 | switch (reg) { |
@@ -419,7 +423,8 @@ static int tegra20_i2s_platform_probe(struct platform_device *pdev) | |||
419 | goto err_pm_disable; | 423 | goto err_pm_disable; |
420 | } | 424 | } |
421 | 425 | ||
422 | ret = snd_soc_register_dai(&pdev->dev, &i2s->dai); | 426 | ret = snd_soc_register_component(&pdev->dev, &tegra20_i2s_component, |
427 | &i2s->dai, 1); | ||
423 | if (ret) { | 428 | if (ret) { |
424 | dev_err(&pdev->dev, "Could not register DAI: %d\n", ret); | 429 | dev_err(&pdev->dev, "Could not register DAI: %d\n", ret); |
425 | ret = -ENOMEM; | 430 | ret = -ENOMEM; |
@@ -429,13 +434,13 @@ static int tegra20_i2s_platform_probe(struct platform_device *pdev) | |||
429 | ret = tegra_pcm_platform_register(&pdev->dev); | 434 | ret = tegra_pcm_platform_register(&pdev->dev); |
430 | if (ret) { | 435 | if (ret) { |
431 | dev_err(&pdev->dev, "Could not register PCM: %d\n", ret); | 436 | dev_err(&pdev->dev, "Could not register PCM: %d\n", ret); |
432 | goto err_unregister_dai; | 437 | goto err_unregister_component; |
433 | } | 438 | } |
434 | 439 | ||
435 | return 0; | 440 | return 0; |
436 | 441 | ||
437 | err_unregister_dai: | 442 | err_unregister_component: |
438 | snd_soc_unregister_dai(&pdev->dev); | 443 | snd_soc_unregister_component(&pdev->dev); |
439 | err_suspend: | 444 | err_suspend: |
440 | if (!pm_runtime_status_suspended(&pdev->dev)) | 445 | if (!pm_runtime_status_suspended(&pdev->dev)) |
441 | tegra20_i2s_runtime_suspend(&pdev->dev); | 446 | tegra20_i2s_runtime_suspend(&pdev->dev); |
@@ -456,7 +461,7 @@ static int tegra20_i2s_platform_remove(struct platform_device *pdev) | |||
456 | tegra20_i2s_runtime_suspend(&pdev->dev); | 461 | tegra20_i2s_runtime_suspend(&pdev->dev); |
457 | 462 | ||
458 | tegra_pcm_platform_unregister(&pdev->dev); | 463 | tegra_pcm_platform_unregister(&pdev->dev); |
459 | snd_soc_unregister_dai(&pdev->dev); | 464 | snd_soc_unregister_component(&pdev->dev); |
460 | 465 | ||
461 | clk_put(i2s->clk_i2s); | 466 | clk_put(i2s->clk_i2s); |
462 | 467 | ||
diff --git a/sound/soc/tegra/tegra20_spdif.c b/sound/soc/tegra/tegra20_spdif.c index 04771d14d343..6fce0be5eaa3 100644 --- a/sound/soc/tegra/tegra20_spdif.c +++ b/sound/soc/tegra/tegra20_spdif.c | |||
@@ -182,6 +182,10 @@ static struct snd_soc_dai_driver tegra20_spdif_dai = { | |||
182 | .ops = &tegra20_spdif_dai_ops, | 182 | .ops = &tegra20_spdif_dai_ops, |
183 | }; | 183 | }; |
184 | 184 | ||
185 | static const struct snd_soc_component_driver tegra20_spdif_component = { | ||
186 | .name = DRV_NAME, | ||
187 | }; | ||
188 | |||
185 | static bool tegra20_spdif_wr_rd_reg(struct device *dev, unsigned int reg) | 189 | static bool tegra20_spdif_wr_rd_reg(struct device *dev, unsigned int reg) |
186 | { | 190 | { |
187 | switch (reg) { | 191 | switch (reg) { |
@@ -329,7 +333,8 @@ static int tegra20_spdif_platform_probe(struct platform_device *pdev) | |||
329 | goto err_pm_disable; | 333 | goto err_pm_disable; |
330 | } | 334 | } |
331 | 335 | ||
332 | ret = snd_soc_register_dai(&pdev->dev, &tegra20_spdif_dai); | 336 | ret = snd_soc_register_component(&pdev->dev, &tegra20_spdif_component, |
337 | &tegra20_spdif_dai, 1); | ||
333 | if (ret) { | 338 | if (ret) { |
334 | dev_err(&pdev->dev, "Could not register DAI: %d\n", ret); | 339 | dev_err(&pdev->dev, "Could not register DAI: %d\n", ret); |
335 | ret = -ENOMEM; | 340 | ret = -ENOMEM; |
@@ -339,13 +344,13 @@ static int tegra20_spdif_platform_probe(struct platform_device *pdev) | |||
339 | ret = tegra_pcm_platform_register(&pdev->dev); | 344 | ret = tegra_pcm_platform_register(&pdev->dev); |
340 | if (ret) { | 345 | if (ret) { |
341 | dev_err(&pdev->dev, "Could not register PCM: %d\n", ret); | 346 | dev_err(&pdev->dev, "Could not register PCM: %d\n", ret); |
342 | goto err_unregister_dai; | 347 | goto err_unregister_component; |
343 | } | 348 | } |
344 | 349 | ||
345 | return 0; | 350 | return 0; |
346 | 351 | ||
347 | err_unregister_dai: | 352 | err_unregister_component: |
348 | snd_soc_unregister_dai(&pdev->dev); | 353 | snd_soc_unregister_component(&pdev->dev); |
349 | err_suspend: | 354 | err_suspend: |
350 | if (!pm_runtime_status_suspended(&pdev->dev)) | 355 | if (!pm_runtime_status_suspended(&pdev->dev)) |
351 | tegra20_spdif_runtime_suspend(&pdev->dev); | 356 | tegra20_spdif_runtime_suspend(&pdev->dev); |
@@ -366,7 +371,7 @@ static int tegra20_spdif_platform_remove(struct platform_device *pdev) | |||
366 | tegra20_spdif_runtime_suspend(&pdev->dev); | 371 | tegra20_spdif_runtime_suspend(&pdev->dev); |
367 | 372 | ||
368 | tegra_pcm_platform_unregister(&pdev->dev); | 373 | tegra_pcm_platform_unregister(&pdev->dev); |
369 | snd_soc_unregister_dai(&pdev->dev); | 374 | snd_soc_unregister_component(&pdev->dev); |
370 | 375 | ||
371 | clk_put(spdif->clk_spdif_out); | 376 | clk_put(spdif->clk_spdif_out); |
372 | 377 | ||
diff --git a/sound/soc/tegra/tegra30_i2s.c b/sound/soc/tegra/tegra30_i2s.c index f4e1ce82750a..f138d8fea977 100644 --- a/sound/soc/tegra/tegra30_i2s.c +++ b/sound/soc/tegra/tegra30_i2s.c | |||
@@ -336,6 +336,10 @@ static const struct snd_soc_dai_driver tegra30_i2s_dai_template = { | |||
336 | .symmetric_rates = 1, | 336 | .symmetric_rates = 1, |
337 | }; | 337 | }; |
338 | 338 | ||
339 | static const struct snd_soc_component_driver tegra30_i2s_component = { | ||
340 | .name = DRV_NAME, | ||
341 | }; | ||
342 | |||
339 | static bool tegra30_i2s_wr_rd_reg(struct device *dev, unsigned int reg) | 343 | static bool tegra30_i2s_wr_rd_reg(struct device *dev, unsigned int reg) |
340 | { | 344 | { |
341 | switch (reg) { | 345 | switch (reg) { |
@@ -464,7 +468,8 @@ static int tegra30_i2s_platform_probe(struct platform_device *pdev) | |||
464 | goto err_pm_disable; | 468 | goto err_pm_disable; |
465 | } | 469 | } |
466 | 470 | ||
467 | ret = snd_soc_register_dai(&pdev->dev, &i2s->dai); | 471 | ret = snd_soc_register_component(&pdev->dev, &tegra30_i2s_component, |
472 | &i2s->dai, 1); | ||
468 | if (ret) { | 473 | if (ret) { |
469 | dev_err(&pdev->dev, "Could not register DAI: %d\n", ret); | 474 | dev_err(&pdev->dev, "Could not register DAI: %d\n", ret); |
470 | ret = -ENOMEM; | 475 | ret = -ENOMEM; |
@@ -474,13 +479,13 @@ static int tegra30_i2s_platform_probe(struct platform_device *pdev) | |||
474 | ret = tegra_pcm_platform_register(&pdev->dev); | 479 | ret = tegra_pcm_platform_register(&pdev->dev); |
475 | if (ret) { | 480 | if (ret) { |
476 | dev_err(&pdev->dev, "Could not register PCM: %d\n", ret); | 481 | dev_err(&pdev->dev, "Could not register PCM: %d\n", ret); |
477 | goto err_unregister_dai; | 482 | goto err_unregister_component; |
478 | } | 483 | } |
479 | 484 | ||
480 | return 0; | 485 | return 0; |
481 | 486 | ||
482 | err_unregister_dai: | 487 | err_unregister_component: |
483 | snd_soc_unregister_dai(&pdev->dev); | 488 | snd_soc_unregister_component(&pdev->dev); |
484 | err_suspend: | 489 | err_suspend: |
485 | if (!pm_runtime_status_suspended(&pdev->dev)) | 490 | if (!pm_runtime_status_suspended(&pdev->dev)) |
486 | tegra30_i2s_runtime_suspend(&pdev->dev); | 491 | tegra30_i2s_runtime_suspend(&pdev->dev); |
@@ -501,7 +506,7 @@ static int tegra30_i2s_platform_remove(struct platform_device *pdev) | |||
501 | tegra30_i2s_runtime_suspend(&pdev->dev); | 506 | tegra30_i2s_runtime_suspend(&pdev->dev); |
502 | 507 | ||
503 | tegra_pcm_platform_unregister(&pdev->dev); | 508 | tegra_pcm_platform_unregister(&pdev->dev); |
504 | snd_soc_unregister_dai(&pdev->dev); | 509 | snd_soc_unregister_component(&pdev->dev); |
505 | 510 | ||
506 | clk_put(i2s->clk_i2s); | 511 | clk_put(i2s->clk_i2s); |
507 | 512 | ||
diff --git a/sound/soc/tegra/tegra_wm9712.c b/sound/soc/tegra/tegra_wm9712.c index 68d42403d9b5..6839f88167d0 100644 --- a/sound/soc/tegra/tegra_wm9712.c +++ b/sound/soc/tegra/tegra_wm9712.c | |||
@@ -55,7 +55,7 @@ static int tegra_wm9712_init(struct snd_soc_pcm_runtime *rtd) | |||
55 | static struct snd_soc_dai_link tegra_wm9712_dai = { | 55 | static struct snd_soc_dai_link tegra_wm9712_dai = { |
56 | .name = "AC97 HiFi", | 56 | .name = "AC97 HiFi", |
57 | .stream_name = "AC97 HiFi", | 57 | .stream_name = "AC97 HiFi", |
58 | .cpu_dai_name = "tegra-ac97-pcm", | 58 | .cpu_dai_name = "tegra20-ac97", |
59 | .codec_dai_name = "wm9712-hifi", | 59 | .codec_dai_name = "wm9712-hifi", |
60 | .codec_name = "wm9712-codec", | 60 | .codec_name = "wm9712-codec", |
61 | .init = tegra_wm9712_init, | 61 | .init = tegra_wm9712_init, |