[alsa-devel] [PATCH v2 resend 15/18] ASoC: soc-core: don't call snd_soc_dapm_new_dai_widgets() at snd_soc_register_dai()

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Tue Nov 5 05:20:37 CET 2019


Hi Ranjani

Thank you for your review

> > +struct snd_soc_dai *snd_soc_register_dai(struct snd_soc_component
> > *component,
> > +					 struct snd_soc_dai_driver
> > *dai_drv,
> > +					 bool legacy_dai_naming)
(snip)
> >  	lockdep_assert_held(&client_mutex);
> >  	dai = soc_add_dai(component, dai_drv, legacy_dai_naming);
> >  	if (!dai)
> > -		return -ENOMEM;
> > -
> > -	/*
> > -	 * Create the DAI widgets here. After adding DAIs, topology may
> > -	 * also add routes that need these widgets as source or sink.
> > -	 */
> > -	ret = snd_soc_dapm_new_dai_widgets(dapm, dai);
> > -	if (ret != 0) {
> > -		dev_err(component->dev,
> > -			"Failed to create DAI widgets %d\n", ret);
> > -	}
> > +		return NULL;
> >  
> > -	return ret;
> > +	return dai;
(snip)
> Maybe you could just say "return soc_add_dai(component, dai_drv,
> legacy_dai_naming);" here?

Yeah indeed :)
Thank you for pointing it.
Will fix in v3

Thank you for your help !!
Best regards
---
Kuninori Morimoto


More information about the Alsa-devel mailing list