What is the point of PulseAudio?

Here you can discuss every aspect of Debian. Note: not for support requests!

What is the point of PulseAudio?

Postby Funkygoby » 2018-04-15 10:03

Lately, I moved my Debian box from Jessie to Stretch. I use this box for android dev and wine-based gaming. I bind my physical vol-/+ buttons to the pulseaudio master sink and leave specifics programs levels at 100%.

1. The sound from a game (through wine) was very faint although I was spamming vol+ button. According to pulseaudio gui interface, nothing was muted but the volume was ~600% (yes, 600%! not 60%) and increasing each time I would push the vol+ button.
Using the mouse to move the slider suddenly brought volume to 90-100% range and also, blasted my ear with full volume.
2. Trying to set my game to 100% AND my master/sink volume to ~20%, I quickly discovered that they were "linked" and couldn't be dissociated.
The solution lies in PA config file, where you have to disable "flat volumes".

I though that pulseaudio was about providing a cool interface for input and output devices, like earphones maybe. But
- allowing volume to go up "silently" to 600%, then suddenly go "full blast" while the user bring back the slider seems very un-userfriendly to me.
- about "flat volumes", what is the point of providing an interface where you can control each program input/output separately, but at the same time, remove the possibility to control volume separately? What is left? I am missing something?

I tried to give pulseaudio a fair trial.
- As a noob, I want audio to work and easy interface if I need to set things up. Pulseaudio failed here, messed up the process of simply settings audio volume.
- As an experimented user, maybe I want full control on how to connect my programs. Jack is already there and doing the job just fine.

So pulseaudio breaks things compared to a pure ALSA setup. My question is does it bring any value? Is someone using it to make easy something that was hard with ALSA? Bluetooth maybe?
Funkygoby
 
Posts: 58
Joined: 2009-08-13 09:25

Re: What is the point of PulseAudio?

Postby Wheelerof4te » 2018-04-15 10:48

It's original intention was to create unified soundsystem on Linux desktop that will be easy to configure for wide ranges of software and hardware. What it became is just a layer and wrapper for ALSA. Again, to simplify porting to third-party programs and APIs.
User avatar
Wheelerof4te
 
Posts: 1134
Joined: 2015-08-30 20:14

Re: What is the point of PulseAudio?

Postby kedaha » 2018-04-15 10:57

Hi, I'd just like to comment:

I use OSS4, for audio, not ALSA. I'd like to remove PulseAudio entirely but for Firefox to work, it must be configured as I mentioned here

While I will always use Debian for my server, I've seriously considered changing to FreeBSD or perhaps Devuan for my desktop because I choose not to use ALSA. However, I've been able so far to continue using OSS4, even though official packages are no longer available in current stable—surprise, surprise—by compiling it myself for stretch. But for Firefox, there's no choice but to use PulseAudio and this I think is true for ALSA too.

For my OSS4 setup, PulseAudio is absolutely pointless except for use with Firefox.
Mate DE & OSSv4.
LaMp, WordPress; ispmail
Debian Stable

Words, as is well known, are the great foes of reality. Joseph Conrad.
Kedaha's Conjecture
User avatar
kedaha
 
Posts: 2869
Joined: 2008-05-24 12:26

Re: What is the point of PulseAudio?

Postby Wheelerof4te » 2018-04-15 11:11

^May I ask, what is your reason for not using ALSA? I know why some don't like PA, I'm curious why boycot ALSA?
Oh, I'd like to point that "I use OSS4 because I want to" is not a reason valid enough. You have that choice, but it defeats the purpose of a good discussion.
User avatar
Wheelerof4te
 
Posts: 1134
Joined: 2015-08-30 20:14

Re: What is the point of PulseAudio?

Postby Funkygoby » 2018-04-15 11:34

@wheelerof4te
Thank you.
So pulseaudio should have abstracted alsa and oss system and provide another "standard" interface to program. Just like jack and sndio?

@kedaha
I saw your post about oss somewhere else .. can't rememeber.
I use firefox on OpenBSD and I don't have pulseaudio on my session. I believe firefox talks to sndio in my case.
Funkygoby
 
Posts: 58
Joined: 2009-08-13 09:25

Re: What is the point of PulseAudio?

Postby kedaha » 2018-04-15 11:35

