uaudio patch, configurable buffer size

Pyun YongHyeon yongari at
Mon Mar 7 02:58:10 GMT 2005

On Sat, Mar 05, 2005 at 05:40:05PM -0500, Mathew Kanner 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:

Hi Mathew,

I guess the real reason DMA buffer allocation failure comes from
the fixed argument 0x3fff of bus_dma_tag_create(9). And if we allow
TUNABLE for "hw.snd.uaudio.default_buffer_size" we should also
update the argument of bus_dma_tag_create(9) too or we couldn't
allocate larger buffer size than 16383(0x3fff). Another thing to
note is that we are not allowed to use buffer size less than 4KB
since we use
bufsz = pcm_getbuffersize(dev, 4096, UAUDIO_PCM_BUFF_SIZE, 65536);
in uaudio_pcm.c. So I think you should also reject size less than

Pyun YongHyeon	|	yongari at

More information about the freebsd-multimedia mailing list