This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#12370 - RDS support for Si4701/Si4703 (Sansa Clip Zip proof-of-concept)
Attached to Project:
Rockbox
Opened by Bertrik Sikken (bertrik) - Sunday, 06 November 2011, 13:15 GMT+2
Last edited by Bertrik Sikken (bertrik) - Friday, 30 December 2011, 01:01 GMT+2
Opened by Bertrik Sikken (bertrik) - Sunday, 06 November 2011, 13:15 GMT+2
Last edited by Bertrik Sikken (bertrik) - Friday, 30 December 2011, 01:01 GMT+2
|
DetailsAttached patch is a proof-of-concept for RDS support for Si4701/Si4703 FM tuners. This makes the RDS station name (8 chars) and the "RadioText" (64 chars max.) show up in the WFMS on the sansa clip zip.
This is done as follows: * The si4700 fm tuner driver is extended with functionality to attach an interrupt to the RDS-ready GPIO of the si4701/3. This interrupt wakes up a thread that reads the RDS payload from the tuner chip and calls an RDS parser to extract the relevant info. This extension is target-specific. * A basic RDS parser is added. It aggregates the separate RDS packets into complete RDS messages and keeps a copy of the most recent valid messages. This module is designed to be hardware/target-independent. Stuff that needs to be done: * #ifdef the target-specific stuff in the si4700 driver * #ifdef HAVE_RDS_CAP the RDS-specifc stuff * Somehow the WFMS shows the most recent RDS info only after pressing a button * There are now two threads accessing the si4700 hardware: the ui thread through the tuner_get() call, and the rds thread when responding to an RDS event from the si4700. |
This task depends upon
Closed by Bertrik Sikken (bertrik)
Friday, 30 December 2011, 01:01 GMT+2
Reason for closing: Accepted
Additional comments about closing: Latest patch from this task has been committed.
Friday, 30 December 2011, 01:01 GMT+2
Reason for closing: Accepted
Additional comments about closing: Latest patch from this task has been committed.
What's odd is 4701 isn't supposed to have RDS according to the docs that I obtained but it works anyway. Go figure!
EDIT: Missed discarding a return point and left the mutex locked in si4700_set. Replaced attachment.
@amaury: Are you saying verbose mode is obligatory (needed to read the bits)? I thought it would not pull the line low unless it had a valid packet. I did try that technique and still had errors anyway.
Could there be a standards difference here in the US/Canada region from where you're at? For basic info, I seem to get alot of nonsense or parts of radio text as they arrive.
RDS should probably clear itself periodically or it can get stale if nothing new arrives for awhile (bad reception after good reception for one).
* correct reset of the rds parser at rds_reset (more thorough)
* simplify the mutexes in si4700 a bit, add a mutex for rds_radio_event
* disable RDS before powering down the tuner (errata for si4703 C19)
* simplify si4700_detect a bit
* add #ifdef HAVE_RDS_CAP around the rds specific bits
* Simplify return value from rds_process from an enum to a bool (maybe we can differentiate later between ps and rt updates)
* Update radio.c so the check for a radio event is moved out of the switch-case which handles buttons, this makes RDS update as soon as it comes in (instead of requiring a button press), I'm not really familiar with the radio code, so please review this.
* Report RDS only if a new message comes in that is actually different from the previous one. This prevents identical incoming RDS messages from resetting the scrolling on the radio text.
The update flag stuff was there before (used also by the ipod fm remote) and I don't want to add another dependency (figuring out whether we need the update flag or not) before we can get RDS in.
I propose to keep the update flag for now, make the RDS tags static (since they don't seem to work as dynamic and nobody's looking at this issue anyway) and force a SKIN_REFRESH_ALL in case the RDS flag indicates new RDS data.
I'm fine with any changes you wish to make later to the update flag mechanism, but at least let's get it in in some working shape.
I fail to see why the skins not updating correctly is a blocker for this. commit and open a bug.
I'm not even sure if radio stations out here provide RDS so even if i had hardware im not sure i could debug. Does the sim show the same broken behaviour?