LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-19-2018, 10:10 AM   #1
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,776

Rep: Reputation: 4425Reputation: 4425Reputation: 4425Reputation: 4425Reputation: 4425Reputation: 4425Reputation: 4425Reputation: 4425Reputation: 4425Reputation: 4425Reputation: 4425
Is There a Common File Used as Identification by Dependent Apps to Search and Call Pulseaudio?


Greetings
I thought this deserved it's own thread since it looks like I'm not alone in wanting to go "pure alsa" and it already looks like some are having minor issues with updates of some apps. I'm wondering just how specific the call for Pulseaudio is as in whether apps just seek a qualifying pulse name and use whatever resources it has to offer. If this were so it might be possible to duplicate Jack files and rename them so they "answer the call". Jack does essentially the same job (and more) as Pulseaudio and with a LOT less overhead.

I may be grasping at straws but I hope it is possible and intend first to discover if there is some standard convention used by all or even most apps to determine if something it needs is present, and if so, I intend to try with Jack.

Am I way off base in that there is no consistency? or is this simply as I'm hoping, SOP?
 
Old 11-19-2018, 10:23 AM   #2
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
well I'd think so, if firefox is dropping alsa for Pulseaudio, and others are using Pulseaudio for the sound connections, then yes their is a provision within the code of same said app to seek out some Pulseaudio config file or in /dev/sdn or some such other place to verify that the sound that it is using it there.

to try and fake it out into thinking you have Pulseaudio and then try to get it to use alsa in place of it, that might be a struggle depending on how that app then connects to the Pulseaudio it thinks it has, if it is not compatible then again you will get a fail to connect. that is just a off the top of my head logical answer. W/O any real investigation.

You're trying to swim upstream, so yes, you're going to have struggles.

Last edited by BW-userx; 11-19-2018 at 10:27 AM.
 
Old 11-19-2018, 12:31 PM   #3
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,048

Rep: Reputation: Disabled
Hello,

Sorry for the OT, but there seem to exist ways to make PA and JACK peacefully coexist. Caveat: I didn't try.

Links:
https://forum.manjaro.org/t/how-to-r...as-friend/2086
http://jackaudio.org/faq/pulseaudio_and_jack.html
https://github.com/jackaudio/jackaud...er_PulseOnJack

Best,
 
Old 11-19-2018, 04:13 PM   #4
chris.willing
Member
 
Registered: Jun 2014
Location: Brisbane, Australia
Distribution: Slackware,LFS
Posts: 914

Rep: Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619
Perhaps you could just consult the provided documentation to help implement what you want (I googled for "pulseaudio api"). A simple version is shown at:
https://www.freedesktop.org/software...en/simple.html
with more features/information/examples available from the index there.

chris
 
Old 11-19-2018, 07:29 PM   #5
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,776

Original Poster
Rep: Reputation: 4425Reputation: 4425Reputation: 4425Reputation: 4425Reputation: 4425Reputation: 4425Reputation: 4425Reputation: 4425Reputation: 4425Reputation: 4425Reputation: 4425
Thanks for responses so far but it appears I need to expand on what I'm trying o accomplish. I am aware that there is a version of Jack that plays nice with Pulse but I fairly often do DAW work and don't want the latency inherent in Pulse and don't wish to give up the handful of features in the pulse-friendly version of Jack

I'm thinking that it is fairly commonplace that apps call for support apps and/or libraries much as Unix Law (paraphrased) of "make apps that do one thing and do it well and chain them with other similar apps to extend the reach". An example of how this is used in all operating systems in browsers, when we navigate to. a YouTube video url containing say an mp4 encoded video the browser will use whatever is established as the default app for handling mp4 or ask us which we would like to use currently.

I am also aware that when MS took over Skype and required an update to a newer version simply renaming the version allowed the previous version to work just fine. Software does such things from time to time.

Steam seeks Pulseaudio as well as NetworkManager, neither of which I have installed and active, but marches right along and works just fine on my also-only plus /etc/rc.d/rc.inet1 system. Regarding that I should point out to some here that Pulseaudio is NOT a sound server. It is utterly dependent on some sound server such as ALSA. Remove ALSA but keerp Pulse and you have no audio. Frankly I don't know that it orchestrates OSS or eSound (and don't much care) but the salient point is Pulseaudio is just a manager of a server... as is Jack. One asks it to deliver Input/Output data to assigned locations and resources, and if properly set.. voila! Sound! To be perfectly clear the software assignments from Pulseaudio are not needed with my sound card as it has hardware mixing and adding another layer of software is largely redundant and Jack does it at far less "cost".

So I'm wanting to discover if many or most apps have a consistent method of searching and being satisfied an extension app exists. Do they look in "/usr/bin" for the executable? or do they seek some config file in either $HOME or /etc?

I'm not altogether confident that I can "fool" apps into using the essentially same resources provided by Jack in place of Pulseaudio but I am willing to wrestle with it to find out. I just don't yet know what search terms are used for an app to be satisfied it has found what it seeks - a specific manager of the resources or any manager that offers the same "workforce" capable of almost identical work, but "cheaper".

Last edited by enorbet; 11-19-2018 at 07:32 PM.
 
Old 11-19-2018, 10:40 PM   #6
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
From what I can find out, pulseaudio libraries expect to talk to a server. https://www.freedesktop.org/wiki/Sof.../FAQ/#index6h3

The format for the server URL is described at https://www.freedesktop.org/wiki/Sof...ServerStrings/

