Gigibeat S Manual - redo r23795 to look like it was originally meant to look.
[kugel-rb.git] / firmware / export / tuner.h
blobb27e660667f86328bec38768f10e47c7952861d0
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 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version 2
16 * of the License, or (at your option) any later version.
18 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 * KIND, either express or implied.
21 ****************************************************************************/
22 #ifndef __TUNER_H__
23 #define __TUNER_H__
25 #include "hwcompat.h"
27 /** Settings to the tuner layer **/
28 enum
30 RADIO_ALL = -1, /* debug */
31 RADIO_SLEEP,
32 RADIO_FREQUENCY,
33 RADIO_MUTE,
34 RADIO_FORCE_MONO,
35 RADIO_SCAN_FREQUENCY,
37 /* Put new general-purpose settings above this line */
38 __RADIO_SET_STANDARD_LAST
41 /** Readback from the tuner layer **/
42 enum
44 RADIO_PRESENT = 0,
45 RADIO_TUNED,
46 RADIO_STEREO,
48 /* Put new general-purpose readback values above this line */
49 __RADIO_GET_STANDARD_LAST
52 /** Tuner regions **/
54 /* Basic region information */
55 enum
57 REGION_EUROPE = 0,
58 REGION_US_CANADA,
59 REGION_JAPAN,
60 REGION_KOREA,
61 REGION_ITALY,
62 REGION_OTHER,
64 /* Add new regions above this line */
65 TUNER_NUM_REGIONS
68 struct fm_region_data
70 int freq_min;
71 int freq_max;
72 int freq_step;
75 extern const struct fm_region_data fm_region_data[TUNER_NUM_REGIONS];
77 #if CONFIG_TUNER
79 #ifdef SIMULATOR
80 int tuner_set(int setting, int value);
81 int tuner_get(int setting);
82 #else
84 #ifdef CONFIG_TUNER_MULTI
85 extern int (*tuner_set)(int setting, int value);
86 extern int (*tuner_get)(int setting);
87 #endif /* CONFIG_TUNER_MULTI */
89 /** Sanyo LV24020LP **/
90 #if (CONFIG_TUNER & LV24020LP)
91 /* Sansa c200, e200 */
92 #include "lv24020lp.h"
93 #endif
95 /** Samsung S1A0903X01 **/
96 #if (CONFIG_TUNER & S1A0903X01)
97 /* Ondio FM, FM Recorder */
98 #include "s1a0903x01.h"
99 #endif
101 /** Philips TEA5760 **/
102 #if (CONFIG_TUNER & TEA5760)
103 #include "tea5760.h"
104 #endif
106 /** Philips TEA5767 **/
107 #if (CONFIG_TUNER & TEA5767)
108 /* Ondio FM, FM Recorder, Recorder V2, iRiver h100/h300, iAudio x5 */
109 #include "tea5767.h"
110 #endif
112 /* Silicon Labs 4700 */
113 #if (CONFIG_TUNER & SI4700)
114 #include "si4700.h"
115 #endif
117 #endif /* SIMULATOR */
119 /* Additional messages that get enumerated after tuner driver headers */
121 /* for tuner_set */
122 enum
124 __RADIO_SET_ADDITIONAL_START = __RADIO_SET_STANDARD_LAST-1,
125 #ifdef HAVE_RADIO_REGION
126 RADIO_REGION,
127 #endif
129 RADIO_SET_CHIP_FIRST
132 /* for tuner_get */
133 enum
135 __RADIO_GET_ADDITIONAL_START = __RADIO_GET_STANDARD_LAST-1,
137 RADIO_GET_CHIP_FIRST
140 /** **/
142 void tuner_init(void);
144 #endif /* #if CONFIG_TUNER */
146 #endif /* __TUNER_H__ */