• Status Closed
  • Percent Complete
  • Task Type Patches
  • Category
  • Assigned To No-one
  • Operating System
  • Severity Low
  • Priority Very Low
  • Reported Version
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by ahellmann - 2005-07-31
Last edited by ahellmann - 2005-08-21

FS#2608 - FM menu for iriver models and simulators

FM menu for iriver models and simulators

!! Do not expect to get sound output from this patch !!

But it includes the following:
- simulate FM on iriver target and SW simulators
- dummy functions for fm_radio_i2c_read/write()
(SH7034 only)
- screen: centered text (independent of font size)
- screen: bounding box (iriver only)
- automatically adding stations on opening the preset
- extended radio menu (freeze mode / peekmeter on/off /
tuning method)
- button handling changed (left/right: tune prev/next
station + other changes)
- sound off after radio exit
- minor other changes
- slightly smaller codesize on archos

To be done
- use language strings
- clock update in FM screen on RTC targets

In addition this patch includes two bug fixes (and
hopefully does not introduce new ones):
1.radio_load_presets(): if preset list includes >32
stations the SW crashed
2.status_draw(): updated every 0.5 sec because 'struct
status_info info' was not 'static'

I zipped the patch file and added the modified files +
screen shot, because for me 'patch < patchfile' does not
work (cygwin version 2.5.8)

Enjoy :-)

Closed by  bger
2006-03-26 13:08
Reason for closing:  Out of Date
Anonymous Submitter commented on 2005-08-01 11:55
patch < patchfile
try adding "-p0", so this becomes "patch -p0 < patchfile". HTH!

Could you perhaps update this?

After FM is implemented on iriver, this patch is probably
more useful.

It's a bit unclear to me from your description how much this
touches radio on archos targets?

Also, what do you mean by "sound off after radio exit"? It
should still be possible to exit the radio screen without
shutting off radio (to allow running plugins, changing
settings etc.)

Anonymous Submitter commented on 2005-08-17 05:21

OK, I will update this patch . I will modify in the way, that it is
more compatible to the current key bindings. Thanks for your

Just dump the simulator fixes - Linus fixed that already.

Project Manager

I have reviewed the patch, and I have some comments:

1) Why did you remove the possibility to keep playing when
you exit the FM screen?

2) Why did you remove the possibility to add a preset?

3) You can't use constant strings for the texts, you must
add them to the language file.

4) Why did you change the update rate to not use the peak
meter frame rate?

5) I personally don't like changing presets with left/right,
and I'm sure many Rockbox users wouldn't want the interface
to change like that.

Linus, thanks for your review!

Here my comments on your comments/questions:
1) "Keep playing" on exit removed
OK, I was wrong. Both "stop sound" and "keep playing"
should be supported.

2) "Add Preset" removed
With current handling up to 3 steps (on ondio) are necessary
to add a station, and there are no obvious keys on ondio and
iriver to perform this task with one key.
My solution automatically adds the station to the preset list
(if not already there). I did not think of the possibility that
people would like to use the "station select" menu when they
can zap from one to the next station with left/right key. So I
kind of misused the opening of preset station menu for "Add
to Presets" purpose.

3) Strings must go to the language file.
The patch was only ment as a first proposal. If it would have
the chance to make its way into cvs of cause I would move
the strings into the language file.

4) Why did you change the update rate to not use the peak
meter frame rate?
Because the peakmeter often disturbs the radio reception on
ondio and fm/recorder.
The less screen manipulation the less disturbance. (My
preference is: no peakmeter)
In my patch the screen is naturally 'quit' if peakmeter is
switched off (except time update).
No need for 'screen freeze' option anymore.

5) Changing presets with left/right?
Because I started rockbox with an Ondio, my very first private
patch changed the preset selection to left/right. OK on the
other devices it is easier to select. But this is one of the two
main features my patch has: preset selection and x-/y-
centered text. All other things can be discussed,
but these two I personally like very much.

For all readers: Please let me know your opinions on
following features:
- x-/y-centered text with respect to status- and button-bar
- preset selection with left/right for the lazy ones like me
(instead of manual scan)
- manual scan with a "ManualTuning" yes/no option
- "Peakmeter" yes/no option
- default station 'names' (ex. '100.2' - again for the lazy ones)
- remove "screen freeze" option (because already virtually
frozen in my patch, except time update)
- peakmeter off by default
- optional background image ('radio_bg.bmp', black bounding
box as a first step)
- if I get it to work: wav recording functionality on the iriver
record button

Project Manager

2) I understand that it might be better for Ondio users, but
I would like the original interface for the other models.

3) Sure. The problem is that it has less chance of making it
into CVS if it isn't complete.

4) I'm with you regarding the peak meter. I don't want it
either. The "screen freeze" is just a lame hack to test if
the lcd updates is the problem. However, there might be a
better solution, by slowing down the LCD transfers in the
LCD driver.

5) I can probably live with the left/right preset switching,
as long as the preset list is there as well. Then I can
leave it in manual tuning mode and select presets from the
list. This will probably not work on the Ondio, but that's life.

BTW, if we add your patch, we will also need your full name
for the credits.

I updated the fmradio patch to support radio sound. The main
differences to current software are listed below:
- iriver: preset options support on play button
- iriver: exit with sound: on long press to off button
- 'add preset' handling modified (as preset list select option)
- freeze option removed
- philips tuner station detection slightly improved
- x-/y-centered text
- peak meter off by default
- preset selection with left/right or via menu

Forgot, to check the upload button last time. :-)

Antonius Hellmann
Project Manager

I haven't had the time to review it yet, but using a long
OFF press to exit the FM screen with sound is a really bad
idea, since a long OFF is used to turn the iriver off.

I think it should use the same button as when leaving the
WPS (joystick push).

Again: I need your real name for the credits.

Use "long play" instead of "long off" for radio exit with sound

This update includes a bugfix in my code and code size
- load presets only once after power on
- code size optimizations


Available keyboard shortcuts


Task Details

Task Editing