From: James Courtier-Dutton <James@superbug.demon.co.uk>
To: alsa-devel <alsa-devel@lists.sourceforge.net>
Subject: Bug in ALSA OSS mixer emulation. Volume++ does not work.
Date: Wed, 03 Dec 2003 03:27:44 +0000 [thread overview]
Message-ID: <3FCD5830.2000702@superbug.demon.co.uk> (raw)
Hi,
The alsa keeps state of all mixer levels in alsa's internal format
which has min,max info. So, for example if alsa has 0-31 levels,
converting that to the OSS 0-100 range is easy with a simple
calculation, but if an OSS app just does Volume++, the change will be
lost in the conversion from OSS to ALSA to actually set the state. So,
to work the way it should, OSS will have to cache all mixer state in OSS
format, thus requiring 2 state tables.
E.g.
OSS Volume(0-100) ALSA Volume(0-31)
OSS = ALSA * 100/31;
0 0
1 0
2 0
3 1
4 1
etc.
So, if OSS Volume is 2, and the OSS application does Volume++, the OSS
volume will be set to 3. but if OSS Volume is 3, and the OSS application
does Volume++, the OSS volume will stay at 3!
Cheers
James
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
next reply other threads:[~2003-12-03 3:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-03 3:27 James Courtier-Dutton [this message]
2003-12-03 8:27 ` Bug in ALSA OSS mixer emulation. Volume++ does not work Jaroslav Kysela
2003-12-03 21:36 ` James Courtier-Dutton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3FCD5830.2000702@superbug.demon.co.uk \
--to=james@superbug.demon.co.uk \
--cc=alsa-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.