Subject: Re: mixer and OSS compatibility
To: None <tech-kern@NetBSD.org>
From: David Young <dyoung@pobox.com>
List: tech-kern
Date: 10/08/2003 10:29:11
On Tue, Oct 07, 2003 at 11:29:37PM +0200, Quentin Garnier wrote:
> Following up to my change in the ac97 mixer code, I took a closer look at
> the ways of working around the issue and what is done by other systems.
> 
> Both Linux (in the OSS layer) and FreeBSD have an intermediate layer in
> the mixer code that makes every possible value available to the userland.
> 
> Here's what happen in Linux and FreeBSD:
> 
> mixer_ioctl_write(mixer, channel, newvalue):
> 	mixer.write_to_hardware(channel, newvalue)
> 	mixer.values[channel] = newvalue
> 	return
> 
> mixer_ioctl_read(mixer, channel):
> 	return mixer.values[channel]

I think this is ok.  Will it solve the problem to add this to the OSS
compatibility layer?

The interface should not be stateful under any condition.

(I still maintain that the apps, and the OSS API by implication, need
repair. It's a usability bug that the volume slider has more "positions"
than the underlying hardware supports.)

Dave

-- 
David Young             OJC Technologies
dyoung@ojctech.com      Urbana, IL * (217) 278-3933