Initial volume settings - please test! (Re: Release8
reportinstallation)
Matt Zimmerman
mdz at canonical.com
Mon Sep 13 15:38:35 CDT 2004
On Mon, Sep 13, 2004 at 11:31:36AM -0700, Matt Zimmerman wrote:
> Unfortunately, I don't think this is trivial enough to get it right for the
> preview release. A scriptlet like this works for me:
>
> for control in "PCM" "Synth" "Master"; do
> amixer -q set "$control" "$volume_level%" unmute
> done
>
> but my understanding is that the control names vary from one sound card to
> the next, as well as which ones need to be set in order to get sound, and I
> don't know whether this does the right thing for multiple sound cards.
OK, I've tested this on a few machines:
- ThinkPad T42, onboard intel8x0 sound and built-in speakers
- GigaByte motherboard with onboard via82xx sound and external amplified
speakers
- amd64 board with onboard intel8x0 sound and external amplified speakers
(same ones)
- Macintosh G4 desktop
It does the right thing on all of them except the Mac, which doesn't seem to
produce any sound from the built-in speaker until the volume level is close
to 100%. For the others, it gives a reasonable volume level which lets me
know that sound is working and invites me to adjust it if needed.
At least it's a start. I am considering adding this code to the alsa-base
init script so that if there are no saved settings, it initializes the
volume to this preset level. I would appreciate if everyone would test it
out and let me know if the results are useful. To test:
1. Log out (otherwise the mixer applet's use of the device will cause the
next step to fail)
2. Switch to a text console, and unload the driver for your sound device:
# lsmod | grep '^snd'
# rmmod snd-intel8x0 # or snd-via82xx, or snd-emu10k1, etc.
# modprobe snd-intel8x0 # or snd-via82xx, or snd-emu10k1, etc.
3. Run the script:
# sh unmute
4. Log back in, do something that makes noise. e.g., from a terminal
window:
$ aplay /usr/share/sounds/gaim/arrive.wav
Tell me if you hear a sound or not. If you don't, adjust the mixer levels
until you do, and make notes about what you did. Either way, send your
findings to the list.
Thanks!
--
- mdz
-------------- next part --------------
#!/bin/sh
volume_level=70
for control in "PCM" "Synth" "Master"; do
amixer -q set "$control" "$volume_level%" unmute 2>/dev/null
done
More information about the sounder
mailing list