5081
|
1 /*
|
|
2 (C)2002 Charles R. Henrich (henrich@msu.edu)
|
|
3 *BSD (hopefully, requires working driver!) BrookTree capture support.
|
|
4
|
|
5 Still in (active) development!
|
|
6
|
|
7 v1.0 Feb 19 2002 First Release, need to add support for changing
|
|
8 audio parameters.
|
|
9 */
|
|
10
|
|
11 #include "config.h"
|
|
12
|
|
13 #if defined(USE_TV) && defined(HAVE_TV_BSDBT848)
|
|
14
|
|
15 #define TRUE (1==1)
|
|
16 #define FALSE (1==0)
|
|
17
|
|
18 #define PAL_WIDTH 768
|
|
19 #define PAL_HEIGHT 576
|
|
20 #define PAL_FPS 25
|
|
21
|
|
22 #define NTSC_WIDTH 640
|
|
23 #define NTSC_HEIGHT 480
|
|
24 #define NTSC_FPS 30
|
|
25
|
|
26 #include <stdio.h>
|
|
27 #include <stdlib.h>
|
|
28 #include <unistd.h>
|
|
29 #include <fcntl.h>
|
|
30 #include <sys/types.h>
|
|
31 #include <sys/mman.h>
|
|
32 #include <signal.h>
|
|
33 #include <string.h>
|
|
34
|
|
35 #include <machine/ioctl_meteor.h>
|
|
36 #include <machine/ioctl_bt848.h>
|
5142
|
37 #ifdef HAVE_SYS_SOUNDCARD_H
|
|
38 #include <sys/soundcard.h>
|
|
39 #else
|
5081
|
40 #include <machine/soundcard.h>
|
5142
|
41 #endif
|
5081
|
42
|
|
43 #include "../libvo/img_format.h"
|
|
44 #include "tv.h"
|
|
45
|
|
46 /* information about this file */
|
|
47 static tvi_info_t info = {
|
|
48 "Brooktree848 Support",
|
|
49 "bt848",
|
|
50 "Charles Henrich",
|
|
51 "in development"
|
|
52 };
|
|
53
|
|
54 /* private data's */
|
|
55 typedef struct {
|
|
56
|
|
57 /* Audio */
|
|
58 char *dspdev;
|
|
59 int dspready;
|
|
60 int dspfd;
|
|
61 int dspsamplesize;
|
|
62 int dspstereo;
|
|
63 int dspspeed;
|
|
64 int dspfmt;
|
|
65 int dspframesize;
|
|
66
|
|
67 /* Video */
|
|
68 char *btdev;
|
|
69 int videoready;
|
|
70 int btfd;
|
|
71 int source;
|
|
72 int maxfps;
|
|
73 int fps;
|
|
74 int iformat;
|
|
75 int maxheight;
|
|
76 int maxwidth;
|
|
77 struct meteor_geomet geom;
|
|
78 struct meteor_capframe capframe;
|
|
79 int buffersize;
|
|
80 unsigned char *buffer;
|
|
81 int currentframe;
|
|
82
|
|
83 /* Inputs */
|
|
84
|
|
85 int input;
|
|
86
|
|
87 /* Tuner */
|
|
88
|
|
89 char *tunerdev;
|
|
90 int tunerfd;
|
|
91 int tunerready;
|
|
92 u_long tunerfreq;
|
|
93 struct bktr_chnlset cset;
|
|
94
|
|
95 } priv_t;
|
|
96
|
|
97 #include "tvi_def.h"
|
|
98
|
|
99 static priv_t *G_private=NULL;
|
|
100
|
|
101
|
|
102 static void processframe(int signal)
|
|
103 {
|
|
104 G_private->currentframe++;
|
|
105
|
|
106 return;
|
|
107 }
|
|
108
|
|
109 /* handler creator - entry point ! */
|
|
110 tvi_handle_t *tvi_init_bsdbt848(char *device)
|
|
111 {
|
|
112 return(new_handle());
|
|
113 }
|
|
114
|
|
115 static int control(priv_t *priv, int cmd, void *arg)
|
|
116 {
|
|
117 switch(cmd)
|
|
118 {
|
|
119
|
|
120 /* Tuner Controls */
|
|
121
|
|
122 case TVI_CONTROL_IS_TUNER:
|
|
123 if(priv->tunerready == FALSE) return TVI_CONTROL_FALSE;
|
|
124 return(TVI_CONTROL_TRUE);
|
|
125
|
|
126 case TVI_CONTROL_TUN_GET_FREQ:
|
|
127 {
|
|
128 if(ioctl(priv->tunerfd, TVTUNER_GETFREQ, &priv->tunerfreq) < 0)
|
|
129 {
|
|
130 perror("GETFREQ:ioctl");
|
|
131 return(TVI_CONTROL_FALSE);
|
|
132 }
|
|
133
|
|
134 (int)*(void **)arg = priv->tunerfreq;
|
|
135 return(TVI_CONTROL_TRUE);
|
|
136 }
|
|
137
|
|
138 case TVI_CONTROL_TUN_SET_FREQ:
|
|
139 {
|
|
140 priv->tunerfreq = (int)*(void **)arg;
|
|
141
|
|
142 if(ioctl(priv->tunerfd, TVTUNER_SETFREQ, &priv->tunerfreq) < 0)
|
|
143 {
|
|
144 perror("SETFREQ:ioctl");
|
|
145 return(0);
|
|
146 }
|
|
147
|
|
148 return(TVI_CONTROL_TRUE);
|
|
149 }
|
|
150
|
|
151 case TVI_CONTROL_TUN_GET_TUNER:
|
|
152 case TVI_CONTROL_TUN_SET_TUNER:
|
|
153
|
|
154 /* Inputs */
|
|
155
|
|
156 case TVI_CONTROL_SPC_GET_INPUT:
|
|
157 {
|
|
158 if(ioctl(priv->btfd, METEORGINPUT, &priv->input) < 0)
|
|
159 {
|
|
160 perror("GINPUT:ioctl");
|
|
161 return(TVI_CONTROL_FALSE);
|
|
162 }
|
|
163
|
|
164 (int)*(void **)arg = priv->input;
|
|
165 return(TVI_CONTROL_TRUE);
|
|
166 }
|
|
167
|
|
168 case TVI_CONTROL_SPC_SET_INPUT:
|
|
169 {
|
|
170 priv->input = getinput((int)*(void **)arg);
|
|
171
|
|
172 if(ioctl(priv->btfd, METEORSINPUT, &priv->input) < 0)
|
|
173 {
|
|
174 perror("tunerfreq:ioctl");
|
|
175 return(0);
|
|
176 }
|
|
177
|
|
178 return(TVI_CONTROL_TRUE);
|
|
179 }
|
|
180
|
|
181 /* Audio Controls */
|
|
182
|
|
183 case TVI_CONTROL_IS_AUDIO:
|
|
184 if(priv->dspready == FALSE) return TVI_CONTROL_FALSE;
|
|
185 return(TVI_CONTROL_TRUE);
|
|
186
|
|
187 case TVI_CONTROL_AUD_GET_FORMAT:
|
|
188 {
|
|
189 (int)*(void **)arg = AFMT_S16_LE;
|
|
190 return(TVI_CONTROL_TRUE);
|
|
191 }
|
|
192 case TVI_CONTROL_AUD_GET_CHANNELS:
|
|
193 {
|
|
194 (int)*(void **)arg = 2;
|
|
195 return(TVI_CONTROL_TRUE);
|
|
196 }
|
|
197 case TVI_CONTROL_AUD_GET_SAMPLERATE:
|
|
198 {
|
|
199 (int)*(void **)arg = 44100;
|
|
200 return(TVI_CONTROL_TRUE);
|
|
201 }
|
|
202 case TVI_CONTROL_AUD_GET_SAMPLESIZE:
|
|
203 {
|
|
204 (int)*(void **)arg = priv->dspsamplesize;
|
|
205 return(TVI_CONTROL_TRUE);
|
|
206 }
|
|
207
|
|
208 /* Video Controls */
|
|
209
|
|
210 case TVI_CONTROL_IS_VIDEO:
|
|
211 if(priv->videoready == FALSE) return TVI_CONTROL_FALSE;
|
|
212 return(TVI_CONTROL_TRUE);
|
|
213
|
|
214 case TVI_CONTROL_TUN_SET_NORM:
|
|
215 {
|
|
216 int req_mode = (int)*(void **)arg;
|
|
217
|
|
218 priv->iformat = METEOR_FMT_AUTOMODE;
|
|
219
|
|
220 if(req_mode == TV_NORM_PAL)
|
|
221 {
|
|
222 priv->iformat = METEOR_FMT_PAL;
|
|
223 priv->maxheight = PAL_HEIGHT;
|
|
224 priv->maxwidth = PAL_WIDTH;
|
|
225 priv->maxfps = PAL_FPS;
|
|
226 priv->fps = PAL_FPS;
|
|
227
|
|
228 if(priv->fps > priv->maxfps) priv->fps = priv->maxfps;
|
|
229
|
|
230 if(priv->geom.rows > priv->maxheight)
|
|
231 {
|
|
232 priv->geom.rows = priv->maxheight;
|
|
233 }
|
|
234
|
|
235 if(priv->geom.columns > priv->maxwidth)
|
|
236 {
|
|
237 priv->geom.columns = priv->maxwidth;
|
|
238 }
|
|
239 }
|
|
240
|
|
241 if(req_mode == TV_NORM_NTSC)
|
|
242 {
|
|
243 priv->iformat = METEOR_FMT_NTSC;
|
|
244 priv->maxheight = NTSC_HEIGHT;
|
|
245 priv->maxwidth = NTSC_WIDTH;
|
|
246 priv->maxfps = NTSC_FPS;
|
|
247 priv->fps = NTSC_FPS;
|
|
248
|
|
249 priv->dspframesize = priv->dspspeed*priv->dspsamplesize/8/
|
|
250 priv->fps * (priv->dspstereo+1);
|
|
251
|
|
252 if(priv->fps > priv->maxfps) priv->fps = priv->maxfps;
|
|
253
|
|
254 if(priv->geom.rows > priv->maxheight)
|
|
255 {
|
|
256 priv->geom.rows = priv->maxheight;
|
|
257 }
|
|
258
|
|
259 if(priv->geom.columns > priv->maxwidth)
|
|
260 {
|
|
261 priv->geom.columns = priv->maxwidth;
|
|
262 }
|
|
263 }
|
|
264
|
|
265 if(req_mode == TV_NORM_SECAM) priv->iformat = METEOR_FMT_SECAM;
|
|
266
|
|
267 if(ioctl(priv->btfd, METEORSFMT, &priv->iformat) < 0)
|
|
268 {
|
|
269 perror("format:ioctl");
|
|
270 return(TVI_CONTROL_FALSE);
|
|
271 }
|
|
272
|
|
273 if(ioctl(priv->btfd, METEORSETGEO, &priv->geom) < 0)
|
|
274 {
|
|
275 perror("geo:ioctl");
|
|
276 return(0);
|
|
277 }
|
|
278
|
|
279 if(ioctl(priv->btfd, METEORSFPS, &priv->fps) < 0)
|
|
280 {
|
|
281 perror("fps:ioctl");
|
|
282 return(0);
|
|
283 }
|
|
284
|
|
285 return(TVI_CONTROL_TRUE);
|
|
286 }
|
|
287
|
|
288 case TVI_CONTROL_VID_GET_FORMAT:
|
|
289 (int)*(void **)arg = IMGFMT_UYVY;
|
|
290 return(TVI_CONTROL_TRUE);
|
|
291
|
|
292 case TVI_CONTROL_VID_SET_FORMAT:
|
|
293 {
|
|
294 int req_fmt = (int)*(void **)arg;
|
|
295
|
|
296 if(req_fmt != IMGFMT_UYVY) return(TVI_CONTROL_FALSE);
|
|
297
|
|
298 return(TVI_CONTROL_TRUE);
|
|
299 }
|
|
300 case TVI_CONTROL_VID_SET_WIDTH:
|
|
301 priv->geom.columns = (int)*(void **)arg;
|
|
302
|
|
303 if(priv->geom.columns > priv->maxwidth)
|
|
304 {
|
|
305 priv->geom.columns = priv->maxwidth;
|
|
306 }
|
|
307
|
|
308 if(ioctl(priv->btfd, METEORSETGEO, &priv->geom) < 0)
|
|
309 {
|
|
310 perror("width:ioctl");
|
|
311 return(0);
|
|
312 }
|
|
313
|
|
314 return(TVI_CONTROL_TRUE);
|
|
315
|
|
316 case TVI_CONTROL_VID_GET_WIDTH:
|
|
317 (int)*(void **)arg = priv->geom.columns;
|
|
318 return(TVI_CONTROL_TRUE);
|
|
319
|
|
320 case TVI_CONTROL_VID_SET_HEIGHT:
|
|
321 priv->geom.rows = (int)*(void **)arg;
|
|
322
|
|
323 if(priv->geom.rows > priv->maxheight)
|
|
324 {
|
|
325 priv->geom.rows = priv->maxheight;
|
|
326 }
|
|
327
|
|
328 if(priv->geom.rows <= priv->maxheight / 2)
|
|
329 {
|
|
330 priv->geom.oformat |= METEOR_GEO_EVEN_ONLY;
|
|
331 }
|
|
332
|
|
333 if(ioctl(priv->btfd, METEORSETGEO, &priv->geom) < 0)
|
|
334 {
|
|
335 perror("height:ioctl");
|
|
336 return(0);
|
|
337 }
|
|
338
|
|
339 return(TVI_CONTROL_TRUE);
|
|
340
|
|
341 case TVI_CONTROL_VID_GET_HEIGHT:
|
|
342 (int)*(void **)arg = priv->geom.rows;
|
|
343 return(TVI_CONTROL_TRUE);
|
|
344
|
|
345 case TVI_CONTROL_VID_GET_FPS:
|
|
346 (int)*(void **)arg = (int)priv->fps;
|
|
347 return(TVI_CONTROL_TRUE);
|
|
348
|
|
349 /*
|
|
350 case TVI_CONTROL_VID_SET_FPS:
|
|
351 priv->fps = (int)*(void **)arg;
|
|
352
|
|
353 if(priv->fps > priv->maxfps) priv->fps = priv->maxfps;
|
|
354
|
|
355 if(ioctl(priv->btfd, METEORSFPS, &priv->fps) < 0)
|
|
356 {
|
|
357 perror("fps:ioctl");
|
|
358 return(0);
|
|
359 }
|
|
360
|
|
361 return(TVI_CONTROL_TRUE);
|
|
362 */
|
|
363
|
|
364 case TVI_CONTROL_VID_CHK_WIDTH:
|
|
365 case TVI_CONTROL_VID_CHK_HEIGHT:
|
|
366 return(TVI_CONTROL_TRUE);
|
|
367
|
|
368 }
|
|
369 return(TVI_CONTROL_UNKNOWN);
|
|
370 }
|
|
371
|
|
372 static int init(priv_t *priv)
|
|
373 {
|
|
374 int marg;
|
|
375
|
|
376 G_private = priv; /* Oooh, sick */
|
|
377
|
|
378 /* Video Configuration */
|
|
379
|
|
380 priv->videoready = TRUE;
|
|
381 priv->btdev = strdup("/dev/bktr0");
|
|
382 priv->iformat = METEOR_FMT_PAL;
|
|
383 priv->maxheight = PAL_HEIGHT;
|
|
384 priv->maxwidth = PAL_WIDTH;
|
|
385 priv->maxfps = PAL_FPS;
|
|
386 priv->source = METEOR_INPUT_DEV0;
|
|
387 priv->fps = priv->maxfps;
|
|
388
|
|
389 priv->currentframe=0;
|
|
390
|
|
391 priv->geom.columns = priv->maxwidth;
|
|
392 priv->geom.rows = priv->maxheight;
|
|
393 priv->geom.frames = 1;
|
|
394 priv->geom.oformat = METEOR_GEO_YUV_PACKED;
|
|
395
|
|
396 priv->btfd = open(priv->btdev, O_RDONLY);
|
|
397
|
|
398 if(priv->btfd < 0)
|
|
399 {
|
|
400 perror("bktr open");
|
|
401 priv->videoready = FALSE;
|
|
402 }
|
|
403
|
|
404 if(priv->videoready == TRUE &&
|
|
405 ioctl(priv->btfd, METEORSFMT, &priv->iformat) < 0)
|
|
406 {
|
|
407 perror("FMT:ioctl");
|
|
408 }
|
|
409
|
|
410 if(priv->videoready == TRUE &&
|
|
411 ioctl(priv->btfd, METEORSINPUT, &priv->source) < 0)
|
|
412 {
|
|
413 perror("SINPUT:ioctl");
|
|
414 }
|
|
415
|
|
416 if(priv->videoready == TRUE &&
|
|
417 ioctl(priv->btfd, METEORSFPS, &priv->fps) < 0)
|
|
418 {
|
|
419 perror("SFPS:ioctl");
|
|
420 }
|
|
421
|
|
422 if(priv->videoready == TRUE &&
|
|
423 ioctl(priv->btfd, METEORSETGEO, &priv->geom) < 0)
|
|
424 {
|
|
425 perror("SGEO:ioctl");
|
|
426 }
|
|
427
|
|
428 if(priv->videoready == TRUE)
|
|
429 {
|
|
430 priv->buffersize = (priv->geom.columns * priv->geom.rows * 2);
|
|
431
|
|
432 priv->buffer = (u_char *)mmap((caddr_t)0, priv->buffersize, PROT_READ,
|
|
433 MAP_SHARED, priv->btfd, (off_t)0);
|
|
434
|
|
435 if(priv->buffer == (u_char *) MAP_FAILED)
|
|
436 {
|
|
437 perror("mmap");
|
|
438 priv->videoready = FALSE;
|
|
439 }
|
|
440
|
|
441 }
|
|
442
|
|
443 /* Tuner Configuration */
|
|
444
|
|
445 priv->tunerdev = strdup("/dev/tuner0");
|
|
446 priv->tunerready = TRUE;
|
|
447
|
|
448 priv->tunerfd = open(priv->tunerdev, O_RDONLY);
|
|
449
|
|
450 if(priv->tunerfd < 0)
|
|
451 {
|
|
452 perror("tune open");
|
|
453 priv->tunerready = FALSE;
|
|
454 }
|
|
455
|
|
456 /* Audio Configuration */
|
|
457
|
|
458 priv->dspready = TRUE;
|
|
459 priv->dspdev = strdup("/dev/dsp");
|
|
460 priv->dspsamplesize = 16;
|
|
461 priv->dspstereo = 1;
|
|
462 priv->dspspeed = 44100;
|
|
463 priv->dspfmt = AFMT_S16_LE;
|
|
464 priv->dspframesize = priv->dspspeed*priv->dspsamplesize/8/priv->fps *
|
|
465 (priv->dspstereo+1);
|
|
466
|
|
467 if((priv->dspfd = open ("/dev/dsp", O_RDWR, 0)) < 0)
|
|
468 {
|
|
469 perror("/dev/dsp open");
|
|
470 priv->dspready = FALSE;
|
|
471 }
|
|
472
|
|
473 marg = (256 << 16) | 13;
|
|
474
|
|
475 if (ioctl(priv->dspfd, SNDCTL_DSP_SETFRAGMENT, &marg ) < 0 )
|
|
476 {
|
|
477 perror("setfrag");
|
|
478 priv->dspready = FALSE;
|
|
479 }
|
|
480
|
|
481 if((priv->dspready == TRUE) &&
|
|
482 (ioctl(priv->dspfd, SNDCTL_DSP_SAMPLESIZE, &priv->dspsamplesize) == -1) ||
|
|
483 (ioctl(priv->dspfd, SNDCTL_DSP_STEREO, &priv->dspstereo) == -1) ||
|
|
484 (ioctl(priv->dspfd, SNDCTL_DSP_SPEED, &priv->dspspeed) == -1) ||
|
|
485 (ioctl(priv->dspfd, SNDCTL_DSP_SETFMT, &priv->dspfmt) == -1))
|
|
486 {
|
|
487 perror ("configuration of /dev/dsp failed");
|
|
488 close(priv->dspfd);
|
|
489 priv->dspready = FALSE;
|
|
490 }
|
|
491
|
|
492 return(1);
|
|
493 }
|
|
494
|
|
495 /* that's the real start, we'got the format parameters (checked with control) */
|
|
496 static int start(priv_t *priv)
|
|
497 {
|
|
498 int marg;
|
|
499
|
|
500 if(priv->videoready == FALSE) return(0);
|
|
501
|
|
502 signal(SIGUSR1, processframe);
|
|
503 signal(SIGALRM, processframe);
|
|
504
|
|
505 marg = SIGUSR1;
|
|
506
|
|
507 if(ioctl(priv->btfd, METEORSSIGNAL, &marg) < 0)
|
|
508 {
|
|
509 perror("METEORSSIGNAL failed");
|
|
510 return(0);
|
|
511 }
|
|
512
|
|
513 marg = METEOR_CAP_CONTINOUS;
|
|
514
|
|
515 if(ioctl(priv->btfd, METEORCAPTUR, &marg) < 0)
|
|
516 {
|
|
517 perror("METEORCAPTUR failed");
|
|
518 return(0);
|
|
519 }
|
|
520
|
|
521 return(1);
|
|
522 }
|
|
523
|
|
524 static int uninit(priv_t *priv)
|
|
525 {
|
|
526 int marg;
|
|
527
|
|
528 if(priv->videoready == FALSE) return(0);
|
|
529
|
|
530 marg = METEOR_SIG_MODE_MASK;
|
|
531
|
|
532 if(ioctl( priv->btfd, METEORSSIGNAL, &marg) < 0 )
|
|
533 {
|
|
534 perror("METEORSSIGNAL");
|
|
535 return(0);
|
|
536 }
|
|
537
|
|
538 marg = METEOR_CAP_STOP_CONT;
|
|
539
|
|
540 if(ioctl(priv->btfd, METEORCAPTUR, &marg) < 0 )
|
|
541 {
|
|
542 perror("METEORCAPTUR STOP");
|
|
543 return(0);
|
|
544 }
|
|
545
|
|
546 close(priv->btfd);
|
|
547 close(priv->dspfd);
|
|
548
|
|
549 priv->dspfd = -1;
|
|
550 priv->btfd = -1;
|
|
551
|
|
552 priv->dspready = priv->videoready = FALSE;
|
|
553
|
|
554 return(1);
|
|
555 }
|
|
556
|
|
557
|
|
558 static int grab_video_frame(priv_t *priv, char *buffer, int len)
|
|
559 {
|
|
560 sigset_t sa_mask;
|
|
561
|
|
562 if(priv->videoready == FALSE) return(0);
|
|
563
|
|
564 alarm(1);
|
|
565 sigfillset(&sa_mask);
|
|
566 sigdelset(&sa_mask,SIGINT);
|
|
567 sigdelset(&sa_mask,SIGUSR1);
|
|
568 sigdelset(&sa_mask,SIGALRM);
|
|
569 sigsuspend(&sa_mask);
|
|
570 alarm(0);
|
|
571
|
|
572 memcpy(buffer, priv->buffer, len);
|
|
573
|
|
574 return(priv->currentframe);
|
|
575 }
|
|
576
|
|
577 static int get_video_framesize(priv_t *priv)
|
|
578 {
|
|
579 return(priv->geom.columns*priv->geom.rows*16/8);
|
|
580 }
|
|
581
|
|
582 static int grab_audio_frame(priv_t *priv, char *buffer, int len)
|
|
583 {
|
|
584 struct audio_buf_info abi;
|
|
585 int bytesread;
|
|
586 int ret;
|
|
587
|
|
588 if(priv->dspready == FALSE) return 0;
|
|
589
|
|
590 /* Get exactly one frame of audio, which forces video sync to audio.. */
|
|
591
|
|
592 bytesread=read(priv->dspfd, buffer, len);
|
|
593
|
|
594 while(bytesread < len)
|
|
595 {
|
|
596 ret=read(priv->dspfd, &buffer[bytesread], len-bytesread);
|
|
597
|
|
598 if(ret == -1)
|
|
599 {
|
|
600 perror("Audio read failed!");
|
|
601 return 0;
|
|
602 }
|
|
603
|
|
604 bytesread+=ret;
|
|
605 }
|
|
606
|
|
607 if(ioctl(priv->dspfd, SNDCTL_DSP_GETISPACE, &abi) < 0)
|
|
608 {
|
|
609 perror("abi:ioctl");
|
|
610 return(TVI_CONTROL_FALSE);
|
|
611 }
|
|
612
|
|
613 return(abi.bytes/len);
|
|
614 }
|
|
615
|
|
616 static int get_audio_framesize(priv_t *priv)
|
|
617 {
|
|
618 if(priv->dspready == FALSE) return 0;
|
|
619
|
|
620 return(priv->dspframesize);
|
|
621 }
|
|
622
|
|
623 static int getinput(int innumber)
|
|
624 {
|
|
625 switch(innumber)
|
|
626 {
|
|
627 case 0: return METEOR_INPUT_DEV0; /* RCA */
|
|
628 case 1: return METEOR_INPUT_DEV1; /* Tuner */
|
|
629 case 2: return METEOR_INPUT_DEV2; /* In 1 */
|
|
630 case 3: return METEOR_INPUT_DEV3; /* In 2 */
|
|
631 case 4: return METEOR_INPUT_DEV_RGB; /* RGB */
|
|
632 case 5: return METEOR_INPUT_DEV_SVIDEO; /* SVid */
|
|
633 }
|
|
634
|
|
635 return 0;
|
|
636 }
|
|
637
|
|
638 #endif /* USE_TV */
|