Page 1 of 1

MX-17.1/MX-18.1: Replacing PulseAudio by ALSA's sound server – implications?

Posted: Sat Aug 03, 2019 2:51 pm
by MX-16_fan
@all:

I'm thinking about replacing PulseAudio (which, to my knowledge, is MX Linux's default sound server) by ALSA's own sound server.

My question is what implications this would have – would there be any useage restrictions?


Greetings, and thanks in advance for any answer, Joe

Re: MX-17.1/MX-18.1: Replacing PulseAudio by ALSA's sound server – implications?

Posted: Sat Aug 03, 2019 2:53 pm
by dolphin_oracle
A few apps may have issues, like Firefox.

Note that pulse just sirs on top of alsa anyway.

Re: MX-17.1/MX-18.1: Replacing PulseAudio by ALSA's sound server – implications?

Posted: Sat Aug 03, 2019 2:59 pm
by MX-16_fan
@dolphin_oracle:
dolphin_oracle wrote: Sat Aug 03, 2019 2:53 pm A few apps may have issues, like Firefox.

Note that pulse just sirs on top of alsa anyway.
The more traditional the application, the fewer issues? Greetings, Joe

Re: MX-17.1/MX-18.1: Replacing PulseAudio by ALSA's sound server – implications?

Posted: Sat Aug 03, 2019 3:55 pm
by dreamer
MX-16_fan wrote: Sat Aug 03, 2019 2:51 pm @all:

I'm thinking about replacing PulseAudio (which, to my knowledge, is MX Linux's default sound server) by ALSA's own sound server.

My question is what implications this would have – would there be any useage restrictions?


Greetings, and thanks in advance for any answer, Joe
Important:
You don't have to uninstall PulseAudio packages. This will make it easier to switch between PulseAudio and ALSA. When you launch an application default behavior is to first check for PulseAudio and then ALSA. If PulseAudio isn't running the application will use ALSA instead.

I think all browsers can use ALSA except regular Firefox from Mozilla, because maintaining ALSA support is apparently not possible with hundreds of millions of dollars. Firefox ESR from Debian supports ALSA.

How to use ALSA without uninstalling PulseAudio packages:
A small change in /etc/pulse/client.conf (can be made per user instead /home/yourusername/.config/pulse/client.conf) is enough:

Code: Select all

autospawn=no
In Xfce > Settings Manager > Session and Startup > Application Autostart I unchecked PulseAudio items and created a new item called Volumicon with command "volumeicon" so that there still is a sound volume icon in the notification area next time you boot.

Reboot then use MX Select Sound to choose the default sound card.

Install qasmixer so you can use that instead of PulseAudio Volume Control. My desktop looks identical with notification area "volumeicon" pointing to QasMixer instead of PulseAudio Volume Control. Make sure the correct sound card is chosen in volumeicon preferences.

If there is an antiX or MX Linux user with Skype working without PulseAudio (requires apulse) I would be interested in knowing the correct command for launching Skype. Thanks.

Re: MX-17.1/MX-18.1: Replacing PulseAudio by ALSA's sound server – implications?

Posted: Sat Aug 03, 2019 4:40 pm
by MX-16_fan
@dreamer:

Thanks for this interesting how-to!

dreamer wrote: Sat Aug 03, 2019 3:55 pm In Xfce > Settings Manager > Session and Startup > Application Autostart I unchecked PulseAudio items and created a new item called Volumicon with command "volumeicon" so that there still is a sound volume icon in the notification area next time you boot.
On a German language system: Einstellungen – Grafische Einstellungen für Xfce 4 -> Sitzung und Startverhalten -> Automatisch gestartete Anwendungen.

dreamer wrote: Sat Aug 03, 2019 3:55 pm If there is an antiX or MX Linux user with Skype working without PulseAudio (requires apulse) I would be interested in knowing the correct command for launching Skype. Thanks.
I used to think that apulse ("PulseAudio emulation for ALSA") was made exactly for a scenario like that?



Greetings, Joe

Re: MX-17.1/MX-18.1: Replacing PulseAudio by ALSA's sound server – implications?

Posted: Sat Aug 03, 2019 5:21 pm
by MX-16_fan
@dreamer:


UPDATE:

Worked myself trough your how-to. Nearly everything works like a charm. Besides, for a reason I do not know, sound quality is many times better, and Twinkle crackling (see viewtopic.php?f=108&t=51888) has disappeared.

