diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2023-06-01 02:42:49 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-06-06 17:57:31 +0200 |
commit | 1c943f60e830d0b959c765df09d4c4b254de0481 (patch) | |
tree | e1b38e3ffa76b4901d3149afd89ffb9b6c9484a3 /sound/soc/soc-pcm.c | |
parent | ASoC: soc.h: remove snd_soc_compr_ops :: trigger (diff) | |
download | linux-1c943f60e830d0b959c765df09d4c4b254de0481.tar.xz linux-1c943f60e830d0b959c765df09d4c4b254de0481.zip |
ASoC: add snd_soc_get_stream_cpu()
We are using get_stream_cpu() to get CPU stream which cares
Codec2Codec. But it is static function for now, and we want to use it
from other files. This patch makes it global function.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87fs7cj9mf.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.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index fc0817dd0d83..799865a6eb56 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -2781,10 +2781,8 @@ static int soc_get_playback_capture(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *codec_dai; /* Adapt stream for codec2codec links */ - int cpu_capture = dai_link->c2c_params ? - SNDRV_PCM_STREAM_PLAYBACK : SNDRV_PCM_STREAM_CAPTURE; - int cpu_playback = dai_link->c2c_params ? - SNDRV_PCM_STREAM_CAPTURE : SNDRV_PCM_STREAM_PLAYBACK; + int cpu_capture = snd_soc_get_stream_cpu(dai_link, SNDRV_PCM_STREAM_CAPTURE); + int cpu_playback = snd_soc_get_stream_cpu(dai_link, SNDRV_PCM_STREAM_PLAYBACK); for_each_rtd_codec_dais(rtd, i, codec_dai) { if (dai_link->num_cpus == 1) { |