diff options
| author | Samuel Thibault <samuel.thibault@ens-lyon.fr> | 2003-07-12 00:17:40 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2003-07-12 00:17:40 -0700 |
| commit | 14dae1f773272dc1ec567767b2ec362d42da14a7 (patch) | |
| tree | 68dd5609bbdff4c178e8f2d896bed644b4fc0d5d | |
| parent | 24f6c6b0f05056d25a77a79a130ec51142ae710f (diff) | |
[PATCH] [2.5] maestro volume tuning
This 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,
much better set it to 5.
| -rw-r--r-- | sound/oss/maestro.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sound/oss/maestro.c b/sound/oss/maestro.c index d4ddc9b76819..934cbf378dc2 100644 --- a/sound/oss/maestro.c +++ b/sound/oss/maestro.c @@ -726,6 +726,12 @@ static void ac97_write_mixer(struct ess_card *card,int mixer, unsigned int left, 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 @@ ess_interrupt(int irq, void *dev_id, struct pt_regs *regs) 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 { |
