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/tea5760uk.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/tea5760uk.c')
-rw-r--r-- | firmware/drivers/tuner/tea5760uk.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/firmware/drivers/tuner/tea5760uk.c b/firmware/drivers/tuner/tea5760uk.c index db07e20cf4..20234e28ed 100644 --- a/firmware/drivers/tuner/tea5760uk.c +++ b/firmware/drivers/tuner/tea5760uk.c | |||
@@ -91,11 +91,12 @@ int tea5760_set(int setting, int value) | |||
91 | 91 | ||
92 | case RADIO_REGION: | 92 | case RADIO_REGION: |
93 | { | 93 | { |
94 | const struct tea5760_region_data *rd = | 94 | const struct fm_region_data *rd = &fm_region_data[value]; |
95 | &tea5760_region_data[value]; | 95 | int band = (rd->freq_min == 76000000) ? 1 : 0; |
96 | int deemphasis = (rd->deemphasis == 50) ? 1 : 0; | ||
96 | 97 | ||
97 | tea5760_set_clear(4, (1<<1), rd->deemphasis); | 98 | tea5760_set_clear(3, (1<<5), band); |
98 | tea5760_set_clear(3, (1<<5), rd->band); | 99 | tea5760_set_clear(4, (1<<1), deemphasis); |
99 | } | 100 | } |
100 | break; | 101 | break; |
101 | 102 | ||