aboutsummaryrefslogtreecommitdiff
path: root/sound/soc/soc-pcm.c
diff options
context:
space:
mode:
authorKuninori Morimoto2021-02-22 09:47:19 +0900
committerMark Brown2021-03-10 13:06:45 +0000
commit7f4a763642cc8d5f49e64a3611de8f62102c9d31 (patch)
treee1a709f2eb667fc1a0d347e22d260ca92ed8a992 /sound/soc/soc-pcm.c
parent6053a840f711fbb4e36fad06880be11db37d3cdc (diff)
ASoC: soc-pcm: unpack dpcm_init_runtime_hw()
dpcm_init_runtime_hw() is now just verbose function. This patch unpacks it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87r1l9vsh4.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-pcm.c')
-rw-r--r--sound/soc/soc-pcm.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index bb912a94e895..fd279fb28533 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -1526,16 +1526,6 @@ unwind:
return err;
}
-static void dpcm_init_runtime_hw(struct snd_pcm_runtime *runtime,
- struct snd_soc_pcm_stream *stream)
-{
- struct snd_pcm_hardware *hw = &runtime->hw;
-
- soc_pcm_hw_update_rate(hw, stream);
- soc_pcm_hw_update_chan(hw, stream);
- soc_pcm_hw_update_format(hw, stream);
-}
-
static void dpcm_runtime_merge_format(struct snd_pcm_substream *substream,
struct snd_pcm_runtime *runtime)
{
@@ -1669,6 +1659,8 @@ static void dpcm_set_fe_runtime(struct snd_pcm_substream *substream)
soc_pcm_hw_init(hw);
for_each_rtd_cpu_dais(rtd, i, cpu_dai) {
+ struct snd_soc_pcm_stream *stream;
+
/*
* Skip CPUs which don't support the current stream
* type. See soc_pcm_init_runtime_hw() for more details
@@ -1676,9 +1668,11 @@ static void dpcm_set_fe_runtime(struct snd_pcm_substream *substream)
if (!snd_soc_dai_stream_valid(cpu_dai, substream->stream))
continue;
- dpcm_init_runtime_hw(runtime,
- snd_soc_dai_get_pcm_stream(cpu_dai,
- substream->stream));
+ stream = snd_soc_dai_get_pcm_stream(cpu_dai, substream->stream);
+
+ soc_pcm_hw_update_rate(hw, stream);
+ soc_pcm_hw_update_chan(hw, stream);
+ soc_pcm_hw_update_format(hw, stream);
}
dpcm_runtime_merge_format(substream, runtime);