From owner-freebsd-multimedia Sun Aug 17 11:20:13 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id LAA13718 for multimedia-outgoing; Sun, 17 Aug 1997 11:20:13 -0700 (PDT) Received: from Ilsa.StevesCafe.com (Ilsa.StevesCafe.com [205.168.119.129]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id LAA13700 for ; Sun, 17 Aug 1997 11:20:06 -0700 (PDT) Received: from Ilsa.StevesCafe.com (localhost [127.0.0.1]) by Ilsa.StevesCafe.com (8.8.7/8.8.5) with ESMTP id MAA07175; Sun, 17 Aug 1997 12:19:55 -0600 (MDT) Message-Id: <199708171819.MAA07175@Ilsa.StevesCafe.com> X-Mailer: exmh version 2.0gamma 1/27/96 From: Steve Passe To: Kyle Mestery cc: Amancio Hasty , Kenneth Merry , freebsd-multimedia@FreeBSD.ORG Subject: Re: Problem with my Wincast, fxtv In-reply-to: Your message of "Sun, 17 Aug 1997 12:12:54 CDT." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 17 Aug 1997 12:19:55 -0600 Sender: owner-freebsd-multimedia@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Hi, Well, if your feeling adverturous perhaps you should write a simple channel scanner. its something the driver could use. b4 doing that, try turning on AFC (auto freq control) I think fxtv has a menu item for that, but if not, use ioctl TVTUNER_SETAFC. this will cause the tuner code to adjust the selected frequency within a +-5 mHz range while polling the hardware for a "centered" signal. --- if that doesn't help a crude userland auto scan would be something like: ******************** THE FOLLOWING IS ALL THEORY *********************** #define AFC_BITS 0x07 #define AFC_FREQ_MINUS_125 0x00 #define AFC_FREQ_MINUS_62 0x01 #define AFC_FREQ_CENTERED 0x02 #define AFC_FREQ_PLUS_62 0x03 #define AFC_FREQ_PLUS_125 0x04 #define BOTTOM (unsigned long)(55.25 * 16) #define TOP (unsigned long)(655.25 * 16) int afcon = 1; unsigned long freq, freq2, status; int fd; fd = open( ... ); if ( ioctl( fd, TVTUNER_SETAFC, &afcon ) < 0 ) { ERROR; } for ( freq = BOTTOM; freq < TOP; freq += (6.0 * 16) ) { printf( "\ntrying freq: %f", (double)((double)freq / 16.0) ); if ( ioctl( fd, TVTUNER_SETFREQ, &freq ) < 0 ) { ERROR; } if ( ioctl( fd, TVTUNER_GETFREQ, &freq2 ) < 0 ) { ERROR; } if ( ioctl( fd, TVTUNER_GETSTATUS, &status ) < 0 ) { ERROR; } if ( !(status & 0x40) ) { printf( ", no lock (?)\n" ); sleep( 1 ); continue; } /** XXX not sure about the / 16 */ printf( "\nafc picked freq: %f", (double)((double)freq2 / 16.0) ); printf( ", hit return to continue..." ); gets(); } -- Steve Passe | powered by smp@csn.net | Symmetric MultiProcessor FreeBSD