Date: Fri, 27 Jun 1997 12:25:09 -0700 (PDT) From: Yixin Jin <yjin@rain.cs.ucla.edu> To: Kenneth Merry <ken@gt.ed.net> Cc: smp@csn.net, rhh@ct.picker.com, multimedia@freebsd.org Subject: Re: Fxtv Message-ID: <Pine.SOL.3.95.970627122118.10995A-100000@rain> In-Reply-To: <199706271922.PAA19130@housing1.stucen.gatech.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi there
Actually, I found the list of HRC frequence, and I changed only one place
in the driver code. Then I recompile the kernel, reboot the machine, Fxtv
works beautifully in my machine using HRC cable. I'd like to share it
with you, and I will send the code to you tonight. ( I can not reach my PC
right now ).
Yixin
On Fri, 27 Jun 1997, Kenneth Merry wrote:
> Kenneth Merry wrote...
> > Steve Passe wrote...
> > > >However, still HRC is not supported, but at this time even
> > > >channel 2 doesn't show up. I change to IRC. Then I can change the
> > > >channels, but only channel 5 and channel 6 can be received correctly.
> > > >And It seems that I can receive the voice of other channels, but not
> > > >video.
> > >
> > > There is no support for HRC, primarily because I didn't have a clue to what
> > > frequencies it uses.
> >
>
> [ ... ]
>
> > I created a table of channels and frequencies, and made a little
> > command line tuner program based on freq.c that changed channels for me.
> >
> > The reason I'm being so vague here is that my computer is boxed up
> > (I'm moving) and I won't be able to get to it for a couple of weeks. If
> > y'all are still in the dark about HRC frequencies in a week or two, let me
> > know and I'll forward out my frequency table. (and the slightly modified
> > version of freq.c as well..)
>
> Okay, here is my tuner program. The structure contains the
> frequencies for the various HRC channels. So if there's anyone out there
> on a HRC cable system, you might want to try this out and see if it works
> for you.
>
> Ken
> --
> Kenneth Merry
> ken@gt.ed.net
>
>
>
> #include <stdio.h>
> #include <stdlib.h>
> #include <sys/fcntl.h>
> #include <unistd.h>
> #include <errno.h>
>
> #include <machine/ioctl_meteor.h>
> #include <machine/ioctl_bt848.h>
>
> #define DEVICE "/dev/tuner0"
>
> typedef struct {
> float frequency;
> int channel;
> } chaninfo_t;
>
> chaninfo_t chaninfo[] =
> {
> { 73.25, 1 },
> { 55.25, 2 },
> { 61.25, 3 },
> { 67.25, 4 },
> { 77.25, 5 },
> { 83.25, 6 },
> { 175.25, 7 },
> { 181.25, 8 },
> { 187.25, 9 },
> { 193.25, 10 },
> { 199.25, 11 },
> { 205.25, 12 },
> { 211.25, 13 },
> { 121.25, 14 },
> { 127.25, 15 },
> { 133.25, 16 },
> { 139.25, 17 },
> { 145.25, 18 },
> { 151.25, 19 },
> { 157.25, 20 },
> { 163.25, 21 },
> { 169.25, 22 },
> { 217.25, 23 },
> { 223.25, 24 },
> { 229.25, 25 },
> { 235.25, 26 },
> { 241.25, 27 },
> { 247.25, 28 },
> { 253.25, 29 },
> { 259.25, 30 },
> { 265.25, 31 },
> { 271.25, 32 },
> { 277.25, 33 },
> /* { 293.25, 34 }, */
> { 283.25, 34 },
> { 289.25, 35 },
> { 295.25, 36 },
> { 301.25, 37 },
> { 307.25, 38 },
> { 313.25, 39 },
> { 319.25, 40 },
> { 325.25, 41 },
> { 331.25, 42 },
> { 337.25, 43 },
> { 343.25, 44 },
> { 349.25, 45 },
> { 355.25, 46 },
> { 361.25, 47 },
> { 367.25, 48 },
> { 373.25, 49 },
> { 379.25, 50 },
> { 385.25, 51 },
> { 391.25, 52 },
> { 397.25, 53 },
> { 403.25, 54 },
> { 409.25, 55 },
> { 415.25, 56 },
> { 421.25, 57 },
> { 427.25, 58 },
> { 433.25, 59 },
> { 439.25, 60 },
> { 445.25, 61 },
> { 451.25, 62 },
> { 457.25, 63 },
> { 463.25, 64 },
> { 469.25, 65 },
> { 475.25, 66 },
> { 481.25, 67 },
> { 487.25, 68 },
> { 493.25, 69 },
> { 499.25, 70 },
> { 505.25, 71 },
> { 511.25, 72 },
> { 517.25, 73 },
> { 523.25, 74 },
> { 529.25, 75 },
> { 535.25, 76 },
> { 541.25, 77 },
> { 547.25, 78 },
> { 553.25, 79 },
> { 559.25, 80 },
> { 565.25, 81 },
> { 571.25, 82 },
> { 577.25, 83 },
> { 583.25, 84 },
> { 589.25, 85 },
> { 595.25, 86 },
> { 601.25, 87 },
> { 607.25, 88 },
> { 613.25, 89 },
> { 619.25, 90 },
> { 625.25, 91 },
> { 631.25, 92 },
> { 637.25, 93 },
> { 643.25, 94 },
> { 91.25, 95 },
> { 97.25, 96 },
> { 103.25, 97 },
> { 109.25, 98 },
> { 115.25, 99 },
> { 649.25, 100 },
> { 655.25, 101 },
> { 661.25, 102 },
> { 667.25, 103 },
> { 673.25, 104 },
> { 679.25, 105 },
> { 685.25, 106 },
> { 691.25, 107 },
> { 697.25, 108 },
> { 703.25, 109 },
> { 709.25, 110 },
> { 715.25, 111 },
> { 721.25, 112 },
> { 727.25, 113 },
> { 733.25, 114 },
> { 739.25, 115 },
> { 745.25, 116 },
> { 751.25, 117 },
> { 757.25, 118 },
> { 763.25, 119 },
> { 769.25, 120 },
> { 775.25, 121 },
> { 781.25, 122 },
> { 787.25, 123 },
> { 793.25, 124 },
> { 799.25, 125 }
> };
>
> void
> byebye( int fd )
> {
> fprintf( stderr, "ioctl failed: %s\n", strerror(errno) );
> close( fd );
> exit( 1 );
> }
>
>
> main(int ac, char **av)
> {
> int x, ch;
> char s[ 128 ];
> int video;
> int n = 0;
> float foo;
> float newfreq;
>
> if ((video = open( DEVICE, O_RDONLY)) < 0)
> byebye( video );
>
> fprintf (stdout, "freq(%d)> ", n++);
> while ( fgets( s, 128, stdin ) ) {
> switch ( s[0] ) {
> case 'b':
> if (ioctl(video, BT848_CCBARS, &x) < 0)
> byebye( video );
> break;
>
> case 'B':
> if (ioctl(video, BT848_SCBARS, &x) < 0)
> byebye( video );
> break;
>
> case 'f':
> if (ioctl(video, TVTUNER_GETFREQ, &x) < 0)
> byebye( video );
> else {
> foo = x / 16;
> fprintf(stderr, "frequency: %f\n", foo);
> }
>
> if (ioctl(video, TVTUNER_GETSTATUS, &x) < 0)
> byebye( video );
> else
> fprintf(stderr, "status: 0x%02x\n", x );
> break;
>
> case 'F':
> x = strtol( &s[ 2 ], NULL, 10 );
> newfreq = atof (&s[ 2 ]);
> fprintf( stderr, "freq: %f\n", newfreq);
> x = newfreq * 16;
> if (ioctl(video, TVTUNER_SETFREQ, &x) < 0)
> byebye( video );
> sleep( 1 );
> if (ioctl(video, TVTUNER_GETSTATUS, &x) < 0)
> byebye( video );
> else
> fprintf(stderr, "status: 0x%02x\n", x );
> break;
>
> case 's':
> x = 0;
> if (ioctl(video, BT848_GSTATUS, &x) < 0)
> byebye( video );
> else
> fprintf(stderr, "bt848 status: 0x%08x\n", x );
>
> if (ioctl(video, TVTUNER_GETSTATUS, &x) < 0)
> byebye( video );
> else
> fprintf(stderr, "tuner status: 0x%02x\n", x );
> break;
>
> case 't':
> x = strtol( &s[ 2 ], NULL, 10 );
> if (ioctl(video, TVTUNER_SETTYPE, &x) < 0)
> byebye( video );
>
> sleep( 1 );
> if (ioctl(video, TVTUNER_GETSTATUS, &x) < 0)
> byebye( video );
> else
> fprintf(stderr, "status: 0x%02x\n", x );
> break;
>
> case 'q':
> close (video);
> exit (0);
> break;
>
> default:
> x = atoi( s );
> if ((x < 2) || (x > 125)) {
> fprintf (stderr, "channel %d out of range\n", x);
> }
> else {
> /*
> if (ioctl(video, TVTUNER_SETCHNL, &x) < 0)
> byebye( video );
> */
> newfreq = chaninfo[x - 1].frequency - 1.25;
> x = newfreq * 16;
> if (ioctl(video, TVTUNER_SETFREQ, &x) < 0)
> byebye(video);
> }
> break;
> }
> fprintf (stdout, "freq(%d)> ", n++);
> }
>
> close(video);
> exit(0);
> }
>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SOL.3.95.970627122118.10995A-100000>
