Re: [PATCH v3 06/19] ASoC: soc-core: add soc_unbind_dai_link()

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

 



Hi Takashi-san

> > @@ -1965,12 +1968,6 @@ static void soc_cleanup_card_resources(struct snd_soc_card *card)
> >  {
> >  	struct snd_soc_dai_link *link, *_link;
> >  
> > -	/* free the ALSA card at first; this syncs with pending operations */
> > -	if (card->snd_card) {
> > -		snd_card_free(card->snd_card);
> > -		card->snd_card = NULL;
> > -	}
> > -
> >  	/* remove and free each DAI */
> >  	soc_remove_link_dais(card);
> >  	soc_remove_link_components(card);
> > @@ -1988,6 +1985,11 @@ static void soc_cleanup_card_resources(struct snd_soc_card *card)
> >  	/* remove the card */
> >  	if (card->remove)
> >  		card->remove(card);
> > +
> > +	if (card->snd_card) {
> > +		snd_card_free(card->snd_card);
> > +		card->snd_card = NULL;
> > +	}
> 
> This will likely break unbind again; when unbind is performed in a
> busy state, the code may release still-in-use resources.  The rcar
> driver seems to have its own disconnect_sync() call so it'd work even
> with this change, but others wouldn't.
> 
> At least you need to call snd_card_disconnect_sync() at the first
> place, then release the rest at the second place.

Ahh, I didn't notice about busy state and async process.
Thank you for pointing it.

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