Page 1 of 3

Re: What is the point of PulseAudio?

Posted: 2018-04-18 09:29
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?

Re: What is the point of PulseAudio?

Posted: 2018-04-18 11:26
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.

Re: What is the point of PulseAudio?

Posted: 2018-04-18 14:19
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.

Re: What is the point of PulseAudio?

Posted: 2018-04-18 15:15
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.

Re: What is the point of PulseAudio?

Posted: 2018-04-18 16:39
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:

Re: What is the point of PulseAudio?

Posted: 2018-04-18 22:07
by Segfault
OK, you are using apulse instead of PA. It is still a dependency. Self-compiled FF will work directly on ALSA.

Re: What is the point of PulseAudio?

Posted: 2018-04-18 22:17
by llivv
Head_on_a_Stick wrote:
Segfault wrote: No, it doesn't :)
The way Steve briefly described it to me was that, apulse tricks firefox into seeing pulseaudio as installed when pulseaudio is actually not installed.
Maybe if Steve see ours posts perhaps he could clear things up a bit.

Also if Segfault revisits this thread, I for one would be interested to know which config options to disable when compiling, it might actually get me interested enough to give it a go.

I posted two other threads concerning firefox version changes in the off topic section. One post concerning the stable and nightly versions released upstream that require pulseaudio by default. Stable version 51 and Nightly version 52 iirc

And the second post warns of the movement of the bookmarks data storage location.
It includes bookmark behavior oddities I noticed after upgrade to versions using the new bookmark storage location.

Re: What is the point of PulseAudio?

Posted: 2018-04-18 23:01
by Segfault
This mozconfig is from a Gentoo box, but you can see the options you are interested in.

Code: Select all

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

# This file specifies the build flags for Firefox.  You can use it by adding:
#  . $topsrcdir/browser/config/mozconfig
# to the top of your mozconfig file.

ac_add_options --enable-application=browser
ac_add_options --enable-optimize=-O2 # Workaround known breakage
ac_add_options --disable-updater # disable_update_strip
ac_add_options --disable-strip # disable_update_strip
ac_add_options --disable-install-strip # disable_update_strip
ac_add_options --with-system-zlib # system_libs
ac_add_options --with-system-bz2 # system_libs
ac_add_options --enable-release # Enable by Gentoo
ac_add_options --enable-gold # tc-ld-is-gold=true
ac_add_options --enable-official-branding # +!bindist
ac_add_options --enable-pie # enabled by Gentoo
ac_add_options --disable-debug # -debug
ac_add_options --disable-tests # -debug
ac_add_options --disable-debug-symbols # disabled by Gentoo
ac_add_options --disable-startup-notification # -startup-notification
ac_add_options --disable-necko-wifi # -wifi
ac_add_options --disable-dbus # -dbus
ac_add_options --with-system-nspr # 
ac_add_options --with-nspr-prefix=/usr # 
ac_add_options --with-system-nss # 
ac_add_options --with-nss-prefix=/usr # 
ac_add_options --x-includes=/usr/include # 
ac_add_options --x-libraries=/usr/lib64 # 
ac_add_options --with-system-libevent=/usr # 
ac_add_options --prefix=/usr # 
ac_add_options --libdir=/usr/lib64 # 
ac_add_options --enable-system-hunspell # Gentoo default
ac_add_options --disable-crashreporter # 
ac_add_options --with-system-png # Gentoo default
ac_add_options --enable-system-ffi # 
ac_add_options --disable-gconf # 
ac_add_options --with-intl-api # 
ac_add_options --enable-skia # 
ac_add_options --enable-default-toolkit=cairo-gtk3 # 
ac_add_options --target=x86_64-pc-linux-gnu # 
ac_add_options --host=x86_64-pc-linux-gnu # 
ac_add_options --disable-pulseaudio # -pulseaudio
ac_add_options --enable-alsa # -pulseaudio
ac_add_options --enable-content-sandbox # Sandbox
ac_add_options --enable-system-sqlite # +system-sqlite
ac_add_options --with-system-jpeg # +system-jpeg
ac_add_options --with-system-icu # +system-icu
ac_add_options --with-system-libvpx # +system-libvpx
ac_add_options --with-system-harfbuzz # +system-harfbuzz
ac_add_options --with-system-graphite2 # +system-harfbuzz
ac_add_options --disable-jack # -jack
ac_add_options --with-google-api-keyfile=/home/notmpfs/portage/www-client/firefox-58.0.1/work/firefox-58.0.1/google-api-key # 
mk_add_options MOZ_OBJDIR=/home/notmpfs/portage/www-client/firefox-58.0.1/work/firefox-58.0.1/ff
mk_add_options XARGS=/usr/bin/xargs
ac_add_options --enable-extensions=default