@wheelerof4te
My use of OSS4 in preference to ALSA is not a boycott any more than using ALSA could be considered boycotting OSS4; I just prefer the sound quality. There's no accounting for taste, as the saying goes. The same applies to PulseAudio; however, I do think that alternatives ought to be available. For example, I use Firefox but it doesn't imply a boycott of Chromium or other browsers. Similarly, I use a Mate desktop but that's just my choice.
Funkygoby wrote:@kedaha
I saw your post about oss somewhere else .. can't rememeber.
I use firefox on OpenBSD and I don't have pulseaudio on my session. I believe firefox talks to sndio in my case.

Aha!
Thanks for this information. :D
Mate DE & OSSv4.
LaMp, WordPress; ispmail
Debian Stable

Words, as is well known, are the great foes of reality. Joseph Conrad.
Kedaha's Conjecture
User avatar
kedaha
 
Posts: 2869
Joined: 2008-05-24 12:26

Re: What is the point of PulseAudio?

Postby Head_on_a_Stick » 2018-04-15 11:45

PA is used by almost all distributions because it offers a simple, tried and tested method to automate sound configuration in systems with more than one audio output.

@OP: do you only have a single soundcard?

I have a laptop with an HDMI audio output and if plain ALSA is used then sound is directed there automatically and so requires further (hardware-specific) configuration to make sound come out of the laptop speakers.

Funkygoby wrote:The solution lies in PA config file, where you have to disable "flat volumes".

^ This is an example of the "finish" provided by some desktop-orientated distributions when compared to vanilla Debian, a similar situation can be observed in Arch where the derivatives offer such configuration as a USP.

And for the record I have firefox audio working just fine in Arch Linux without PA:

https://software.opensuse.org//download ... age=apulse

It also works without PA in Alpine Linux but I don't need to hack that box :)
dbruce wrote:Ubuntu forums try to be like a coffee shop in Seattle. Debian forums strive for the charm and ambience of a skinhead bar in Bacau. We intend to keep it that way.
User avatar
Head_on_a_Stick
 
Posts: 8315
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: What is the point of PulseAudio?

Postby Lysander » 2018-04-15 12:08

I think I have been lucky in Debian with PA. I have a relatively high-end sound card so audio sounds great, and I don't really run more than one audio application simultaneously.

PA, in Slackware on the other hand, has given me no end of problems. My low-end netbook has onboard audio so a gfx equalizer was needed to beef up the sound, which PA doesn't have [it was removed from the distro because of instability] so I use alsamixer. PA also cannot play two simultaneous streams in Slackware without amendments being made in asound.conf. Additionally, PA will 'revert' my solutions to its issues once solved.

I've now ended up disabling PA in Slackware and going pure ALSA. I don't think uninstalling PA is the answer though, seeing as it's not necessary and may cause breakage.
User avatar
Lysander
 
Posts: 558
Joined: 2017-02-23 10:07
Location: London

Re: What is the point of PulseAudio?

Postby Funkygoby » 2018-04-16 10:33

@HOAS
Good point regarding multiple output.
I only have had laptops. Only one output devices per machines.

Concerning the "flat volumes", this was on two pure Debian -stable installs. Does this default config comes from a debian maintainer's choice?

@Lysander
Same for me. I seldom use Debian nowadays and I only have a little experience with PA. Once the stupids default are adjusted, it is working for me. I would like to try jack routing, midi and all the jazz with it to see how it behaves under loads.
Funkygoby
 
Posts: 58
Joined: 2009-08-13 09:25

Re: What is the point of PulseAudio?

Postby bw123 » 2018-04-16 10:55

Funkygoby wrote:Concerning the "flat volumes", this was on two pure Debian -stable installs. Does this default config comes from a debian maintainer's choice?


I don't know who had the idea, but the problem with the busted eardrums is documented here.
https://bugs.debian.org/cgi-bin/pkgrepo ... ble#_0_1_4

I was able to get it to stop doing this with one set of speakers, but with two sets the rear speakers always go to 100% on just about any sound action.

The old alsa setup still works fine, and I'd like to see pulseaudio work at least as well since it is integrated into just about everything now.
User avatar
bw123
 
Posts: 3572
Joined: 2011-05-09 06:02
Location: TN_USA

Re: What is the point of PulseAudio?

Postby n_hologram » 2018-04-16 14:34

wheelerof4te wrote:"I use OSS4 because I want to" is not a reason valid enough

Uh, yeah, it is lol. It's his/her own system.

Speaking of OSS4...
Funkygoby wrote:I use firefox on OpenBSD and I don't have pulseaudio on my session. I believe firefox talks to sndio in my case.

