Date: Wed, 9 Mar 2005 12:43:22 +0900 From: Pyun YongHyeon <yongari@kt-is.co.kr> To: Mathew Kanner <mat@cnd.mcgill.ca> Cc: Alexander@Leidinger.net Subject: Re: uaudio patch, configurable buffer size Message-ID: <20050309034322.GC8398@kt-is.co.kr> In-Reply-To: <20050308123700.GB2944@cnd.mcgill.ca> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050309034322.GC8398>