#6670 BLOC Update.: Userspace (OHM) needs to know about the audio device state

Zarro Boogs per Child bugtracker at laptop.org
Fri Jun 20 18:03:02 EDT 2008


#6670: Userspace (OHM) needs to know about the audio device state
----------------------+-----------------------------------------------------
  Reporter:  cjb      |       Owner:  dilinger        
      Type:  defect   |      Status:  new             
  Priority:  blocker  |   Milestone:  Update.2 (8.2.0)
 Component:  kernel   |     Version:                  
Resolution:           |    Keywords:                  
  Verified:  0        |    Blocking:                  
 Blockedby:           |  
----------------------+-----------------------------------------------------

Comment(by dsaxena):

 Replying to [ticket:6670 cjb]:
 > Specifically:
 >
 >  * 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:
 >
 >  1. Suspending while audio is active often breaks audio on resume.  This
 is #4247 and #6201.
 >  2. 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.

 That sounds really ugly and like it could get out of control (needing
 sysfs for every device we want to keep track of). And it surely will not
 ever get accepted upstream.

 Can we just use inotify here? Just check for IN_ACCESS, IN_CLOSE_WRITE,
 and IN_CLOSE_NOWRITE events.

-- 
Ticket URL: <http://dev.laptop.org/ticket/6670#comment:5>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system


More information about the Bugs mailing list