diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2019-03-20 13:55:27 +0900 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-03-21 14:51:30 +0000 |
commit | 686911b46fb5a08df142fe22b6c06dc6fbd3ba65 (patch) | |
tree | 8550290ea62ee05305b5bf446e76c87f690e0ea4 /sound/soc/generic/audio-graph-card.c | |
parent | f38df5bf0c9cb905fa9d5abc86c3a00128cdbba5 (diff) | |
download | linux-686911b46fb5a08df142fe22b6c06dc6fbd3ba65.tar.bz2 |
ASoC: simple-card-utils: share asoc_simple_shutdown()
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_shutdown() 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/audio-graph-card.c')
-rw-r--r-- | sound/soc/generic/audio-graph-card.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/sound/soc/generic/audio-graph-card.c b/sound/soc/generic/audio-graph-card.c index 29ae71b427ec..f3577b5bf14c 100644 --- a/sound/soc/generic/audio-graph-card.c +++ b/sound/soc/generic/audio-graph-card.c @@ -56,17 +56,6 @@ static const struct snd_soc_dapm_widget graph_dapm_widgets[] = { SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD), }; -static void graph_shutdown(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); - - asoc_simple_card_clk_disable(dai_props->cpu_dai); - - asoc_simple_card_clk_disable(dai_props->codec_dai); -} - static int graph_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { @@ -100,7 +89,7 @@ err: static const struct snd_soc_ops graph_ops = { .startup = asoc_simple_startup, - .shutdown = graph_shutdown, + .shutdown = asoc_simple_shutdown, .hw_params = graph_hw_params, }; |