From adc472bec522e5b8bd34302cb3267cfb9a12d12c Mon Sep 17 00:00:00 2001 From: Bertrik Sikken Date: Mon, 26 Jul 2010 20:15:16 +0000 Subject: 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 --- firmware/drivers/tuner/tea5767.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'firmware/drivers/tuner/tea5767.c') 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) case RADIO_REGION: { - const struct tea5767_region_data *rd = - &tea5767_region_data[value]; + const struct fm_region_data *rd = &fm_region_data[value]; + int deemphasis = (rd->deemphasis == 75) ? 1 : 0; + int band = (rd->freq_min == 76000000) ? 1 : 0; - tea5767_set_clear(4, (1<<6), rd->deemphasis); - tea5767_set_clear(3, (1<<5), rd->band); + tea5767_set_clear(4, (1<<6), deemphasis); + tea5767_set_clear(3, (1<<5), band); break; } case RADIO_FORCE_MONO: -- cgit v1.2.3