Commit 7c63f3c0 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: rsnd: fixup pcm_new callback method

bff58ea4
(ASoC: rsnd: add DVC support) added DVC support,
and it added pcm_new callback feature for it.
Then it called all DAI's pcm_new callback, and it was wrong.
This patch fixup it and call correct callback.
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 4f8f86aa
......@@ -944,19 +944,17 @@ static struct snd_pcm_ops rsnd_pcm_ops = {
static int rsnd_pcm_new(struct snd_soc_pcm_runtime *rtd)
{
struct rsnd_priv *priv = snd_soc_dai_get_drvdata(rtd->cpu_dai);
struct rsnd_dai *rdai;
int i, ret;
struct snd_soc_dai *dai = rtd->cpu_dai;
struct rsnd_dai *rdai = rsnd_dai_to_rdai(dai);
int ret;
for_each_rsnd_dai(rdai, priv, i) {
ret = rsnd_dai_call(pcm_new, &rdai->playback, rdai, rtd);
if (ret)
return ret;
ret = rsnd_dai_call(pcm_new, &rdai->playback, rdai, rtd);
if (ret)
return ret;
ret = rsnd_dai_call(pcm_new, &rdai->capture, rdai, rtd);
if (ret)
return ret;
}
ret = rsnd_dai_call(pcm_new, &rdai->capture, rdai, rtd);
if (ret)
return ret;
return snd_pcm_lib_preallocate_pages_for_all(
rtd->pcm,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment