From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 9 19:39:16 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CAA5216A46F for ; Mon, 9 Jul 2007 19:39:16 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe10.swip.net [212.247.155.33]) by mx1.freebsd.org (Postfix) with ESMTP id 0FB8813C4D5 for ; Mon, 9 Jul 2007 19:39:15 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] Received: from [212.17.141.54] (account mc467741@c2i.net HELO [10.150.241.19]) by mailfe10.swip.net (CommuniGate Pro SMTP 5.1.10) with ESMTPA id 372192689; Mon, 09 Jul 2007 21:39:11 +0200 From: Hans Petter Selasky To: freebsd-hackers@freebsd.org Date: Mon, 9 Jul 2007 21:39:10 +0200 User-Agent: KMail/1.9.5 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200707092139.10519.hselasky@c2i.net> Cc: Christopher Davis , multimedia@freebsd.org Subject: Re: Audio driver template X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2007 19:39:16 -0000 On Monday 09 July 2007 20:47, Christopher Davis wrote: > http://people.freebsd.org/~cg/template.c > > Thought I would take a look at the audio driver template as > part of my task to modernize drivers, soc2007. I would simplify > the read and write functions to avoid using the bus tag and > handle, but I'm not sure what else to do to bring it up to date. > > How else can it be improved? Regarding echo cancelling, you should add some code that time-stamps the audio data, and computes the current number of bytes in the RX/TX FIFOs! Look at the exported functions in the Echo Canceller for I4B: http://www.turbocat.net/~hselasky/isdn4bsd/sources/src/sys/i4b/layer1/i4b_echo_cancel.c The echo canceller above is a work in progress. --HPS