Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: [jmcneill-pm] src/sys



Module Name:    src
Committed By:   jmcneill
Date:           Thu Oct 18 02:07:24 UTC 2007

Modified Files:
        src/sys/dev [jmcneill-pm]: audio.c audiovar.h
        src/sys/kern [jmcneill-pm]: init_main.c kern_pnp.c
        src/sys/sys [jmcneill-pm]: pnp.h

Log Message:
Improve PNP audio power management. Instead of starting an idle timer
to power down the audio device on last close, allow the pm policy to
power down the device while it's still open.

Since X mixers typically poll /dev/mixer with AUDIO_GET_INFO ioctls, we need
to avoid resetting the idle timer when these applications are running. As a
result, introduce audio_mixer_{capture,restore} in MI audio and use them in
its power handler. When an audio device is asleep, we simply return cached
values on AUDIO_GET_INFO ioctls. A nice side effect is that MI audio now
properly captures and restores mixer values across hw device suspend/resume.

XXX: I've added locking in pnp_power(), but I'm using mutex_owned() in
a way that mutex(9) claims I shouldn't be doing. Needs to be revisited.


To generate a diff of this commit:
cvs rdiff -r1.222.6.4 -r1.222.6.5 src/sys/dev/audio.c
cvs rdiff -r1.39.16.1 -r1.39.16.2 src/sys/dev/audiovar.h
cvs rdiff -r1.311.4.3 -r1.311.4.4 src/sys/kern/init_main.c
cvs rdiff -r1.1.2.8 -r1.1.2.9 src/sys/kern/kern_pnp.c
cvs rdiff -r1.1.2.3 -r1.1.2.4 src/sys/sys/pnp.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index