#6670 BLOC 8.2.0 (: Userspace power manager needs to know about the audio device state (was: Userspace (OHM) needs to know about the audio device state)
Zarro Boogs per Child
bugtracker at laptop.org
Tue May 22 15:37:15 EDT 2012
#6670: Userspace power manager needs to know about the audio device state
---------------------------------+------------------------------------------
Reporter: cjb | Owner: pgf
Type: defect | Status: new
Priority: blocker | Milestone: 8.2.0 (was Update.2)
Component: kernel | Version:
Resolution: | Keywords:
Next_action: never set | Verified: 0
Deployment_affected: | Blockedby:
Blocking: |
---------------------------------+------------------------------------------
Changes (by pgf):
* cc: AlbertCahalan, dsaxena, dilinger (removed)
* cc: sascha_silbe (added)
* owner: cjb => pgf
Comment:
inotify is close, but not quite good enough. turns out data is most often
transferred to the device via ioctl(), and inotify won't track that.
it turns out that alsa does offer /proc/asound/card0/pcm0?/sub0/status ,
which contains a string that corresponds to the device state. in
particular "RUNNING" or "DRAINING" tell you that data is being played.
powerd now uses this, but it exposes issues in activities. some
activities (Scratch) send data to the device continuously, long after
noise is not being made. this is probably a squeak issue. others
(notably the TamTam family, Etoys) send data to the device the entire time
they're up, whether making noise or not, unless they lose window focus.
--
Ticket URL: <http://dev.laptop.org/ticket/6670#comment:8>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system
More information about the Bugs
mailing list