Bug 16496 - Radio turns itself back ON after setting alarm close to current time
: Radio turns itself back ON after setting alarm close to current time
Status: REOPENED
Product: SB Radio
Classification: Unclassified
Component: Power Management
: Include FW version in comment
: PC Windows XP
: P1 normal (vote)
: 7.6.x
Assigned To: Felix Mueller
: factory_mp
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-09-01 09:13 UTC by Ryan
Modified: 2011-09-29 13:17 UTC (History)
6 users (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan 2010-09-01 09:13:14 UTC
Testing the new MSP430 code versio 1333  with FW 9023.

While powered either on battery or AC.,there are times when pressing the power button to turn off the unit the unit will not stay off.  It appears that if there is an alarm set that is very near to happening <2 min away the unit will wake up from OFF mode reboot and the alarm will come on. If the alarm is set for somewhat longer away (10 min) the unit will stay off.
I am not sure if this is a feature that is not completely working or bug that shouldn't happen.
Comment 1 Mickey Gee 2010-09-01 14:09:12 UTC
Do not include in MP build to Suzhou. Chris to review for general release.
Comment 2 Mickey Gee 2010-09-03 08:26:51 UTC
Although I've heard it's seen with previous firmware, this documents a new issue seen with MSP430 1333.
Comment 3 Mickey Gee 2010-09-03 08:30:50 UTC
The questions are:

1. If you press Power to turn it OFF, should it stay OFF?
2. If the Radio is on battery only, and it turns itself OFF to conserve power, should an alarm turn it back ON?
Comment 4 Alan Young 2010-09-03 10:16:02 UTC
In both cases an alarm (that was set prior to it being turned off) will turn it on. It comes on early so that it can send WOL to the server.
Comment 5 Ryan 2010-09-10 14:04:34 UTC
The behavior is the same in the released FW 9009 the unit won't stay off if there is an alarm in the near future.
Comment 6 Vahid Fereydouny 2010-09-10 14:22:48 UTC
I checked the code. If there is a source of power like external Battery or AC connected while the MSP430 is in low power mode and an alarm is expected, then the MSP430 tries to power up the Baby.
If the AC is not present to check the presence of the Battery then the i2c lines are checked as follows:

set_pin(2, 5, INPUT, 0, 0); /* turn on switch */
wait_ta1r(1000 * 32); /* wait one second */
if (are_i2c_lines_high())

This is done because while the iMX25 is powered off the information fetched related to Battery are not valid.
Comment 7 Vahid Fereydouny 2010-09-10 14:52:04 UTC
There are two cases: Manual off versus Unexpected power failure.
In case of a user manually powering off the Baby the Alarm due should not cause the Baby to boot up.
In case of unexpected power failure, the Baby should power up several minutes before the Alarm is due if AC power or battery is available
Comment 8 Chris Owens 2010-09-13 09:08:24 UTC
Why is this assigned to me?  From the user effects, I'm not sure it's very important.  Is there another reason to be fixing this bug?  Does it point to some issue with supercap charging, for instance?
Comment 9 Ryan 2010-09-14 13:18:04 UTC
I have discovered additional info on the power off conditions. Currently testing on fw 9089 and msp code 1351.

Press power for approx 3 sec and release as soon as you get to the goodbye screen. Then the unit goes into off mode and  will wake up for an alarm in the near furure as stated before.

If you press and hold the power button through the goodbye screen the goodbye screen will stay as long as the button is held. Once released the unit will be off. What is different is that it will not wake up for an alarm event as when you have just pressed power for only 3 seconds to power down.

This indicates that somehow there are two slightly different off states.
Comment 10 Vahid Fereydouny 2010-09-28 23:02:19 UTC
This is not considered as a showstopper. We deal with it later when time permits.
Comment 11 Vahid Fereydouny 2010-11-08 09:37:47 UTC
I can change the MSP430 so that if the user is powering off the Baby manually I can ignore the alarms setting inside the MSP430.
Comment 12 Vahid Fereydouny 2010-11-08 16:39:57 UTC
There are several scenario's for this bug:
1. If the Baby is powered off manually then the Alarm should not wake up the Baby. That includes power off on AC and Battery
2. If the Baby loses the power accidentally then the Baby should power on and ring the Alarm if that is feasible ( Having enough charge, etc )
3. If The Baby is running off the Battery and the system is inactive for 1/2 hour the Baby will power itself off. In that case if there is any alarm due then the Baby should power itself back on.
Since this bug is marked as P4, I suggest removing this from the MP release and moving the target to 7.6 .
Comment 13 Mickey Gee 2011-01-20 11:05:39 UTC
Desired behavior:

1. If unit is in standby, then alarm should sound
2. If unit not in standby and is OFF, then alarm should not sound
Comment 14 Bradley D. Wall 2011-08-02 09:30:45 UTC
This is back and is being reported on the Logitech forums. Please see thread.  

http://forums.logitech.com/t5/Squeezebox-Players/squeezebox-internetradio-software-update/td-p/655586
Comment 15 Mickey Gee 2011-08-02 14:35:24 UTC
Have 1 report from Logitech employee in Switzerland. Happening with Touch and Radio regularly -- you turn them off, and 1 hour later they're on again.
Comment 16 CatLogitech 2011-08-02 14:55:54 UTC
https://bugs-archive.lyrion.org/show_bug.cgi?id=17391

new Bug for 7.6 users since this seems like a different bug then the original
Comment 17 gman65 2011-08-04 03:08:56 UTC
radio will turn itself on hours after being turned off opening  to last station with no sound
Comment 18 Mickey Gee 2011-08-08 09:13:11 UTC
This bug is for the "immediately ON after just turned OFF issue."
Comment 19 Felix Mueller 2011-08-09 00:03:07 UTC
I think this bug was originally opened for the issue that a SB Radio which was shut down would start up again immediately - and not for the recent 7.6 issue where a soft off would return to NP screen again (either immediately or after a while).

I've tested the shutdown procedure (SB Radio 7.6.1 r9468) about 10 times and it always stayed shutdown as it should.
Comment 20 Andy Grundman 2011-08-09 05:27:19 UTC
Yeah I think this bug got some comments that were really meant for the other power-related bug.
Comment 21 Mickey Gee 2011-08-11 12:13:03 UTC
Straightened out the bug to unmorph it from original intent.
Comment 22 Felix Mueller 2011-09-29 12:00:36 UTC
Developers note: I did some testing and I can confirm that SB Radio turns itself on again immediately if it is shutdown manually and an alarm is set within about 5 minutes. If the alarm is further away, say 10 minutes, SB Radio stays off.

I suspect it has to do with the code dealing with SB Radio turning on itself a few minutes before the actual alarm in order to be able to send out a WOL packet to wake up SbS.

This code probably incorrectly takes precedence over the code deciding whether SB Radio shutdown itself automatically (battery operated but not playing) or has been shutdown manually.

I have not yet looked into the corresponding code (neither in SP nor MSP code) so I cannot say where it goes wrong.
Comment 23 Ben Klaas 2011-09-29 13:17:29 UTC
Felix, I think you are spot on with your assessment. I'm pretty sure Ryan and I came to the same conclusion a while back on this bug, and I'm not sure why there isn't already a comment describing that (actually, the comments on this bug are describing all kinds of unrelated stuff).