The officially official Devuan Forum!

You are not logged in.

#26 Re: Desktop and Multimedia » sayonara: undefined symbol in libsqlite.so » 2025-10-03 20:26:42

The best place to discuss appimages is, perhaps, Ubuntu newbie forum.

Audacious is easy to compile
_https://dev1galaxy.org/viewtopic.php?id=7214

#27 Freedom Hacks » [ALSA] Firefox vs Chromium: Which crap sounds better? » 2025-09-29 14:43:53

igorzwx
Replies: 0

Firefox downsamples Hi-Res Audio to 44.1 kHz, or it prefers to play 44.1 kHz audio format, because of PreferredSampleRate

about:support 

Media
-----

Audio Backend: alsa
Max Channels: 10000
Preferred Sample Rate: 44100

Chromium downsamples Hi-Res Audio to 48 kHz (or it prefers 48 kHz).

To find out which crap sounds better, you may try to conduct a blind test, a scientific method where listeners evaluate options without knowing their identity or brand.

Hi-Res Audio 24 Bit/192Khz Bass Test - Audiophile Art
_https://www.youtube.com/watch?v=dMTKSSqDwyU
_https://youtu.be/dMTKSSqDwyU

$ firefox 2>&1 youtu.be/dMTKSSqDwyU
Input:  44100 Hz, 2 ch, 's32_le' (0xa): dummy = 0, period = 1764
Output: 48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 1920
Rates:  44100 --> 48000 (J: 0.00%, T: FFT, W: Vorbis)
Ok.

Input:  48000 Hz, 2 ch, 's32_le' (0xa): dummy = 0, period = 1920
Output: 48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 1920
Rates:  48000 --> 48000 (J: 0.00%, T: None, W: Planar)
Ok.

Input:  44100 Hz, 2 ch, 's32_le' (0xa): dummy = 0, period = 1764
Output: 48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 1920
Rates:  44100 --> 48000 (J: 0.00%, T: FFT, W: Vorbis)
Ok.
$ chromium 2>&1 --audio-buffer-size=8192 youtu.be/dMTKSSqDwyU
Input:  48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 1920
Output: 48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 1920
Rates:  48000 --> 48000 (J: 0.00%, T: None, W: Planar)
Ok.

Input:  48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 1920
Output: 48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 1920
Rates:  48000 --> 48000 (J: 0.00%, T: None, W: Planar)
Ok.

To disable resampling, or change PreferredSampleRate, one may try to recompile Firefox.
There is a manual for Ubuntu newbies.

#28 Freedom Hacks » How to fix Chromium's ALSA backend (+ fix for Brave Browser) » 2025-09-28 21:55:10

igorzwx
Replies: 0

ALSA - Gentoo Wiki
_https://wiki.gentoo.org/wiki/ALSA#Firefox.2C_Chromium.2C_and_YouTube_have_no_audio_with_custom_.asoundrc_but_other_apps_do

Both browsers [Firefox and Chromium] either depend on pulseaudio to set up correct sample rate or in absence of pulseaudio set sample rate to 48000 as defacto standard in sound card world.

NOTE: For dmix with the fftrate resampler, any sample rate is consumable. It should play sound without problems.

Experiment:

1. .asoundrc was generated by arateconf (with dmix, dsnoop, etc.)

2. the same YouTube video is played with Firefox and Chromium (with and without apulse)

$ firefox --version
Mozilla Firefox 140.3.0esr

Firefox with ALSA (with apulse):

$ apulse firefox 2>&1
Input:  48000 Hz, 2 ch, 's32_le' (0xa): dummy = 0, period = 1920
Output: 48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 1920
Rates:  48000 --> 48000 (J: 0.00%, T: None, W: Planar)
Ok.

Firefox with ALSA (without apulse) - notice the difference:

$ firefox 2>&1
Input:  44100 Hz, 2 ch, 's32_le' (0xa): dummy = 0, period = 1764
Output: 48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 1920
Rates:  44100 --> 48000 (J: 0.00%, T: FFT, W: Vorbis)
Ok.

Input:  44100 Hz, 2 ch, 's32_le' (0xa): dummy = 0, period = 1764
Output: 48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 1920
Rates:  44100 --> 48000 (J: 0.00%, T: FFT, W: Vorbis)
Ok.

