Subject: audio confusion
To: None <current-users@NetBSD.ORG>
From: Tom Pavel <tom@Bozon.Stanford.EDU>
List: current-users
Date: 10/22/1995 22:56:45
I started to explore the audio interface on my system (496/33 with
PAS16, running latest 1.1-alpha), and I thought I would write a simple
mixer program to set the volume and so forth. In the process, I've
figured a bunch of things out, but I've also gotten myself a little
confused. Here are the highlights:
* I was disappointed not to find any man4 pages for audio (nor for
pas/sb/etc.) to describe how the interface should work. Well,
that's ok, I know how to RTFS... (Are there man pages planned for
1.1 release?)
* I'm confused about the AUDIO_MIXER_READ/_WRITE ioctl interface on
the /dev/mixer. Is this meant to be a device-dependent interface
that one can use after verifying the device type via AUDIO_GETDEV?
I wouldn't think so, but short of including <dev/isa/sbdspvar.h>,
how does one know what "index"/"dev" value to use to
AUDIO_MIXER_DEVINFO or AUDIO_MIXER_READ? Are you supposed try all
possible values and look at the names of the ones that are present?
* Both the AUDIO_MIXER_READ ioctl and the AUDIO_GETINFO ioctl (on
/dev/audio) always return gain settings of zero. I think this is
just an unimplemented feature of the pas driver. Does anyone know
if this is supposed to work?
* When I do an AUDIO_GETINFO on /dev/sound, I still see an encoding of
AUDIO_ENCODING_ULAW. I thought the idea of /dev/sound was that it
was for PCM samples. Am I wrong, or is this just unimplemented yet?
Anyone have any hints on any of these questions? Many thanks,
Tom Pavel
Stanford Linear Accelerator Center
pavel@slac.stanford.edu