Re: What is the point of PulseAudio?

Posted: 2018-04-18 23:22
by llivv
thanks Seg
I wonder what behavior changes I'll see if I disable gtk 3
iirc
the new gtk brings depends, that brings more systemd in debian, at least so far, although it seems to be better than it used to be, at least in the newer stuff.
I wonder how that is will read to anyone else besides me?

Re: What is the point of PulseAudio?

Posted: 2018-04-19 01:37
by Segfault
Perhaps it is time to switch to Gentoo. No systemd here. GTK+ both 2 and 3 can be built systemd free.

Re: What is the point of PulseAudio?

Posted: 2018-04-19 05:05
by Head_on_a_Stick
Segfault wrote:OK, you are using apulse instead of PA. It is still a dependency.
To repeat: I *do not* have PulseAudio installed in any of my GNU/Linux systems and firefox (both Quantum and ESR) works just fine in all my various boxen.

There is *no* hard requirement for PA in firefox, please stop spreading FUD :roll:

Re: What is the point of PulseAudio?

Posted: 2018-04-19 05:15
by steve_v
Segfault wrote:Perhaps it is time to switch to Gentoo.
I highly recommend it. Going back to Gentoo after ~11 years of Arch and Debian was like the rails under me just vanished. So much freedom of choice.
I didn't realise just how restricted my choices were, but it was steadily grating on my nerves. Now I have a GNU/Linux system that is set up how I want it again, with no griping, no hacking away at overengineered build systems or dodgy third-party repos, no strange distro-specific configuration, just upstream code and some tools to compile it with.
Segfault wrote:No systemd here. GTK+ both 2 and 3 can be built systemd free.
Gentoo isn't systemd-free, it's systemd-optional. :mrgreen:
As Debian should be...
Head_on_a_Stick wrote:There is *no* hard requirement for PA in firefox, please stop spreading FUD
There is a hard requirement for a pulseaudio-compatible API in firefox as available in the Debian repos. Whether that is provided by pulseaudio itself or the partial implementation in apulse is irrelevant. Firefox in Debian *requires* the pulseaudio API for working sound.
You could call it a "soft" dependency if you don't want audio to work, but that is missing the point.

Re: What is the point of PulseAudio?

Posted: 2018-04-19 05:26
by Head_on_a_Stick
steve_v wrote:
Head_on_a_Stick wrote:There is *no* hard requirement for PA in firefox, please stop spreading FUD
There is a hard requirement for a pulseaudio-compatible API in firefox as available in the Debian repos. Whether that is provided by pulseaudio itself or the partial implementation in apulse is irrelevant. Firefox in Debian *requires* the pulseaudio API for working sound.
You could call it a "soft" dependency if you don't want audio to work, but that is missing the point.
That's just silly.

I don't have PA installed and I don't have PA running; apulse isn't a program that runs, it's just an interface to ALSA so there is no extra overhead.

Your objections to a "pulseaudio-compatible API" are ridiculous and nonsensical, I'm guessing that you are one of those crazy "tentacle" people?

Re: What is the point of PulseAudio?

Posted: 2018-04-19 05:54
by steve_v
Head_on_a_Stick wrote:I don't have PA installed and I don't have PA running; apulse isn't a program that runs, it's just an interface to ALSA so there is no extra overhead.
Firefox requires pulseaudio, and apulse fools it into thinking it is installed with libraries of the same names and LD_LIBRARY_PATH tricks. Firefox then calls code in those libraries, so it does indeed "run".
No, you don't need the real pulseaudio installed, but that this crafty hack is possible in no way invalidates the claim. Firefox requires something that, to it, is indistinguishable from pulseaudio.
If I fork pulseaudio and change the name, and this fork allows firefox to work, is "firefox requires pulseaudio" now doubly untrue?
Besides, apulse isn't available in the stable repos anyway.
Head_on_a_Stick wrote:I'm guessing that you are one of those crazy "tentacle" people?
I have no idea what you are on about. Are you one of those crazy "split every hair at a subatomic level" people?

