Rockbox

Tasklist

FS#7515 - Radio disappears from menu!

Attached to Project: Rockbox
Opened by Daniel Rosenzweig (dzr) - Thursday, 02 August 2007, 01:32 GMT
Last edited by Nils Wallménius (nls) - Wednesday, 12 November 2008, 14:52 GMT
Task Type Bugs
Category Applications
Status Unconfirmed
Assigned To No-one
Operating System Sansa e200
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Version 3.1
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

Over the past month? the radio menu has been disappearing. When I reinstall the menu comes back and the radio works and the debug screen shows the radio.

When it re-initializes the DB, the radio disappears and the debug screen said that there's is no hardware.

If I manually deleted the DB files, the radio comes back...

A few other people on anythingbutipod forum have mentioned the same issue.

Still an issue August 1, 2007: r14133-070801
This task depends upon

Comment by Daniel Rosenzweig (dzr) - Thursday, 02 August 2007, 01:52 GMT
ok - let me take back that it's still an issue in today's build.. I need to test some more and then
either confirm or request that this bug report be closed.

I tested the other bug reports again before reporting that they're still an issue.. For some reason,
I forgot to test this one today and tested it afterwards.

It was definately in the official build the past few weeks.
Note, it doesn't consistantly disappear upon first database initialization. I have yet to find a pattern.
Comment by Daniel Rosenzweig (dzr) - Thursday, 02 August 2007, 02:09 GMT
ok - after another couple of DB refreshes and reboots, the FM Radio menu is gone again.
Again, I'm not really sure what's triggering this issue.


So:
Still an issue August 1, 2007: r14133-070801 is true!
Comment by Stephane (Icefire) - Saturday, 01 September 2007, 02:04 GMT
Mine done it yesterday after some Themes tryout, it disapeared and needed to reinstall RockBox.
Comment by Jonathan Gordon (jdgordon) - Sunday, 02 September 2007, 02:02 GMT
Just tried this on my dads sansa (mine doesnt have radio), and couldnt reproduce it..
when it disappears, does the fm debug screen show the radio hardware?
Comment by Michael Sevakis (MikeS) - Sunday, 02 September 2007, 05:17 GMT
That's weird because once the radio is detected the first time, the "present" flag should be permanently set for the session.
Comment by Daniel Rosenzweig (dzr) - Sunday, 02 September 2007, 17:14 GMT
When it disappears, it is listed as hardware not available, in the debug radio hardware screen.
Over time, the radio just comes and goes, even with the same build, without reinstallation. (I do have auto database initialization, and I
add new files every day, so if it does have
anything to do with that, that could be why mine comes and goes)
Comment by Jonathan Gordon (jdgordon) - Sunday, 02 September 2007, 23:43 GMT
sonus more like a dodgey hardware connection than anything else...
Comment by Michael Sevakis (MikeS) - Sunday, 02 September 2007, 23:59 GMT
Not, to me. it sounds like a bug. In working with threading something came up that makes me suspect hidden stack overflows. I haven't yet checked if shutting down the database affects this (it was on with auto update). Way off topic to describe in detail here but stack usage was found on a stack that shouldn't have yet been used at all. One key thing I want straight here is: does the radio present status ever change within the same rockbox session or only after a restart? I also haven't determined if that really matters to this bug but I think database would be most demanding of stack while updating something.
Comment by Daniel Rosenzweig (dzr) - Monday, 03 September 2007, 00:36 GMT
Yah, I"m not sure when the present status changes... at this point it's on again off again and I don't use the radio much... I never remember what I did or didn't do prior to the status change.

There are a number of us on the Anything But Ipod forum who have the same issue. It started a few months ago already.
Comment by Tonismar (Kroiner) - Tuesday, 04 September 2007, 17:03 GMT
I have a Sandisk Sansa e250 and this is occurring with me also every the database is updated.
Comment by Jonathan Gordon (jdgordon) - Monday, 21 April 2008, 14:33 GMT
is this still occuring?
Comment by Tonismar (Kroiner) - Monday, 21 April 2008, 15:39 GMT
Yes. Usually when i add files and the database is reloaded.
Comment by Chris Dow (taliesin1077) - Tuesday, 22 April 2008, 18:20 GMT
I thought I'd add that I didn't have Auto-Update enabled, and FM Radio just totally disappeared on my Sansa e250 as well after the first boot. It could have been that I initialized and updated the Database manually, but it won't come back. On my device, it's not that auto-update is causing problems. Mine has never been turned on.
Comment by Marc Guay (Marc_Guay) - Tuesday, 22 April 2008, 18:33 GMT
Is it possible that the original firmware version could have anything to do with this? It seems odd to me that duplicate hardware with duplicate versions of Rockbox could be producing different outcomes. I have never experienced this bug on my e200 using v1.02.18A.
Comment by Chris Dow (taliesin1077) - Tuesday, 22 April 2008, 18:42 GMT
Well, we could post the OF versions we're using.