You'd have to implement the interface pulseaudio code expects to see when it talks to that server.

It's up to you to decide how to spend your time, but whatever you did would be dependent upon that interface being stable. Sisyphus comes to my mind for some reason.
 
Old 11-20-2018, 08:22 AM   #7
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,776

Original Poster
Rep: Reputation: 4425Reputation: 4425Reputation: 4425Reputation: 4425Reputation: 4425Reputation: 4425Reputation: 4425Reputation: 4425Reputation: 4425Reputation: 4425Reputation: 4425
Thank you Richard Cranium, those are some useful, if a bit confusing links. The first page does clear up that pulseaudio can work with a variety of sound servers but it also says Pulseaudio is is a drop-in replacement for eSound which I don't understand since I am under the impression that pulse requires an external, direct sound server to manage what only such a server can accomplish.

It still seems to me that there doesn't have to be a hard dependency on pulse. As long as an app can get to the ultimate destination, the sound hardware's resources, it shouldn't "care" what facilitates that. A simpler solution could be hinted at in the line -----

Quote:
Originally Posted by Pulseaudio FAQ
I want to run PulseAudio only when it is needed, how do I do this?

Set autospawn = yes in client.conf. That configuration file may be found either in /etc/pulse/ or in ~/.pulse/.
I've tried this and without knowing (yet) how to define "needed" many apps are written so that if it finds pulseaudio exists it will just grab it up and use it, looking no further. It seems a very loose definition of "need" so unless there is a way to force trying to connect to ALSA (or whatever other sound server anyone uses) FIRST, which seems to me in the code of each external app seeking sound resources, not in either ALSA or Pulse, and only fallback on Pulse if that doesn't work, it isn't yet a solution for me so despite being a struggle, I will continue but now at least I have an alternate to consider and research. It baffles me why Pulseaudio behaves or is looked to as a hard dependency so quickly by such a large part of the Linux Community when it obviously isn't required to make audio work. Oh well... Thanks again.

Last edited by enorbet; 11-20-2018 at 08:27 AM.
 
Old 11-20-2018, 01:42 PM   #8
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
You can set up pulse to expose a DBus endpoint, but that doesn't appear to be the default anybody uses.

I didn't delve into the pulse client library very deeply at all, but the underlying idea appeared to be that if you've linked in the pulse client code, then you expect to use PulseAudio. I can think of ways to make that more-or-less optional by an application, but you'd normally control that by some type of configuration; either you tell the app that you want to use X for sound or you provide an ordered list of providers that the application will attempt to use and will stop on the first one that appears to work.

But all of that is work. Easiest for the app to use Pulse and be done with it.
 
Old 11-21-2018, 09:13 AM   #9
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,776

Original Poster
Rep: Reputation: 4425Reputation: 4425Reputation: 4425Reputation: 4425Reputation: 4425Reputation: 4425Reputation: 4425Reputation: 4425Reputation: 4425Reputation: 4425Reputation: 4425
Quote:
Originally Posted by Richard Cranium View Post
You can set up pulse to expose a DBus endpoint, but that doesn't appear to be the default anybody uses.

I didn't delve into the pulse client library very deeply at all, but the underlying idea appeared to be that if you've linked in the pulse client code, then you expect to use PulseAudio. I can think of ways to make that more-or-less optional by an application, but you'd normally control that by some type of configuration; either you tell the app that you want to use X for sound or you provide an ordered list of providers that the application will attempt to use and will stop on the first one that appears to work.

But all of that is work. Easiest for the app to use Pulse and be done with it.
That might be a valid solution if I could force Pulse to be the very last in line so it never spawns unless it is absolutely necessary ie: the app will stall if it isn't present. So far I have been unable to do that and have preferred pure alsa. Apparently there are enough who think similarly since the pure-alsa alternative is officially a part of Current and slated for the next Full Release. I have no problem with people choosing pulseaudio for whatever reason, but I do want the ability to choose.

If I don't assign some kind of "helper app" to handle say PDF documents (and those are somewhat proprietary as I recall) in browsers, they simply ask me what I want to use... doesn't seem like Rocket Surgery.

Last edited by enorbet; 11-21-2018 at 09:14 AM.
 
Old 11-21-2018, 10:22 AM   #10
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by enorbet View Post
If I don't assign some kind of "helper app" to handle say PDF documents (and those are somewhat proprietary as I recall) in browsers, they simply ask me what I want to use... doesn't seem like Rocket Surgery.
The difference is this is all handled by the WM/DE and/or xdg based on the file extension. I haven't dug into the resources posted in this thread, but I imagine there's nothing in place like that for sound output. Most programs I've used that have the ability to output to multiple sound systems (pulse, alsa, etc) usually have to be physically changed in that program's options. I'd be curious what kind of checks could be used to determine if a particular sound system would work other than verifying it is running...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bypass pulseaudio problems and crashes when you don't have pulseaudio. Rinndalir Linux - Software 1 08-31-2016 01:00 PM
[SOLVED] int size is compiler dependent or OS dependent tarunchawla Programming 4 11-30-2011 03:46 AM
[SOLVED] Squeeze + Pulseaudio + Alsa and USB Midi device causes Pulseaudio crash mad4linux Debian 1 01-26-2011 03:57 AM
Winecfg crashes on sound tab with Pulseaudio and no 'sounddrivers' without pulseaudio William (Dthdealer) Linux - Software 5 06-13-2010 07:30 AM
running apps from a konsole without it being dependent DropSig Linux - Newbie 4 06-07-2004 05:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration