Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Does anyone know how to setup default volume levels and unmute line in for alsa? I presume you put something in the /usr/share/alsa/alsa.conf but I can find no mention of it in the readme's, howto's or on lq.
On my system I have made ~./.asoundrc and inserted:
pcm.cmipci {
type hw
card 0
}
ctl.cmipci {
type hw
card 0
}
Sound works fine but I have to umute things and adjust volumes at startup
No, you misunderstand, I can use that to set up volumes but I want to save those settings (alsamixer exits without saving its settings).
edit: no mention of it in alsamixer man page
When I came to re-installing ALSA, I added it to the startup.
Try rc-update add alsasound boot and reboot and then check the levels in the alsa mixer. I knew that they weren't by default with me. But after adding this line so that it would start at boot time, when checking, the mixer already had the levels set and I didn't need to do it manually [whereas I did previously after every time I started the computer]
Anyway, give it a try and tell us what happens.
[EDIT] changed line!!!
rc-update add alsasound boot is correct
Last edited by breakerfall; 09-28-2003 at 05:43 PM.
Hmm. Do you mean for me to type "rc-update add alsa boot" as root? If so, the command rc-update doesn't exist on my system . I haven't missed something obvious have I?
hmmm.. I'm not sure about slack then... but try starting alsa whilst you're in the system. There should be a way that you can get ALSA to auto load. When you do this, it should have the channels unmuted.
Am I correct in thinking that at the moment you have to load up ALSA mixer to un-mute after every bootup?
I'm just checking some info and I've come across some that I didn't need to do. You might need to do this.
Quote:
Running and unmuting
Since we're Linux users, we don't want to reboot. So we'll start the alsasound script manually.
Code listing 3.2
# /etc/init.d/alsasound start
ALSA is running now. If everything is ok, you should be able to see the ALSA modules loaded when running lsmod. However, sound won't work yet, because the channels are still muted. We need amixer for this.
Code listing 3.3: Running amixer
# amixer
Warning: You shouldn't get this, but if you get an error about "amixer: Mixer attach default error: No such file or directory", you should manually modprobe snd-mixer-oss and snd-pcm-oss once. After that run amixer again.
Code listing 3.4: only if you get an error when running amixer
If you got this far, now unmute Master and PCM channels. Some hardware even requires you to unmute the center channel or even the surround channel.
Code listing 3.5: Unmuting channels
# amixer set Master 100 unmute
# amixer set PCM 100 unmute
Only if the above doesn't succeed on its own:
# amixer set Center 100 unmute
# amixer set Surround 100 unmute
Test the sound:
# aplay $KDEDIR/share/sounds/pop.wav // (pop.wav is part of KDE)
We check to see if sound is working by using the aplay (alsa play) command. If you hear a pop, then sound is indeed working. Then, adjust the volume settings to your liking; the ncurses-based alsamixer is a great way to get them "just so".
You may want to emerge alsa-xmms as that will provide ALSA support for XMMS.
When you reboot your system, the alsasound init script will properly save and restore your volume settings.
I don't have init.d type system, instead I have /etc/rc.d/*.rc which handle runlevels, modules, internet etc....
I do however have the alsa sources and in the "driver" source package is the script "alsasound" in which can be found the lines:
function stop() {
#
# store driver settings
#
if [ -x $alsactl ]; then
$alsactl -f $asoundcfg store
else
echo -n -e "${rc_warning}!!!alsactl not found!!!${rc_reset} "
fi
so, in a rood console, I typed "alsactl -f asoundcfg store" and hey presto!
I do this by modules.conf file.
Put this :
post-install snd-xxx-xxx /usr/sbin/alsactl restore
pre-remove snd-xxx-xxx /usr/sbin/alsactl store
After this you can make your changes in alsamixer and do alsactl store .
Reboot.
There must be sound now .
Here is my modules.conf:
alias char-major-116 snd
alias snd-card-0 snd-intel8x0
alias char-major-14 soundcore
post-install snd-intel8x0 /usr/sbin/alsactl restore
pre-remove snd-intel8x0 /usr/sbin/alsactl store
alias sound-slot-0 snd-card-0
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss
options snd major=116 cards_limit=1 device_mode=0666
options snd-intel8x0 index=0
Glad you posted that petatsabev as my previous post doesn't seem to do the trick, it said it saved the settings but when I rebooted I found that the line input was still muted!
I'll wade through what you posted and see what happens.
ps. I'll reboot and test it this time - before I post "It works!!!"
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.