LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Query (and maybe a dependent query) on alsamixer. (http://www.linuxquestions.org/questions/linux-newbie-8/query-and-maybe-a-dependent-query-on-alsamixer-919320/)

ajaygarg 12-18-2011 07:40 AM

Query (and maybe a dependent query) on alsamixer.
 
Hi all.

I am wanting to set some customized settings using alsamixer, which should remain persistent after reboot.


1. I have read at many places, that using only alsamixer, does not have a persistent effect. However, when I modified settings using alsamixer, and nothing else, the settings seemed to remain persistent.
So, is this a phantom effect I am seeing? Or is this the required behaviour (If this is indeed the required bahaviour, I am done.)


2. Provided the above is indeed a phantom behaviour, I would like to know as to where from does alsamixer reads its configuration. I ask this, because by modifying the configuration file on persistent storage, I will be available to have persistent settings.


I am using Fedora 14.


Looking forward to some lightning.


Regards,
Ajay

aus9 12-18-2011 06:16 PM

on a 32 bit debian system the default settings file is
/var/lib/alsa/asound.state

the command you are looking for is

/usr/sbin/alsactl

irst set the correct settings inside alsamixer as a local user then press escape the run as a local user

Code:

/usr/sbin/alsactl store -f ~/asound.state
creates a file in your home folder to can then edit if you wish

However, if you want system wide setting then run that store command with root powers as
/usr/sbin/alsactl store

ajaygarg 12-18-2011 09:10 PM

Thanks aus9 for the reply.

I tried alsactl. Following are the steps I followed ::

a. Run alsamixer.
b. Modify the settings.
c. Run sudo alsactl store
d. Reboot.
e. Run alsamixer.
f. The settings remain persistent.

g. Run alsamixer.
h. Modify settings.
i. DO NOT RUN alsactl.
j. Reboot
k. The settings remain persistent.

Settings-persistence is expected in steps a.-f.
But how come settings remain persistent in steps g.-k. ?


Looking forward to a reply.


Regards,
Ajay

aus9 12-18-2011 11:32 PM

ok sounds like you already have more than one asound.state file

since you decided to do the root first...you created /etc/asound.state....I know I don't use your distro but thats my guess

so on reboot....you already had a system wide "saved" settings

to prove me wrong....find and RENAME each asound.state file lets call it test.state

then you will see if have true persistence

can I repeat...persistence is from a file whose settings are the default settings and you make no changes or you make changes and have a file independent of your distros....default file

that new file can be created by root or by each local user.

let me know if that is what you are seeking or if I have misunderstood

regards

---------- Post added 19-12-11 at 13:32 ----------

ok sounds like you already have more than one asound.state file

since you decided to do the root first...you created /etc/asound.state....I know I don't use your distro but thats my guess

so on reboot....you already had a system wide "saved" settings

to prove me wrong....find and RENAME each asound.state file lets call it test.state

then you will see if have true persistence

can I repeat...persistence is from a file whose settings are the default settings and you make no changes or you make changes and have a file independent of your distros....default file

that new file can be created by root or by each local user.

let me know if that is what you are seeking or if I have misunderstood

regards

ajaygarg 12-20-2011 12:31 AM

Thanks aus9 for the reply.

I understood what you are saying. But I meant the settings of the "second" time are persisted SOMEHOW, even though alsactl store is not re-run.

Also, if I do a diff of /etc/asound.state of the first and second settings, it shows empty.

Thus, it is concluded that /etc/asound.state is updated only when alsactl store is run. So, I fail to understand, as to how are the settings persisted the second time?


Regards,
Ajay


All times are GMT -5. The time now is 01:07 AM.