ASoC: soc-pcm: add soc_get_playback_capture() and simplify soc_new_pcm()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Fri, 22 Jan 2021 01:13:38 +0000 (10:13 +0900)
committerMark Brown <broonie@kernel.org>
Wed, 3 Feb 2021 17:41:40 +0000 (17:41 +0000)
commit7fc6bebd5831a788a74e019e39c43c014a96a110
tree034c31c671a82ac41695db3c9f479079dba04276
parente04e7b8ccd4912e6c823bf7e66f302a53396fb77
ASoC: soc-pcm: add soc_get_playback_capture() and simplify soc_new_pcm()

soc_new_pcm() implementation is very long / verbose / complex,
thus, it is very difficult to read.
If we read it carefully, we can notice that it is consisted by

int soc_new_pcm(...)
{
(1) judging playback/caputre part
(2) creating the PCM part
(3) setup pcm/rtd part
}

This patch adds new soc_get_playback_capture() for (1) part
and offload it from soc_new_pcm().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/877do5aign.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-pcm.c