Subject: Forcing audio(9) block and buffer sizes
To: None <tech-kern@netbsd.org>
From: Jared D.McNeill <jmcneill@invisible.ca>
List: tech-kern
Date: 02/22/2004 20:44:43
I must be missing something here -- I thought that the values returned 
by foo_round_blocksize and foo_round_buffersize were supposed to 
override any suggestions by the audio subsystem.

I'm currently hacking on vraiu(4), and I have the following:
	vraiu_round_blocksize always returns 1024
	vraiu_round_buffersize always returns 2048

However, if I pepper some printf's in vraiu_init_output, 
vraiu_trigger_output, etc, I see that these values are being almost 
completely ignored. With vraiu_debug=2 I see the following when I 
attempt to playback a 22kHz, 16-bit stereo audio file:

	vraiu_open
	vraiu_set_params: 16bit, 2ch, 22050Hz, encoding 6
	vraiu_commit_settings
	vraiu_commit_settings: set conversion rate 1
	vraiu_commit_settings: clock supply start
	vraiu_commit_settings: enable DMA
	vraiu_commit_settings: Vref on
	vraiu_init_output: buffer 0xa0701000, size 2016
	vraiu_init_output: speaker power on
	vraiu_init_output: start output
	vraiu_trigger_output: start=0xa0701000, end=0xa07017e0, blksize=672

Is there some way for me to force the buffer and block sizes in the 
audio subsystem for devices that have specific requirements?

Thanks,
Jared