JACK instead of Pulseaudio?


Silent-Hunter

Hardcore Member
Joined
May 29, 2010
Messages
3,174
I was under the impression that everything worked with it because it just supplies an ALSA interface for programs that don't support JACK directly. That's what Pulse does too.
 

vinipsmaker

Member
Joined
Jun 22, 2013
Messages
209
Location
Brazil
Website
vinipsmaker.github.io
I would be interested in a benchmark.

Code:
"[...] power consumption was definitely in favor of PulseAudio [...]"
  -- http://www.phoronix.com/scan.php?page=news_item&px=MTA0MzY
The above citation isn't comparing JACK and PulseAudio, btw.
 

Silent-Hunter

Hardcore Member
Joined
May 29, 2010
Messages
3,174
Can someone give the benefits for normal users of Pulseaudio over JACK then? JACK looks more user friendly to me, I had a lot of trouble with Pulse.
 

TrashyMG

Sarcasm Dispenser
Staff member
Joined
Jan 18, 2010
Messages
10,753
Item 2 on the official jack audio faq. Specifially the last paragraph of the bullet point.

http://www.jackaudio.org/faq/pulseaudio_and_jack.html

Seriously Pulseaudio isn't really big deal, you can disable it easily and use alsa or jack audio. pulseaudio has some advantages especially if the pyra is going to be a phone device.
 
Last edited by a moderator:

_jr_

Advanced Member
Joined
May 5, 2013
Messages
1,170
Whether the default audio system is a big deal IMO depends on the number of applications/use cases that are restricted in sound support to only one environment or may even refuse to start in different environments.


I don't think this will be a problem for games/emulators, because these will mostly have exclusive access to all major Pyra subsystems anyway and switching to the supported mode (loosing phone or proaudio functionality) while playing should be acceptable.


But I don't know the situation with general tools where audio is either crucial (e.g. a media player) or at least desirable (e.g. a 3D modeling tool providing valuable audible feedback). It would suck having to switch back to PA after I set up my connections in JACK just to watch a video in the browser. It would still be quite annoying having to restart the browser after switching audio environments.


Unfortunately I don't see a general solution besides having two separate sound devices in the hardware.
 
Last edited by a moderator:

EvilDragon

Administrator
Staff member
Joined
Mar 4, 2003
Messages
29,526
Age
42
Location
Ingolstadt
I've read myself a bit into Pulseaudio and CPU usage. CPU usage shouldn't be high unless you do resampling - in which case ALSA also has a higher CPU usage.


Without resampling, Pulseaudio shouldn't really use more CPU power than ALSA.
 

Elw3

ƐʍlƎ
Joined
Aug 10, 2010
Messages
1,388
Speaking of it, on my ubuntu system pulse generates files in /dev/shm (system ram disk) with 64-258 mb size. 

Does someone know why it does that? And is that an ubuntu bug or does pulse really generate that on all systems? I rather not want it to block 200mb on a mobile system. 
 

WizardStan

Mega GP Mania
Joined
May 24, 2008
Messages
16,733
I've got pulse on my BeagleBoard with just 256mb of RAM and I've never noticed any such memory problem.

Not that my Beagle does a whole lot of sound stuff lately, it's just been an email server and IRC client for a few years.
 

ashcloud

-- BANNED! -- Lactose Intolerant Volcano
Joined
Jul 2, 2010
Messages
297
Location
guru.awakes.dormant
I've got pulse on my BeagleBoard with just 256mb of RAM and I've never noticed any such memory problem.

Not that my Beagle does a whole lot of sound stuff lately, it's just been an email server and IRC client for a few years.
Pulseaudio itself is fine for me here. But pavucontrol can do some horrible things when left alone for a few days, devouring more and more memory for no obvious reason.
 

WizardStan

Mega GP Mania
Joined
May 24, 2008
Messages
16,733
pavucontrol is not meant to be run for extended periods of time. Run it, change your settings, close it.

If you're seeing it consume mass amounts of CPU and RAM days later then it sounds like a major problem, it doesn't need to run continuously
 

canseco

Very Active Member
Joined
Jun 1, 2004
Messages
885
Location
Spain
Whether the default audio system is a big deal IMO depends on the number of applications/use cases that are restricted in sound support to only one environment or may even refuse to start in different environments.