Input:  48000 Hz, 2 ch, 's32_le' (0xa): dummy = 0, period = 1920
Output: 48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 1920
Rates:  48000 --> 48000 (J: 0.00%, T: None, W: Planar)
Ok.

Chromium:

$ chromium --version
Chromium 140.0.7339.207 built on Debian GNU/Linux 12 (bookworm)

Chromium with ALSA (with apulse):

$ apulse chromium 2>&1
Input:  44100 Hz, 2 ch, 's32_le' (0xa): dummy = 0, period = 1764
Output: 48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 1920
Rates:  44100 --> 48000 (J: 0.00%, T: FFT, W: Vorbis)
Ok.

Input:  44100 Hz, 2 ch, 's32_le' (0xa): dummy = 0, period = 1764
Output: 48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 1920
Rates:  44100 --> 48000 (J: 0.00%, T: FFT, W: Vorbis)
Ok.

Chromium with ALSA (without apulse) - sound quality is horrible:

$ chromium 2>&1
Input:  48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 1920
Output: 48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 1920
Rates:  48000 --> 48000 (J: 0.00%, T: None, W: Planar)
Ok.

Input:  48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 1920
Output: 48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 1920
Rates:  48000 --> 48000 (J: 0.00%, T: None, W: Planar)
Ok.

dmix does not employ resampling:

Rates:  48000 --> 48000 (J: 0.00%, T: None, W: Planar)

The most likely cause of audio distortions is, perhaps, Chromium ALSA backend.

To improve sound quality with Chrome, Chromium, Brave, Min, and the like, one may try to use them with apulse.

EDIT:

This seems to be a solution:

chromium 2>&1 --audio-buffer-size=4096
$ chromium 2>&1 --audio-buffer-size=8192
Input:  48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 1920
Output: 48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 1920
Rates:  48000 --> 48000 (J: 0.00%, T: None, W: Planar)
Ok.

Input:  48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 1920
Output: 48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 1920
Rates:  48000 --> 48000 (J: 0.00%, T: None, W: Planar)
Ok.

The same solution works for Brave Browser:

$ brave-browser-stable 2>&1 --audio-buffer-size=8192
Input:  48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 1920
Output: 48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 1920
Rates:  48000 --> 48000 (J: 0.00%, T: None, W: Planar)
Ok.

Input:  48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 1920
Output: 48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 1920
Rates:  48000 --> 48000 (J: 0.00%, T: None, W: Planar)
Ok.

Input:  48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 1920
Output: 48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 1920
Rates:  48000 --> 48000 (J: 0.00%, T: None, W: Planar)
Ok.

With the default audio-buffer-size, Brave Browser produces the same audio distortions.

Redirection of stderr to stdout, 2>&1, is used to print debug information from the fftrate resampler.

Desktop launcher for Brave Browser (with fix for ALSA):

$ cat ~/.local/share/applications/brave-browser.desktop
[Desktop Entry]
Version=1.0
Name=Brave Web Browser
GenericName=Web Browser
Comment=Access the Internet
Exec=/usr/bin/brave-browser-stable --audio-buffer-size=8192 %U
StartupNotify=true
Terminal=false
Icon=brave-browser
Type=Application
Categories=Network;WebBrowser;
MimeType=application/pdf;application/rdf+xml;application/rss+xml;application/xhtml+xml;application/xhtml_xml;application/xml;image/gif;image/jpeg;image/png;image/webp;text/html;text/xml;x-scheme-handler/http;x-scheme-handler/https;
Actions=new-window;new-private-window;

[Desktop Action new-window]
Name=New Window
Exec=/usr/bin/brave-browser-stable --audio-buffer-size=8192

[Desktop Action new-private-window]
Name=New Incognito Window
Exec=/usr/bin/brave-browser-stable --incognito --audio-buffer-size=8192

The Brave browser includes a built-in ad-blocking feature called Brave Shields that automatically blocks unwanted advertisements and trackers on most websites and video platforms by default, offering a cleaner, faster, and more private browsing experience without needing third-party extensions.

#29 Re: Freedom Hacks » ALSA: Dogmatism and Empiriokritizismus » 2025-09-26 00:30:24

It was about a technical problem how to toggle ALSA configs with a script.

