From owner-freebsd-multimedia@FreeBSD.ORG Sat Jan 31 11:23:19 2004 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 40F2F16A4CE for ; Sat, 31 Jan 2004 11:23:19 -0800 (PST) Received: from feith1.FEITH.COM (feith1.FEITH.COM [192.251.93.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id B1C2043D54 for ; Sat, 31 Jan 2004 11:23:17 -0800 (PST) (envelope-from john@feith.com) Received: from jwlab.FEITH.COM (jwlab.FEITH.COM [192.251.93.16]) by feith1.FEITH.COM (8.12.10+Sun/8.12.9) with ESMTP id i0VJMOAL021926; Sat, 31 Jan 2004 14:22:24 -0500 (EST) Received: (from john@localhost) by jwlab.FEITH.COM (8.11.7+Sun/8.11.7) id i0VJL0028112; Sat, 31 Jan 2004 14:21:00 -0500 (EST) Date: Sat, 31 Jan 2004 14:21:00 -0500 (EST) From: John Wehle Message-Id: <200401311921.i0VJL0028112@jwlab.FEITH.COM> To: rclancey-freebsd-multimedia@dfmm.org Content-Type: text X-Scanned-By: MIMEDefang 2.39 X-Archived: cashew.FEITH.COM cc: multimedia@freebsd.org Subject: Re: FreeBSD 4.9 Hauppauge PVR-250 / 350 Driver Patch (Jan 25, 2004) X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2004 19:23:19 -0000 > 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 #include #include #include #include #include /****************************************************************************/ /* 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 | | -------------------------------------------------------------------------