FS#10181 - Allow the FM region to be set from a FMR file

Attached to Project: Rockbox
Opened by Alexander Levin (fml2) - Friday, 01 May 2009, 21:29 GMT
Task Type Patches
Category FM Tuner
Status New
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Version 3.2
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No


Since FM stations list may require that the FM region is set to a certain value, it would be good if the FM region could be set along with the station list. The patch does just that.

The region is set by putting the line "region:N" into the FMR file (at any line there). N can be one of the values allowed for the fm_region setting.

The patch does not work on the simulators for e200 and h120 (the only two I tried) because, for some reason, the symbol HAVE_RADIO_REGION is not defined for them. Could anybody tell why?

Saving the region along with the station list is not implemented.
This task depends upon

Comment by Alexander Levin (fml2) - Thursday, 14 May 2009, 13:40 GMT
Slightly modified the patch so that is also works in the simulator. Separating the fm_region setting (making its presence depending on HAVE_RADIO_REGION) has proven to be a more complicated task that I thought because it's woven deeply in the code (some pieces of code use fm_region structure regardless whether the REGION capability is present or not).

Please comment since I think it's a cute feature (having region in fmr file).