Dunno if you have already, but you may find this thread of interest: viewtopic.php?f=20&t=130028&hilit=firefox+53+pulseaudio

I haven't read the whole thing because the commends follow like a seesaw of ideas, and because I use Palemoon on Linux (and Firefox on OpenBSD). I feel like there was a firefox-oss package or something at some point. Idk if it's been fully replaced by pulseaudio dependencies.

I also wonder if firefox can be built to utilize oss/alsa direcly rather than using pulse. EDIT: I ran a search through the thread and it looked like mixed results -- again, didn't read the whole thing.
bester69 wrote:There is nothing to install in linux, from time to time i go to google searching for something fresh to install in linux, but, there is nothing

the crunkbong project: scripts, operating system, the list goes on...
n_hologram
 
Posts: 444
Joined: 2013-06-16 00:10

Re: What is the point of PulseAudio?

Postby tynman » 2018-04-16 14:54

I suppose there are a number of "points" to Pulseaudio.

I thought one of them was to support multiple applications to write to the sound card simultaneously - i.e., mixing on the fly. As opposed to with ALSA-only, where you would have to set that up on a case-by-case basis, requiring fiddling with config files.
tynman
 
Posts: 85
Joined: 2016-05-03 19:48
Location: British Columbia, Canada

Re: What is the point of PulseAudio?

Postby steve_v » 2018-04-17 09:51

Funkygoby wrote:Bluetooth maybe?
I've not tried it in Debian, but bluetooth audio certainly works fine without pulseaudio over in Gentoo.

Wheelerof4te wrote:It's original intention was to create unified soundsystem on Linux desktop that will be easy to configure for wide ranges of software and hardware.
Image

tynman wrote:one of them was to support multiple applications to write to the sound card simultaneously - i.e., mixing on the fly.
ALSA has supported DMIX (and enabled it by default) for years. This was one of the selling points of ALSA over OSS3.
tynman wrote:As opposed to with ALSA-only, where you would have to set that up on a case-by-case basis, requiring fiddling with config files.
DMIX is configured once for each PCM if you do it by hand, automatically for each PCM via dmix:<card>, and automatically for everything if you use the "default" PCM.
"Fiddling with config files" is required only if you want exotic sound routing, and dmixing the output of such is as simple as using the aforementioned dmix:<card> at the end of the chain.

If anyone can tell me how to duplicate all streams to both the analogue jacks (upmixing to 5.1) and to raw PCM over SPDIF (stereo, downmixing if required), with software volume control on the SPDIF output, and with an option to output a52 encoded surround on my second SPDIF jack, with pulseaudio, without noticeable latency, do let me know. Until it can do all the things ALSA can, I really don't see the point of it.

Wheelerof4te wrote:Oh, I'd like to point that "I use OSS4 because I want to" is not a reason valid enough.
Yes, it most definitely is. It's not your box, so it's not your place to comment on personal preference.

Lysander wrote:I don't think uninstalling PA is the answer though, seeing as it's not necessary and may cause breakage.
For me it causes breakage if I don't uninstall it. Certain applications will try it first, starting the daemon, and borking sound for everything.

n_hologram wrote:I also wonder if firefox can be built to utilize oss/alsa direcly rather than using pulse.
Sure it can. Probably more annoying to recompile on Debian than Gentoo, but the alternative, apulse, is pretty easy.
steve_v
 
Posts: 695
Joined: 2012-10-06 05:31
Location: New Zealand

Re: What is the point of PulseAudio?

Postby Segfault » 2018-04-17 11:09

software volume control on the SPDIF output

Why? Why people want to do this? The very idea of digital passthru is to preserve the quality by not processing the sound while it is in digital form in any way. All processing should be done after DAC.
Segfault
 
Posts: 806
Joined: 2005-09-24 12:24

Re: What is the point of PulseAudio?

Postby steve_v » 2018-04-17 23:17

Segfault wrote:
software volume control on the SPDIF output
Why? Why people want to do this? The very idea of digital passthru is to preserve the quality by not processing the sound while it is in digital form in any way.
Changing the volume of the PCM stream, assuming you have sufficient bit-depth to take the resolution hit, introduces far less unwanted signal degradation than attenuating the analogue side of things, with the nasty pots in most consumer-grade preamps, to achieve the same effect.
The very idea of digital passthrough (in my case) is to get an audio stream from one device to another without shitty noise-prone unbalanced line-level analogue cables.
steve_v
 
Posts: 695
Joined: 2012-10-06 05:31
Location: New Zealand

Next

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 3 guests

fashionable