Subject: Re: Some Sparc problems
To: Jason Thorpe <thorpej@nas.nasa.gov>
From: Jesper Nilsson <dat92jni@ludat.lth.se>
List: port-sparc
Date: 11/25/1996 18:16:41
On Sun, 24 Nov 1996, Jason Thorpe wrote:
> On Sun, 24 Nov 1996 22:17:43 -0800 (PST) 
> MLARKIN@CSUPomona.Edu wrote:
> > 2. The realaudio Solaris/SunOS player doesn't work, complains about "Error
> >    opening audio device"

The problem could be the /dev/audioctl device,
which is called /dev/mixer in NetBSD.

> I think that our audio interface is a bit different...

A little? /dev/mixer is an undocumented mess without
any resemblance to the /dev/audioctl in SunOS... :-(

I've been poking around those branches in the source of
the Sparc tree, and found a few points of irritation:

1.  Without /dev/mixer you can't alter volume unless you're
    the one who opened /dev/audio. (Irritating but no bug)

2.  Only two ports (can't remember which) have an entry in
    MAKEDEV for /dev/mixer. (Bug, but quite easy to add)

3.  /dev/mixer does not support the AUDIO_GETINFO and AUDIO_SETINFO
    ioctls. (SunOS /dev/audioctl does). (Irritating but no bug)

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.

The /dev/mixer documentation is old and incomplete,
and the layout for the mixer_ctrl_t is quite confusing.
Does any one have a clue why this layout was selected?

Furthermore, what is the NetBSD position on devices like
/dev/audio and /dev/kbd? In the strictest sense, only
one program should ever have these devices open, but it
is easy to see that ioctls could be interesting to use.
(Setting volume for /dev/audio, toggling keyboard LEDs for /dev/kbd)

Should every such device forbid two processes to have it
open for read and write simultaneously?

> Jason R. Thorpe                                       thorpej@nas.nasa.gov

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