[alsa-devel] [PATCH v2 0/2] Add snd_card_disconnect_sync() helper

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Mon Oct 16 04:26:42 CEST 2017


Hi Takashi

> > I could confirm this by printing who's stop was called by local quick hack.
> > 
> > Maybe timing reason, if kernel has Oops for some reasons,
> > then, both BE/FE snd_pcm_stop() are called.
> > If no Oops, BE snd_pcm_stop() only called.
> 
> Any pending delayed work (like rtd->delayed_work)?
> This is flushed at soc_cleanup_card_resources(), but it's called at
> card removal, thus it's too late for the hot-removal of the
> component.

Current my dirver used delayed_work, but we can control it
by snd_soc_runtime_ignore_pmdown_time();
I think my driver now doesn't use delayed_work.

But there is still issue.
I don't know detail, but it seems 
snd_pcm_dev_disconnect() and snd_pcm_relase() are called
it the same time, both are calling snd_pcm_stop().

Then, snd_pcm_relase() side will calls
snd_pcm_detach_substream() and snd_pcm_dev_disconnect() side will die.

Mark's suggestion (= hiding BE) can solve this ?

Best regards
---
Kuninori Morimoto


More information about the Alsa-devel mailing list