I am using OF version 01.02.18J
Comment by Ivan Z (zivan56) - Wednesday, 23 April 2008, 19:23 GMT
I guess this has probably been tried, but what about setting FM_CLK_DELAY to 2?
Comment by Chris Dow (taliesin1077) - Thursday, 24 April 2008, 04:25 GMT
I have no idea how to set that FM_CLK_DELAY thing. I'm assuming it's a line in the source.

I am now using OF version 01.02.18A on my e250, and it's still doing the same thing. After screwing around with trying to get newer versions of the firmware installed, reinstalling the bootloader, etc, I was able to see the FM Radio option on the main menu. When I rebooted, the option was gone.

As of right now, I still have to boot into the OF to get Radio. It's workable, but not optimal. Is there anything else I can provide to the knowledgeable people on this task? I can take my device apart....give model numbers, serial numbers, printed chip designations... lol. I'm not much of a programmer, but I can provide any information I have.
Comment by Chris Dow (taliesin1077) - Friday, 06 June 2008, 15:54 GMT
Just a quick bump to remind people that this is still occurring. FM Tuner is available when I first install it, but when I turn it off and back on again, the Tuner is gone, and never comes back, from what I can tell.

Is there any further information I can provide to help anyone?
Comment by Justin Hannigan (Chronon) - Wednesday, 09 July 2008, 16:30 GMT
Someone posted some information on the forums that may be helpful for this issue. It looks like he never got around to posting it here. . .

http://forums.rockbox.org/index.php?topic=16538.15
==========
jonnyapple wrote:
Here's a workaround that worked for me and seems to be slightly less annoying than booting into the Sansa firmware when you want radio:
Set Settings>General Settings>System>Start Screen to 'FM Radio.'
The radio comes on every time you turn on the player, but then at least it's on the menu and stays there for me.
----------
enginerd wrote:
Only tried a couple of times but has worked so far.


UPDATE:
Well this morning it didnt work Sad

It went to the screen to start playing FM, but no sound checked the debug and No Hardware.

Well back to the OF


UPDATE 2:
After playing around with it for awhile i have noticed that FM is always present after the USB unplug system restart. Even if nothing is changed on the system... no new files no update nothing just unplug usb... system restart .... ta da FM
=======================

It seems like a compelling lead, anyway. Hope this helps. . .
Comment by Chris Dow (taliesin1077) - Wednesday, 09 July 2008, 17:57 GMT
I just noticed that Marc changed this to "Due in version 3.0". What does this mean? There's a fix, and it'll be implemented in version3?

I can confirm that the FM Radio DOES return after I unplug from USB and the OF restarts into Rockbox. Power cycle again, and POOF, FM Radio is gone again.
Comment by Marc Guay (Marc_Guay) - Wednesday, 09 July 2008, 21:35 GMT
Chris, "Due in version 3.0" simply means that this is something that should either be fixed by the time of a release or documented as a known bug of importance.
Comment by Bertrik Sikken (bertrik) - Saturday, 02 August 2008, 19:01 GMT
I looked a bit through the radio code, especially the startup/detection sequence. The sequence is as follows:
* function radio_hardware_present eventually calls lv24020lp_get(RADIO_PRESENT)
* this calls tuner_power(true) which does some target-specific initialisation, which then calls lv24020lp_power(true)
* lpv24020lp_power reads the chip identification register once, makes a decision based on this value and caches the result for further calls

Here's my review for possible problems:
1) the tuner_power function for sansa c200/e200 has a comment about a "mystery amplification device". I think this needs clarification, is it really for amplification or does it control some kind of power switch to turn on the radio chip?
2) in case the mystery amplification device is actually something to turn the power to the radio chip on or off, the following udelay of 5 microseconds seems a bit short.
3) for e200, only GPO32_ENABLE is configured, which I interpret as configuring a specific pin as GPIO, but not defining the pin's direction or value yet. Wouldn't we also need to set the GPIO direction and output value?
4) the chip's datasheet mentions a minimum timing of 0.75 us for most parameters and the currently used delay of 1 us seems safe, but I think udelay(1) may actually provide a delay that can be shorter than that. The udelay function is based on a microsecond counter in the PP50xx and is defined in system-target.h. The current implementation of udelay(1) delays execution until the microsecond counter has changed from x to x+1 (or higher). So when the microsecond counter is just about to increase from x to x+1, the resulting delay may be considerably shorter than 1 microsecond. There will be some overhead from the code that makes the delays a bit longer again, but it's not guaranteed.
5) is the proper register block selected when reading the chip identification register? It looks like it does, but it's not immediately obvious.

