

This seems illogical. It would work in Fedora because Fedora uses pipewire by default. You have the option of using pipewire in Gentoo. Anyway, running Firefox with apulse might help you.lars_the_bear wrote:If I can't run Zoom, I've have to go back to Fedora :/

I have the option of using systemd and the Gnome desktop as well. But these are exactly the complexities that I hoped Gentoo would allow me to avoid.RumpletonBongworth wrote:This seems illogical. It would work in Fedora because Fedora uses pipewire by default. You have the option of using pipewire in Gentoo.


Yeah. I'm certainly not blaming Gentoo for this. I was hoping somebody had seen the same problem, and would say "Just click the 'use ALSA input button"RumpletonBongworth wrote:Naturally, there's only so much a distributor can do.

So you know, I don't use systemd, pipewire or pulseaudio. Firefox will work with media-sound/apulse, which uses ALSA underneath:lars_the_bear wrote:I have absolutely no need for pipewire or pulse. Worse, running these things makes it harder to use ordinary ALSA effectively, because they tend to take control of the ALSA system for their own purposes. Every other piece of software I use that does audio, does it fine with plain ALSA. It's not Gentoo's fault that the Firefox maintainers can't be bothered to support ALSA properly, and I'm not wedded to Firefox. I'm happy to use something else.
If you were already aware of that, then carry on ;)The program provides an alternative partial implementation of the PulseAudio API. It consists of a loader script and a number of shared libraries with the same names as from original PulseAudio, so applications could dynamically load them and think they are talking to PulseAudio. Internally, no separate sound mixing daemon is used. Instead, apulse relies on ALSA's dmix, dsnoop, and plug plugins to handle multiple sound sources and capture streams running at the same time. dmix plugin muxes multiple playback streams; dsnoop plugin allow multiple applications to capture from a single microphone; and plug plugin transparently converts audio between various sample formats, sample rates and channel numbers. For more than a decade now, ALSA comes with these plugins enabled and configured by default.
apulse wasn't designed to be a drop-in replacement of PulseAudio. It's pointless, since that will be just reimplementation of original PulseAudio, with the same client-daemon architecture, required by the complete feature set. Instead, only parts of the API that are crucial to specific applications are implemented. That's why there is a loader script, named apulse. It updates value of LD_LIBRARY_PATH environment variable to point also to the directory where apulse's libraries are installed, making them available to the application.
Name comes from names of both ALSA and PulseAudio. As aoss was a compatibility layer between OSS programs and ALSA, apulse was designed to be compatibility layer between PulseAudio applications and ALSA.
apluse always gave me static, especially with output and input in Firefox. It got to the point I just got bored with fixing things every time there was a regression.RumpletonBongworth wrote:Using the apulse wrapper is as close to clicking a button as it gets, I think. Certainly not as convenient.

It uses the default as defined by asoundrc.lars_the_bear wrote:Also: how does apulse cope when there are multiple PCM inputs and outputs?
I cannot. I only use it for the occasional video or playing music locally.lars_the_bear wrote:Thanks. Can you confirm that it works with input, as well as output? I note other comments that aren't as positive as yours ;)
[post=8546692]garrison[/post] wrote:Yeah for a simple single audio stream directly via alsa there is no point in adding extra layers.
With more involved setup like multiple audio streams playing simultaneously, you can use alsa "dmix"..
But for almost anything beyond that, like adding echo cancellation for mics, persisting volume adjustment per application, automatically moving your audio to AVR you seldom use - at present you want to use pulseaudio. Audio part of pipewire project is being actively evolved to be better pulseaudio in every aspect, and things like audio processing latency are already better, though not all replacement parts to make it usable on desktops are available right now.
This is either sad or hilarious, given that this was basically the thing that PulseAudio was claiming to provide in the first place (when it was a replacement for ESD.) I suppose PulseAudio was my first introduction to the world of Lennart Poettering's shoddy bloated lying software... promises galore, zero valid documentation, insane and utterly unmanageable configuration files and nothing ever working as advertised.Ralphred wrote:*I still can't make pulse run as a "system wide daemon" (needed for multiseat in this case) even after reading all the docs, it just doesn't work as advertised.

OK. Thank you. At present, I am able to use Zoom with Google Chrome and Chromium; but I'd rather use Firefox if I can.AJM wrote: Anyway, to the original point... on my Gentoo PC I use firefox(-bin) with apulse and have just checked and confirmed that I can make a Zoom test call - definitely no PulseAudio here!

