*BSD News Article 71214


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!nntp.coast.net!howland.reston.ans.net!usenet.ins.cwru.edu!news.csuohio.edu!usenet
From: jabaker@grail.cba.csuohio.edu (jason)
Newsgroups: comp.unix.bsd.netbsd.misc
Subject: /dev/audio blocksizes
Date: 17 Jun 1996 09:25:52 -0400
Organization: Organization of Amway Salesmen
Lines: 21
Sender: jason@jlbaker.async.csuohio.edu
Message-ID: <v688qo93x.fsf@jlbaker.async.csuohio.edu>
NNTP-Posting-Host: porta24.async.csuohio.edu
X-Newsreader: Gnus v5.0.13


I am confused by the following code in audiosetinfo in
/sys/dev/audio.c: 
		if (ai->blocksize == 0)
			bsize = audio_blocksize;
		else if (ai->blocksize > AU_RING_SIZE/2)
			bsize = AU_RING_SIZE/2;
		else
			bsize = ai->blocksize;
		bsize = hw->round_blocksize(sc->hw_hdl, bsize);
		if (bsize > AU_RING_SIZE)
			bsize = AU_RING_SIZE;
		ai->blocksize = sc->sc_blksize = bsize;

Why can the user only specify blocksizes up to AU_RING_SIZE/2 while
the driver can specify sizes up to AU_RING_SIZE?  There are several
useful block sizes between 2048 and 4096, such as 32khz sr and 20ms
blocks, or 44.1khz and 60 blocks per second.  The latter contains 735
samples, so the blocksize cannot be halved.

Jason