Subject: Re: Propose: improve audio driver
To: Tetsuya Isaki <isaki@par.odn.ne.jp>
From: TAMURA Kent <kent@netbsd.org>
List: tech-kern
Date: 03/01/2002 21:06:45
In message "Re: Propose: improve audio driver"
on 02/03/01, Tetsuya Isaki <isaki@par.odn.ne.jp> writes:
> > a) How about recording? The patch seems not to modify audio_read().
> Yes, as you know, vs(4) doesn't need to modify audio_read().
> Are there any audio devices to need it in recording?
I don't know. I simply worried about symmetry of audio_write()
and audio_read(). We don't need to implement it for
audio_read() if we don't need it.
> > b) When an application calls write() with 1 Byte data and
> > reduce_factor is 2, your audio_write() drops the data, right?
> Right.
> Should I return EIO (or appropriate error code)
> if reduce_factor > uio_resid ?
> Or should I pad some data?
The effect of write(fd, buf, 100) and
for(i=0;i<100;i++)write(fd, buf+i, 1) should be the same.
The following patch contains such audio data conversion with
padding.
http://www.hauN.org/kent/audio-20020227.diff
# This patch is incomplete yet. I'll fix remaining problems and
# post the description of the patch later.
--
TAMURA Kent <kent2002@hauN.org> <kent@netbsd.org>