Would be good to have a script wrapped into a package that could do all this automatically, plus removing everything PulseAudio from your system. We might call it "RemovePulseAudio".

The only thing that does not work at all is audio streaming to a Bluetooth device. Apparently you need bluez-alsa (https://github.com/Arkq/bluez-alsa) for that, which currently isn't available via repo for MX-17.1 nor MX-18.1. I'll file a package request for that.


Greetings, Joe

Re: MX-17.1/MX-18.1: Replacing PulseAudio by ALSA's sound server – implications?

Posted: Sat Aug 03, 2019 5:59 pm
by dreamer
MX-16_fan wrote: Sat Aug 03, 2019 4:40 pm I used to think that apulse ("PulseAudio emulation for ALSA") was made exactly for a scenario like that?
You need the correct launch command for Skype that first starts apulse. It could be as easy as

Code: Select all

apulse skypeforlinux
but it didn't work and then I got tired and started asking myself questions like "Why am I using Skype?"

Re: MX-17.1/MX-18.1: Replacing PulseAudio by ALSA's sound server – implications?

Posted: Sat Aug 03, 2019 6:38 pm
by dreamer
MX-16_fan wrote: Sat Aug 03, 2019 5:21 pm Worked myself trough your how-to. Nearly everything works like a charm. Besides, for a reason I do not know, sound quality is many times better, and Twinkle crackling (see viewtopic.php?f=108&t=51888) has disappeared.
MX is the best PulseAudio experience I have had, but of course sound is better without PulseAudio because the (lazy) middle-man is gone. I think PulseAudio needs to hit the gym, but no one is testing performance so nothing happens.
MX-16_fan wrote: Sat Aug 03, 2019 5:21 pm Would be good to have a script wrapped into a package that could do all this automatically, plus removing everything PulseAudio from your system. We might call it "RemovePulseAudio".
Well, you can set up one user without PulseAudio and one user with PulseAudio. If you want to use an application that requires PulseAudio you can quickly switch to your PulseAudio account. When PulseAudio isn't running having the packages installed does nothing. Maybe you can save a little space by removing the packages. The good thing with MX Linux is that you only have to do something once, thanks to the snapshot functionality.
MX-16_fan wrote: Sat Aug 03, 2019 5:21 pm The only thing that does not work at all is audio streaming to a Bluetooth device. Apparently you need bluez-alsa (https://github.com/Arkq/bluez-alsa) for that, which currently isn't available via repo for MX-17.1 nor MX-18.1. I'll file a package request for that.
That's a good idea. Having all the necessary components for a PulseAudio free experience is a worthy goal I think. antiX comes without PulseAudio, but the main difference between these platforms seems to be systemd-free vs systemd-shim.

Re: MX-17.1/MX-18.1: Replacing PulseAudio by ALSA's sound server – implications?

Posted: Sun Aug 04, 2019 8:49 am
by MX-16_fan
@dreamer:
dreamer wrote: Sat Aug 03, 2019 5:59 pm (...) and then I got tired and started asking myself questions like "Why am I using Skype?"
That's a very good question indeed. Personally speaking, I wouldn't put Skype on a nice clean MX Linux system.

Maybe you'd like to have a look at jami – A GNU package (formerly named Ring – A GNU package) (https://jami.net/) (see older discussion here: viewtopic.php?f=134&t=43901)).


Greetings, Joe

Re: MX-17.1/MX-18.1: Replacing PulseAudio by ALSA's sound server – implications?

Posted: Sun Aug 04, 2019 9:13 am
by MX-16_fan
@dreamer:
dreamer wrote: Sat Aug 03, 2019 6:38 pm ... of course sound is better without PulseAudio because the (lazy) middle-man is gone. (...) Having all the necessary components for a PulseAudio free experience is a worthy goal I think. antiX comes without PulseAudio, but the main difference between these platforms seems to be systemd-free vs systemd-shim.
Given the fact that PulseAudio has been developed by the same guy who also developed systemd, plus the fact that IMHO PulseAudio has led to more than ten years of broken or questionable audio functionality with many Linux distros, it's puzzling to me why MX Linux (via Debian) would want to use PulseAudio any longer in the first place.

In any case, having a "network transparent" audio server on your system sounds like a dangerous thing to me, especially when you think of potential shortcomings in implementation. IMHO PulseAudio's potential security impilications might even in the long run be considered as leading to an incompatibility with the General Data Protection Regulation (GDPR).

ALSA works fine. OSS is now free. OpenBSD's sndio (https://en.wikipedia.org/wiki/Sndio) is available under the GPL-compatible (cf. (cf. https://www.gnu.org/licenses/license-list.en.html#ISC) ISC license. So maybe we could all be freed from another burden of the past from the time when the Linux world was severely damaged?


Greetings, Joe

Re: MX-17.1/MX-18.1: Replacing PulseAudio by ALSA's sound server – implications?

Posted: Sun Aug 04, 2019 12:13 pm
by dreamer
If I dislike PulseAudio - it's because I have suffered for ten years - driving me to Windows 7 in the process. If I had been a smarter guy maybe I would have figured out how to use Ubuntu without PulseAudio, but it was much trickier than MX Linux. Therein lies the greatness of MX Linux.

MX Linux can cater to almost any user. Having PulseAudio by default is what the great majority expect. PulseAudio also brings some benefits in terms of easy configuration and ease of use.

I also consider PulseAudio "bugged" (in every sense of the word) - much like systemd. I'm more of an ideological guy, but taking the route MX Linux is taking is the smartest choice. With MX Linux you can have it your way.

antiX is the ideological distro and MX Linux is the inclusive distro - I think it's a good combination. MX Linux gets its base system from antiX and in return antiX users can probably use the vast majority of packages in MX repo if they wish. As a "lagging" MX Linux user I appreciate that MX repo packages are compiled with basic Stretch compatibility.

I appreciate these fluid boundaries between Debian, antiX and MX Linux. If you don't like MX Linux semi-rolling you can disable the MX repo and find yourself on "Debian/antiX stable" with browser updates from antiX repo.

If I can use MX Linux my way, why would I dislike that someone else uses MX Linux their way? Use systemd, Snaps whatever if you want to. Most of the "hate" these technologies receive stems from the perception that they are hurting existing technologies. MX Linux has found a way to let technologies coexist.

Re: MX-17.1/MX-18.1: Replacing PulseAudio by ALSA's sound server – implications?

Posted: Sun Aug 04, 2019 1:58 pm
by MX-16_fan
@dreamer:
dreamer wrote: Sun Aug 04, 2019 12:13 pm (...) I also consider PulseAudio "bugged" (in every sense of the word) - much like systemd. (...) Most of the "hate" these technologies receive stems from the perception that they are hurting existing technologies. MX Linux has found a way to let technologies coexist.
In this case: not yet – currently you cannot remove the pulseaudio package without loosing mx-apps and mx-system-sounds. Tested on MX-17.1. Greetings, Joe

Re: MX-17.1/MX-18.1: Replacing PulseAudio by ALSA's sound server – implications?

Posted: Sun Aug 04, 2019 6:04 pm
by dreamer
MX-16_fan wrote: Sun Aug 04, 2019 1:58 pm In this case: not yet – currently you cannot remove the pulseaudio package without loosing mx-apps and mx-system-sounds. Tested on MX-17.1. Greetings, Joe
mx-system-sounds has a dependency on libcanberra-pulse. libcanberra-pulse has a dependency on pulseaudio.

Consider the other back-end:

mx-system-sounds has a dependency on libcanberra-gstreamer. libcanberra-gstreamer has a dependency on libgstreamer. libcanberra-gstreamer and libgstreamer do NOT have a dependency on gstreamer (only suggests).

When you pull in a pulse related library you pull in pulseaudio. When you pull in a gstreamer related library you don't pull in gstreamer. It seems impossible to make an application that supports PulseAudio without bringing PulseAudio with it. Bad packaging in Debian it seems. It's worse in Ubuntu of course.

mx-system-sounds needs to support PulseAudio so that it has a dependency on libcanberra-pulse is understandable.

Re: MX-17.1/MX-18.1: Replacing PulseAudio by ALSA's sound server – implications?

Posted: Sun Aug 04, 2019 6:08 pm
by MX-16_fan
@dreamer:

dreamer wrote: Sun Aug 04, 2019 6:04 pm (...) mx-system-sounds has a dependency on libcanberra-pulse. libcanberra-pulse has a dependency on pulseaudio.

Consider the other back-end:

mx-system-sounds has a dependency on libcanberra-gstreamer. libcanberra-gstreamer has a dependency on libgstreamer. libcanberra-gstreamer and libgstreamer do NOT have a dependency on gstreamer (only suggests).

When you pull in a pulse related library you pull in pulseaudio. When you pull in a gstreamer related library you don't pull in gstreamer. It seems impossible to make an application that supports PulseAudio without bringing PulseAudio with it. Bad packaging in Debian it seems. It's worse in Ubuntu of course.

mx-system-sounds needs to support PulseAudio so that it has a dependency on libcanberra-pulse is understandable.

Thanks for that explanation. What you say fully explains to me the mx-system-sounds depencency, but what about mx-apps?


Greetings, Joe

Re: MX-17.1/MX-18.1: Replacing PulseAudio by ALSA's sound server – implications?

Posted: Sun Aug 04, 2019 6:10 pm
by dolphin_oracle
mx-apps is just a metapackage for all the mx-apps. It's safe to remove, the apps it pulls in should remain. It's being flagged for removal because it depends on mx-system-sounds.

Re: MX-17.1/MX-18.1: Replacing PulseAudio by ALSA's sound server – implications?

Posted: Sat Oct 19, 2019 2:51 pm
by MX-16_fan
@dreamer:
dreamer wrote: Sun Aug 04, 2019 6:04 pm
mx-system-sounds has a dependency on libcanberra-pulse. libcanberra-pulse has a dependency on pulseaudio. (...) mx-system-sounds has a dependency on libcanberra-gstreamer. libcanberra-gstreamer has a dependency on libgstreamer. (...) When you pull in a pulse related library you pull in pulseaudio. When you pull in a gstreamer related library you don't pull in gstreamer. It seems impossible to make an application that supports PulseAudio without bringing PulseAudio with it. Bad packaging in Debian it seems. It's worse in Ubuntu of course. (...)

Thanks for the explanation.

Do you think that someone should report this upstream as a flaw in packaging?

Maybe (I'm not sure) the problem is even more complex: According to http://0pointer.de/lennart/projects/lib ... /#overview, the libcanberra API has been developed by the guy who, according to https://en.wikipedia.org/wiki/PulseAudio, is the lead developer of PulseAudio (and, btw., according to https://en.wikipedia.org/wiki/Lennart_Poettering, has invented systemd), so basically I guess one might assume that libcanberra has intentionally been hard-wired to PulseAudio. Please correct me if I'm wrong here.

Generally, I'd think that no piece of software should ever be hard-wired to any specific sound server, unless completely inevitable.

If you look at what happens if you try to uninstall "everything PulseAudio", it seems as if PulseAudio has already been implemented deeply into the Debian ecosphere, which is amazing to me, as the Debian people had once been so conscious about cleanliness in general architecture.

Obviously it's not yet too late remove this forced connection with resonable effort. However, this would probably have to be done soon.

A first step would be to offer MX Linux system sounds functionality without PulseAudio installed.


Greetings, Joe

Re: MX-17.1/MX-18.1: Replacing PulseAudio by ALSA's sound server – implications?

Posted: Sat Oct 19, 2019 6:16 pm
by dolphin_oracle
I changed the libcanberra-pulse from a depend to a recommend today for the MX19 builds based on your comment.

**edit** just did the same for mx17/18

Re: MX-17.1/MX-18.1: Replacing PulseAudio by ALSA's sound server – implications?

Posted: Sat Oct 19, 2019 8:59 pm
by MX-16_fan
@dolphin_oracle:
dolphin_oracle wrote: Sat Oct 19, 2019 6:16 pm I changed the libcanberra-pulse from a depend to a recommend today for the MX19 builds based on your comment.

**edit** just did the same for mx17/18
That's great news. Thanks so much!

A (hopefully) small splash for our beloved aquatic mammal, but a giant step for a clean MX ocean :number1:!


Greetings, Joe

Re: MX-17.1/MX-18.1: Replacing PulseAudio by ALSA's sound server – implications?

Posted: Sun Oct 20, 2019 4:17 pm
by rs55
Here is my experiment:
- I uninstalled pulse and pavu and all pulse associated things.
- Important: libcanberra0 and libcanberra-GTK3-* programs seem to be necessary - so I had to reinstall those.
- I installed apulse
- changed call to firefox as follows: apulse firefox , chrome works as is, deadbeef works, VLC works.
- installed a pre-amp for alsa ( took some fiddling, this is optional but can raise the volume quite high on my thinkpad with the preamp)

Consequences: MX System Sounds was uninstalled in the process. I never use system sounds anyway - so no loss.
Ram usage went down 20-30 MB - minor
- Run my music player on pure alsa without any processing, sounds great.

Overall, Iam happy with this. I dont like software that tries to be too clever - and Pulse falls in that category - too much fiddling with setups, and if you set the volume to 150% , then use the hardware keys to reduce it a bit - it falls to 100% and then cannot raise it back etc etc. Too many idiosyncrasies for something simple.

All I need is sound in the browser and sound for my music player - through the speakers of through my DAC. Thats it. And with Alsa - everything now Just Works.

I dont have any complex sound setups or bluetooth etc - so other beware that this drastic surgery may affect you if you have other sound devices.

Re: MX-17.1/MX-18.1: Replacing PulseAudio by ALSA's sound server – implications?

Posted: Thu Oct 24, 2019 8:40 pm
by MX-16_fan
@rs55:
rs55 wrote: Sun Oct 20, 2019 4:17 pm Here is my experiment:
Very interesting, @rs55. Thank you for sharing your test results with us.
rs55 wrote: Sun Oct 20, 2019 4:17 pm - I uninstalled pulse and pavu and all pulse associated things.
I.e. set up the way that @dreamer and I have worked it out so far, with great help from @dolphin_oracle. As to your report, this has now worked in another (in any case: third,) setup (as once, before the degradation of Debian, it did with no issues whatsoever out-of-the-box.). Superb !
rs55 wrote: Sun Oct 20, 2019 4:17 pm - Important: libcanberra0 and libcanberra-GTK3-* programs seem to be necessary - so I had to reinstall those.
(@rs55:) That is ugly.

@dolphin_oracle: Is there anything that could be done about those remaining libcanberra* dependencies?
rs55 wrote: Sun Oct 20, 2019 4:17 pm - I installed apulse
- changed call to firefox as follows: apulse firefox , chrome works as is, deadbeef works, VLC works.
Sounds like a good idea, but could you (or someone else) tell us more about the connection between PulseAudio, apulse, and potential security- and general implications regarding further development architecture? Would be interesting to know what the price for that compatibility is.
rs55 wrote: Sun Oct 20, 2019 4:17 pm - installed a pre-amp for alsa ( took some fiddling, this is optional but can raise the volume quite high on my thinkpad with the preamp)
Sounds like an excellent idea. However, you might wish to try and run a "sudo rm /var/lib/alsa/asound.state" (at your own risk), and reboot after that, and maybe (chance of 30% would be my estimation) you won't need the pre-amp afterwards any more.
rs55 wrote: Sun Oct 20, 2019 4:17 pm - installed a pre-amp for alsa ( took some fiddling, this is optional but can raise the volume quite high on my thinkpad with the preamp)
Tẃo questions regading that very same thing:
  1. What pre-amping application did you use for that?
  2. Would you know how to increase the volume generated by any Firefox-based browser simply via about:config?
rs55 wrote: Sun Oct 20, 2019 4:17 pm Consequences: MX System Sounds was uninstalled in the process. I never use system sounds anyway - so no loss.
Please see above. Thanks to dolphin_oracle's repackaging, there's no need to loose the system sounds any more. You might wish to try the new package.
rs55 wrote: Sun Oct 20, 2019 4:17 pm Ram usage went down 20-30 MB - minor
Sounds good.
rs55 wrote: Sun Oct 20, 2019 4:17 pm - Run my music player on pure alsa without any processing, sounds great.
Great! As with you, according to quite a few people, sound generally becomes great again once you remove PulseAudio.
rs55 wrote: Sun Oct 20, 2019 4:17 pm Overall, Iam happy with this.
rs55 wrote: Sun Oct 20, 2019 4:17 pm I dont like software that tries to be too clever - and Pulse falls in that category - too much fiddling with setups, and if you set the volume to 150% , then use the hardware keys to reduce it a bit - it falls to 100% and then cannot raise it back etc etc. Too many idiosyncrasies for something simple.
Fully correct, IMHO.
rs55 wrote: Sun Oct 20, 2019 4:17 pm All I need is sound in the browser and sound for my music player - through the speakers of through my DAC. Thats it. And with Alsa - everything now Just Works.
A vast majority of Linux-on-a-Desktop users is likely to fully agree agree with you.
rs55 wrote: Sun Oct 20, 2019 4:17 pm I dont have any complex sound setups or bluetooth etc - so other beware that this drastic surgery may affect you if you have other sound devices.
We'll keep working on documenting potential implications here in this thread, and try to remove roadblocks. Please stay stuned. Further input from you would most certainly be greatly appreciated.

In case you'd like to use Bluetooth, please have a look at this separate thread: https://forum.mxlinux.org/viewtopic.php?f=134&t=51892.


Best wishes,

and a nice weekend to all of you,


Joe

Re: MX-17.1/MX-18.1: Replacing PulseAudio by ALSA's sound server – implications?

Posted: Fri Oct 25, 2019 5:16 am
by Eadwine Rose
Just a general request, your posts are a LOT more pleasant to read when you leave all the boldings out. :smile:

Re: MX-17.1/MX-18.1: Replacing PulseAudio by ALSA's sound server – implications?

Posted: Fri Oct 25, 2019 8:01 am
by KoO
Actually setting up alsa sound is pretty easy thanks to the devs of antiX and MX.

Let get one thing straight pulseaudio has nothing to with the actual sound driver itself that is the job of (alsa) no alsa > Pulseaudio is useless it producers no sound at all. It is a mixer and a channeller for your devices speakers , mic etc.
Can pulse effort your sound yes it can mostly because alsa has it own mixer equalizer preamp settings.

If you use asound.conf found in etc/asound.conf you are setting up system wide sound. If you choose to use .asoundrc.conf found in home/asoundrc.conf you are setting up sound on a per user level this file is added by the user. (I prefer asound.conf)

All you need to do is remove pulseaudio and pavu.. Some users have to install apulse meaning (alsapulse) to let alsa sound work in their browsers as for some strange reason they will only produce sound with pulseaudio. I myself do not use apulse as I run Waterfox and qutebrowser. Music mpd and ncmpcpp

The first thing you need to do after removing pulse and company is find out what sound card you have and its id number this is done using your terminal with this command = cat /proc/asound/cards


This is my readout and I want to use my USB Audio so the device id number is (2)

Code: Select all

  15 files = 1003M ~ >$cat /proc/asound/cards
 
 0 [PCH            ]: HDA-Intel - HDA Intel PCH
                      HDA Intel PCH at 0xf7130000 irq 29
 1 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xf7080000 irq 17
 2 [US2x2          ]: USB-Audio - US-2x2
                      TEAC Corporation US-2x2 at usb-0000:00:14.0-10, high speed
(Just remember one thing sometimes your ID number can change if you add a new audio device just rerun the above command if you lose sound) and edit your device ID number..

Now all I need to do is edit my asound.conf file and make device 2 the default sound device as below. (using sudo with your editor)

defaults.pcm.card 2
defaults.ctl.card 2

Set default sound card... Must be done from sudo

After this Open alsa mixer with sudo press F6 or S select your card then type sudo alsactl store. Also the below is not needed with antiX as sudo antiX-cli-cc = control centre is run as root anyway and works.


sudo alsamixer

sudo alsactl store

That is it you should now have your sound card running with alsa.

If you want a bit more info on asound.conf equalizer , pre amps this is the asound.conf from antiX and you can adjust the settings in the file. Note this line (Requires alsa-utils libasound2-plugin-equal)

Code: Select all

 # v4.0
# Requires alsa-utils libasound2-plugin-equal



# ***** Defaults *******************************************************

# Audio card/chip and device to use and control
# In most cases these settings should remain commented (#)
# When commented, card and device 0 are usually automatically selected
# When uncommented, the item corresponding to the number is selected
defaults.pcm.card 2
defaults.ctl.card 2
#defaults.pcm.device 0

# ***** Reset **********************************************************

# override the existing definition of the default device 
pcm.!default 
{
   type plug
  
   # point output to the equalizer device
   slave.pcm plugequal
}



# ***** Equalizer ******************************************************

# set up the control interface of the equalizer device
ctl.equalizer
{
   type equal
}


# set up the equalizer device
pcm.plugequal
{
   type equal
  
   # point output to device named preamp
   slave.pcm  "plug:preamp"
}



# ***** Pre-Amp ********************************************************

# set up the preamp device
pcm.preamp 
{
   type softvol

   # name of slider control to display in alsamixer interface
   control.name Pre-Amp
   
   # minimum dB when slider is at 0%
   min_dB -5.0
   
   # maximum dB when slider is at 100%
   max_dB 40.0
   
   # point output to device named duplex
   slave.pcm "duplex"
}



# ***** Playback and Capture *******************************************

# set up the playback/capture device
pcm.duplex 
{
   type asym

   # point playback output to use dmix
   playback.pcm "dmix"

   # point capture input record to use dsnoop
   capture.pcm "dsnoop"
}
If you want even more some awesome links for Alsa

https://wiki.archlinux.org/index.php/A ... chitecture
https://en.wikipedia.org/wiki/Advanced ... chitecture

Re: MX-17.1/MX-18.1: Replacing PulseAudio by ALSA's sound server – implications?

Posted: Sat Oct 26, 2019 4:45 pm
by MX-16_fan
@Eadwine Rose:
Eadwine Rose wrote: Fri Oct 25, 2019 5:16 am Just a general request, your posts are a LOT more pleasant to read when you leave all the boldings out. :smile:

"Boldings" enable the reader to get an overview quickly. Convention for correspondence in professional working life.

Talking about it, setting text in capital letters is a syntactically wrong replacement for boldface. Text in capital letters makes sense only for headings, in special situations.

In case you personally don't like "boldings", please feel free to have your browser filter them out.


Greetings, and have a nice Sunday, Joe

Re: MX-17.1/MX-18.1: Replacing PulseAudio by ALSA's sound server – implications?

Posted: Sat Oct 26, 2019 4:46 pm
by MX-16_fan
@KoO: Thanks for the valuable input. Greetings, Joe

Re: MX-17.1/MX-18.1: Replacing PulseAudio by ALSA's sound server – implications?

Posted: Sun Oct 27, 2019 2:34 am
by rs55
MX-16_fan wrote: Thu Oct 24, 2019 8:40 pm @rs55:
rs55 wrote: Sun Oct 20, 2019 4:17 pm Here is my experiment:
Very interesting, @rs55. Thank you for sharing your test results with us.
rs55 wrote: Sun Oct 20, 2019 4:17 pm - I uninstalled pulse and pavu and all pulse associated things.
I.e. set up the way that @dreamer and I have worked it out so far, with great help from @dolphin_oracle. As to your report, this has now worked in another (in any case: third,) setup (as once, before the degradation of Debian, it did with no issues whatsoever out-of-the-box.). Superb !
rs55 wrote: Sun Oct 20, 2019 4:17 pm - Important: libcanberra0 and libcanberra-GTK3-* programs seem to be necessary - so I had to reinstall those.
(@rs55:) That is ugly.

@dolphin_oracle: Is there anything that could be done about those remaining libcanberra* dependencies?
rs55 wrote: Sun Oct 20, 2019 4:17 pm - I installed apulse
- changed call to firefox as follows: apulse firefox , chrome works as is, deadbeef works, VLC works.
Sounds like a good idea, but could you (or someone else) tell us more about the connection between PulseAudio, apulse, and potential security- and general implications regarding further development architecture? Would be interesting to know what the price for that compatibility is.
rs55 wrote: Sun Oct 20, 2019 4:17 pm - installed a pre-amp for alsa ( took some fiddling, this is optional but can raise the volume quite high on my thinkpad with the preamp)
Sounds like an excellent idea. However, you might wish to try and run a "sudo rm /var/lib/alsa/asound.state" (at your own risk), and reboot after that, and maybe (chance of 30% would be my estimation) you won't need the pre-amp afterwards any more.
rs55 wrote: Sun Oct 20, 2019 4:17 pm - installed a pre-amp for alsa ( took some fiddling, this is optional but can raise the volume quite high on my thinkpad with the preamp)
Tẃo questions regading that very same thing:
  1. What pre-amping application did you use for that?
  2. Would you know how to increase the volume generated by any Firefox-based browser simply via about:config?
rs55 wrote: Sun Oct 20, 2019 4:17 pm Consequences: MX System Sounds was uninstalled in the process. I never use system sounds anyway - so no loss.
Please see above. Thanks to dolphin_oracle's repackaging, there's no need to loose the system sounds any more. You might wish to try the new package.
rs55 wrote: Sun Oct 20, 2019 4:17 pm Ram usage went down 20-30 MB - minor
Sounds good.
rs55 wrote: Sun Oct 20, 2019 4:17 pm - Run my music player on pure alsa without any processing, sounds great.
Great! As with you, according to quite a few people, sound generally becomes great again once you remove PulseAudio.
rs55 wrote: Sun Oct 20, 2019 4:17 pm Overall, Iam happy with this.
rs55 wrote: Sun Oct 20, 2019 4:17 pm I dont like software that tries to be too clever - and Pulse falls in that category - too much fiddling with setups, and if you set the volume to 150% , then use the hardware keys to reduce it a bit - it falls to 100% and then cannot raise it back etc etc. Too many idiosyncrasies for something simple.
Fully correct, IMHO.
rs55 wrote: Sun Oct 20, 2019 4:17 pm All I need is sound in the browser and sound for my music player - through the speakers of through my DAC. Thats it. And with Alsa - everything now Just Works.
A vast majority of Linux-on-a-Desktop users is likely to fully agree agree with you.
rs55 wrote: Sun Oct 20, 2019 4:17 pm I dont have any complex sound setups or bluetooth etc - so other beware that this drastic surgery may affect you if you have other sound devices.
We'll keep working on documenting potential implications here in this thread, and try to remove roadblocks. Please stay stuned. Further input from you would most certainly be greatly appreciated.

In case you'd like to use Bluetooth, please have a look at this separate thread: viewtopic.php?f=134&t=51892.


Best wishes,

and a nice weekend to all of you,


Joe
As for the pre-amp , I simply have this in my /etc/asound.conf, not exactly sure about the syntax for this - I copied this from some guy on the web who seemed to know what he was doing !!

pcm.!default{
type plug
slave.pcm "softvol"
}

pcm.softvol{
type softvol
slave{
pcm "dmix"
}
control{
name "Pre-Amp"
card 0
}
min_dB -30.0
max_dB 30.0
resolution 6
}

Re: MX-17.1/MX-18.1: Replacing PulseAudio by ALSA's sound server – implications?

Posted: Sun Oct 27, 2019 8:05 am
by KoO
@rs55
You want to know about alsa and your dac or audio cards plus more check these links out.

https://lacocina.nl/detect-alsa-output-capabilities
https://lacocina.nl/audiophile-mpd
https://lacocina.nl/bitperfect-audio

Re: MX-17.1/MX-18.1: Replacing PulseAudio by ALSA's sound server – implications?

Posted: Wed Nov 20, 2019 4:25 pm
by MX-16_fan
@KoO:
KoO wrote: Sun Oct 27, 2019 8:05 am @rs55
You want to know about alsa and your dac or audio cards plus more check these links out.

https://lacocina.nl/detect-alsa-output-capabilities
https://lacocina.nl/audiophile-mpd
https://lacocina.nl/bitperfect-audio
Very interesting. My impression is that ever since PulseAudio entered the stage, the aspect of sound quality has been disregarded. So it's great to see that there are people still working on this topic.

Seems as if that alsa-capabilities tool mentioned in https://lacocina.nl/detect-alsa-output-capabilities would add a nice feature. Apparently it's available on GitHub (https://github.com/ronalde/mpd-configur ... pabilities), and on GitLab also. As it is only a shell script, packaging it would probably be trivial.


Greetings, Joe

Re: MX-17.1/MX-18.1: Replacing PulseAudio by ALSA's sound server – implications?

Posted: Wed Nov 20, 2019 10:46 pm
by sunrat
Just a few points:
- If you're aiming for "bit-perfect" audio you need no software volume controls, equalisers, or other processors. These change the bits.
- PulseAudio now has an option to avoid resampling so it is possible to have an unresampled stream and still use PA.
- The best sound I have achieved is using PulseAudio, avoid-resampling, playing well-recorded 24/96 files with the sound card set to 96kHz. (My M-Audio Audiophile 2496 can be hardware set to sample frequency.) Kacey Musgraves' album "Golden Hour" from HDTracks is a dream to listen to like this.

I have said in several other discussion on Linux audio playback, the most important factors are good quality audio equipment and well-recorded material. Optimising the software is less important, and avoiding software changes to sample frequency is more important than whether you use PA or ALSA or OSS or whatever.
I used to be a PA hater 5 years ago when it still needed work. Now I embrace it and appreciate how it makes some facets of audio much easier to set up. It has improved and matured immeasurably.