aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video
diff options
context:
space:
mode:
authorRicardo Cerqueira <v4l\@cerqueira.org>2005-11-09 00:36:20 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-09 10:56:07 -0500
commitcc9d8d49bb13fdcea521f907e120d3a7c7ce94f8 (patch)
tree6e032140664ea6822675749963ad2ea743d27ccf /drivers/media/video
parent87f0783159783a315c68a00e50706cd01aa10511 (diff)
[PATCH] v4l: 635: add bttv card 137 conceptronic ctvfmi v2
- Add bttv card 137 - Conceptronic CTVFMi v2 Signed-off-by: Ricardo Cerqueira <v4l\@cerqueira.org> Signed-off-by: Michael Krufky <mkrufky@m1k.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media/video')
-rw-r--r--drivers/media/video/bttv-cards.c15
-rw-r--r--drivers/media/video/bttv.h1
-rw-r--r--drivers/media/video/ir-kbd-gpio.c71
3 files changed, 87 insertions, 0 deletions
diff --git a/drivers/media/video/bttv-cards.c b/drivers/media/video/bttv-cards.c
index 0881a17d5226..75033f06551f 100644
--- a/drivers/media/video/bttv-cards.c
+++ b/drivers/media/video/bttv-cards.c
@@ -2418,6 +2418,21 @@ struct tvcard bttv_tvcards[] = {
2418 .tuner_type = TUNER_YMEC_TVF66T5_B_DFF, 2418 .tuner_type = TUNER_YMEC_TVF66T5_B_DFF,
2419 .tuner_addr = 0xc1 >>1, 2419 .tuner_addr = 0xc1 >>1,
2420 .has_radio = 1, 2420 .has_radio = 1,
2421},{
2422 /* ---- card 0x89 ---------------------------------- */
2423 .name = "Conceptronic CTVFMi v2",
2424 .video_inputs = 3,
2425 .audio_inputs = 1,
2426 .tuner = 0,
2427 .svhs = 2,
2428 .gpiomask = 0x001c0007,
2429 .muxsel = { 2, 3, 1, 1 },
2430 .audiomux = { 0, 1, 2, 2, 3 },
2431 .needs_tvaudio = 0,
2432 .pll = PLL_28,
2433 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
2434 .tuner_addr = ADDR_UNSET,
2435 .has_remote = 1,
2421}}; 2436}};
2422 2437
2423static const unsigned int bttv_num_tvcards = ARRAY_SIZE(bttv_tvcards); 2438static const unsigned int bttv_num_tvcards = ARRAY_SIZE(bttv_tvcards);
diff --git a/drivers/media/video/bttv.h b/drivers/media/video/bttv.h
index d254e90e3bb9..dcdf9cde7857 100644
--- a/drivers/media/video/bttv.h
+++ b/drivers/media/video/bttv.h
@@ -137,6 +137,7 @@
137#define BTTV_ADLINK_RTV24 0x86 137#define BTTV_ADLINK_RTV24 0x86
138#define BTTV_DVICO_FUSIONHDTV_5_LITE 0x87 138#define BTTV_DVICO_FUSIONHDTV_5_LITE 0x87
139#define BTTV_ACORP_Y878F 0x88 139#define BTTV_ACORP_Y878F 0x88
140#define BTTV_CONCEPTRONIC_CTVFMI2 0x89
140 141
141/* i2c address list */ 142/* i2c address list */
142#define I2C_TSA5522 0xc2 143#define I2C_TSA5522 0xc2
diff --git a/drivers/media/video/ir-kbd-gpio.c b/drivers/media/video/ir-kbd-gpio.c
index 234151e48edc..1861d31f11b8 100644
--- a/drivers/media/video/ir-kbd-gpio.c
+++ b/drivers/media/video/ir-kbd-gpio.c
@@ -156,6 +156,71 @@ static IR_KEYTAB_TYPE ir_codes_apac_viewcomp[IR_KEYTAB_SIZE] = {
156 156
157/* ---------------------------------------------------------------------- */ 157/* ---------------------------------------------------------------------- */
158 158
159/* Ricardo Cerqueira <v4l@cerqueira.org> */
160/* Weird matching, since the remote has "uncommon" keys */
161
162static IR_KEYTAB_TYPE ir_codes_conceptronic[IR_KEYTAB_SIZE] = {
163
164 [ 30 ] = KEY_POWER, // power
165 [ 7 ] = KEY_SWITCHVIDEOMODE, // source
166 [ 28 ] = KEY_SEARCH, // scan
167
168/* FIXME: duplicate keycodes?
169 *
170 * These four keys seem to share the same GPIO as CH+, CH-, <<< and >>>
171 * The GPIO values are
172 * 6397fb for both "Scan <" and "CH -",
173 * 639ffb for "Scan >" and "CH+",
174 * 6384fb for "Tune <" and "<<<",
175 * 638cfb for "Tune >" and ">>>", regardless of the mask.
176 *
177 * [ 23 ] = KEY_BACK, // fm scan <<
178 * [ 31 ] = KEY_FORWARD, // fm scan >>
179 *
180 * [ 4 ] = KEY_LEFT, // fm tuning <
181 * [ 12 ] = KEY_RIGHT, // fm tuning >
182 *
183 * For now, these four keys are disabled. Pressing them will generate
184 * the CH+/CH-/<<</>>> events
185 */
186
187 [ 3 ] = KEY_TUNER, // TV/FM
188
189 [ 0 ] = KEY_RECORD,
190 [ 8 ] = KEY_STOP,
191 [ 17 ] = KEY_PLAY,
192
193 [ 26 ] = KEY_PLAYPAUSE, // freeze
194 [ 25 ] = KEY_ZOOM, // zoom
195 [ 15 ] = KEY_TEXT, // min
196
197 [ 1 ] = KEY_KP1,
198 [ 11 ] = KEY_KP2,
199 [ 27 ] = KEY_KP3,
200 [ 5 ] = KEY_KP4,
201 [ 9 ] = KEY_KP5,
202 [ 21 ] = KEY_KP6,
203 [ 6 ] = KEY_KP7,
204 [ 10 ] = KEY_KP8,
205 [ 18 ] = KEY_KP9,
206 [ 2 ] = KEY_KP0,
207 [ 16 ] = KEY_LAST, // +100
208 [ 19 ] = KEY_LIST, // recall
209
210 [ 31 ] = KEY_CHANNELUP, // chn down
211 [ 23 ] = KEY_CHANNELDOWN, // chn up
212 [ 22 ] = KEY_VOLUMEUP, // vol down
213 [ 20 ] = KEY_VOLUMEDOWN, // vol up
214
215 [ 4 ] = KEY_KPMINUS, // <<<
216 [ 14 ] = KEY_SETUP, // function
217 [ 12 ] = KEY_KPPLUS, // >>>
218
219 [ 13 ] = KEY_GOTO, // mts
220 [ 29 ] = KEY_REFRESH, // reset
221 [ 24 ] = KEY_MUTE // mute/unmute
222};
223
159struct IR { 224struct IR {
160 struct bttv_sub_device *sub; 225 struct bttv_sub_device *sub;
161 struct input_dev *input; 226 struct input_dev *input;
@@ -329,6 +394,12 @@ static int ir_probe(struct device *dev)
329 ir->mask_keyup = 0x008000; 394 ir->mask_keyup = 0x008000;
330 ir->polling = 50; // ms 395 ir->polling = 50; // ms
331 break; 396 break;
397 case BTTV_CONCEPTRONIC_CTVFMI2:
398 ir_codes = ir_codes_conceptronic;
399 ir->mask_keycode = 0x001F00;
400 ir->mask_keyup = 0x006000;
401 ir->polling = 50; // ms
402 break;
332 } 403 }
333 if (NULL == ir_codes) { 404 if (NULL == ir_codes) {
334 kfree(ir); 405 kfree(ir);