Fix a typo that would cause incorrect enums.
[Rockbox.git] / firmware / export / tuner.h
blob122583009441a4213a74ed41960ec952a7292d6a
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 * Tuner abstraction layer
11 * Copyright (C) 2004 Jörg Hohensohn
13 * All files in this archive are subject to the GNU General Public License.
14 * See the file COPYING in the source tree root for full license agreement.
16 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
17 * KIND, either express or implied.
19 ****************************************************************************/
20 #ifndef __TUNER_H__
21 #define __TUNER_H__
23 #include "hwcompat.h"
25 /** Settings to the tuner layer **/
26 enum
28 RADIO_ALL = -1, /* debug */
29 RADIO_SLEEP,
30 RADIO_FREQUENCY,
31 RADIO_MUTE,
32 RADIO_FORCE_MONO,
33 RADIO_SCAN_FREQUENCY,
35 /* Put new general-purpose settings above this line */
36 __RADIO_SET_STANDARD_LAST
39 /** Readback from the tuner layer **/
40 enum
42 RADIO_PRESENT = 0,
43 RADIO_TUNED,
44 RADIO_STEREO,
46 /* Put new general-purpose readback values above this line */
47 __RADIO_GET_STANDARD_LAST
50 /** Tuner regions **/
52 /* Basic region information */
53 enum
55 REGION_EUROPE = 0,
56 REGION_US_CANADA,
57 REGION_JAPAN,
58 REGION_KOREA,
60 /* Add new regions above this line */
61 TUNER_NUM_REGIONS
64 struct fm_region_data
66 int freq_min;
67 int freq_max;
68 int freq_step;
71 extern const struct fm_region_data fm_region_data[TUNER_NUM_REGIONS];
73 #if CONFIG_TUNER
75 #ifdef SIMULATOR
76 int tuner_set(int setting, int value);
77 int tuner_get(int setting);
78 #else
80 #ifdef CONFIG_TUNER_MULTI
81 extern int (*tuner_set)(int setting, int value);
82 extern int (*tuner_get)(int setting);
83 #endif /* CONFIG_TUNER_MULTI */
85 /** Sanyo LV24020LP **/
86 #if (CONFIG_TUNER & LV24020LP)
87 /* Sansa e200 Series */
88 #include "lv24020lp.h"
89 #endif
91 /** Samsung S1A0903X01 **/
92 #if (CONFIG_TUNER & S1A0903X01)
93 /* Ondio FM, FM Recorder */
94 #include "s1a0903x01.h"
95 #endif
97 /** Philips TEA5767 **/
98 #if (CONFIG_TUNER & TEA5767)
99 /* Ondio FM, FM Recorder, Recorder V2, iRiver h100/h300, iAudio x5 */
100 #include "tea5767.h"
101 #endif
103 #endif /* SIMULATOR */
105 /* Additional messages that get enumerated after tuner driver headers */
107 /* for tuner_set */
108 enum
110 __RADIO_SET_ADDITIONAL_START = __RADIO_SET_STANDARD_LAST-1,
111 #ifdef HAVE_RADIO_REGION
112 RADIO_REGION,
113 #endif
115 RADIO_SET_CHIP_FIRST
118 /* for tuner_get */
119 enum
121 __RADIO_GET_ADDITIONAL_START = __RADIO_GET_STANDARD_LAST-1,
123 RADIO_GET_CHIP_FIRST
126 /** **/
128 void tuner_init(void);
129 bool tuner_power(bool power);
130 bool tuner_powered(void);
132 #endif /* #if CONFIG_TUNER */
134 #endif /* __TUNER_H__ */