Why Pavucontrol AND Alsamixer? [Solved]

Questions about the project and the distribution - obviously no support questions here please
Post Reply
User avatar
sfrusciante
Level 3
Level 3
Posts: 158
Joined: Wed Mar 19, 2014 11:15 am
Location: Italy
Contact:

Why Pavucontrol AND Alsamixer? [Solved]

Post by sfrusciante » Sun Oct 02, 2016 6:23 am

Correct me if I'm wrong.

LM uses Pulseaudio as its audio server. It means that Pulse manages all audio streams within the system.
ALSA is another similar piece of software, but it's not used in LM.

Then, why both Pavucontrol (control of Pulse) and Alsamixer are effective on LM? Why is that?
Last edited by sfrusciante on Sun Oct 02, 2016 9:20 am, edited 1 time in total.
I got a crazy number of people to disappoint. -me

rene
Level 8
Level 8
Posts: 2228
Joined: Sun Mar 27, 2016 6:58 pm

Re: Why Pavucontrol AND Alsamixer?

Post by rene » Sun Oct 02, 2016 7:31 am

sfrusciante wrote:ALSA is another similar piece of software, but it's not used in LM.
ALSA certainly is used in Mint and is not similar to Pulseaudio. ALSA, the Advanced Linux Sound Architecture, is the audio subsystem of the Linux kernel and common to all Linux systems; low-level generic interface and utility code and lowest-level hardware-specific drivers both resident in the Linux kernel, together with mid-level user space library code in libasound.

Pulseaudio is a high-level sound server that in turn builds on ALSA to provide to the highest level, applications, what some people feel to be a better or easier interface to sound than is available directly through kernel+libasound. Other people to this day remove Pulseaudio as unnecessary and as merely adding to complexity, and although I wouldn't these days advise such it's an important point that indeed you can. Removing ALSA you can not (while still having sound, that is). It is the foundation upon which all the rest is layered.
sfrusciante wrote:Then, why both Pavucontrol (control of Pulse) and Alsamixer are effective on LM? Why is that?
I do not in fact believe that pavucontrol is a standard component of any Mint edition but other than that: they are as per above control applications for different layers of the Mint sound system. The former operates at the same level as your desktop-mixer, the latter at the lower ALSA level.

User avatar
sfrusciante
Level 3
Level 3
Posts: 158
Joined: Wed Mar 19, 2014 11:15 am
Location: Italy
Contact:

Re: Why Pavucontrol AND Alsamixer?

Post by sfrusciante » Sun Oct 02, 2016 9:20 am

Well that was an answer, thank you!
I got a crazy number of people to disappoint. -me

Hoser Rob
Level 12
Level 12
Posts: 4344
Joined: Sat Dec 15, 2012 8:57 am

Re: Why Pavucontrol AND Alsamixer?

Post by Hoser Rob » Sun Oct 02, 2016 9:49 am

rene is right ... you can't remove ALSA as you can pulseaudio, though you shouldn't remove pulse. It has a ton od dependencies and you can just shut it off anyway. Here's a good article on ubuntu based audio talking about this:

http://voices.canonical.com/david.henni ... our-audio/

I do agree with those who say that Linux audio is convoluted if not a bit of a mess. It's one of the only things in Linux that I don't find reasonably straightforward. In fact I'm still not sure why the hell we even really need pulseaudio. This is a good guide to linux audio architecture:

https://jan.newmarch.name/LinuxSound/Sa ... hitecture/

If I'm playing music or video from files I completely bypass pulseaudio. I use a USB sound card and the media players I usually use (SMplayer and Clementine) allow you to output the audio straight to the USB card with no conversions by assigning it to ports. SMplayer will do this for video as well, which gave me a big video rendering performance increase. VLC will do this for audio but not video.

Assigning the audio bit stream straight to the USB card gives me much better sound too because then there's no resampling of 44.1K to 48K or vice versa. You can resample 88.2K to 44.1K or 192K to 48K no problem because it's dividing evenly. But you can't resample between 44.1K and 48K without it sounding worse. That's acceptable for me with movies or TV shows but not for music. My previous solution to this was changing the ALSA dmix default sample rate to 44..1K but not resampling is better by a long ways.

I could do this system wide by editing the ALSA config file asound.src but I haven't bothered with this yet.

This may not be relevant ... not everyone is as fussy about audio quality as I am ... but it may be useful.

rene
Level 8
Level 8
Posts: 2228
Joined: Sun Mar 27, 2016 6:58 pm

Re: Why Pavucontrol AND Alsamixer? [Solved]

Post by rene » Sun Oct 02, 2016 1:03 pm

A note; both of Hoser Rob's link claim that ALSA does not by itself support mixing, in the sense of mixing multiple streams into one; of allowing multiple applications to output audio to the same sound device at the same time. This is not in fact true. It used to be in the very early ALSA days but hasn't been for more than ten years now (for plain old stereo certainly, and for most all sound cards, I should say to be precise) and specifically also wasn't true anymore when Pulseaudio started being widely used.

Admittedly, if you value your audio you might want to make sure that the dmix plugin that is responsible for said mixing is using a decent resampler, but that isn't in fact different for Pulseaudio...

b_hayles
Level 2
Level 2
Posts: 56
Joined: Sat May 19, 2018 6:17 pm

Re: Why Pavucontrol AND Alsamixer? [Solved]

Post by b_hayles » Tue Jul 31, 2018 8:37 am

Talk about reviving an old thread...LOL.

I know of at least one instance where ALSA does NOT work while Pulseaudio DOES...the latest version of Shotcut (18.07.02) video editing software when doing a voiceover. In the latest version the methodology for voiceover was changed, and ALSA is an option...an option I could not get to work at all. I posted the issue on the Shotcut Forum and 24 hours later the developer gave me the solution...Pulseaudio...and he said trying to use ALSA was the problem.

Apparently, ALSA is an issue ONLY for voiceovers. It IS an option and I cannot imagine it being an optio that is not used for SOMEHING...but not for voiceovers.

***Note: This is coming from a linux/mint newbie...I have no idea what the Shotcut developer was talking about or how to implement Pulseaudio so I STILL cannot do voiceovers. Also, this may be specific to Mint, not generally linux. Another forum responder said he had no problems doing voiceover with ALSA in Fedora VMware.

Post Reply

Return to “Non-technical Questions”