CVSROOT: /cvs Module name: src Changes by: ratc...@cvs.openbsd.org 2019/09/04 23:33:57
Modified files: sys/dev : audio.c audio_if.h share/man/man9 : audio.9 Log message: Add the set_blksz() and set_nblks() audio driver functions. The first sets the block size in frames, which is necessarily common to play and recording directions no matter the number of channels. The second sets the number of blocks per buffer for the given direction. Together, these two functions allow audio drivers to easily set the block size, matching both playback and recording constraints. The round_blocksize() didn't allow to do so because it returns the block size in *bytes*. Since the driver doesn't know if it's called for the play or for the record block size, it's impossible to calculate the block size in all cases if play and record number of channels are different. ok mpi@