From: Samuel Thibault <Samuel.Thibault@ens-lyon.fr>
To: linux-sound@vger.kernel.org
Subject: [PATCH] [2.5] maestro volume tuning
Date: Sat, 12 Jul 2003 01:14:29 +0000 [thread overview]
Message-ID: <marc-linux-sound-105797265328435@msgid-missing> (raw)
Hi,
Here is a patch which tunes the volume control of maestro sound boards:
The log conversion seems not good for PCM and CD. The volume buttons
incrementing / decrementing the main volume by 10 on 100 is too much, I'd
rather set it to 5.
Regards,
Samuel Thibault
diff -ur linux-2.5.71-orig/sound/oss/maestro.c linux-2.5.71-perso/sound/oss/maestro.c
--- linux-2.5.71-orig/sound/oss/maestro.c 2003-06-14 17:13:46.000000000 -0400
+++ linux-2.5.71-perso/sound/oss/maestro.c 2003-07-06 13:51:23.000000000 -0400
@@ -726,6 +726,12 @@
left = (left * mh->scale) / 100;
if ((left = 0) && (right = 0))
val |= 0x8000;
+ } else if (mixer = SOUND_MIXER_PCM || mixer = SOUND_MIXER_CD) {
+ /* log conversion seems bad for them */
+ if ((left = 0) && (right = 0))
+ val = 0x8000;
+ right = ((100 - right) * mh->scale) / 100;
+ left = ((100 - left) * mh->scale) / 100;
} else {
/* log conversion for the stereo controls */
if((left = 0) && (right = 0))
@@ -1937,12 +1943,12 @@
manner by adjusting the master mixer volume. */
volume = c->mix.mixer_state[0] & 0xff;
if (vol_evt = UP_EVT) {
- volume += 10;
+ volume += 5;
if (volume > 100)
volume = 100;
}
else if (vol_evt = DOWN_EVT) {
- volume -= 10;
+ volume -= 5;
if (volume < 0)
volume = 0;
} else {
reply other threads:[~2003-07-12 1:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=marc-linux-sound-105797265328435@msgid-missing \
--to=samuel.thibault@ens-lyon.fr \
--cc=linux-sound@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox