Commit 0c9ba720 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: soc-pcm: use snd_soc_dai_get_pcm_stream() at dpcm_set_fe_runtime()

We already have snd_soc_dai_get_pcm_stream(),
let's use it
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87mu8up9ul.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 265694b6
......@@ -2022,7 +2022,6 @@ static void dpcm_set_fe_runtime(struct snd_pcm_substream *substream)
struct snd_pcm_runtime *runtime = substream->runtime;
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_dai *cpu_dai;
struct snd_soc_dai_driver *cpu_dai_drv;
int i;
for_each_rtd_cpu_dai(rtd, i, cpu_dai) {
......@@ -2033,11 +2032,9 @@ static void dpcm_set_fe_runtime(struct snd_pcm_substream *substream)
if (!snd_soc_dai_stream_valid(cpu_dai, substream->stream))
continue;
cpu_dai_drv = cpu_dai->driver;
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
dpcm_init_runtime_hw(runtime, &cpu_dai_drv->playback);
else
dpcm_init_runtime_hw(runtime, &cpu_dai_drv->capture);
dpcm_init_runtime_hw(runtime,
snd_soc_dai_get_pcm_stream(cpu_dai,
substream->stream));
}
dpcm_runtime_merge_format(substream, &runtime->hw.formats);
......
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