diff options
author | Bertrik Sikken <bertrik@sikken.nl> | 2010-07-26 20:15:16 +0000 |
---|---|---|
committer | Bertrik Sikken <bertrik@sikken.nl> | 2010-07-26 20:15:16 +0000 |
commit | adc472bec522e5b8bd34302cb3267cfb9a12d12c (patch) | |
tree | 394ca78314cb2ece1fd5412f8870868e608be813 /firmware/drivers/tuner/tea5767.c | |
parent | 6087d8960328b427f495d46d74664a4b0e32af17 (diff) | |
download | rockbox-adc472bec522e5b8bd34302cb3267cfb9a12d12c.tar.gz rockbox-adc472bec522e5b8bd34302cb3267cfb9a12d12c.zip |
FM tuner region code cleanup - FS #11492 by me.
This removes the tuner-specific region structs and makes each driver use the common one (which is now extended with a deemphasis field)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27579 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/tuner/tea5767.c')
-rw-r--r-- | firmware/drivers/tuner/tea5767.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/firmware/drivers/tuner/tea5767.c b/firmware/drivers/tuner/tea5767.c index 5888e00781..b16bb4b7c5 100644 --- a/firmware/drivers/tuner/tea5767.c +++ b/firmware/drivers/tuner/tea5767.c | |||
@@ -86,11 +86,12 @@ int tea5767_set(int setting, int value) | |||
86 | 86 | ||
87 | case RADIO_REGION: | 87 | case RADIO_REGION: |
88 | { | 88 | { |
89 | const struct tea5767_region_data *rd = | 89 | const struct fm_region_data *rd = &fm_region_data[value]; |
90 | &tea5767_region_data[value]; | 90 | int deemphasis = (rd->deemphasis == 75) ? 1 : 0; |
91 | int band = (rd->freq_min == 76000000) ? 1 : 0; | ||
91 | 92 | ||
92 | tea5767_set_clear(4, (1<<6), rd->deemphasis); | 93 | tea5767_set_clear(4, (1<<6), deemphasis); |
93 | tea5767_set_clear(3, (1<<5), rd->band); | 94 | tea5767_set_clear(3, (1<<5), band); |
94 | break; | 95 | break; |
95 | } | 96 | } |
96 | case RADIO_FORCE_MONO: | 97 | case RADIO_FORCE_MONO: |