Ticket #6670 (closed defect: fixed)
Userspace power manager needs to know about the audio device state
|Reported by:||cjb||Owned by:||pgf|
|Component:||kernel||Version:||Development source as of this date|
|Action Needed:||no action||Verified:||no|
|Deployments affected:||Blocked By:|
- is the audio device open?
- when (in epoch time, let's say) was the last time it was opened?
We need to avoid suspending in the "device is open" case and the "device was open case", for two different reasons:
- Suspending while audio is active often breaks audio on resume. This is #4247 and #6201.
- OHM currently doesn't avoid suspending when Record, Distance, eToys or the Totem plugin are busy with audio, because it doesn't know when those activities are currently using the mic/speakers. Distance, for example, opens the audio device briefly in its "continuous measurement" mode, but is idle when not doing that. The "when was the device last opened" will allow OHM to inhibit suspend for it.
A sysfs interface to the two variables would be perfect.