From owner-freebsd-ports@FreeBSD.ORG Wed May 14 11:59:44 2003 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C06B037B401 for ; Wed, 14 May 2003 11:59:44 -0700 (PDT) Received: from boromir.vpop.net (dns1.vpop.net [207.178.248.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6688643F93 for ; Wed, 14 May 2003 11:59:44 -0700 (PDT) (envelope-from mreimer@vpop.net) Received: from vpop.net (bilbo.vpop.net [65.103.33.41]) by boromir.vpop.net (Postfix) with ESMTP id D3CB83A5E9F; Wed, 14 May 2003 11:59:41 -0700 (PDT) Message-ID: <3EC29250.7020508@vpop.net> Date: Wed, 14 May 2003 14:00:32 -0500 From: Matthew Reimer Organization: VPOP Technologies, Inc. User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.3) Gecko/20030429 X-Accept-Language: en-us, en MIME-Version: 1.0 To: ports@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: ffmpeg w/bktr no sound X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2003 18:59:45 -0000 Audio recording wasn't working for me, so I started poking around and finally came up with a hack that made audio recording work. Apparently the audio wasn't getting initialized properly; the fix seems to be to issue TVTUNER_SETTYPE and a TVTUNER_SETCHNL ioctls like the pseudo-patch below. Of course the channel set shouldn't be hard-coded. Hopefully this will work for you Pete. Matt --- grab_bsdbktr.c Thu Feb 27 11:43:18 2003 +++ grab_bsdbktr.c Thu Feb 27 14:08:51 2003 @@ -139,6 +140,17 @@ perror ("METEORSINPUT"); return -EIO; } + +/* HACK */ +{ + int d; + + ioctl(s->tuner_fd, TVTUNER_GETCHNL, &d); + + c = CHNLSET_NABCST; + ioctl(s->tuner_fd, TVTUNER_SETTYPE, &c); + + ioctl(s->tuner_fd, TVTUNER_SETCHNL, &d); +} + video_buf = mmap((caddr_t)0, width*height*3, PROT_READ, MAP_SHARED, video_fd, (off_t) 0); if (video_buf == MAP_FAILED) {