diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2007-06-06 19:23:48 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2007-06-06 19:23:48 +0000 |
commit | 21a4a87ca2553834b3f7b0c8f95f1b0889d8cb2c (patch) | |
tree | b3c7693a1c1b2e24d5aeee3e3316bbcc404f7dbc /firmware/export/tuner.h | |
parent | af4cd0a84cc8ead0e3b9c32684c55235c792fb12 (diff) | |
download | rockbox-21a4a87ca2553834b3f7b0c8f95f1b0889d8cb2c.tar.gz rockbox-21a4a87ca2553834b3f7b0c8f95f1b0889d8cb2c.zip |
Accept FS#7178 - Sansa e200 FM tuner support by Ivan Zupan. Do the needed integration work into recording and the AS3514 audio driver. Do a little AS3514 fiq_record tweak to have it all work nicely from the start.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13573 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export/tuner.h')
-rw-r--r-- | firmware/export/tuner.h | 58 |
1 files changed, 40 insertions, 18 deletions
diff --git a/firmware/export/tuner.h b/firmware/export/tuner.h index 2e286b4cbe..9f6d29f697 100644 --- a/firmware/export/tuner.h +++ b/firmware/export/tuner.h | |||
@@ -17,28 +17,42 @@ | |||
17 | * KIND, either express or implied. | 17 | * KIND, either express or implied. |
18 | * | 18 | * |
19 | ****************************************************************************/ | 19 | ****************************************************************************/ |
20 | #ifndef __TUNER_SAMSUNG_H__ | 20 | #ifndef __TUNER_H__ |
21 | #define __TUNER_SAMSUNG_H__ | 21 | #define __TUNER_H__ |
22 | 22 | ||
23 | #include "hwcompat.h" | 23 | #include "hwcompat.h" |
24 | 24 | ||
25 | /* settings to the tuner layer */ | 25 | /* settings to the tuner layer */ |
26 | #define RADIO_ALL -1 /* debug */ | 26 | #define RADIO_ALL -1 /* debug */ |
27 | #define RADIO_SLEEP 0 | 27 | #define RADIO_SLEEP 0 |
28 | #define RADIO_FREQUENCY 1 | 28 | #define RADIO_FREQUENCY 1 |
29 | #define RADIO_MUTE 2 | 29 | #define RADIO_MUTE 2 |
30 | #define RADIO_IF_MEASUREMENT 3 | 30 | #define RADIO_IF_MEASUREMENT 3 |
31 | #define RADIO_SENSITIVITY 4 | 31 | #define RADIO_SENSITIVITY 4 |
32 | #define RADIO_FORCE_MONO 5 | 32 | #define RADIO_FORCE_MONO 5 |
33 | #define RADIO_SCAN_FREQUENCY 6 | 33 | #define RADIO_SCAN_FREQUENCY 6 |
34 | #if (CONFIG_TUNER & TEA5767) | 34 | #if (CONFIG_TUNER & TEA5767) |
35 | #define RADIO_SET_DEEMPHASIS 7 | 35 | #define RADIO_SET_DEEMPHASIS 7 |
36 | #define RADIO_SET_BAND 8 | 36 | #define RADIO_SET_BAND 8 |
37 | #endif | ||
38 | #if (CONFIG_TUNER & LV24020LP) | ||
39 | #define RADIO_REGION 9 /* to be used for all tuners */ | ||
40 | #define RADIO_REG_STAT 100 | ||
41 | #define RADIO_MSS_FM 101 | ||
42 | #define RADIO_MSS_IF 102 | ||
43 | #define RADIO_MSS_SD 103 | ||
44 | #define RADIO_IF_SET 104 | ||
45 | #define RADIO_SD_SET 105 | ||
37 | #endif | 46 | #endif |
38 | /* readback from the tuner layer */ | 47 | /* readback from the tuner layer */ |
39 | #define RADIO_PRESENT 0 | 48 | #define RADIO_PRESENT 0 |
40 | #define RADIO_TUNED 1 | 49 | #define RADIO_TUNED 1 |
41 | #define RADIO_STEREO 2 | 50 | #define RADIO_STEREO 2 |
51 | |||
52 | #define REGION_EUROPE 0 | ||
53 | #define REGION_US_CANADA 1 | ||
54 | #define REGION_JAPAN 2 | ||
55 | #define REGION_KOREA 3 | ||
42 | 56 | ||
43 | #if CONFIG_TUNER | 57 | #if CONFIG_TUNER |
44 | 58 | ||
@@ -49,6 +63,9 @@ int radio_get(int setting); | |||
49 | #if CONFIG_TUNER == S1A0903X01 /* FM recorder */ | 63 | #if CONFIG_TUNER == S1A0903X01 /* FM recorder */ |
50 | #define radio_set samsung_set | 64 | #define radio_set samsung_set |
51 | #define radio_get samsung_get | 65 | #define radio_get samsung_get |
66 | #elif CONFIG_TUNER == LV24020LP /* Sansa */ | ||
67 | #define radio_set sanyo_set | ||
68 | #define radio_get sanyo_get | ||
52 | #elif CONFIG_TUNER == TEA5767 /* iRiver, iAudio */ | 69 | #elif CONFIG_TUNER == TEA5767 /* iRiver, iAudio */ |
53 | #define radio_set philips_set | 70 | #define radio_set philips_set |
54 | #define radio_get philips_get | 71 | #define radio_get philips_get |
@@ -57,14 +74,19 @@ int radio_get(int setting); | |||
57 | #define radio_get _radio_get | 74 | #define radio_get _radio_get |
58 | int (*_radio_set)(int setting, int value); | 75 | int (*_radio_set)(int setting, int value); |
59 | int (*_radio_get)(int setting); | 76 | int (*_radio_get)(int setting); |
60 | #endif | 77 | #endif /* CONFIG_TUNER == */ |
61 | #endif | 78 | #endif /* SIMULATOR */ |
62 | 79 | ||
63 | #if (CONFIG_TUNER & S1A0903X01) | 80 | #if (CONFIG_TUNER & S1A0903X01) |
64 | int samsung_set(int setting, int value); | 81 | int samsung_set(int setting, int value); |
65 | int samsung_get(int setting); | 82 | int samsung_get(int setting); |
66 | #endif /* CONFIG_TUNER & S1A0903X01 */ | 83 | #endif /* CONFIG_TUNER & S1A0903X01 */ |
67 | 84 | ||
85 | #if (CONFIG_TUNER & LV24020LP) | ||
86 | int sanyo_set(int setting, int value); | ||
87 | int sanyo_get(int setting); | ||
88 | #endif /* CONFIG_TUNER & LV24020LP */ | ||
89 | |||
68 | #if (CONFIG_TUNER & TEA5767) | 90 | #if (CONFIG_TUNER & TEA5767) |
69 | struct philips_dbg_info | 91 | struct philips_dbg_info |
70 | { | 92 | { |
@@ -98,4 +120,4 @@ static inline void tuner_init(void) | |||
98 | 120 | ||
99 | #endif /* #if CONFIG_TUNER */ | 121 | #endif /* #if CONFIG_TUNER */ |
100 | 122 | ||
101 | #endif | 123 | #endif /* __TUNER_H__ */ |