mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
ASoC: rockchip: spdifrx: Register PCM before DAI component
API snd_soc_register_component will try to rebind card per
each component register. and the ASoC allow no-pcm card instance.
devm_snd_soc_register_component
snd_soc_try_rebind_card
snd_soc_bind_card
snd_soc_add_pcm_runtime
devm_snd_dmaengine_pcm_register
So, we should register PCM before DAI component.
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I8de05cf709187afd406775998f58ed5ebdb39d38
This commit is contained in:
@@ -328,6 +328,12 @@ static int rk_spdifrx_probe(struct platform_device *pdev)
|
||||
goto err_pm_runtime;
|
||||
}
|
||||
|
||||
ret = devm_snd_dmaengine_pcm_register(&pdev->dev, NULL, 0);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "Could not register PCM\n");
|
||||
goto err_pm_suspend;
|
||||
}
|
||||
|
||||
ret = devm_snd_soc_register_component(&pdev->dev,
|
||||
&rk_spdifrx_component,
|
||||
&rk_spdifrx_dai, 1);
|
||||
@@ -336,12 +342,6 @@ static int rk_spdifrx_probe(struct platform_device *pdev)
|
||||
goto err_pm_suspend;
|
||||
}
|
||||
|
||||
ret = devm_snd_dmaengine_pcm_register(&pdev->dev, NULL, 0);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "Could not register PCM\n");
|
||||
goto err_pm_suspend;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
err_pm_suspend:
|
||||
|
||||
Reference in New Issue
Block a user