Date: Sat, 31 Jan 2004 14:21:00 -0500 (EST) From: John Wehle <john@feith.com> To: rclancey-freebsd-multimedia@dfmm.org Cc: multimedia@freebsd.org Subject: Re: FreeBSD 4.9 Hauppauge PVR-250 / 350 Driver Patch (Jan 25, 2004) Message-ID: <200401311921.i0VJL0028112@jwlab.FEITH.COM>
index | next in thread | raw e-mail
> mplayer -tv driver=bsdbt848:channel=28:device=/dev/bktr0 /dev/bktr0
It's not really a bt848 so various pieces of software unfortunately
don't work correctly with it. Only a subset of the ioctls are supported
and there's only one device node (/dev/tuner0 isn't supported ... all
access / ioctls go through /dev/bktr0 ... on my system I have tuner0
linked to bktr0). However, it should be a easy task to write a cxm
driver for mplayer.
> #!/usr/bin/perl
> ...
Yep ... I see the same error here using your perl script.
> have any tips?
I use the enclosed program.
-- John
-------------8<-----------------------------8<-----------------------
#include <stdio.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <machine/ioctl_bt848.h>
#include <machine/ioctl_meteor.h>
#include <unistd.h>
/****************************************************************************/
/* setchannel.c - Set the channel of the bktr tuner card. */
/* */
/* COMPILE WITH: cc -o setchannel setchannel.c */
/****************************************************************************/
static void
usage()
{
printf("Usage: setchannel <-c|-s|-t|-t channel|channel>\n"
" -c Select composite input.\n"
" -s Select svideo input.\n"
" -t Select tuner.\n");
}
int main( int argc, char *argv[] )
{
int c;
int status;
int tfd;
unsigned int channel;
unsigned long device;
channel = 0;
device = 0;
status = 0;
while ((c = getopt (argc, argv, "cst")) != -1)
switch (c) {
case 'c':
device = METEOR_INPUT_DEV2;
break;
case 's':
device = METEOR_INPUT_DEV_SVIDEO;
break;
case 't':
device = METEOR_INPUT_DEV1;
break;
default:
usage ();
exit (1);
}
if ( optind < argc)
channel = atoi( argv[optind] );
if (! channel && ! device) {
usage ();
exit (1);
}
tfd = open( "/dev/bktr0", O_RDONLY );
if ( tfd < 0 ) {
perror( "open() of /dev/bktr0 failed." );
exit(1);
}
if (device)
if ( ioctl( tfd, METEORSINPUT, &device ) < 0 ) {
perror( "ioctl( tfd, METEORSINPUT ) failed." );
status = 1;
}
if (channel)
if ( ioctl( tfd, TVTUNER_SETCHNL, &channel ) < 0 ) {
perror( "ioctl( tfd, TVTUNER_SETCHNL ) failed." );
status = 1;
}
close ( tfd );
exit ( status );
}
-------------------------------------------------------------------------
| Feith Systems | Voice: 1-215-646-8000 | Email: john@feith.com |
| John Wehle | Fax: 1-215-540-5495 | |
-------------------------------------------------------------------------
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200401311921.i0VJL0028112>
