From owner-freebsd-multimedia@FreeBSD.ORG Wed Mar 9 03:43:54 2005 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 2B78C16A4CE for ; Wed, 9 Mar 2005 03:43:54 +0000 (GMT) Received: from ns.kt-is.co.kr (ns.kt-is.co.kr [211.218.149.125]) by mx1.FreeBSD.org (Postfix) with ESMTP id 61ED843D2D for ; Wed, 9 Mar 2005 03:43:53 +0000 (GMT) (envelope-from yongari@kt-is.co.kr) Received: from michelle.kt-is.co.kr (ns2.kt-is.co.kr [220.76.118.193]) (authenticated bits=128) by ns.kt-is.co.kr (8.12.10/8.12.10) with ESMTP id j293hZAh009558 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Wed, 9 Mar 2005 12:43:36 +0900 (KST) Received: from michelle.kt-is.co.kr (localhost.kt-is.co.kr [127.0.0.1]) by michelle.kt-is.co.kr (8.13.1/8.13.1) with ESMTP id j293haJK008791 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 9 Mar 2005 12:43:36 +0900 (KST) (envelope-from yongari@kt-is.co.kr) Received: (from yongari@localhost) by michelle.kt-is.co.kr (8.13.1/8.13.1/Submit) id j293hMbX008789; Wed, 9 Mar 2005 12:43:22 +0900 (KST) (envelope-from yongari@kt-is.co.kr) Date: Wed, 9 Mar 2005 12:43:22 +0900 From: Pyun YongHyeon To: Mathew Kanner Message-ID: <20050309034322.GC8398@kt-is.co.kr> References: <20050306171027.GE4237@cnd.mcgill.ca> <20050306184416.5603976c@Magellan.Leidinger.net> <20050306204908.GF4237@cnd.mcgill.ca> <20050308.154828.963419604.kazuhito@ph.noda.tus.ac.jp> <20050308123700.GB2944@cnd.mcgill.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050308123700.GB2944@cnd.mcgill.ca> User-Agent: Mutt/1.4.2.1i X-Filter-Version: 1.11a (ns.kt-is.co.kr) cc: freebsd-multimedia@freebsd.org cc: Alexander@Leidinger.net Subject: Re: uaudio patch, configurable buffer size X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: yongari@kt-is.co.kr List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Mar 2005 03:43:54 -0000 On Tue, Mar 08, 2005 at 07:37:00AM -0500, Mathew Kanner wrote: > On Mar 08, Kazuhito HONDA wrote: > > Hello, > > > > `he' is me, isn't he? > > > > I haven't found that FreeBSD has the sampling rate converter. > > So I have made several ugly solutions for uaudio. > > But when uaudio can use the sampling rate converter, > > they should be canceled. > > Hi Kazuhito, > FreeBSD does have a format/sample rate converter in the > kernel, refer to hw.snd.report_soft_formats in the snd(4). However, I believe the kernel format converter should be used in the last resort. The conversion consumes extra CPU cycles in kernel and it would generate "audio hiccups" under high network or disk I/Os. Accessing hardware buffer in kernel needs a Giant lock or device supplied lock and the conversion needs manipulations of every bytes of audio streams. Also audio application could be fooled with hw.snd.report_soft_formats and the application will think that the hardware supports almost every format. That would impose unnecessary burden on pcm(4). There are some comments in OSS Programmer's Guide too.(See page 31.) > it won't work with uaudio until we probe the capabilities properly. Yes. Reporting correct hardware capabilities is prerequisit to correct operation of audio hardware. > See my other e-mail to you a couple of minutes ago. > --Mat -- Regards, Pyun YongHyeon http://www.kr.freebsd.org/~yongari | yongari@freebsd.org