Commit 8facf84b authored by Peter Ujfalusi's avatar Peter Ujfalusi Committed by Mark Brown

ASoC: soc-topology: Move template info print soc_tplg_dapm_widget_create()

A DAPM widget now can have different types of controls, it is no longer
correct to print the type as it is just the type of the first control.

Move it after the loop where we create the controls and print the number
of the control types.
Signed-off-by: default avatarPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: default avatarKai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: default avatarGuennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Link: https://lore.kernel.org/r/20210902112301.22657-1-peter.ujfalusi@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 19843302
...@@ -1473,10 +1473,6 @@ static int soc_tplg_dapm_widget_create(struct soc_tplg *tplg, ...@@ -1473,10 +1473,6 @@ static int soc_tplg_dapm_widget_create(struct soc_tplg *tplg,
goto widget; goto widget;
} }
control_hdr = (struct snd_soc_tplg_ctl_hdr *)tplg->pos;
dev_dbg(tplg->dev, "ASoC: template %s has %d controls of type %x\n",
w->name, w->num_kcontrols, control_hdr->type);
template.num_kcontrols = le32_to_cpu(w->num_kcontrols); template.num_kcontrols = le32_to_cpu(w->num_kcontrols);
kc = devm_kcalloc(tplg->dev, le32_to_cpu(w->num_kcontrols), sizeof(*kc), GFP_KERNEL); kc = devm_kcalloc(tplg->dev, le32_to_cpu(w->num_kcontrols), sizeof(*kc), GFP_KERNEL);
if (!kc) if (!kc)
...@@ -1536,6 +1532,8 @@ static int soc_tplg_dapm_widget_create(struct soc_tplg *tplg, ...@@ -1536,6 +1532,8 @@ static int soc_tplg_dapm_widget_create(struct soc_tplg *tplg,
} }
template.kcontrol_news = kc; template.kcontrol_news = kc;
dev_dbg(tplg->dev, "ASoC: template %s with %d/%d/%d (mixer/enum/bytes) control\n",
w->name, mixer_count, enum_count, bytes_count);
widget: widget:
ret = soc_tplg_widget_load(tplg, &template, w); ret = soc_tplg_widget_load(tplg, &template, w);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment