Subject: Re: Ideas on the audio framework
To: Jukka Marin <jmarin@embedtronics.fi>
From: None <cube@cubidou.net>
List: tech-kern
Date: 12/12/2004 13:57:32
--5LiOUhUlsRX0HDkW
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Dec 12, 2004 at 02:03:33PM +0200, Jukka Marin wrote:
> On Sun, Dec 12, 2004 at 12:09:20PM +0100, cube@cubidou.net wrote:
> > That's exactly the change I committed to the ac97 mixers about a year
> > ago.  The issue is, it's very hard to do that with stateless mixers,
> > and I can't say I'm really satisfied with the result, but at least it
> > allows OSS applications to work to some extent in some situations.
>=20
> IMHO, the mixer should save the volume level supplied by the application
> (without scaling), so the same value can be read back by the application.
> This value would then be scaled and written to the hardware register.

In the NetBSD API, only the hardware is trusted.

> > Jukka said he didn't know any up/down applications.  I know two of
> > them:  mp3blaster and mplayer.
>=20
> Hmm, I have used mplayer.. I guess I use xmmix (and mixerctl) to adjust
> volume even with mplayer..

Not very handy while watching a video...

> There should probably be a way of asking how many steps (in the 0...255
> scale) one hardware step is, so you could increment the volume by one
> hardware step of you really wanted to.  (On the other hand, this would
> make the averaged increment steps different size with different hardware.)

OSS API doesn't offer that, unfortunately.  Otherwise, I would simply
blame the applications.

> > Both had the issue that the granularity of their own mixer change was
> > not enough to allow the volume to be pushed up, so I added a guess in
> > ac97.c to actually change the volume in that situation.
> >=20
> > But I let you look at the downside of this:
> >=20
> > for i in `jot 45 150`; do mixerctl -w outputs.master=3D$i; done
>=20
> I wonder if this is what I'm seeing with xmmix, too..

Probably.

--=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.

--5LiOUhUlsRX0HDkW
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (NetBSD)

iQEVAwUBQbxAPNgoQloHrPnoAQLiqQgAglV5lPLtwzaW9ELkXa2rs1zrXRpEavlI
Bah4Nc8yz8eOSbQQrKiNaMkMf/iy8g5yf4DoHy9UvAn6aRYb1zl2oTZcQFpZigcj
Ji3EOVcs4A2Fd5IuSpRc7rvNEavF9b9N8zccZQnfSiUoBdMym62DUhZsMTXvI2Iz
SyETxG73ZwydKja8R35tD44YoiKq3ERaT1wNRBxKCKBWui9FYwKonlcZFMnSOauY
bldSixXcjm17phnqnmyv41cQ9AptZhPpduyeL4AIdXdqyKm0Bk9EZydMyzr/NEze
BWGYb0fYDngfJIctFGePBRlf8cXXKliiqFQ3mGZhYti4m7iE6VfAAQ==
=gJV8
-----END PGP SIGNATURE-----

--5LiOUhUlsRX0HDkW--