Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Mar 2005 11:57:42 +0900
From:      Pyun YongHyeon <yongari@kt-is.co.kr>
To:        Mathew Kanner <mat@cnd.mcgill.ca>
Cc:        freebsd-multimedia@freebsd.org
Subject:   Re: uaudio patch, configurable buffer size
Message-ID:  <20050307025742.GA951@kt-is.co.kr>
In-Reply-To: <20050305224005.GC4237@cnd.mcgill.ca>
References:  <20050305224005.GC4237@cnd.mcgill.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
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:
 > 
 > http://www.cnd.mcgill.ca/~mat/uaudio-HEAD-buffersize-tunable.diff.gz
 > 

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
4KB.

-- 
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?20050307025742.GA951>