Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

What is the point of PulseAudio?

Here you can discuss every aspect of Debian. Note: not for support requests!
Message
Author
Funkygoby
Posts: 68
Joined: 2009-08-13 09:25

What is the point of PulseAudio?

#1 Post by Funkygoby »

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?

Wheelerof4te
Posts: 1454
Joined: 2015-08-30 20:14

Re: What is the point of PulseAudio?

#2 Post by Wheelerof4te »

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.

kedaha
Posts: 3521
Joined: 2008-05-24 12:26
Has thanked: 33 times
Been thanked: 77 times

Re: What is the point of PulseAudio?

#3 Post by kedaha »

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

Code: Select all

$ vrms

No non-free or contrib packages installed on debian!  rms would be proud.

Wheelerof4te
Posts: 1454
Joined: 2015-08-30 20:14

Re: What is the point of PulseAudio?

#4 Post by Wheelerof4te »

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

Funkygoby
Posts: 68
Joined: 2009-08-13 09:25

Re: What is the point of PulseAudio?

#5 Post by Funkygoby »

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

kedaha
Posts: 3521
Joined: 2008-05-24 12:26
Has thanked: 33 times
Been thanked: 77 times

Re: What is the point of PulseAudio?

#6 Post by kedaha »

@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
DebianStable

Code: Select all

$ vrms

No non-free or contrib packages installed on debian!  rms would be proud.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: What is the point of PulseAudio?

#7 Post by Head_on_a_Stick »

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 :)
deadbang

User avatar
Lysander
Posts: 643
Joined: 2017-02-23 10:07
Location: London
Been thanked: 1 time

Re: What is the point of PulseAudio?

#8 Post by Lysander »

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.

Funkygoby
Posts: 68
Joined: 2009-08-13 09:25

Re: What is the point of PulseAudio?

#9 Post by Funkygoby »

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

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: What is the point of PulseAudio?

#10 Post by bw123 »

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.
resigned by AI ChatGPT

n_hologram
Posts: 459
Joined: 2013-06-16 00:10

Re: What is the point of PulseAudio?

#11 Post by n_hologram »

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: http://forums.debian.net/viewtopic.php? ... 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...

tynman
Posts: 131
Joined: 2016-05-03 19:48
Location: British Columbia, Canada
Been thanked: 1 time

Re: What is the point of PulseAudio?

#12 Post by tynman »

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.

steve_v
df -h | grep > 20TiB
df -h | grep > 20TiB
Posts: 1395
Joined: 2012-10-06 05:31
Location: /dev/chair
Has thanked: 78 times
Been thanked: 173 times

Re: What is the point of PulseAudio?

#13 Post by steve_v »

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.
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

Segfault
Posts: 993
Joined: 2005-09-24 12:24
Has thanked: 5 times
Been thanked: 17 times

Re: What is the point of PulseAudio?

#14 Post by Segfault »

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.

steve_v
df -h | grep > 20TiB
df -h | grep > 20TiB
Posts: 1395
Joined: 2012-10-06 05:31
Location: /dev/chair
Has thanked: 78 times
Been thanked: 173 times

Re: What is the point of PulseAudio?

#15 Post by steve_v »

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.
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

Innovate
Posts: 188
Joined: 2015-12-27 01:28

Re: What is the point of PulseAudio?

#16 Post by Innovate »

firefox even force pulseaudio otherwise no sound on firefox.
So what's the solution to make it work on firefox if you're using other sound system?

kedaha
Posts: 3521
Joined: 2008-05-24 12:26
Has thanked: 33 times
Been thanked: 77 times

Re: What is the point of PulseAudio?

#17 Post by kedaha »

Innovate wrote:firefox even force pulseaudio otherwise no sound on firefox.
So what's the solution to make it work on firefox if you're using other sound system?
I mentioned the solution in my reply above for OSS4: I can only obtain sound in Firefox by editing /etc/pulse/default.pa as detailed at Configuring_Applications_for_OSSv4#Pulseaudio.
DebianStable

Code: Select all

$ vrms

No non-free or contrib packages installed on debian!  rms would be proud.

Innovate
Posts: 188
Joined: 2015-12-27 01:28

Re: What is the point of PulseAudio?

#18 Post by Innovate »

kedaha wrote:
Innovate wrote:firefox even force pulseaudio otherwise no sound on firefox.
So what's the solution to make it work on firefox if you're using other sound system?
I mentioned the solution in my reply above for OSS4: I can only obtain sound in Firefox by editing /etc/pulse/default.pa as detailed at Configuring_Applications_for_OSSv4#Pulseaudio.
Thank you, I'll note your solution & try it out. It's good to have more solutions. I've stuck in the dark for long.
I planned to remove xfce4-pulseaudio-plugin Depends: out of xfce package as well.
The default xfce package force this plugin to preinstall by default I'll fix that out.

Segfault
Posts: 993
Joined: 2005-09-24 12:24
Has thanked: 5 times
Been thanked: 17 times

Re: What is the point of PulseAudio?

#19 Post by Segfault »

For sake of truth Firefox works with plain ALSA, although developers claim this is unsupported. To use plain ALSA in Debian you have to compile FF by yourself, the packaged FF depends on PA.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: What is the point of PulseAudio?

#20 Post by Head_on_a_Stick »

Segfault wrote:To use plain ALSA in Debian you have to compile FF by yourself, the packaged FF depends on PA.
No, it doesn't :)

I have firefox-esr working fine in my Debian stretch system by using apulse, no pulseaudio is installed and I don't compile anything from scratch.

I'm using my own package but I think @stevepusser has a version in his OBS repository.

EDIT: in fact, it's in testing/unstable now:

https://packages.debian.org/buster/apulse

Go Debian! :cool:
deadbang

Post Reply