Re: [PATCH 19/21] ASoC: soc-core: call snd_soc_register_dai() from snd_soc_register_dais()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Pierre-Louis

> > @@ -2610,14 +2610,17 @@ struct snd_soc_dai *snd_soc_register_dai(struct snd_soc_component *component,
> >   					 struct snd_soc_dai_driver *dai_drv,
> >   					 bool legacy_dai_naming)
> >   {
> > +	struct device *dev = component->dev;
> >   	struct snd_soc_dai *dai;
> >   -	if (dai_drv->dobj.type != SND_SOC_DOBJ_PCM) {
> > -		dev_err(component->dev, "Invalid dai type %d\n",
> > -			dai_drv->dobj.type);
> > +	if (dai_drv->dobj.type &&
> > +	    dai_drv->dobj.type != SND_SOC_DOBJ_PCM) {
> > +		dev_err(dev, "Invalid dai type %d\n", dai_drv->dobj.type);
> >   		return NULL;
> >   	}
> 
> this block of code is removed in patch 20, so do we need the
> modification here?

Yes, it will be removed 20, but it is still exist until then.
Because of this patch 19, snd_soc_register_dai() is called
from soc-core which doesn't have dobj.type.
Without this modification, *all* sound will get error, unfortunately.

Or apply 20 first, 19 next can be more simple patch.

Thank you for your help !!
Best regards
---
Kuninori Morimoto
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux