ASoC: rockchip: multi-dais: 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: I275e919495280568b6b732097532f466a0cc3a2a
This commit is contained in:
Sugar Zhang
2024-07-19 16:52:02 +08:00
committed by Tao Huang
parent 1f1211c186
commit c06d283fd2

View File

@@ -621,6 +621,12 @@ static int rockchip_mdais_probe(struct platform_device *pdev)
goto err_pm_disable;
}
ret = snd_dmaengine_mpcm_register(mdais);
if (ret) {
dev_err(&pdev->dev, "Could not register PCM\n");
goto err_suspend;
}
ret = devm_snd_soc_register_component(&pdev->dev,
&rockchip_mdais_component,
soc_dai, 1);
@@ -630,12 +636,6 @@ static int rockchip_mdais_probe(struct platform_device *pdev)
goto err_suspend;
}
ret = snd_dmaengine_mpcm_register(mdais);
if (ret) {
dev_err(&pdev->dev, "Could not register PCM\n");
return ret;
}
return 0;
err_suspend: