No, close callback is always after the hw_free callback. So, in hw_free callback, you just need to assure that hrtimer callback is finished (and/or cancel it). After that, you are free to work without considering hrtimer stuff. Here is my first attempt on that. The optimization you mention above is possible, but I haven't done it (yet). Because I think it will obscure
We don't drop pcm substream lock here because we don't need to acquire it. Why not? Because it is not recommended to use any more, or for some other reason? I mostly need the hrtimer callback to be protected from all
Hello. Takashi Iwai wrote: things. I can't really say if this code is better than before - it looks cleaner but adds 3 locks. the pcm callbacks, modulo the (IMO questionable) optimization. So why not would I just use the substream lock?