I think FM_CLK_DELAY should at least be increased from 1 to 2.

To properly tackle this problem, I think we first need a good reproduction recipe. We could for example reduce the udelay(5) after "mystery amplification device" to see if it increases the likelihood of the bug (or even if it results in the same kind of bug at all). Maybe timing can be influenced by temperature like cooling it in a freezer (probably avoid freezing the battery) to see if it gets better or worse. We could also show the chip identification value in the debug menu (e.g. to see if it's completely wrong or just slightly wrong).
Comment by Bertrik Sikken (bertrik) - Sunday, 03 August 2008, 12:56 GMT
After looking a bit closer, most issues seem quite harmless:
1) I tried disabling the mystery amplification device on my c200 and it just disables sound from the radio, the radio itself is still detected. So it's not a kind of power-switch to the radio chip itself.
2) Removed the 5 microsecond udelay and it didn't seem to affect radio detection.
3) As the name suggests, GPO is for general-purpose _output_ pins, so the direction probably does not need to be set. The pin output value is already set to low in system-pp502x.c (function system_init).
4) udelay(1) is still a suspect, although 750 ns is not such a long time (just 18 ticks at 24 MHz)
5) I think this works as expected too (properly switching the register block to 1 before reading the chip id registers, since it boots up with register block initialised to 0).
Comment by Gareth (Mystic_kitsune) - Friday, 05 September 2008, 00:05 GMT
umm, i think its *GPIO* not GPO, which means the direction would have to be set, right?
Comment by Johannes Linke (Jaykay) - Friday, 30 January 2009, 20:46 GMT
according to  FS#9839  this is still valid.
Comment by John T. (zbirdman) - Friday, 29 May 2009, 19:31 GMT
My Sansa e260 still exhibits this behavior, even with RB v3.2. Can't count on the FM Radio unless I'm in the OF. So... bump. :-)
Comment by Randy J. (rdjenter) - Sunday, 26 July 2009, 15:28 GMT
I just purchased a Sansa e250 for a gift with the same issue - FM Radio isn't available in the menu unless you boot from a USB unplug or from the original firmware. In the original firmware the FM radio always works. This is specific to the Rockbox firmware only. Original firmware version is 01.02.18A. I am using Rockbox version 3.3. For comparison I own a Sansa e260 running original firmware 01.02.24A on the same Rockbox install version 3.3 without any issues. I purchased the e260 in 4/2008 and have run Rockbox on it since version 3.1.
Comment by Randy J. (rdjenter) - Sunday, 26 July 2009, 18:05 GMT
Just to eliminate one more possibility that the newer original firmware (O/F) had modified someother internal IC code I flashed the e250 to the same O/F version as the e260 (01.01.24A). No difference (I was 99.9% sure there wouldn't be). As a Test Engineer I believe Bertrik is on the right track. This has all of the indications of a timing issue. If the FM hardware is detected at bootup it works for the rest of the session. It's detection is very sporadic in Rockbox. It appears to be right on the edge of a hardware ready to detect phase. Perhaps a conditional do_while loop could delay (x) period of time and recheck the hardware presence for (x) attempts before proceeding. Let me know if I can help in field testing this issue. I am supposed to present the gift on 8/1/2009. It would be nice to resolve it before then.
Comment by MichaelGiacomelli (saratoga) - Friday, 13 April 2012, 19:16 GMT
I'm pretty sure the e200v1 radio problems have been sorted out. Does anyone actually have this problem still?
Comment by Bill Newman (StogieB) - Friday, 17 August 2012, 10:02 GMT
I just installed Rockbox Version: 3.11.2 on my e250 and the problem is still there pretty much the way it was four years ago. Where does your optimism come from saratoga? Has there been progress not reported here?
I get the FM Radio when I boot by unplugging the USB. I can also get it by forcing the original firmware (with the |<< key) and then powering off and on--quickly. This brings up Rockbox with the FM Radio. It's like, if the FM chip is still "warm" ("charged up"?) Rockbox sees it but if it's "cold" Rockbox gives up too early and declares it dead.
Comment by Boxbot (boxbot) - Saturday, 13 July 2013, 05:09 GMT
Agreeing with StogieB. Just fresh installed Rockbox on an old v1 c250 with FM radio, empty database with no music. FM radio did not show up at all until I booted into the firmware, activated the radio, then quickly rebooted into Rockbox. It's showing up now, but we'll see for how long.

Loading...