Subject: Re: Ideas on the audio framework
To: Eric Haszlakiewicz <erh@nimenees.com>
From: None <cube@cubidou.net>
List: tech-kern
Date: 12/13/2004 06:04:19
--eJnRUKwClWJh1Khz
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Sun, Dec 12, 2004 at 08:44:17PM -0600, Eric Haszlakiewicz wrote:
> On Sun, Dec 12, 2004 at 04:19:22PM -0600, David Young wrote:
> > We are 95% agreed. The 5% where we disagree is whether or not the
> > volume resolution is a limitation that can be hidden. If you hide that
> > information, you don't make the application's job any easier, and you
> > foreclose certain possibilities.
>=20
> Actually, you _do_ make the application's job easier because it
> doesn't need to keep state.=20
That's not true. An application doing up/down operations should never
keep state (either there is an up/down API, or it has to re-read the
mixer control level before doing it), and to display a slider it has to
(unless it can get notifications of level changes). This not dependent
on the API, but rather on the fact that two processes can manipulate a
mixer level at the same time.
> What are these "certain possibilities" that you are talking about?
> As long as it is possible for an app to figure out what a meaningful
> volume step is, I don't see what keeping state in the kernel could
> prevent you from doing. It currently _is_ possible to figure out
> the hardware step: mixerctl -w outputs.master++ works. I don't think
> anyone is proposing removing that feature.
>=20
> Things that I can think an app would want to do with volume:
> set volume to level X
> increase/decrease the volume by one step
> increase/decrease the volumn by one meaningful step
> All of these are possible with a stateful volume control.
> What else can you do with a volume knob?
You're missing the point here. The NetBSD API allows all 3 actions.
OSS API doesn't allow action 3, so OSS application have no way to
figure out what a meaningful step is.
And I agree with David on that point: the "meaningful step" is an
important information, otherwise applications (and it's the case of
all OSS application, whatever the OS is) don't necessarily raise
the volume when you ask them for it. The value is changed, but it
does nothing to the hardware. OSS API is inherently broken in
that aspect.
So yes, we _could_ rewrite all pkgsrc applications to use the NetBSD
API on NetBSD. But no one will do that.
--=20
Quentin Garnier - cube@cubidou.net - cube@NetBSD.org
"Commala-come-five! / Even when the shadows rise!
To see the world and walk the world / Makes ya glad to be alive."
Susannah's Song, The Dark Tower VI, Stephen King, 2004.
--eJnRUKwClWJh1Khz
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (NetBSD)
iQEVAwUBQb0i09goQloHrPnoAQKwgQf/e260wnunUciC5GGU5Ig2S6Nj0LPkrESz
To61LP0wdx/0eboSwkha7FMZucRCafAtKgyUqC4bdJu5jerAumVOh1OI28iLT7cC
SjcLLXtqZYTW7Tk9gMH61kWqhki1j5I02nnqSW8UKbQ1Ze5qxc4UeHURhnKQyjgz
X0GiMuWj6YB2kbCdiuEnAN0+kEBsKb7c3qq7JxfZk6UjbM0QNkm4khmzC2VzNY9v
2KSwwBYIeksNShGrR0fGiTD8LZNjJ64EAJhx+LWpdhbmap9NM73Pz4cQT1ePt3Q9
8atkc09D5a3I8BxzpvjOAoKKsmHmt3BT6kYFy2Wbmf8Sxkf80UczEA==
=IeUM
-----END PGP SIGNATURE-----
--eJnRUKwClWJh1Khz--