未验证 提交 180d9ef5 编写于 作者: K Kuninori Morimoto 提交者: Mark Brown

ASoC: rsnd: call snd_soc_disconnect_sync() when remove

Renesas R-Car sound driver should be stopped if unbinded during
playbacking/capturing. Otherwise clock open/close counter mismatch
happen.

One note is that we can't skip from remove function (= return -Exxx)
in such case if user used unbind. Because unbind function doesn't
check return value from each driver's remove function.
This means we must to stop and remove driver in remove function.

Now ASoC has snd_soc_disconnect_sync() for this purpose.
Let's use it.
Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 69830d39
...@@ -1496,6 +1496,8 @@ static int rsnd_remove(struct platform_device *pdev) ...@@ -1496,6 +1496,8 @@ static int rsnd_remove(struct platform_device *pdev)
}; };
int ret = 0, i; int ret = 0, i;
snd_soc_disconnect_sync(&pdev->dev);
pm_runtime_disable(&pdev->dev); pm_runtime_disable(&pdev->dev);
for_each_rsnd_dai(rdai, priv, i) { for_each_rsnd_dai(rdai, priv, i) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册