mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 06:31:58 +02:00
ASoC: SOF: topology: Parse the dapm_widget_tokens in case of DSPless mode
Parsing the dapm_widget_tokens is also needed for DSPless mode as it is setting the snd_soc_dapm_widget.no_wname_in_kcontrol_name flag for the kcontrol creation from DAPM widgets. Without that flag set, the following warnings might appear because of long control names: ALSA: Control name 'eqiir.2.1 Post Mixer Analog Playback IIR Eq bytes' truncated to 'eqiir.2.1 Post Mixer Analog Playback IIR Eq' ALSA: Control name 'eqfir.2.1 Post Mixer Analog Playback FIR Eq bytes' truncated to 'eqfir.2.1 Post Mixer Analog Playback FIR Eq' ALSA: Control name 'drc.2.1 Post Mixer Analog Playback DRC bytes' truncated to 'drc.2.1 Post Mixer Analog Playback DRC byte' ALSA: Control name 'drc.2.1 Post Mixer Analog Playback DRC switch' truncated to 'drc.2.1 Post Mixer Analog Playback DRC swit' ALSA: Control name 'gain.15.1 Pre Mixer Deepbuffer HDA Analog Volume' truncated to 'gain.15.1 Pre Mixer Deepbuffer HDA Analog V' Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://patch.msgid.link/20250619102640.12068-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
2710204bf1
commit
6b3cb7f434
|
|
@ -2378,14 +2378,25 @@ static int sof_dspless_widget_ready(struct snd_soc_component *scomp, int index,
|
|||
struct snd_soc_dapm_widget *w,
|
||||
struct snd_soc_tplg_dapm_widget *tw)
|
||||
{
|
||||
struct snd_soc_tplg_private *priv = &tw->priv;
|
||||
int ret;
|
||||
|
||||
/* for snd_soc_dapm_widget.no_wname_in_kcontrol_name */
|
||||
ret = sof_parse_tokens(scomp, w, dapm_widget_tokens,
|
||||
ARRAY_SIZE(dapm_widget_tokens),
|
||||
priv->array, le32_to_cpu(priv->size));
|
||||
if (ret < 0) {
|
||||
dev_err(scomp->dev, "failed to parse dapm widget tokens for %s\n",
|
||||
w->name);
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (WIDGET_IS_DAI(w->id)) {
|
||||
static const struct sof_topology_token dai_tokens[] = {
|
||||
{SOF_TKN_DAI_TYPE, SND_SOC_TPLG_TUPLE_TYPE_STRING, get_token_dai_type, 0}};
|
||||
struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(scomp);
|
||||
struct snd_soc_tplg_private *priv = &tw->priv;
|
||||
struct snd_sof_widget *swidget;
|
||||
struct snd_sof_dai *sdai;
|
||||
int ret;
|
||||
|
||||
swidget = kzalloc(sizeof(*swidget), GFP_KERNEL);
|
||||
if (!swidget)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user