You are not logged in.
The official ALSA documentation is here: _https://www.alsa-project.org/wiki/Asoundrc
ALSA: Outdated documentation
_https://alsa.opensrc.org/Asoundrc#Changing_thingsAsoundrc: Changing things
Most programs require a restart to reread .asoundrc or asound.conf! This includes desktop environment audio daemons, such as PulseAudio. For most changes to .asoundrc you will need to restart the sound server (ie. sudo /etc/init.d/alsa-utils restart) for the changes to take effect.
This chapter was deprecated and removed from the official ALSA documentation about 15 years ago (or more). However, the true believers still believe that it is necessary to reload ALSA "for the changes [in .asoundrc] to take effect".
If you see a "buffalo" sign on an elephant's cage, do not trust your eyes.
Kozma Prutkov, Fruits of Reflection (1853-1854)
To believe in a dogma, one should not trust his senses and his ability to think.
EDIT:
2025-09-22 15:51:04
I think I would start by making a super simple .asoundrc and going from there...If that works, a simple script that offers a dialog where you choose either 0, 1, or 2, and it seds the change and re-starts alsa, would allow you to change during session.
_https://dev1galaxy.org/viewtopic.php?pid=58157#p58157
Yes, and one thing that is confusing with ALSA is that programs typically loads the sound configuration only once, early during startup. Therefore such a change to the configuration only takes effect for programs that are started after the change.
There is a way to make a configuration have a dynamic part, to be automatically reloaded upon every sink (or source) creation instead, but then we are entering a deeper level of understanding of ALSA configuration structure and elements which most people rather wish to avoid.
It is so "technical", that it is almost incomprehensible.
1. First, make a dir
mkdir ~/myscriptsThe folder "myscripts" should be in your home directory.
You can open it with your file manager (file browser).
2. Then write the script and make it executable, as described here:
_https://dev1galaxy.org/viewtopic.php?pid=58214#p58214
And test it.
#!/bin/bash
xfce4-terminal -e 'alsamixer -c Headphones' &
xfce4-terminal -e 'alsamixer -c vc4hdmi1' &It should open two terminals with alsamixer
3. Then create two different text files in the folder ~/myscripts
with content like this:
defaults.pcm.!card Headphones
defaults.ctl.!card Headphones
defaults.pcm.!device 0
defaults.ctl.!device 0For example, the second text file might be like this:
defaults.pcm.!card vc4hdmi1
defaults.ctl.!card vc4hdmi1
defaults.pcm.!device 0
defaults.ctl.!device 04. Then post here the output of these commands:
echo "$HOME/myscripts"ls -a -1 $HOME/myscriptsThen we will add other commands to the script.
For bash terminal and bash script, commands are the same.
First, test commands on terminal.
If they work, you can add them to the script.Try this website:
Explain Shell
_https://explainshell.com/#
_https://explainshell.com/explain?cmd=ls+-a+-1+%24HOME%2Fmyscripts#
_https://explainshell.com/explain?cmd=xfce4-terminal+-e+%27alsamixer+-c+vc4hdmi1%27+%26#
Bash scripting tutorial for Ubuntu newbies
_https://help.ubuntu.com/community/Beginners/BashScriptingBash scripting is one of the easiest types of scripting to learn...
if you are a 'non-computer-savvy' person that won't mean a thing to you. Bash is the language that you will learn to love as much of everyday Ubuntu life is done/can be done using the Terminal.Scripting
NOTE: The commands given in the scripting section are to be put into the text editor and not in the terminal unless instructed otherwise.
Bash is primarily a scripting language, so it would be a crime not to talk about scripting. Let's dive straight in with a bash script... You can create a bash script by opening your favorite text editor to edit your script and then saving it (typically the .sh file extension is used for your reference, but is not necessary.
_https://help.ubuntu.com/community/Beginners/BashScripting#Scripting
OK. Let us make the script. It is very simple. And scripts are very useful.
In Ubuntu, hidden files are any file or folder whose name begins with a period (.). These files are not displayed by default in file managers or the ls command but are still present on the system. They typically serve as configuration files for user applications and system services, helping to keep the directory clutter-free and preventing accidental modification by normal users. You can view hidden files by pressing Ctrl + H or using the "Show Hidden Files" option in the file manager's menu, and you can hide a file or folder by renaming it to start with a dot
The command ls -a displays all files.
ls --help | grep '\-\-a'
-a, --all do not ignore entries starting with .
-A, --almost-all do not list implied . and ..
--author with -l, print the author of each filels -al --author -1ls -al -1apulse is very useful, but he has another problem.
Something like this:
_https://raspberrypi.stackexchange.com/questions/39187/alsa-base-conf-file-missing
it seems devuanpi is missing alsa-base or similar, because after removing pulseaudio there is no more sound.
"devuanpi" or "raspberry pi"? He is testing them both.
This topic is now very confusing.
You may better close it and let him start new topics for each problems separately, and clearly define each problem.
Systemd can start services in parallel, significantly reducing boot times.
In a similar way, he is trying to solve all problems "in parallel" to minimize time and efforts.
EDIT:
_https://tracker.debian.org/pkg/alsa-base
alsa-base
package is gone
This package is not part of any Debian distribution. Thus you won't find much information here. The package is either very new and hasn't appeared on mirrors yet, or it's an old package that eventually got removed. The old news are kept for historic purpose only.
alsa-base was gone some years ago, but the myth of alsa-base is still alive.
Reload ALSA:
sudo /etc/init.d/alsa-utils force-reloador
sudo service alsa-utils force-reloadIf you have systemd, you may need enother command to reload ALSA
sudo systemctl restart alsaPost the output of these commands:
fuser -av $(find /dev/snd -type c 2>/dev/null)inxi -Acat /proc/asound/cardslsmod | grep sndaplay -li think it is because alsa-base is missing?
Do you mean:
alsa-base conf file missing
Perhaps, you have to create ALSA config
Post the ouput of these commands:
cat $HOME/.asoundrcls -1 /usr/share/alsacat /usr/share/alsa/alsa.confDoes the script work?
If it works, we can try to modify it step by step until it does what you want.
It will change, if you want. It is 100% functioning ALSAMIXER
Let us try to make a simple script which can do the same.
mkdir ~/myscriptscd ~/myscriptsmousepad script1.shCopy and past these 3 lines:
#!/bin/bash
xfce4-terminal -e 'alsamixer -c Headphones'Save it.
Check
ls | grep script1.shcat script1.shMake it executable
chmod a+x -v script1.shRun
stat -c %a script1.shIt shoud output "755"
$ stat -c %a script1.sh
755See: _https://chmodcommand.com/chmod-755/
Run it:
./script1.shRun it with full path:
$HOME/myscripts/script1.shon raspios the c\hange is made, a little bit silly situation resulted however, to change the playback from one device now to copy .asoundrc , practically heeded your advice and made several copy for different devices i~d like to activate.
Do you want to know how to write a simple bash script to switch between two "devices" with a mouse click?
If you have XFCE, try this command
xfce4-terminal -e 'alsamixer -c Headphones'It should open a new terminal with "alsamixer" for "Headphones'
It should not be difficult to fix sound problems with "devuanpi". Start a new topic for it.
And a new topic for this:
the alsa plugin would only function for regulating the volume
If you are not a masochist, you may better try MATE Desktop.
To make a copy of "asoundrc", run
cp -v $HOME/.asoundrc $HOME/.asoundrc-copy1"-v" means "verbose"
Check the result
ls -a ~/ | grep asoundTo replace "asoundrc" with another one (named, for example, "asoundrc-copy2"), run
cp -v $HOME/.asoundrc-copy2 $HOME/.asoundrcTo read, edit, or create a text file, you may try commands like these:
mousepad $HOME/.asoundrcmousepad $HOME/.asoundrc-copy2alsamixer:
alsamixer -c <Name of the card (id)>Try
alsamixer -c Headphonesalsamixer -c vc4hdmi0alsamixer -c vc4hdmi1speaker-test:
speaker-test -D hw:<Name of the card (id)>,0 --channels 2Try
speaker-test -D hw:Headphones,0 --channels 2speaker-test -D hw:vc4hdmi0,0 --channels 2speaker-test -D hw:vc4hdmi1,0 --channels 2The very old versions of "alsamixer" did allow to select a card, but to start "alsamixer", you had to use the name of card (or number), for example:
alsamixer -c 0alsamixer -c PCHYes, of course. It was his infamous article in LWN.net about Linux audio.
"Pulse my audio" was a response to that article:
I was saving this one until this article became free on LWN.net. It's awesomeness is truly unparalleled.
Another post was about bug trackers:
One bug report to rule them all
Posted Monday, August 4, 2008 @ 1:32 PM. ? FLAMES
Whatup y'all. I hope I haven't worn out all those refresh buttons on your browsers. Just because I don't post for a few days, y'all want to declare the death of this blog? You wish.
Anyways, today I'm talkin' about one of the community's crown jewels: bug trackers. We've heard it all before. Open bug tracking increases collaboration, transparency, and saves lives of poor, hungry children, etc.
But guess what? take a look at the bug trackers out there. They're mostly full of hogwash. Most of the bug reports go something like this...
Johnny User writes...
Hi. I'm trying to use ellipticaljerk-0.3.2, but my speakers make a farting sound when I click the jerk button. Then it crashes. Is this a bug?
Sammy Developer writes...
Hi Johnny. The jerk button works for me.
Bug status updated: CLOSED - USER ERROR
Sally User writes...
I'm also seeing this problem. These farting noises suck.
Bug status updated: REOPENED
Sammy Developer writes...
Ok, fine. Could you give me some more information? A backtrace maybe?
Johnny User writes...
What's a backtrace?
Sammy Developer writes...
It tells me where the problem is. You need to make sure you have debugging symbols installed. Also please tell me which compiler, which glibc, and which libjerk you are using.
Johnny User writes...
What are debugging symbols? How do I figure out all this information?Sally User writes...
Johnny, I know what Sammy is asking for. Here's the info:
gcc-4.1.3 glibc-2.5.1 libjerk-0.8a backtrace: : :Sammy User writes...
Thanks Sally. Except that I can't reproduce this bug. But I'm using glibc-2.5.2 beta and libjerk-cvs
Sally User writes...
I don't know how to use the versions you talk of. And besides, this is how it behaves on Ubuntu. I don't care about how it works on your computer. It is broken in Ubuntu Masturbating Monkey.
Joe User writes...
OMG, I'm so glad I found this report. I think I have a related problem. I'm
trying to play videos using mplayer for my wife, but she farts in my face
everytime I have to look at the man page to remember the options. Here's my
xorg.conf. Could you help me?: : (A huge long xorg.conf that makes a bug page a huge pain to navigate) : :Sammy Developer writes...
Joe, you need to file a separate bug for that.
Johnny User writes...
When will this bug be fixed? I thought Open Sauce meant that if I report the bug, it'll get fixed
Sammy Developer writes...
Johnny, I can't reproduce it. Feel free to send me a patch
(a few months later) Sammy Developer writes...
Upstream libjerk-0.9 fixes this problem.
Bug status updated: FIXED
(6 months later) Johnny User writes...
I just updated to Ubuntu Naughty Nutgoblin, and this broke again...
Sammy Developer writes...
It works for me. It must be Ubuntu's fault. I don't know what patches they
apply, so please file a bug with them.Bug status updated: WON'T FIX
Joe User writes...
What about my bug? Will you please fix it? My wife is still farting at me.
Yep. That sounds about right to me. Open bug trackers are filled with so much noise that there's a constant call for "triagers", which really are zealous volunteers suckered into cleaning out the accumulated crap.* Meanwhile, all the noise hides the real issues, causes developers to get frustrated, and slows progress. It's no wonder companies rarely open up their bug trackers. If you do, you're just asking for it.
I stopped filing bugs long ago. If you're gonna ask me to do it for free, you should at least make sure it's worth my time.
Bug trackers can be useful tools to coordinate work between competent developers and testers who speak the same language, and who work within a well-design development workflow. But as a mechanism to collect problem reports from clueless non-technical users, they FAIL in the EPIC manner. So y'all need to stop acting as if an open bug tracker is some crazy new innovation that is going to make FOSS better than all other software. I bet these things slow you down as much as they help.
* by the way, the idea that just anyone can effectively triage bugs is a huge load of crap as well. Anyone who has worked at a real software company writing huge complex software will tell you the same.
2008 was the year Ubuntu was infected with pulseaudio.
_https://daemonforums.org/showthread.php?t=2099
Originally Posted by _http://linuxhaters.blogspot.com/2008/10/pulse-my-audio.html
Thursday, October 2, 2008Pulse my audio
I was saving this one until this article became free on LWN.net. It's awesomeness is truly unparalleled.
Let me attempt to summarize.
A) PulseAudio needs to work with existing applications, so it implements an ALSA emulation layer, except, it's not complete. Only 70% of ALSA applications work. So it's like, totally ready.
B) So, in the true open source fashion, you should port your app to be a native PulseAudio client. Except that you can't. There's this yet-another-audio-library called libsidney, but it's not ready yet. (Hmm, this sounds familiar...)
C) Fedora led the way in incorporating PulseAudio before it was ready, breaking audio for thousands of users. Then because open source is about copying good ideas and bad ones, a ton of other distros adopted it as well. Amazing guys. In a way, you've spread bad code that breaks audio on thousands of computers faster than a virus could have. And it's immune to antivirus!
D) so now that we're in this "mess" (as the lead developer of PulseAudio calls it*), LSB comes along and says "we're going to standardize how your write audio apps!" Oh, but wait, ALSA's now "old" (we hardly knew ye), and I can't directly program PulseAudio. Hmm... So the article's brilliant solution? Standardize on the PulseAudio-safe subset of ALSA.
WHAT THE FUCK.
I can just imagine the future alsa man page. A big listing of functions, with a nice little asterisk next to those functions that you shouldn't use unless you want your app to totally FAIL on a system which has been sodomized by Pulse Audio. I can just see the developers of commercial Linux sound apps (all three of them) jumping for joy.
And thus unfolds another chapter in long history of failed sound systems on Linux. Can they make it much worse? I, for one, am excited to see how much worse they can make it until we all go back to listening to square waves on our PC speakers.
* BTW, also notice that it's the PulseAudio guy calling Linux audio a mess. Did he forget that it was his project that took the existing mess, and unloaded a giant steaming turd on it? Congratufuckinglations. You've just made it worse. You're a truly a worthy OSS contributor.
so most probably pulseaudio is interfering
Yes. It should be removed.
For other devices the content of $HOME/.asoundrc should be like this:
defaults.pcm.!card vc4hdmi0
defaults.ctl.!card vc4hdmi0
defaults.pcm.!device 0
defaults.ctl.!device 0or like this:
defaults.pcm.!card vc4hdmi1
defaults.ctl.!card vc4hdmi1
defaults.pcm.!device 0
defaults.ctl.!device 0Run
speaker-test --channels 2It should play "pink noise" to the current default device (set in $HOME/.asoundrc )
To free all audio devices, run
fuser -kv $(find /dev/snd -type c 2>/dev/null)NOTE: It may not work with pulseaudio
To verify, run
fuser -av $(find /dev/snd -type c 2>/dev/null)Run
mousepad $HOME/.asoundrcCopy and past 4 lines:
defaults.pcm.!card Headphones
defaults.ctl.!card Headphones
defaults.pcm.!device 0
defaults.ctl.!device 0Save it.
Run
cat $HOME/.asoundrcIt should look like this:
$ cat $HOME/.asoundrc
defaults.pcm.!card Headphones
defaults.ctl.!card Headphones
defaults.pcm.!device 0
defaults.ctl.!device 0Run
speaker-test --channels 2It should play "pink noise" to the default device (Headphones)
Do you want to know how to create $HOME/.asoundrc with a text editor?
Do you have a text editor?
sudo apt install mousepadCan you create a text file (two lines) with a text editor such mousepad, pluma, and the like?
If you can, it should not be a problem to create a simple ALSA config.
Do you want to use pulseaudio, or it can be removed?
Post the output of these commands:
fuser -av $(find /dev/snd -type c 2>/dev/null)inxi -Acat /proc/asound/cardsYes. To avoid troubles, one has to use the names.
$ cat /proc/asound/cards
0 [system ]: USB-Audio - iMic USB audio system
Griffin Technology, Inc iMic USB audio system at usb-0000:00:1a.0-1.3.4, full s$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: system [iMic USB audio system], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0Card number: 0 Name: "system"This is config generated by arateconf:
$ cat $HOME/.asoundrc
# ALSA library configuration file managed by arateconf.
#
# MANUAL CHANGES TO THIS FILE WILL BE OVERWRITTEN!
#
# Manual changes to the ALSA library configuration should be implemented
# by editing the ~/.asoundrc file, not by editing this file.
#=====================================================
# Configuration for system
#-----------------------------------------------------
# Perform dmixer
pcm.dmixer
{
type dmix
ipc_key 1024
ipc_perm 0666
hint
{
show off
description "Direct mixing of multiple audio streams"
}
slave
{
pcm "hw:system,0"
rate 48000
channels 2
format S16_LE
period_size 1920
buffer_size 7680
}
}
# Perform dsnooper
pcm.dsnooper
{
type dsnoop
ipc_key 1025
ipc_perm 0666
hint
{
show off
description "Recording from the same device for several applications simultaneously"
}
slave
{
pcm "hw:system,0"
rate 48000
format S16_LE
period_size 1920
buffer_size 7680
}
}
# Perform duplex
pcm.duplex
{
type asym
playback.pcm "dmixer"
capture.pcm "dsnooper"
hint
{
show off
description "Full duplex for simultaneous playback and recording"
}
}
# Perform convert
pcm.convert
{
type rate
converter fftrate
hint
{
show off
description "Sample rate converter"
}
slave
{
pcm "duplex"
rate 48000
format S16_LE
}
}
#=====================================================
# Configuration for default audio device
#-----------------------------------------------------
# Perform plug device
pcm.!default
{
type plug
slave.pcm "convert"
hint.description "Default device"
}No need to re-start ALSA, if you change (or create) ~/.asoundrc
If sound quality does not matter, a simple config might be a solution.
You may need to reload ALSA, if you remove pulseaudio or pipewire.
Can you create two ALSA configs (with different default devices) with arateconf?
For example:
1. Create a config with arateconf and save it.
2. Open it with a text editor a save a copy of it, for example:
pluma $HOME/.asoundrc mousepad $HOME/.asoundrc echo $HOME3. Create another config and save a copy of it.
If you do not like my solution, you may try something like this :
One united default PCM for two cards, or TwoCardsAsOne
_https://unix.stackexchange.com/a/295050
_https://unix.stackexchange.com/a/194631
Have you tested this method?
It works without problems.
If a problem occurs, the user can restart mpv player.
If you have two ALSA configs with different default devices, you can toggle them with a mouse click. What is needed is a simple bash script and a Desktop launcher.
Example is here:
_https://dev1galaxy.org/viewtopic.php?pid=57177#p57177
It was designed for a Linux Mint user who wanted to switch from a Bluetooth headphones to Intel HDA codec (and other way round) with a mouse click.
The magic commans:
cp $HOME/.asoundrc-BT $HOME/.asoundrc
cp $HOME/.asoundrc-HDA $HOME/.asoundrc cp means "copy".
$ alsamixer -h
Usage: alsamixer [options]
Useful options:
-h, --help this help
-c, --card=NUMBER sound card number or id
-D, --device=NAME mixer device name
-m, --mouse enable mouse
-M, --no-mouse disable mouse
-f, --config=FILE configuration file
-F, --no-config do not load configuration file
-V, --view=MODE starting view mode: playback/capture/all
Debugging options:
-g, --no-color toggle using of colors
-a, --abstraction=NAME mixer abstraction level: none/basicYou are avoiding to answer the question, because you are not going to take any responsibility for your statements, because you cannot trust them.
EDIT:
Would you trust a security expert who does not trust his senses and his ability to think?
If you do not trust your senses and your ability to think, your statements can be dismissed as lunatic ravings or a sort of bullshit.