diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2019-03-20 13:55:14 +0900 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-03-21 14:51:16 +0000 |
commit | f38df5bf0c9cb905fa9d5abc86c3a00128cdbba5 (patch) | |
tree | 651de1dc29cc69ba842f9dfb1b4e8fa430cb4c3d /sound/soc/generic/simple-card.c | |
parent | e59289cda8dec0153fa396864c8ba8092ec3b80d (diff) | |
download | linux-f38df5bf0c9cb905fa9d5abc86c3a00128cdbba5.tar.gz |
ASoC: simple-card-utils: share asoc_simple_startup()
The difference between simple-card / audio-graph are just using
OF graph style, or not. In other words, other things should be same.
This means, simple-card/audio-graph common functions should be
implemented at simple-card-utils, and its own functions should be
implemented at each files.
Current simple-card / audio-graph have almost same functions.
This patch shares asoc_simple_startup() between in these 2 drivers.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/generic/simple-card.c')
-rw-r--r-- | sound/soc/generic/simple-card.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index 628c19a3aaff..d0ea5736889e 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -26,25 +26,6 @@ struct link_info { #define CELL "#sound-dai-cells" #define PREFIX "simple-audio-card," -static int simple_startup(struct snd_pcm_substream *substream) -{ - struct snd_soc_pcm_runtime *rtd = substream->private_data; - struct asoc_simple_priv *priv = snd_soc_card_get_drvdata(rtd->card); - struct simple_dai_props *dai_props = - simple_priv_to_props(priv, rtd->num); - int ret; - - ret = asoc_simple_card_clk_enable(dai_props->cpu_dai); - if (ret) - return ret; - - ret = asoc_simple_card_clk_enable(dai_props->codec_dai); - if (ret) - asoc_simple_card_clk_disable(dai_props->cpu_dai); - - return ret; -} - static void simple_shutdown(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = substream->private_data; @@ -114,7 +95,7 @@ err: } static const struct snd_soc_ops simple_ops = { - .startup = simple_startup, + .startup = asoc_simple_startup, .shutdown = simple_shutdown, .hw_params = simple_hw_params, }; |