Hi Takashi-san, Mark
Thank you for your feedback
Then, snd_pcm_relase() side will calls snd_pcm_detach_substream() and snd_pcm_dev_disconnect() side will die.
This must be also specific to DPCM. Something is really wrong there.
Basically snd_pcm_dev_disconnect() and snd_pcm_release() can't race since both are protected via pcm->open_mutex. snd_pcm_stop() calls are protected even more with substream lock.
Mark's suggestion (= hiding BE) can solve this ?
Some of the issues might be addressed, yes, but I'm skeptical whether it covers all. The BE needs proper locking and refcounting that is coupled with the FE, I suppose.
So, this means, your helper patch seems OK, but DPCM side needs more hack.
Mark I'm happy to solve this issue, but I'm not good at DPCM. If you can give me some help/advice, I can debug it.
Best regards --- Kuninori Morimoto