Author: richard
Date: Fri Jan 16 11:45:51 2009
New Revision: 3863

URL: http://svn.slimdevices.com?rev=3863&root=Jive&view=rev
Log:
Bug: 10296
Description:
Fix a rebooting issue in jive 7.4 firmware, caused by a slow system clock when 
the cpu speed is 
reduced.


Modified:
    
7.4/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SqueezeboxJive/SqueezeboxJiveApplet.lua

Modified: 
7.4/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SqueezeboxJive/SqueezeboxJiveApplet.lua
URL: 
http://svn.slimdevices.com/7.4/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SqueezeboxJive/SqueezeboxJiveApplet.lua?rev=3863&root=Jive&r1=3862&r2=3863&view=diff
==============================================================================
--- 
7.4/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SqueezeboxJive/SqueezeboxJiveApplet.lua
 (original)
+++ 
7.4/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SqueezeboxJive/SqueezeboxJiveApplet.lua
 Fri Jan 16 11:45:51 2009
@@ -114,11 +114,14 @@
        self.watchdog = Watchdog:open()
        if self.watchdog then
                -- allow 30 seconds to boot
+               log:info("watchdog timeout 30")
                self.watchdog:setTimeout(30)
+
                local timer = Timer(2000, -- 2 seconds
                        function()
-                               -- 10 second when running
+                               -- allow 10 seconds after boot
                                if not self.watchdogRunning then
+                                       log:info("watchdog timeout 10")
                                        self.watchdog:setTimeout(10)
                                        self.watchdogRunning = true
                                end
@@ -585,6 +588,11 @@
        if self.powerState == "active" then
                self.powerTimer:restart()
        else
+               -- the system clock drifts in sleep mode, reset it
+               if self.powerState == "sleep" or self.powerState == "suspend" 
then
+                       os.execute("hwclock -s")
+               end
+
                self:setPowerState("active")
        end
 end
@@ -1058,6 +1066,15 @@
 
        fh:write(speed)
        fh:close()
+
+       -- the system clock runs slow in low power mode, so we need
+       -- to modify watchdog interval based on cpu speed
+       if self.watchdogRunning then
+               local timeout = fast and 10 or 30
+
+               log:info("watchdog timeout ", timeout)
+               self.watchdog:setTimeout(timeout)
+       end
 end
 
 

_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins

Reply via email to