FS#4714 - Preset naming

Attached to Project: Rockbox
Opened by Anonymous Submitter - Thursday, 23 February 2006, 12:28 GMT
Last edited by Christi Scarborough (christi-s) - Sunday, 19 March 2006, 12:38 GMT
Task Type Bugs
Category FM Tuner
Status Closed
Assigned To No-one
Operating System Iriver H300 series
Severity Low
Priority Immediate
Reported Version
Due in Version Version 3.0
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


Many bugs together:

The radio seems to overload the processor, and then the selection of letters in the screen is too slow. (not properly a bug)

Sometimes, when one direction key is pressed (up, down, right, left), the program keeps repeating this key several times. And sometimes the repetition includes unpressed buttons.

When a letter is selected with NAVI, it is sometimes not inserted in the name. The only solution is then to restart the machine.
This task depends upon

Closed by  Bj√∂rn Stenberg (zagor)
Friday, 24 March 2006, 14:21 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in CVS.
Comment by Jonathan Gordon (jdgordon) - Thursday, 23 February 2006, 12:46 GMT
the radio sets the cpu to idle mode and (stupidly) doesnt reset it when a button is pressed... i fixed this in the radio wps patch, and ill up a patch with just this change soon (hopefully)..
if you want to fix this your self goto apps/recorder/radio.c and comment out the line cpu_idle_mode(true) (or something similar) in the radio_screen function
Comment by Javier Farreres (jfarreres) - Saturday, 25 February 2006, 17:02 GMT
Instead of posting a patch, I preferred to post here a reply with your suggested edition. Please, check if the file is properly changed. If you look for the string "#4714" you'll find the two lines commented out. One cpu_idle_mode(true) and one cpu_idle_mode(false). I see there is a switch(button) inside the while below the edited line, which controls the actions to be done with pressed buttons. I don't have the knowledge to judge if the edition is the adequate to correct the bug. Please, someone check.
   radio.c (37.3 KiB)
Comment by Jonathan Gordon (jdgordon) - Sunday, 26 February 2006, 00:19 GMT
ye, thats fine, just copy that over the current file and it will work fine...
there is actually a better way to do it, which is turning idle mode off when a button is pressed and then back on after a timeout with no button being presed but tis a bit more complicated, and not really nescacery
Comment by Javier Farreres (jfarreres) - Sunday, 26 February 2006, 08:06 GMT
Two things: shouldn't a patch be sent with the change? Should I put this edited file as a patch in the bug system or not? I am new with rockbox, I just know some C programming, but I am not the one to decide as I know nothing of rockbox internals.

About the solution you comment, I already considered it. This would be preferrable. In fact I am curious because inside the while you can find two if(search_dir) in sequence (is it redundant?). Perhaps the first one sets the radio freq and the second is the one detecting the button pressed. Is it inside the second if where cpu should be set to active? And then, after the switch below, more or less where you can see if (button != BUTTON_NONE) set it to idle mode? Or is it the other way around, idle mode before the switch and idel when button!=BUTTON_NONE? And well, about this timeout, I don't know how to detect it, sorry :(

So, should a patch be added or not? Will you do it along with several other changes?
Comment by Jonathan Gordon (jdgordon) - Sunday, 26 February 2006, 08:14 GMT
i dont like the radio code at all and have changed it.. but the higher powers havnt yet added that patch.. so we'll wait... ill sync it with the latest cvs and fix it upa bit and then nag them in irc again and we'll see what happens
Comment by Javier Farreres (jfarreres) - Sunday, 26 February 2006, 08:25 GMT
Let me suggest something. I am using the H300 optimized build from Needleboy. He has the policy of including everything worth being used for H300 even though it is not in the official build (it is in fact a paral.lel build for H300 until the official one supports H300 adequately). You could send him a note to include this code of yours so we can test it. I suppose you know about it:

Just an idea..
Comment by Manuel Dejonghe (limbus) - Tuesday, 28 February 2006, 11:30 GMT
Patch fixes it as well.

It bumps the cpu out of idle if a button is pressed and kicks it down to sleep two seconds after buttonpress again.
Comment by Manuel Dejonghe (limbus) - Wednesday, 08 March 2006, 01:28 GMT
As the patch 4745 is closed, this bug here is.