From owner-freebsd-multimedia Sat Sep 13 05:27:01 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id FAA02317 for multimedia-outgoing; Sat, 13 Sep 1997 05:27:01 -0700 (PDT) Received: from labinfo.iet.unipi.it (labinfo.iet.unipi.it [131.114.9.5]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id FAA02302 for ; Sat, 13 Sep 1997 05:26:40 -0700 (PDT) Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id NAA06019 for multimedia@freebsd.org; Sat, 13 Sep 1997 13:12:05 +0200 From: Luigi Rizzo Message-Id: <199709131112.NAA06019@labinfo.iet.unipi.it> Subject: fxtv and pal... To: multimedia@freebsd.org Date: Sat, 13 Sep 1997 13:12:05 +0200 (MET DST) X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-freebsd-multimedia@freebsd.org X-Loop: FreeBSD.org Precedence: bulk forget who was who had problems with fxtv and pal modes... it seems to work fine here, once you realize that all defaults are against you :) The correct command here is ./fxtv -inputFormat pal -antennaFreqSet weurope -defaultInput tuner (you cannot specify inputFormat or antennaFreqSet from the menus). If you still have problems the following test program might help (who said that source code is the best documentation ...). Run it in a separate xterm, it lets you change things with simple commands such as C27 (select channel 27) T4 (tuner type 4 corresponds to weurope) B60 (brightness 60) Cheers Luigi ----- tune.c ------ #include #include #include #include #include #include #define TUNER #include int video; main(int ac, char **av) { int x, ch; char s[ 128 ]; if ((video = open("/dev/tuner", O_RDONLY)) < 0) { fprintf(stderr, "open failed: %s\n", strerror(errno)); goto bybye; } if (ac>1) { int i; do_fn("T4"); for (i=88*16; i<800*16; i+=32) { sprintf(s,"F%d", i); do_fn(s); do_fn("f"); sleep(2); } } while ( fgets( s, 100, stdin ) ) { do_fn(s); } bybye: close(video); exit(0); } do_fn(char *s) { int cmd = s[0]; int x = atoi( s+1 ); switch (cmd) { case 'K' : /* afc */ case 'k' : if (ioctl(video, cmd =='k'? BT848_CCBARS: BT848_SCBARS, &x) < 0) fprintf(stderr, "setafc ioctl failed: %s\n", strerror(errno)); else fprintf(stderr, "Current afc %d\n", x); break; case 'A' : /* afc */ case 'a' : if (ioctl(video, cmd =='a'? TVTUNER_GETAFC: TVTUNER_SETAFC, &x) < 0) fprintf(stderr, "setafc ioctl failed: %s\n", strerror(errno)); else fprintf(stderr, "Current afc %d\n", x); break; case 'X' : /* contrast */ case 'x' : if (ioctl(video, cmd =='x'? BT848_GCONT: BT848_SCONT, &x) < 0) fprintf(stderr, "setcontrast ioctl failed: %s\n", strerror(errno)); else fprintf(stderr, "Current contrast %d\n", x); break; case 'B' : /* bright */ case 'b' : if (ioctl(video, cmd =='b'? BT848_GBRIG: BT848_SBRIG, &x) < 0) fprintf(stderr, "setbright ioctl failed: %s\n", strerror(errno)); else fprintf(stderr, "Current bright %d\n", x); break; case 'T': case 't': if (ioctl(video, cmd=='t'?TVTUNER_GETTYPE:TVTUNER_SETTYPE, &x) < 0) fprintf(stderr, "settype ioctl failed: %s\n", strerror(errno)); else fprintf(stderr, "Current type %d\n", x); break; case 's' : /* get status */ if (ioctl(video, TVTUNER_GETSTATUS, &x) < 0) fprintf(stderr, "getchan ioctl failed: %s\n", strerror(errno)); else fprintf(stderr, "Current status %d\n", x); break; case 'f' : /* get freq */ case 'F' : /* set freq */ if (ioctl(video, cmd=='f'?TVTUNER_GETFREQ:TVTUNER_SETFREQ, &x) < 0) fprintf(stderr, "getfreq ioctl failed: %s\n", strerror(errno)); else fprintf(stderr, "Current freq %d (%8.3f MHz)\n", x, (double)x/16.0); break; case 'c' : /* get channel */ case 'C' : /* set channel */ if (ioctl(video, cmd=='c'?TVTUNER_GETCHNL:TVTUNER_SETCHNL, &x) < 0) fprintf(stderr, "getchan ioctl failed: %s\n", strerror(errno)); else fprintf(stderr, "Current chan %d\n", x); break; } }