How to save your alsa audio configuration on Android-x86

Snapshot.png


I. Introduction

Audio problem is one of the most asked question in our Discord server, whether it's mic problem, or some HDMI audio. After digging the whole Internet for some init.sh fix (which can even make you bootloop) or alsamixer, you are wondering is there any way that you can save the audio config into a file that you can carry around ? Well...... yes ! So in this post I'm gonna teach you to do that.

The advantage of this method that you can bring this file anywhere you want, either it's Android-x86, BlissOS or PhoenixOS Darkmatter, etc. You can just edit a bit to automatically load it up.
The disadvantage is..... well it's your own config, sharing with others might not work for them (unless you guys use the same audio card)

Ok so let's get started.

II. Save the config

Snapshot_1.png


We are gonna use alsactl, a tool from alsa-utils. Open your Terminal, get root with su command. And then type :

alsa_ctl store -f /anywhere/you/want.state

For example in my picture above :

alsa_ctl store -f /system/etc/alsa/mysave.state

Note : Although I said everywhere, but you have to set it under /system or /data

After that, check the file to see if it's exist

Snapshot_2.png


As you can see, all of my config have been saved, including my audio card, my HDMI and my Webcam Mic in one single file.


III. Load the config

Snapshot_3.png


After saving your config, now try to load it. Restart, open Terminal with su again and type


alsa_ctl restore -f /anywhere/you/want.state

For example in my picture above :

alsa_ctl restore -f /system/etc/alsa/mysave.state

And check if everything loaded correctly.
If it does, then alsamixer will immediately loaded. Now time to make it load automatically.

IV. Make it load in the next boot

*For PhoenixOS Darkmatter
Go to /system/etc/alsa_preset.sh , you can see the audio config is here

Snapshot_4.png


Now clear everything and put the restore command above into the file

Snapshot_5.png


Save it, and done.

*For other Android-x86 OSes
Open /system/etc/init.sh , scroll down to this part where the alsa config located.

Screenshot_20210103-001932.png


Select it and replace with the restore code live above.

Screenshot_20210103-002029.png


Here is what you need to replace. Save it, then done.


Good luck :D
 
Last edited:

grtstha

Member
View attachment 761

I. Introduction

Audio problem is one of the most asked question in our Discord server, whether it's mic problem, or some HDMI audio. After digging the whole Internet for some init.sh fix (which can even make you bootloop) or alsamixer, you are wondering is there any way that you can save the audio config into a file that you can carry around ? Well...... yes ! So in this post I'm gonna teach you to do that.

The advantage of this method that you can bring this file anywhere you want, either it's Android-x86, BlissOS or PhoenixOS Darkmatter, etc. You can just edit a bit to automatically load it up.
The disadvantage is..... well it's your own config, sharing with others might not work for them (unless you guys use the same audio card)

Ok so let's get started.

II. Save the config

View attachment 762


We are gonna use alsactl, a tool from alsa-utils. Open your Terminal, get root with su command. And then type :

alsa_ctl store -f /anywhere/you/want.state

For example in my picture above :

alsa_ctl store -f /system/etc/alsa/mysave.state

Note : Although I said everywhere, but you have to set it under /system or /data

After that, check the file to see if it's exist

View attachment 763

As you can see, all of my config have been saved, including my audio card, my HDMI and my Webcam Mic in one single file.


III. Load the config

View attachment 764

After saving your config, now try to load it. Restart, open Terminal with su again and type


alsa_ctl restore -f /anywhere/you/want.state

For example in my picture above :

alsa_ctl restore -f /system/etc/alsa/mysave.state

And check if everything loaded correctly.
If it does, then alsamixer will immediately loaded. Now time to make it load automatically.

IV. Make it load in the next boot

*For PhoenixOS Darkmatter
Go to /system/etc/alsa_preset.sh , you can see the audio config is here

View attachment 765

Now clear everything and put the restore command above into the file

View attachment 766

Save it, and done.

*For other Android-x86 OSes
Open /system/etc/init.sh , scroll down to this part where the alsa config located.

View attachment 768

Select it and replace with the restore code live above.

View attachment 767

Here is what you need to replace. Save it, then done.


Good luck :D
Thanks a lot for this😍😍
My mic issue got solved finally after 2 years of using Phoenix OS🤣🤣
Post automatically merged:

For other Android x86 OSes can I copy and paste mysave.state from DM to other OS system/alsa/etc?
And also copy paste the restore code as shown up?
Or what can be the process for this?
 
Last edited:

Similar threads

Similar threads

Top