[alsa-devel] [PATCH] ASoC: SOF: intel: Fix probe error without i915 graphics

Takashi Iwai tiwai at suse.de
Mon Feb 17 14:55:13 CET 2020


On Mon, 17 Feb 2020 14:17:54 +0100,
Kai Vehmanen wrote:
> 
> Hey,
> 
> On Sun, 16 Feb 2020, Takashi Iwai wrote:
> 
> > @@ -200,6 +202,9 @@ int hda_codec_i915_exit(struct snd_sof_dev *sdev)
> >  	struct hdac_bus *bus = sof_to_bus(sdev);
> >  	int ret;
> >  
> > +	if (!bus->audio_component) /* not bound with i915 */
> > +		return 0;
> > +
> >  	hda_codec_i915_display_power(sdev, false);
> >  
> >  	ret = snd_hdac_i915_exit(bus);
> 
> hmm, actually found the issue in my patch. It turned out to be a bit 
> suprising issue with acomp&devres.
> 
>  snd_hdac_i915_exit() calls
>    -> snd_hdac_acomp_exit(), which again calls
>    -> component.c:component_master_del(dev, &hdac_component_master_ops);
>    -> component.c:take_down_master()
>    -> devres.c:devres_release_group(master->dev, NULL);
> 
> ...  now that is somewhat suprising. Basicly that goes on to release all 
> devres resources for the hdac_bus device (not just those related to 
> acomp!).

Does it really?  I thought it applies only to the group, and id=NULL
indicating that it's a local group that was created with id=NULL (by
address match).


Takashi

> 
> I can fix my immediate problem by not calling snd_hdac_i915_exit() if 
> hdac_bus contineus to be used, but I'm a bit worried we could hit this in 
> other flows.
> 
> Anyways, FYI at least for the list archives.
> 
> Br, Kai
> 


More information about the Alsa-devel mailing list