The main principle of ALSA design is a sort of "hot-plug".
Today, you do not need to reload ALSA, if you change .asoundrc
Though a media player may (or may not) need to be re-started.

It is self-evident. If you don't believe, read Gentoo Wiki and try proposed tests.

Gentoo Wiki:
Use of ~/.asoundrc is immediate and as long as you are not forcing the use of specific devices in any applications, they either will require a restart or will begin working immediately. One of the best tests is to run Chrome, go to YouTube, open a terminal, run mplayer with an audio or video file and see that you do not get an error about audio (such an error might be 'Device or resource busy').
_https://wiki.gentoo.org/wiki/ALSA#Sound_card_only_available_for_one_application

The problem is that ALSA is poorly documented, and, therefore, one has to use the method of trial and error to find the correct solution. However, what is correct today might be wrong tomorrow.

To foresee changes in the "advanced sound system", one may need "a deeper level of understanding of ALSA", or a sort of esoteric knowledge for navigating uncertainty.

ALSA in user space is a sort of software mixer with plugins, such as dmix, dsnoop, and the like. Many years ago, ALSA was so buggy that it was necessary to reload ALSA to enable changes in .asoundrc. Today, to enable dmix or other plugin in .asoundrc, you do not need to reload ALSA.

In 2008, it was necessary to reload ALSA to enable dmix. This problem was fixed in 2009 (or 2010) in a new version of ALSA. In 2010, Ubuntu users were advised to recompile ALSA to fix sound problems, although it was enough to remove pulseaudio. In 2010, Ubuntu users asked questions like this: "Could I remove ALSA, and use PulseAudio instead?"

Linux Mint Forums
_https://forums.linuxmint.com/viewtopic.php?t=179838

Remove ALSA, install Pulseaudio

Post by H.Remedy » Tue Oct 07, 2014 9:13 am

Can someone please give terminal commands for fully removing ALSA and installing Pulseaudio? :?

It is very logical:
1. If pulseaudio is much better than ALSA, it is reasonable to remove ALSA and install pulseaudio.
2. If pulseaudio needs ALSA to work, it cannot be better than ALSA, and, perhaps, is not needed.
3. If ALSA can work without pulseaudio, it might be reasonable to remove pulseaudio as an unnecessary fifth wheel.

If ALSA is buggy and ill-designed, and the resamplers are crappy, any sort of pulseaudio is doomed to fail, for it is a castle built on sand. It is obvious, but not evident.

Today, many "computer scientists" firmly believe that Fedora Linux has PipeWire instead of ALSA. It is impossible to convince them that they have ALSA installed and working in their Linux system, because they do not want to know what ALSA is, and how it looks like. They have the gift of faith in the sense that they do not trust their senses and their ability to think. They have a special, extraordinary trust in PipeWire's promises and a sort of "supernatural ability to believe in the unseen and to act on spiritual truths despite physical evidence to the contrary".

...some audio applications keep the ALSA PCM device open, even when they are not actively streaming any audio, and so it is necessary to close each application before any other can use the device...
ALSA provides a solution to this for hardware cards with the "dmix" plugin. That plugin allows multiple open connections, mixes the streams together, then sends the result as a single stream to the hardware device.
_https://github-wiki-see.page/m/Arkq/bluez-alsa/wiki/Using-bluealsa-with-dmix

dmix is needed to make ALSA usable.

When #Software mixing [dmix] is enabled, ALSA is forced to resample everything to the same frequency (48 kHz by default when supported). By default, it will try to use the speexrate converter to do so, and fallback to low-quality linear interpolation if it is not available. Thus, if you are getting poor sound quality due to bad resampling, the problem can be solved by simply installing the alsa-plugins package.
_https://wiki.archlinux.org/title/Advanced_Linux_Sound_Architecture#High_quality_resampling

The speexrate converter is also crappy.

In 2008, Ubuntu was infected with PulseAudio which was a replacement for dmix and ESD. PulseAudio was very advanced, but buggy and unusable. ESD was not so buggy. It was usable, and, therefore, it was deprecated. However, it was still  available, and the standard solution for sound problems was to remove PulseAudio and install ESD. The best solution for sound problems was to remove both ALSA and PulseAudio, compile OSS4 and install it.

NOTE: ESD was created, because dmix was buggy and unusable. ESD was buggy, but usable. When most bugs were fixed, it was deprecated (in 2008).

