Date: Sun, 6 Mar 2005 22:28:23 -0500 From: Mathew Kanner <mat@cnd.mcgill.ca> To: Pyun YongHyeon <yongari@kt-is.co.kr> Cc: Mathew Kanner <mat@cnd.mcgill.ca> Subject: Re: uaudio patch, configurable buffer size Message-ID: <20050307032823.GH4237@cnd.mcgill.ca> In-Reply-To: <20050307025927.GB951@kt-is.co.kr> References: <20050305224005.GC4237@cnd.mcgill.ca> <20050306162811.694d9c82@Magellan.Leidinger.net> <20050307025927.GB951@kt-is.co.kr>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mar 06, Pyun YongHyeon wrote: > On Sun, Mar 06, 2005 at 04:28:11PM +0100, Alexander Leidinger wrote: > > On Sat, 5 Mar 2005 17:40:05 -0500 > > Mathew Kanner <mat@cnd.mcgill.ca> wrote: > > > > > Hi All, > > > I couldn't use my usb device because the default buffer size > > > (16*1024 bytes) was too much to be allocated (dma changes that > > > happened a while ago). The following is a patch to make it a tunable: > > > > > > http://www.cnd.mcgill.ca/~mat/uaudio-HEAD-buffersize-tunable.diff.gz > > > > There's an open PR about it. It changes the buffer size. AFAIR it also > > talks about changing the value of a parameter to a busdma call instead. > > I've patched the busdma call and now the device is detected here (but I > > don't hear any output...). > > > > I think you should add another set of validation code: The buffer size > > is divided by 2 in the code, so I think it should at least print a > > warning if "buffsize % 2 != 0". > > > > AFAIK no. The buffer size should be power of 2. > See pcm_getbuffersize() in sound.c. Hi Pyun, Darn, I totally forgot about the tunable in the form of hw.snd.pcm0.buffersize as is used in pcm_getbuffersize. This probably means that this patch isn't so necessary. Though there might be some value in having a tunable just for uaudio devices since we don't know the what pcm unit it will be before the devices comes (ok, they're seqeuential). Per your other e-mail, as present in the source, is having the default size of 16*1024 and doing bus_dma_tag_create with a maxsegz of 0x3fff (16*1024-1) a bug? --Mat
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050307032823.GH4237>