On Fri, 16 Nov 2001, Benny Sj�strand wrote: > > This should be done within the sound driver already. See > > drivers/sound/h3600-uda1341.c:h3600_audio_shutdown() which is called on the > > closing of the sound device and just before entering sleep mode through the > > pm callback in drivers/sound/sa1100-audio.c. > > > The problem is that h3600_audio_shutdown() is called only if you are a > playing a sound, so you need to have a MP3 player running to shutdown the > sound driver (-:) ), i've verfied this on the 2.4.13-ac4-rmk1, and i am > _sure_ .
It is called if: 1- you're playing something i.e. the sound device is opened and you enters sleep mode, or 2- the song ends and the sound device is closed. In all other cases the sound hardware is supposed to be in the unpowered state already thus not requiring any particular handling on sleep mode activation. > Other possible solution for the IPAQ H36xxx that came into my mind is to > set all EGPIO to low on suspend, and then on resume we restore all > EGPIO to the original state. This is far from being the best thing to do. Oh sure you'll fix, or should I say mask, the sleep mode power handling, but you'll completely miss appropriate power management for when the iPAQ is alive. Each specific drivers must be responsible for its power management. Performing a big hack at sleep activation is ugly and will only mask out the real design flaws in the driver code. The only exception could be the setting of default values in h3600_map_io() just in case no driver ever take over responsibility of a particular egpio or such (you'll see there are already initialisation of default GPIO values there). Nicolas _______________________________________________ http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm Please visit the above address for information on this list.
