Subject: Re: Some Sparc problems
To: None <port-sparc@NetBSD.ORG>
From: Jesper Nilsson <dat92jni@ludat.lth.se>
List: port-sparc
Date: 11/26/1996 03:14:38
On Mon, 25 Nov 1996, Jesper Nilsson wrote:
> 4.  /dev/audio supports the ioctls AUDIO_GETINFO and AUDIO_SETINFO
>     but there is some problem doing a AUDIO_GETINFO followed
>     by a AUDIO_SETINFO with the same values (loss of data,
>     lower quality sound, etc.) (BUG)
> 
> The problem here is probably that the driver changes some
> value which should not be changed, but I can't find it.

When I got home I poked around a bit more in the
audio device driver, and I found the problem.

The audiosetinfo() function is a collection of ifs
checking if each member in the audio_info_t struct
is not equal to ~0 and clearing the device to make sure,
if certain variables should be changed.

However, this is not wanted in the case when you do a
AUDIO_GETINFO directly followed by a AUDIO_SETINFO.

For just a change in volume you have to explicitly set
all members except play->gain to ~0.

Quite a bother and not very much like SunOS. :-(
Wouldn't it be better to check for changes in the values?

/^JN - Jesper Nilsson
--
              I've heard of UNIseX, but I've never had it.
      Jesper Nilsson -- dat92jni@ludat.lth.se || jesper@df.lth.se