Yeah, I get it. I understand why pipewire/pulse exist. Both are fine, from an ease-of-use perspective. But so, frankly, is Windows.pjp wrote:It does seem like anything advanced or involving multiple devices leads people to pipewire. A bit old, but from early in pipewire's existence
This is good news. Drop your asoundrc for Lars please, just in case.AJM wrote:Anyway, to the original point... on my Gentoo PC I use firefox(-bin) with apulse and have just checked and confirmed that I can make a Zoom test call - definitely no PulseAudio here!
Like I said, pulse is quite nice when you can rein it in and have it only do what you want, but by default it tries to be all things automatically, and because it succeeds at that for a lot of people documentation and examples are sparse. I know I'm going to possibly have to switch to pipewire someday, if/when I do I'll be bridling that to "do what you are told, nothing more!" too, at which point I'll try and drop some examples and explanations here in the forums.lars_the_bear wrote:But my real concern with pipewire/pulse is that they are so complicated, I can't begin to understand them.
Code: Select all
defaults.pcm.!card Generic_1
defaults.pcm.!device 0
defaults.ctl.!card Generic_1

Code: Select all
xhost si:localuser:ff && sudo -u ff apulse firefox-bin -P & exit
Code: Select all
arecord -f S16_LE test.wav
aplay test.wav


I guess in both these cases apulse has to be installed, right? And maybe running?Chiitoo wrote:Looking at the ebuilds, I believe www-client/firefox-bin already uses apulse by default, if USE="alsa -pulseaudio".
On the other hand, www-client/firefox always does so if USE="pulseaudio" and media-sound/apulse is installed; in this case the PulseAudio backend is enabled. With USE="-pulseaudio", the ALSA backend is enabled instead, in which case I imagine some web applications might require running Firefox through apulse manually.



That is a good question. I wonder what exactly Firefox does then...lars_the_bear wrote:I built firefox with "USE=alsa -pulseaudio". So I presume that apulse won't work for me, because there's no pulse support in firefox to exercise it. (?)
Yeah, I believe it should, too, and testing quickly with www-client/firefox-bin, I can change the capture device, which I know from the error messages being different.lars_the_bear wrote:When built this way, as I said, I get audio output via ALSA, but no input. Weirdly, firefox (with ALSA) does respect .soundrc for selecting an output device. The same settings should set the default input device -- at least 'arecord' says they do. But nothing from firefox.
As mentioned, not sure at this time how Firefox and web applications will behave in this case.lars_the_bear wrote:IIUC, to use apulse I'd need to build firefox with pulse enabled, and not ALSA. Or I'd have to find a binary build, and tell emerge to ignore my USE=-pulseaudio(?)
It will use apulse if installed, and libpulse if not.lars_the_bear wrote:But that would mean, I think, that I'd only be able to use it with apulse, right?
These web applications sure are too many fun, in too many fun ways...lars_the_bear wrote:Right now, I'm sort-of resigned to having to use Chrome or Chromium for Zoom, etc. Even if apulse doesn't require extra processes, it's still a solution to a problem that should not exist.
Software changes. Your description of how ALSA is less complicated than it's presumptive successor(s) reminds me of when I avoided ALSA because it was needlessly complicated and OSS "just worked." At some point I switched and I don't do anything to it.lars_the_bear wrote:Yeah, I get it. I understand why pipewire/pulse exist. Both are fine, from an ease-of-use perspective. But so, frankly, is Windows.
But my real concern with pipewire/pulse is that they are so complicated, I can't begin to understand them. Heaven knows, ALSA is bad enough. But I've figured out (based on trial-and-error, rather than knowledge) how to set up ALSA so that I can send hi-res audio to my DAC without it being fiddled about with. I imagine the same is possible with pipewire/pulse, but I've never figured out how.
BR, Lars.
I may be mistaken, but I believe part of why pulse/pipe exist were due to limitations of ALSA. Particularly when trying to do more than one audio function at a time. From a development perspective, it makes a lot of sense (to me) that it would be easier to support only one of multiple solutions.lars_the_bear wrote: It's particular galling in this case because ALSA is easy to support, and exists (I think) on every Linux platform since about 2002. The use of apulse solves a problem that should simply not exist. Many Linux application still support OSS, for Heavens' sake, and that's not been in widespread use for at least 20 years. There's just no excuse for not supporting ALSA properly.

I'm not saying there's never a need for Pulse, etc. I understand what these things set out to achieve. ALSA dates from a time when it was rare to have more than one sound device, and nobody expected multiple applications to play audio at the same time. ALSA can cope with these things now although, so far as I know, it still can't use separate audio channels for different applications, which means that you can't set their volume levels independently. And ALSA's configuration is byzantine and the documentation essentially non-existent. I've written applications that use it, and I still don't really understand it. And getting it to work with Bluetooth audio is horrible.pjp wrote:I may be mistaken, but I believe part of why pulse/pipe exist were due to limitations of ALSA. Particularly when trying to do more than one audio function at a time. From a development perspective, it makes a lot of sense (to me) that it would be easier to support only one of multiple solutions.