Skip to content

Commit

Permalink
ASoC: meson: switch to use c2c_params instead of params
Browse files Browse the repository at this point in the history
ASoC is now using c2c_params instead of params. This patch replace it.
num_c2c_params (was num_params) was not mandatory before,
but let's set it by this patch.

Signed-off-by: Kuninori Morimoto <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
morimoto authored and broonie committed Apr 5, 2023
1 parent a1cd7e8 commit 433f4a1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion sound/soc/meson/axg-card.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,8 @@ static int axg_card_add_link(struct snd_soc_card *card, struct device_node *np,
return ret;

if (axg_card_cpu_is_codec(dai_link->cpus->of_node)) {
dai_link->params = &codec_params;
dai_link->c2c_params = &codec_params;
dai_link->num_c2c_params = 1;
} else {
dai_link->no_pcm = 1;
snd_soc_dai_link_set_capabilities(dai_link);
Expand Down
3 changes: 2 additions & 1 deletion sound/soc/meson/gx-card.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ static int gx_card_add_link(struct snd_soc_card *card, struct device_node *np,

/* Or apply codec to codec params if necessary */
if (gx_card_cpu_identify(dai_link->cpus, "CODEC CTRL")) {
dai_link->params = &codec_params;
dai_link->c2c_params = &codec_params;
dai_link->num_c2c_params = 1;
} else {
dai_link->no_pcm = 1;
snd_soc_dai_link_set_capabilities(dai_link);
Expand Down
5 changes: 3 additions & 2 deletions sound/soc/meson/meson-codec-glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,14 @@ int meson_codec_glue_output_startup(struct snd_pcm_substream *substream,
if (!in_data)
return -ENODEV;

if (WARN_ON(!rtd->dai_link->params)) {
if (WARN_ON(!rtd->dai_link->c2c_params)) {
dev_warn(dai->dev, "codec2codec link expected\n");
return -EINVAL;
}

/* Replace link params with the input params */
rtd->dai_link->params = &in_data->params;
rtd->dai_link->c2c_params = &in_data->params;
rtd->dai_link->num_c2c_params = 1;

return snd_soc_runtime_set_dai_fmt(rtd, in_data->fmt);
}
Expand Down

0 comments on commit 433f4a1

Please sign in to comment.