[In 2007] the Enlightened Sound Daemon (ESD or EsounD) was the sound server for Enlightenment and GNOME. Esound is a small sound daemon for both Linux and UNIX. ESD was created to provide a consistent and simple interface to the audio device, so applications do not need to have different driver support written per architecture. It was also designed to enhance capabilities of audio devices such as allowing more than one application to share an open device. ESD accomplishes these things while remaining transparent to the application, meaning that the application developer can simply provide ESD support and let it do the rest. On top of this, the API is designed to be very similar to the current audio device API, making it easy to port to ESD.
ESD will mix the simultaneous audio output of multiple running programs, and output the resulting stream to the sound card.
_https://en.wikipedia.org/wiki/Enlightened_Sound_Daemon

ESD was mostly using ALSA's built-in OSS emulation (alsa-oss: snd-pcm-oss and snd-seq-oss) which performed much better than native ALSA in 2008. The emulation provided a more stable solution for applications still using the Open Sound System (OSSv.3) API.

Horrible sound quality with dmix is caused by its poor resampling algorithm which produces noticeable audio distortions.

In 2008, dmix was extremely buggy (and ALSA resamplers have always been crappy). The sound quality was really horrible with dmix. This problem was fixed in 2010 with the fftrate ALSA plugin (and with ALSA update).

ALSA was designed as a universal solution to all problems, but it was so buggy that it was decided to create pulseaudio as a truly advanced solution to all problems. Pipewire was created for a similar reason.

Today ALSA is not so buggy and even usable, if it is correctly configured.

#30 Freedom Hacks » ALSA: Dogmatism and Empiriokritizismus » 2025-09-25 23:01:56

igorzwx
Replies: 4

The official ALSA documentation is here: _https://www.alsa-project.org/wiki/Asoundrc

ALSA: Outdated documentation
_https://alsa.opensrc.org/Asoundrc#Changing_things

Asoundrc: 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:

greenjeans wrote:

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

ralph.ronnquist wrote:

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.

#31 Re: Desktop and Multimedia » (alsa) changin soundcard easily via terminal » 2025-09-24 19:11:12

1. First, make a dir

mkdir ~/myscripts

The 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 0

For example, the second text file might be like this:

defaults.pcm.!card vc4hdmi1
defaults.ctl.!card vc4hdmi1
defaults.pcm.!device 0
defaults.ctl.!device 0

4. Then post here the output of these commands:

echo "$HOME/myscripts"
ls -a -1 $HOME/myscripts

Then 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/BashScripting

Bash 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

#32 Re: Desktop and Multimedia » (alsa) changin soundcard easily via terminal » 2025-09-24 16:49:08

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 file
ls -al --author -1
ls -al -1

#33 Re: Desktop and Multimedia » (alsa) changin soundcard easily via terminal » 2025-09-24 16:20:32

apulse is very useful, but he has another problem.

Something like this:

_https://raspberrypi.stackexchange.com/questions/39187/alsa-base-conf-file-missing

kapqa wrote:

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.

#34 Re: Desktop and Multimedia » (alsa) changin soundcard easily via terminal » 2025-09-24 15:35:01

Reload ALSA:

sudo /etc/init.d/alsa-utils force-reload

or

sudo service alsa-utils force-reload

If you have systemd, you may need enother command to reload ALSA

sudo systemctl restart alsa

Post the output of these commands:

fuser -av $(find /dev/snd -type c 2>/dev/null)
inxi -A
cat /proc/asound/cards
lsmod | grep snd
aplay -l
kapqa wrote:

i 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/.asoundrc
ls -1 /usr/share/alsa
cat /usr/share/alsa/alsa.conf

#35 Re: Desktop and Multimedia » (alsa) changin soundcard easily via terminal » 2025-09-24 14:54:26

Does the script work?

If it works, we can try to modify it step by step until it does what you want.

#36 Re: Desktop and Multimedia » (alsa) changin soundcard easily via terminal » 2025-09-24 14:25:06

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 ~/myscripts
cd ~/myscripts
mousepad script1.sh

Copy and past these 3 lines:

#!/bin/bash

xfce4-terminal -e 'alsamixer -c Headphones'

Save it.

Check

ls | grep script1.sh
cat script1.sh

