diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2019-03-20 07:56:06 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-03-21 17:52:11 +0300 |
commit | 629f75440a68220a78aef9d8569831824890c47d (patch) | |
tree | 2e3da33cd6f26f464ed3a48acbcfcba5432ba67f /sound/soc/generic/audio-graph-card.c | |
parent | ad934ca8010843482d61fda46786449a9bc99e10 (diff) | |
download | linux-629f75440a68220a78aef9d8569831824890c47d.tar.xz |
ASoC: simple-card-utils: share asoc_simple_be_hw_params_fixup()
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_be_hw_params_fixup() 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 b1ceefc60879..605126fb2810 100644 --- a/sound/soc/generic/audio-graph-card.c +++ b/sound/soc/generic/audio-graph-card.c @@ -62,17 +62,6 @@ static const struct snd_soc_ops graph_ops = { .hw_params = asoc_simple_hw_params, }; -static int graph_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, - struct snd_pcm_hw_params *params) -{ - 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_convert_fixup(&dai_props->adata, params); - - return 0; -} - static void graph_parse_convert(struct device *dev, struct device_node *ep, struct asoc_simple_card_data *adata) @@ -186,7 +175,7 @@ static int graph_dai_link_of_dpcm(struct asoc_simple_priv *priv, /* BE settings */ dai_link->no_pcm = 1; - dai_link->be_hw_params_fixup = graph_be_hw_params_fixup; + dai_link->be_hw_params_fixup = asoc_simple_be_hw_params_fixup; dai = dai_props->codec_dai = &priv->dais[li->dais++]; |