On Fri, Mar 16, 2012 at 09:00:12PM +0100, Lars-Peter Clausen wrote:
So I'm wondering if we can make it easier for userspace to detect that the constraints have changed and it may retry with other parameters? E.g. return a special error code in such a case.
I think an event would be better; userspace or possibly the in kernel core can turn it into an error code if it wants to but from a driver point of view the event seems simpler. If the drivers try to do an error code it has to keep track of which applications saw what and if they're affected by a given change which is more trouble than it's worth.
Though to be honest the race is almost always an application fighting with itself over bidirectional audio so practically the problem isn't often serious.