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>
Tento commit je obsažen v:
@@ -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++];
|
||||
|
Odkázat v novém úkolu
Zablokovat Uživatele