mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
ASoC: rockchip: spdif: 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: Id099f4774e040263a370da36427529d45071c173
This commit is contained in:
@@ -399,6 +399,12 @@ static int rk_spdif_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_spdif_component,
|
||||
&rk_spdif_dai, 1);
|
||||
@@ -407,12 +413,6 @@ static int rk_spdif_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