Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Bugs
  • Category FM Tuner
  • Assigned To No-one
  • Operating System iPod 5G
  • Severity Low
  • Priority Very Low
  • Reported Version Release 3.4
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by tourist08 - 2010-05-13
Last edited by bertrik - 2011-04-17

FS#11266 - iPod FM Radio Remote

I´ve got still some bugs when using the original Apple Radio Remote

- The radio remote is only detected when plugging it in after rockbox has finished the booting process. And still then you have to refresh the main screen by going to an other menu to see the radio icon.

- When the Radio Remote is detected and your are listening to mp3 or radio, changing the volume by using the iPod wheel is no longer possible. The volume icon in wps is changing but without any effect. Changing the volume with the remote is still working.

- The radio screen shows RDS name and info, but there are shown only 7 characters. The RDS name should have 8 characters. This is the RDS standard and is used by the radio stations. I think the number of shown characters for the RDS info text could even be higher (64 characters).

I think since  FS#10853  Radio Screen Support has been completed, the elimination of the bugs becomes more important.

Closed by  bertrik
2011-04-17 09:45
Reason for closing:  Rejected
Additional comments about closing:   Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407

Fixing this bug needs cooperation of the original bug submitter, which is lacking in this case.

It also seems that the device has some type of volume internal own state.
Let’s try this:
- connect the remote so that it can work;
- set the volume using the remote control;
- change the volume using the target scroll wheel;
- now, if you change again the volume using the remote, the delta is applied to the old level set by the remote. You will feel a noticeable “step” in the volume level change.

torne commented on 2010-05-13 10:10

The volume issue is because the iPod dock connector exposes *line level* audio, and the radio remote has its own, totally independant volume control which it applies to that. All accessories which draw audio from the dock connector work this way - the volume control only ever applies to the headphone jack.

I understand.
Is it possible to apply the volume control to the dock connector when the ipod radio remote is connected?
Because in this case of using the radio remote a fixed line out is not useful in my opinion.

torne commented on 2010-05-13 10:42

No, that’s just how the hardware works. There is no way to control the volume that comes out of the dock pins in hardware. For Rockbox to be able to control the volume, we would have to prescale the digital audio in software before feeding it to the DAC, and then the remote’s volume control would *still* be separate.

If I had to guess, I would suspect that the Apple firmware *sends commands* to the remote, to tell *it* to turn the volume up and down, when you change the volume using the wheel… I could be wrong though.

I don´t think that it´s only hardware specific. Using the Apple firmware there is no fixed line out at the dock connector. For example using the apple docking station you can change the volume by using the scroll wheel.
Perhaps rockbox is going a completely other way. Nevertheless I think (hope) it should be possible to fix it.

I tested again the behaviour of the remote right now:
If I set the volume using the remote (for example -20 dB) and then try to change the volume by using the scroll wheel it´s only possible to lower and then raise the volume in between -60 dB and -90 dB.
The space in which the scroll wheel is changing the volume (-60 - -90 dB) is fix and does not depend on the volume setting by the remote.
If I have lowered the volume by the scroll wheel and then use volume buttons of the remote, the volume jumps back to level which was setted before.

torne commented on 2010-05-13 11:53

I just explained how it could work in the Apple firmware, while still being a fixed line out in hardware: the connection between the remote and the ipod is a two-way communication and it’s possible in theory for them *both* to control each other. I don’t know this for sure because I don’t have one, but as far as we know the line out *is* fixed. If you wanted to convince us otherwise, it’s easy: stick a multimeter on it and see if the level goes up and down :)

The bottom range of the volume, -60 to -90, is indeed implemented by prescaling the digital audio in software, which is why that works. The ipod’s hardware volume control only goes down to -60.

Another slightly strange behaviour happens when the remote is used as control, not as FM receiver.
When changing the volume, the back light doesn’t turn on, but when you skip to next or previous track or press play/pause, the back light is switched on.

My feeling is that the different events sent by the remote are managed at different level in the “stack” of drivers.
I don’t know the RB architecture, but I suppose that there is a sort of abstraction layer for the events received by the dock connector, one for the click wheel, one for the display, and so on. If this is quite right, it seems that the volume events are received directly by the DSP system, and the track control events are enqueued as if they arrived from the click wheel.
But it can’t be so, because with “Long play” on the remote while in stop, it doesn’t switch the target off… It might be funny for me to debug it, but my real life is calling…

Attached are a couple of patches to fix the RDS problem and to clean up the code a bit.

Fixes:
fmremote_rds.patch should fix the RDS displaying only 7 characters. I believe there is some misunderstanding by the original author about strlcpy: the third argument specifies the size of the destination buffer, not the amount of characters to copy. I’m not completely sure if my fix is correct because I don’t have any documentation for the fmremote radio protocol, I’m assuming here that the remote sends null-terminated RDS text.

Clean-ups:
fmremote_functions.patch cleans up global functions (making them static where possible)
fmremote_variables.patch cleans up global variables (making them static where possible) and fixes the type of some variables
fmremote_const makes byte arrays const where possible

Hans, please try if the RDS fix works. Also please try if the remote radio still works OK with the clean-up patches.
The patches can be applied with “patch -p0 <fmremote_XXX.patch”, don’t worry about warnings about Hunks getting applied with offset (as long as they succeed)

I have a new issue that should be added. When I go into the FM Tuner and choose a station, it is inaudible over the headphone socket in the iPod itself, but when I plug it in the Radio it is noisy (noise comes over headphones - not powered speakers) and extra noise cames in when keys are pressed on the Radio itself, when the screen scrolls the RDS data, and when the iPod wheel is touched. The audio itself is extremely faint. I bumped the volume to db 0 and even 6 and then the music over the radio can be heard. It is just fine when listened to, after recording and amplified (using the gain setting) 20 dband the vu meter underneath looks like it is receiving sound at a decent volume. Is there any way to give it the gain like in the original firmware for the first gen iPod Nano.

NOTE: Apparently the iPod Radio works on the first five nanos and the first gen video as well.

Has is been enabled for the iPod Video yet? In daily, recent, or release builds?

Please add any new/different issues in a separate task.

Three of the four patches I posted earlier have been applied already.
Attached is the fmremote_rds_v2.patch updated to current SVN.

Please test and report if the name is now indeed 8 characters long and if the 64-character radio text is now displayed correctly.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing