Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#11492 - FM tuner region code cleanup

Attached to Project: Rockbox
Opened by Bertrik Sikken (bertrik) - Thursday, 22 July 2010, 09:48 GMT+2
Last edited by Bertrik Sikken (bertrik) - Monday, 26 July 2010, 22:19 GMT+2
Task Type Patches
Category FM Tuner
Status Closed
Assigned To No-one
Player Type All players
Severity Low
Priority Normal
Reported Version Release 3.6
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Private No

Details

Currently we have a driver-specific struct and region list for each tuner driver, which specifies settings for an FM region: FM band frequency range, frequency spacing and deemphasis. This information is mostly already present in the fm_region_data struct.

This patch updates the fm_region_data struct (adding a "deemphasis" field), allowing all of the driver-specific structs to be removed. Each tuner driver now calculates its region settings from the fields in the common fm_region_data struct instead of taking it from its own struct.
For the targets I compiled this for, there was a net binsize saving (and also source code lines savings).

Please test this on your target. I am able to test targets with LV24020, SI4700, RDA5802 tuners myself. Other drivers that need testing are TEA5760, TEA5767 and the ipod remote tuner.
Stuff to test:
* do FM channels still appear on the right frequency? (this tests FM band setting)
* do you hear a change in high frequencies when switching between the Europe and USA/Canada setting? (this test deemphasis, works only for stations where the tenths of MHz are odd). The europe setting should sound brighter.
   region_cleanup.patch (15.4 KiB)
 firmware/export/tuner.h                    |    1 
 firmware/export/lv24020lp.h                |    2 
 firmware/export/tea5767.h                  |    8 --
 firmware/export/rda5802.h                  |    8 --
 firmware/export/si4700.h                   |    9 --
 firmware/export/tea5760.h                  |    8 --
 firmware/export/ipod_remote_tuner.h        |   13 ----
 firmware/drivers/tuner/tea5767.c           |    9 +-
 firmware/drivers/tuner/ipod_remote_tuner.c |   15 ++--
 firmware/drivers/tuner/lv24020lp.c         |    5 +
 firmware/drivers/tuner/rda5802.c           |   25 ++++----
 firmware/drivers/tuner/si4700.c            |   15 ++--
 firmware/drivers/tuner/tea5760uk.c         |    9 +-
 firmware/tuner.c                           |   88 +----------------------------
 14 files changed, 53 insertions(+), 162 deletions(-)

This task depends upon

Closed by  Bertrik Sikken (bertrik)
Monday, 26 July 2010, 22:19 GMT+2
Reason for closing:  Accepted
Additional comments about closing:  Slightly modified version committed as SVN r27579

Loading...