If you are so keen to propose API translation layers as viable workarounds for compile-time dependencies, perhaps you would like to run firefox in wine? After all, by your logic the windows binary doesn't *require* windows, and wine is just an interface to linux system calls...

Re: What is the point of PulseAudio?

Posted: 2018-04-19 10:04
by sunrat
Pistols at 10 paces! :mrgreen:

I can see both your points. PA has a couple of useful features. Before I actually had to edit some text in a couple of config files :shock: but usually ended up with reliable audio either way.

Re: What is the point of PulseAudio?

Posted: 2018-04-19 10:18
by steve_v
sunrat wrote:Pistols at 10 paces! :mrgreen:
I am feeling a mite argumentative at the moment. :P
Defense of "You now need this new invasive software to run something you always used without it, because we chose to compile it that way" with "Just install this other piece of software you never needed before, and jump through this here hoop" kinda rubs me the wrong way though, particularly when the real answer is "Pass this flag to configure, and continue as before".

Re: What is the point of PulseAudio?

Posted: 2018-04-19 12:41
by Segfault
Head_on_a_Stick wrote:
Segfault wrote:OK, you are using apulse instead of PA. It is still a dependency.
To repeat: I *do not* have PulseAudio installed in any of my GNU/Linux systems and firefox (both Quantum and ESR) works just fine in all my various boxen.

There is *no* hard requirement for PA in firefox, please stop spreading FUD :roll:
You may benefit from looking up the meaning of FUD. For sake of truth, I never said there is hard requirement for PA in Firefox. I merely stated Debian version of Firefox is compiled with PA as a dependency. If you deceive FF with apulse it does not mean the PA dependency is gone.

Re: What is the point of PulseAudio?

Posted: 2018-04-19 13:33
by n_hologram
Segfault wrote:If you deceive FF with apulse it does not mean the PA dependency is gone.
I'm pretty sure both of you are right, just for different reasons. It sounds like HoaS is just affirming that Debian's FF doesn't requrie PA proper; apulse, which a PA emulator, is not PA proper, so you can't really call PA a hard dependency. On the other hand, it's fair to note the direction of Debian's FF towards the PA infrastructure, in no small part to GNOME being the official Debian desktop.

Looking at the package pages for firefox/firefox-esr, all the way up to sid, I don't see pulseaudio in the dependency lists, so I'm wondering where this "pulseaudio dependency" issue is coming from...

https://packages.debian.org/sid/firefox
https://packages.debian.org/sid/firefox-esr
https://packages.debian.org/buster/firefox-esr
https://packages.debian.org/stretch/firefox-esr

Re: What is the point of PulseAudio?

Posted: 2018-04-19 16:38
by Head_on_a_Stick
n_hologram wrote:HoaS is just affirming that Debian's FF doesn't requrie PA
^ Yes, thank you, that was my point exactly.
steve_v wrote:I have no idea what you are on about.
Hypothetical scenario: systemd is not being used as PID1 but libsystemd0 is installed; are you
a) outraged
b) happy
c) indifferent

If the answer is (a) then you are a crazy tentacle person and are henceforth required to state this in your signature to avoid further confusion :mrgreen:

Re: What is the point of PulseAudio?

Posted: 2018-04-19 18:08
by Funkygoby
Gentlemen please...
Can we agree to disagree?
I think steve_v prefers not to rely on anything PA related (be it the software or the API). I can understand that.

So pulseaudio brings an easy interface if you have several sound card. So does jack? And sndio?
ALSA was good enough for most users (having a single sound card), shouldn't we keep pulseaudio (as a daemon, as an API and a dependenciy) optionnal then?
if I understand correctly, FF requires Pulseaudio API to play sound. One can provide this API by installing PA himself, or using apulse instead.
FF can be compiled with ALSA support.