Make it executable

chmod a+x -v script1.sh

Run

stat -c %a script1.sh

It shoud output "755"

$ stat -c %a script1.sh
755

See: _https://chmodcommand.com/chmod-755/

Run it:

./script1.sh

Run it with full path:

$HOME/myscripts/script1.sh

#37 Re: Desktop and Multimedia » (alsa) changin soundcard easily via terminal » 2025-09-24 13:47:51

kapqa wrote:

on 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'

#38 Re: Desktop and Multimedia » (alsa) changin soundcard easily via terminal » 2025-09-24 12:51:10

Can you separate your questions into different topics?

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 asound

To replace "asoundrc" with another one (named, for example, "asoundrc-copy2"), run

cp -v $HOME/.asoundrc-copy2 $HOME/.asoundrc

To read, edit, or create a text file, you may try commands like these:

mousepad $HOME/.asoundrc
mousepad $HOME/.asoundrc-copy2

alsamixer:

alsamixer -c <Name of the card (id)>

Try

alsamixer -c Headphones
alsamixer -c vc4hdmi0
alsamixer -c vc4hdmi1

speaker-test:

speaker-test -D hw:<Name of the card (id)>,0 --channels 2

Try

speaker-test -D hw:Headphones,0 --channels 2
speaker-test -D hw:vc4hdmi0,0 --channels 2
speaker-test -D hw:vc4hdmi1,0 --channels 2

The 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 0
alsamixer -c PCH

#39 Re: Installation » Cant do upgrade Dadedalus to Ceres » 2025-09-23 18:47:39

Yes, 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.

#40 Re: Installation » Cant do upgrade Dadedalus to Ceres » 2025-09-23 15:12:51

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, 2008

Pulse 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.

#41 Re: Desktop and Multimedia » (alsa) changin soundcard easily via terminal » 2025-09-22 21:08:58

kapqa wrote:

so most probably pulseaudio is interfering

Yes. It should be removed.

#42 Re: Desktop and Multimedia » (alsa) changin soundcard easily via terminal » 2025-09-22 20:07:36

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 0

or like this:

defaults.pcm.!card vc4hdmi1
defaults.ctl.!card vc4hdmi1
defaults.pcm.!device 0
defaults.ctl.!device 0

Run

speaker-test --channels 2

It 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)

#43 Re: Desktop and Multimedia » (alsa) changin soundcard easily via terminal » 2025-09-22 19:48:28

Run

mousepad $HOME/.asoundrc

Copy and past 4 lines:

defaults.pcm.!card Headphones
defaults.ctl.!card Headphones
defaults.pcm.!device 0
defaults.ctl.!device 0

Save it.

Run

cat $HOME/.asoundrc

It should look like this:

$ cat $HOME/.asoundrc
defaults.pcm.!card Headphones
defaults.ctl.!card Headphones
defaults.pcm.!device 0
defaults.ctl.!device 0

Run

speaker-test --channels 2

It should play "pink noise" to the default device (Headphones)

#44 Re: Desktop and Multimedia » (alsa) changin soundcard easily via terminal » 2025-09-22 19:20:06

Do you want to know how to create $HOME/.asoundrc with a text editor?

Do you have a text editor?

sudo apt install mousepad

#45 Re: Desktop and Multimedia » (alsa) changin soundcard easily via terminal » 2025-09-22 18:39:40

Can 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?

#46 Re: Desktop and Multimedia » (alsa) changin soundcard easily via terminal » 2025-09-22 17:50:24

Post the output of these commands:

fuser -av $(find /dev/snd -type c 2>/dev/null)
inxi -A
cat /proc/asound/cards

#47 Re: Desktop and Multimedia » (alsa) changin soundcard easily via terminal » 2025-09-22 17:19:40

Yes. 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 #0
Card 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"
}

#48 Re: Desktop and Multimedia » (alsa) changin soundcard easily via terminal » 2025-09-22 16:31:21

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.

#49 Re: Desktop and Multimedia » (alsa) changin soundcard easily via terminal » 2025-09-22 15:45:58

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 $HOME

3. Create another config and save a copy of it.

#50 Re: Desktop and Multimedia » (alsa) changin soundcard easily via terminal » 2025-09-22 15:18:04

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

Board footer

Forum Software