LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 04-07-2004, 02:39 AM   #1
melinda_sayang
Member
 
Registered: Dec 2003
Location: Petaling Jaya
Distribution: Ubuntu
Posts: 475

Rep: Reputation: 31
How can I save mixer settings?


To hear the sound CD playing with alsa driver and kernel 2.6.x, you have to increase the value of Line1 with Volume Control, or aumix. But after reboot, the setting is gone. That means I have to do manually. Anyone know how to save this setting?

The same problem apply with my normal sound. So it mute by default. So I have to add two lines in my startup script to solve this problem:

amixer sset Master 20 unmute >/dev/null
amixer sset PCM 20 unmute >/dev/null

But unfortunatelly add these two lines:

amixer sset Line 20 unmute >/dev/null
amixer sset CD 20 unmute >/dev/null

doesn't work.

$ amixer sset Line1 20 unmute >/dev/null
amixer: Unable to find simple control 'Line1',0

So, anyone know how to solve this problem?
 
Old 04-07-2004, 03:21 AM   #2
chii-chan
Member
 
Registered: Sep 2003
Location: chikyuu (E103N6)
Distribution: Redhat 8.0 (2.4.25-custom), Fedora Core 1 (2.4.30-custom)
Posts: 357

Rep: Reputation: 30
Do you have alsasound script in /etc/rc.d/init.d ? You must have it in the directory and also in the directory corresponding to your runlevel.
 
Old 04-07-2004, 04:50 AM   #3
melinda_sayang
Member
 
Registered: Dec 2003
Location: Petaling Jaya
Distribution: Ubuntu
Posts: 475

Original Poster
Rep: Reputation: 31
No one told me about that. I don't have one. So could you tell me how to make one?
 
Old 04-07-2004, 09:57 PM   #4
chii-chan
Member
 
Registered: Sep 2003
Location: chikyuu (E103N6)
Distribution: Redhat 8.0 (2.4.25-custom), Fedora Core 1 (2.4.30-custom)
Posts: 357

Rep: Reputation: 30
As far as I can remember (I'm not at linux computer right now), download alsa-driver.xxx.tar.gz from www.alsa-project.org and then compile. Then check inside utils/. There will be alsasound script inside there. Or you could try this one:
http://www.alsa-project.org/alsa/dri...s/alsasound.in

Just rename it to alsasound then put inside the /etc/rc.d/init.d/ then softlink it to your runlevel.
 
Old 04-08-2004, 12:36 AM   #5
melinda_sayang
Member
 
Registered: Dec 2003
Location: Petaling Jaya
Distribution: Ubuntu
Posts: 475

Original Poster
Rep: Reputation: 31
I downloaded the script and run it in console.
# alsasound restart
Shutting down sound driver: !!!alsactl not found!!! done
Starting sound driver: snd-emu10k1 done
ERROR: alsactl not found

But that does not increase the value of Line1 ( the others are Vol, Bass, Trebl, Synth, Pcm, Apkr, Mic, CD, Video ).

Any idea????
 
Old 04-08-2004, 03:59 AM   #6
chii-chan
Member
 
Registered: Sep 2003
Location: chikyuu (E103N6)
Distribution: Redhat 8.0 (2.4.25-custom), Fedora Core 1 (2.4.30-custom)
Posts: 357

Rep: Reputation: 30
How did you install the alsa? Did you follow the instaruction on the alsa-project website? Because alsactl should be present if you installed them correctly. Did you install alsa-driver, alsa-utils and alsa-lib correctly?
 
Old 04-08-2004, 05:36 AM   #7
melinda_sayang
Member
 
Registered: Dec 2003
Location: Petaling Jaya
Distribution: Ubuntu
Posts: 475

Original Poster
Rep: Reputation: 31
# which alsactl
/usr/sbin/alsactl

#echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin:/root/bin:/usr/sbin/

# alsactl
alsactl: Specify command...

I installed by sources.
 
Old 04-08-2004, 08:22 PM   #8
chii-chan
Member
 
Registered: Sep 2003
Location: chikyuu (E103N6)
Distribution: Redhat 8.0 (2.4.25-custom), Fedora Core 1 (2.4.30-custom)
Posts: 357

Rep: Reputation: 30
It is the correct location. Try looking into your source file for alsasound. Maybe it was compiled to fit your system. I mean in the alsa-driver. But for me, when I installed from source, it will copy the 'alsasound' file to the correct runlevel. I think this part of script is correct:

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

Did you run the script in root account? Exactly what I did were:

1. Put the script in /etc/rc.d/init.d/.
2. Add softlink in /etc/rc.d/rc3.d/ and /etc/rc.d/rc5.d/ to alsaound script.
3. Run alsaconf.
4. Reboot.
5. I see that the alsasound is loaded.
6. Then I see that the mixer setting was set to default.

Yeah I forgot something. Is there alsactl script in the /etc/rc.d/init.d directory. Maybe the alsasound script was refering to the script, not the /usr/sbin/alsactl.
 
Old 04-08-2004, 11:03 PM   #9
melinda_sayang
Member
 
Registered: Dec 2003
Location: Petaling Jaya
Distribution: Ubuntu
Posts: 475

Original Poster
Rep: Reputation: 31
I did that with root account. I don't have rc3.d and rc5.d directory. I use Slackware. So I make them. Put the alsasound script into them. I copy alsactl script from /usr/sbin/alsactl to /etc/rc.d/init.d directory. Run alsaconf. Reboot. Got no luck. I still have to increase the value of Line1 with aumix, or kmix, or Gnome Volume Control if I want to hear the sound of CD music.
 
Old 04-09-2004, 12:45 AM   #10
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
On my Slackware machine, I added these lines to my rc.local file:

rexima vol 90
rexima pcm 90

I find moving them much higher than 90% makes everything sound like crap, but that might just be my hardware, it might work differently on your system.
 
Old 04-09-2004, 01:26 AM   #11
melinda_sayang
Member
 
Registered: Dec 2003
Location: Petaling Jaya
Distribution: Ubuntu
Posts: 475

Original Poster
Rep: Reputation: 31
Quote:
Originally posted by MS3FGX
On my Slackware machine, I added these lines to my rc.local file:

rexima vol 90
rexima pcm 90
Damn, that's the solution So I add this line in my startup script (rc.local):

rexima line1 50

That's all. My vol and pcm is already increased by this command in startup script:
amixer sset Master 20 unmute >/dev/null
amixer sset PCM 20 unmute >/dev/null

Thank you, chiichan and MS3FGX.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mixer settings lost Boffy Mandriva 4 03-31-2004 03:02 PM
Save mixer settings ar1 Linux - General 1 03-02-2004 10:17 AM
Save mixer settings corwax Linux - General 4 12-18-2003 01:59 PM
Mixer settings? Allen614 Slackware 5 04-20-2003 08:52 PM
Mixer Settings RefriedBean Linux - Software 2 08-06-2002 09:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration