diff options
Diffstat (limited to 'firmware/drivers/tuner/ipod_remote_tuner.c')
-rw-r--r-- | firmware/drivers/tuner/ipod_remote_tuner.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/firmware/drivers/tuner/ipod_remote_tuner.c b/firmware/drivers/tuner/ipod_remote_tuner.c index 25ad2d9845..52d93b8b34 100644 --- a/firmware/drivers/tuner/ipod_remote_tuner.c +++ b/firmware/drivers/tuner/ipod_remote_tuner.c | |||
@@ -177,8 +177,9 @@ void rmt_tuner_region(int region) | |||
177 | { | 177 | { |
178 | if (region != old_region) | 178 | if (region != old_region) |
179 | { | 179 | { |
180 | const struct fm_region_data *rd = &fm_region_data[region]; | ||
180 | unsigned char data[] = {0x07, 0x08, 0x00}; | 181 | unsigned char data[] = {0x07, 0x08, 0x00}; |
181 | if (region == 2) | 182 | if (rd->freq_min == 76000000) |
182 | { | 183 | { |
183 | data[2] = 0x02; /* japan band */ | 184 | data[2] = 0x02; /* japan band */ |
184 | } | 185 | } |
@@ -378,12 +379,14 @@ int ipod_rmt_tuner_set(int setting, int value) | |||
378 | 379 | ||
379 | case RADIO_REGION: | 380 | case RADIO_REGION: |
380 | { | 381 | { |
381 | const struct rmt_tuner_region_data *rd = | 382 | const struct fm_region_data *rd = &fm_region_data[value]; |
382 | &rmt_tuner_region_data[value]; | 383 | int band = (rd->freq_min == 76000000) ? 2 : 0; |
383 | 384 | int spacing = (100000 / rd->freq_step); | |
384 | rmt_tuner_region(rd->band); | 385 | int deemphasis = (rd->deemphasis == 50) ? 1 : 0; |
385 | set_deltafreq(rd->spacing); | 386 | |
386 | set_deemphasis(rd->deemphasis); | 387 | rmt_tuner_region(band); |
388 | set_deltafreq(spacing); | ||
389 | set_deemphasis(deemphasis); | ||
387 | rmt_tuner_set_param(tuner_param); | 390 | rmt_tuner_set_param(tuner_param); |
388 | break; | 391 | break; |
389 | } | 392 | } |