Rockbox mail archiveSubject: RDS support in Rockbox
RDS support in Rockbox
From: Bertrik Sikken <bertrik_at_sikken.nl>
Date: Fri, 04 Nov 2011 21:52:36 +0100
This is a proposal for extending RDS support in Rockbox.
Since I now have a stable target with hardware that supports RDS
(The Clip Zip, which has Si4703), I can really start working on this.
* What is RDS
RDS is a system for delivering data over FM radio. It's formatted
into 8 byte packets, arriving at a rate of approximately 11 p/s.
Several kinds of data can be sent over RDS, common items are a 16-bit
station id, an 8-character station name, a 64-character (max) text,
a list of alternate FM frequencies and current date/time.
* current RDS support
Rockbox currently supports basic RDS from ipod FM remotes, with
just the station name and the 64-char text.
The generic radio code polls the tuner driver for an RDS event.
When the tuner driver indicates that an RDS event occurred, the
actual RDS data (station name + RDS text) is retrieved using
function "char* ipod_get_rds_info(int setting)"
* adding RDS to other fm tuners
I want to add this functionality to the Si4703 fm tuner too,
so first concentrate on the basic station name and radio text
first, and worry about the other RDS features later.
The Si4703 can be configured to capture one RDS packet, then
raise an pin voltage for 5 ms. My plan is to attach an interrupt
to this event that wakes up a high-prio thread to read the RDS
packet. It then feeds the raw RDS packet into a generic RDS processor
that collects packets until a full RDS message has been assembled.
I'm thinking of the following interface:
- int rds_process(uint16_t data)
which returns a number indicating what kind of data has been
received. When something is received, the fm tuner driver can call
a function to get a copy of the RDS data, something like:
- bool rds_get_stationname(char *buf, int bufsize)
- bool rds_get_radiotext(char *buf, int bufsize)
When the FM frequency is changed, the RDS data is invalidated with
- void rds_reset(void)
What do you think?
Received on 2011-11-04