I don't think this will be a problem for games/emulators, because these will mostly have exclusive access to all major Pyra subsystems anyway and switching to the supported mode (loosing phone or proaudio functionality) while playing should be acceptable.


But I don't know the situation with general tools where audio is either crucial (e.g. a media player) or at least desirable (e.g. a 3D modeling tool providing valuable audible feedback). It would suck having to switch back to PA after I set up my connections in JACK just to watch a video in the browser. It would still be quite annoying having to restart the browser after switching audio environments.


Unfortunately I don't see a general solution besides having two separate sound devices in the hardware.
There are specific Linux distros, like KXStudio, configured to use JACK on top of Pulseaudio.

I'm sure we can do something similar, if not the same on Pyra.

https://wiki.archlinux.org/index.php/PulseAudio/Examples#PulseAudio_through_JACK
 
Last edited by a moderator:

Linux-SWAT

Hardcore Member
Joined
Feb 13, 2010
Messages
8,528
Alsa for normal usage, jack for audio production.

I've always found pulseaudio totally useless. I even had to remove it from some Ubuntu installations as it was causing trouble.
 

EvilDragon

Administrator
Staff member
Joined
Mar 4, 2003
Messages
29,526
Age
42
Location
Ingolstadt
Pulseaudio actually is quite useful together with kmix. Changing the volume and sound output from various streams is great, something you can't really do comfortably with ALSA.


And don't forget we got various outputs: HDMI, Headset, Speaker, Bluetooth.


When connecting a TV on HDMI but want the sound coming out from the headset port, how would that work with ALSA?


With Pulseaudio, it's just two clicks to route the audio either to HDMI or the headset.


You can even send the audio of a movie you're watching to your TV while getting notifications out of your Pyra speakers.


There's no easy way for that with ALSA, it's not even possible with some apps.


And it's probably the reason there's still no easy way to use a bluetooth headset with the Pandora.
 

Silent-Hunter

Hardcore Member
Joined
May 29, 2010
Messages
3,174
Well alright. But this Cadence thingy should be made available in the repo, so people who want to use JACK can, without losing the features Pulse provides.
 

Antartica

Member
Joined
Oct 17, 2011
Messages
30
When connecting a TV on HDMI but want the sound coming out from the headset port, how would that work with ALSA?


With Pulseaudio, it's just two clicks to route the audio either to HDMI or the headset.


You can even send the audio of a movie you're watching to your TV while getting notifications out of your Pyra speakers.


There's no easy way for that with ALSA, it's not even possible with some apps.


And it's probably the reason there's still no easy way to use a bluetooth headset with the Pandora.
It is possible with ALSA, as I do it in my HTPC. But it is very cumbersome:

1. To modify the default output you have to change the ~/.asoundrc and restart the app using the sound card. This can be automated with a gui and some scripts, but the application restart is not very user-friendly.

2. Some apps would let you specify the output (i.e. for vieweing a movie in the HDMI while playing background music to the analog output), but others not. mplayer can be commanded to use a specific card, but AFAICT firefox uses the default output.

3. In the .asoundrc you can configure a bluetooth headset, but getting the system to use the headset if it is "on" and the HDMI or analog when not needs a lot of trickery (in my case, a two-packet l2ping to the headset, then call mplayer with different paramenters whether the headset replied or not) and is not error-proof, as from time to time the headset would miss both packets and the automatic detection would not work.

TL;DR: I don't use pulseaudio myself, but I can understand that it is a reasonable option for the default configuration of the operating system.
 

WizardStan

Mega GP Mania
Joined
May 24, 2008
Messages
16,733
TL;DR: I don't use pulseaudio myself, but I can understand that it is a reasonable option for the default configuration of the operating system.
With the idea of the Pyra also having phone features Pulse as default makes even more sense, the ability to redirect audio to speakers or headphones or bluetooth or to a recorded file at will without needing to restart the phone app is important.
 

slaeshjag

¯\_(ツ)_/¯
Joined
Apr 8, 2010
Messages
2,687
Location
~Stockholm, Sweden
The thing with pulseaudio is that the thing is controllable over dbus, so most of such audio stream redirection can be done automatically.
 
Top