Since This->started was not set yet[...]
This doesn't make sense, there's a critical section.
You are right, this one patch is only needed for my lock-less code, which I'll not submit for now. Good catch.
(The minimal dueTime would benefit current code nevertheless, since critical section contention still requires the magnificient Linux scheduler to perform two more context switches until everything is ready. I've yet to write down the summary of my lock-contention tests. The result is not pretty, and my lock-less code significantly reduced underruns in mmdevapi/render/test_worst_case (aka. XA2 test).)
Regards, Jörg Höhle