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/tuner.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/tuner.c')
-rw-r--r-- | firmware/tuner.c | 88 |
1 files changed, 6 insertions, 82 deletions
diff --git a/firmware/tuner.c b/firmware/tuner.c index 3232147bbb..e08cef46ff 100644 --- a/firmware/tuner.c +++ b/firmware/tuner.c | |||
@@ -28,92 +28,16 @@ | |||
28 | /* General region information */ | 28 | /* General region information */ |
29 | const struct fm_region_data fm_region_data[TUNER_NUM_REGIONS] = | 29 | const struct fm_region_data fm_region_data[TUNER_NUM_REGIONS] = |
30 | { | 30 | { |
31 | [REGION_EUROPE] = { 87500000, 108000000, 100000 }, | 31 | [REGION_EUROPE] = { 87500000, 108000000, 100000, 50 }, |
32 | [REGION_US_CANADA] = { 87900000, 107900000, 200000 }, | 32 | [REGION_US_CANADA] = { 87900000, 107900000, 200000, 75 }, |
33 | [REGION_JAPAN] = { 76000000, 90000000, 100000 }, | 33 | [REGION_JAPAN] = { 76000000, 90000000, 100000, 50 }, |
34 | [REGION_KOREA] = { 87500000, 108000000, 200000 }, | 34 | [REGION_KOREA] = { 87500000, 108000000, 200000, 50 }, |
35 | [REGION_ITALY] = { 87500000, 108000000, 50000 }, | 35 | [REGION_ITALY] = { 87500000, 108000000, 50000, 50 }, |
36 | [REGION_OTHER] = { 87500000, 108000000, 50000 } | 36 | [REGION_OTHER] = { 87500000, 108000000, 50000, 50 } |
37 | }; | 37 | }; |
38 | 38 | ||
39 | #ifndef SIMULATOR | 39 | #ifndef SIMULATOR |
40 | 40 | ||
41 | /* Tuner-specific region information */ | ||
42 | |||
43 | #if (CONFIG_TUNER & LV24020LP) | ||
44 | /* deemphasis setting for region */ | ||
45 | const unsigned char lv24020lp_region_data[TUNER_NUM_REGIONS] = | ||
46 | { | ||
47 | [REGION_EUROPE] = 0, /* 50uS */ | ||
48 | [REGION_US_CANADA] = 1, /* 75uS */ | ||
49 | [REGION_JAPAN] = 0, /* 50uS */ | ||
50 | [REGION_KOREA] = 0, /* 50uS */ | ||
51 | [REGION_ITALY] = 0, /* 50uS */ | ||
52 | [REGION_OTHER] = 0, /* 50uS */ | ||
53 | }; | ||
54 | #endif /* (CONFIG_TUNER & LV24020LP) */ | ||
55 | |||
56 | #if (CONFIG_TUNER & TEA5760) | ||
57 | const struct tea5760_region_data tea5760_region_data[TUNER_NUM_REGIONS] = | ||
58 | { | ||
59 | [REGION_EUROPE] = { 1, 0 }, /* 50uS, US/Europe band */ | ||
60 | [REGION_US_CANADA] = { 0, 0 }, /* 75uS, US/Europe band */ | ||
61 | [REGION_JAPAN] = { 1, 1 }, /* 50uS, Japanese band */ | ||
62 | [REGION_KOREA] = { 1, 0 }, /* 50uS, US/Europe band */ | ||
63 | [REGION_ITALY] = { 1, 0 }, /* 50uS, US/Europe band */ | ||
64 | [REGION_OTHER] = { 1, 0 }, /* 50uS, US/Europe band */ | ||
65 | }; | ||
66 | #endif /* (CONFIG_TUNER & TEA5760) */ | ||
67 | |||
68 | #if (CONFIG_TUNER & TEA5767) | ||
69 | const struct tea5767_region_data tea5767_region_data[TUNER_NUM_REGIONS] = | ||
70 | { | ||
71 | [REGION_EUROPE] = { 0, 0 }, /* 50uS, US/Europe band */ | ||
72 | [REGION_US_CANADA] = { 1, 0 }, /* 75uS, US/Europe band */ | ||
73 | [REGION_JAPAN] = { 0, 1 }, /* 50uS, Japanese band */ | ||
74 | [REGION_KOREA] = { 0, 0 }, /* 50uS, US/Europe band */ | ||
75 | [REGION_ITALY] = { 0, 0 }, /* 50uS, US/Europe band */ | ||
76 | [REGION_OTHER] = { 0, 0 }, /* 50uS, US/Europe band */ | ||
77 | }; | ||
78 | #endif /* (CONFIG_TUNER & TEA5767) */ | ||
79 | |||
80 | #if (CONFIG_TUNER & SI4700) | ||
81 | const struct si4700_region_data si4700_region_data[TUNER_NUM_REGIONS] = | ||
82 | { | ||
83 | [REGION_EUROPE] = { 1, 0, 1 }, /* 50uS, US/Europe band, 100kHz spacing */ | ||
84 | [REGION_US_CANADA] = { 0, 0, 0 }, /* 75uS, US/Europe band, 200kHz spacing */ | ||
85 | [REGION_JAPAN] = { 1, 2, 1 }, /* 50uS, Japanese band, 100kHz spacing */ | ||
86 | [REGION_KOREA] = { 1, 0, 0 }, /* 50uS, US/Europe band, 200kHz spacing */ | ||
87 | [REGION_ITALY] = { 1, 0, 2 }, /* 50uS, US/Europe band, 50kHz spacing */ | ||
88 | [REGION_OTHER] = { 1, 0, 2 }, /* 50uS, US/Europe band, 50kHz spacing */ | ||
89 | }; | ||
90 | #endif /* (CONFIG_TUNER & SI4700) */ | ||
91 | |||
92 | #if (CONFIG_TUNER & RDA5802) | ||
93 | const struct rda5802_region_data rda5802_region_data[TUNER_NUM_REGIONS] = | ||
94 | { | ||
95 | [REGION_EUROPE] = { 1, 0 }, /* 50uS, US/Europe band */ | ||
96 | [REGION_US_CANADA] = { 0, 0 }, /* 75uS, US/Europe band */ | ||
97 | [REGION_JAPAN] = { 1, 1 }, /* 50uS, Japanese band */ | ||
98 | [REGION_KOREA] = { 1, 0 }, /* 50uS, US/Europe band */ | ||
99 | [REGION_ITALY] = { 1, 0 }, /* 50uS, US/Europe band */ | ||
100 | [REGION_OTHER] = { 1, 0 }, /* 50uS, US/Europe band */ | ||
101 | }; | ||
102 | #endif /* (CONFIG_TUNER & RDA5802) */ | ||
103 | |||
104 | #if (CONFIG_TUNER & IPOD_REMOTE_TUNER) | ||
105 | const struct rmt_tuner_region_data | ||
106 | rmt_tuner_region_data[TUNER_NUM_REGIONS] = | ||
107 | { | ||
108 | [REGION_EUROPE] = { 1, 0, 1 }, /* 50uS, US/Europe band, 100kHz spacing */ | ||
109 | [REGION_US_CANADA] = { 0, 0, 0 }, /* 75uS, US/Europe band, 200kHz spacing */ | ||
110 | [REGION_JAPAN] = { 1, 2, 1 }, /* 50uS, Japanese band, 100kHz spacing */ | ||
111 | [REGION_KOREA] = { 1, 0, 0 }, /* 50uS, US/Europe band, 200kHz spacing */ | ||
112 | [REGION_ITALY] = { 1, 0, 2 }, /* 50uS, US/Europe band, 50kHz spacing */ | ||
113 | [REGION_OTHER] = { 1, 0, 2 }, /* 50uS, US/Europe band, 50kHz spacing */ | ||
114 | }; | ||
115 | #endif /* (CONFIG_TUNER & IPOD_REMOTE_TUNER) */ | ||
116 | |||
117 | #ifdef CONFIG_TUNER_MULTI | 41 | #ifdef CONFIG_TUNER_MULTI |
118 | int (*tuner_set)(int setting, int value); | 42 | int (*tuner_set)(int setting, int value); |
119 | int (*tuner_get)(int setting); | 43 | int (*tuner_get)(int setting); |