Subject: Audio: set_params()
To: None <tech-kern@netbsd.org>
From: TAMURA Kent <kent@netbsd.org>
List: tech-kern
Date: 02/11/2002 01:24:28
I have a question about set_params function of audio(9).
Suppose that an audio hardware supports slinear16_le and no 8 bit
PCM. If a driver for the hardware is requested to set 8 bit
mulaw for playing, the driver would set mulaw_to_slinear16_le to
audio_params::sw_code and set 2 to audio_params::factor. Then,
should the driver set 16 to audio_params::precision?
I have looked at cmpci and yds drivers. The driver of cmpci
uses mulaw_to_slinear16_le for mulaw but it does not update
audio_params::precision. The driver of yds also uses it, and it
sets 16 to audio_param::precision. I guess, in yds case,
AUDIO_GETINFO returns inconssitent data 'encoding=mulaw,
precisoin=16' even just after setting 'encoding=mulaw,
precision=8.'
--
TAMURA Kent <kent2002@hauN.org> <kent@netbsd.org>