レナート   TBFKAYIBYNYAAYB   ﻟﻴﻨﺎﺭﺕ

Tue, 10 Feb 2009

Oh Nine Fifteen

Last week I've released a test version for the upcoming 0.9.15 release of PulseAudio. It's going to be a major one, so here's a little overview what's new from the user's perspective.

Flat Volumes

Based on code originally contributed by Marc-André Lureau we now support Flat Volumes. The idea behind flat volumes has been inspired by how Windows Vista handles volume control: instead of maintaining one volume control per application stream plus one device volume we instead fix the device volume automatically to the "loudest" application stream volume. Sounds confusing? Actually it's right the contrary, it feels pretty natural and easy to use and brings us a big step forward to reduce a bit the number of volume sliders in the entire audio pipeline from the application to what you hear.

The flat volumes logic only applies to devices where we know the actual multiplication factor of the hardware volume slider. That's most devices supported by the ALSA kernel drivers except for a few older devices and some cheap USB hardware that exports invalid dB information.

On-the-fly Reconfiguration of Devices (aka "S/PDIF Support")

PulseAudio will now automatically probe all possible combinations of configurations how to use your sound card for playback and capturing and then allow on-the-fly switching of the configuration. What does that mean? Basically you may now switch beetween "Analog Stereo", "Digital S/PDIF Stereo", "Analog Surround 5.1" (... and so on) on-the-fly without having to reconfigure PA on the configuration file level or even having to stop your streams. This fixes a couple of issues PA had previously, including proper SPDIF support, and per-device configuration of the channel map of devices.

Unfortunately there is no UI for this yet, and hence you need to use pactl/pacmd on the command line to switch between the profiles. Typing list-cards in pacmd will tell you which profiles your card supports.

In a later PA version this functionality will be extended to also allow input connector switching (i.e. microphone vs. line-in) and output connector switching (i.e. internal speakers vs. line-out) on-the-fly.

Native support for 24bit samples

PA now supports 24bit packed samples as well as 24bit stored in the LSBs of 32bit integers natively. Previously these formats were always converted into 32bit MSB samples.

Airport Express Support

Colin Guthrie contributed native Airport Express support. This will make the RAOP audio output of ApEx routers appear like local sound devices (unfortunately sound devices with a very long latency), i.e. any application connecting to PulseAudio can output audio to ApEx devices in a similar way to how iTunes can do it on MacOSX.

Before you ask: it is unlikely that we will ever make PulseAudio be able to act as an ApEx compatible device that takes connections from iTunes (i.e. becoming a RAOP server instead of just an RAOP client). Apple has an unfriendly attitude of dongling their devices to their applications: normally iTunes has to cryptographically authenticate itself to the device and the device to iTunes. iTunes' key has been recovered by the infamous Jon Lech Johansen, but the device key is still unknown. Without that key it is not realistically possible to disguise PA as an ApEx.

Other stuff

There have been some extensive changes to natively support Bluetooth audio devices well by directly accessing BlueZ. This code was originally contributed by the GSoC student João Paulo Rechi Vita. Initially, 0.9.15 was intended to become the version were BT audio just works. Unfortunately the kernel is not really up to that yet, and I am not sure everything will be in place so that 0.9.15 will ship with well working BT support.

There have been a lot of internal changes and API additions. Most of these however are not visible to the user.

posted at: 20:11 | path: /projects | permanent link to this entry | 31 comments


Posted by PA at Tue Feb 10 20:37:35 2009
Very impressive. Keep up awesome work!

Posted by fatal at Tue Feb 10 21:24:31 2009
Thanks for the summary! Good to see new kickass improvements to sound on Linux.

Posted by PerfectlyNormal at Tue Feb 10 21:35:52 2009
Does this mean that PulseAudio finally supports passthrough over S/PDIF? That's the last piece I'm missing before switching over to PulseAudio for good. Now I'm using ALSA and pasuspender for my movies, while everything else uses PulseAudio

Posted by Anonymous at Tue Feb 10 22:08:46 2009
I don't quite understand what you intend to do with flat volumes.  It sounds like you want to eliminate the system-wide slider in favor of the per-application sliders, which seems completely backward.

Why not have a single system-wide slider for volume, and eliminate all the application sliders?

Posted by Dave Hayes at Tue Feb 10 22:32:38 2009
Awesome, can't wait to try out the S/PDIF stuff.

Posted by Marc-Andre Lureau at Tue Feb 10 22:42:47 2009
@Anonymous: you can still change the "system-wide" or "per-role" volume. It will in turn update the perceived volume on all application sliders. Should be pretty neat for users. You just have to get a bit used to it, may be.

Posted by Mike at Tue Feb 10 23:04:29 2009
Awesome news, thanks for the update! Airport Express support is very exciting, I may have to pick one up. I am also looking forward to the day when I can use my bluetooth headset as the mic and speaker trivially (I can't seem to do it at all ATM).

Posted by Jud at Tue Feb 10 23:37:24 2009
It does beg the question.

"Joe" wants to turn down the volume of all of his applications (in essence, the computer) at once.  His built-in-laptop volume knob is a software one and doesn't work under Linux.

How does he do it?

(Don't get me wrong, I love the per-app flat volumes, and the automatic loudest-volume detection is interesting.  But it seems to neglect the ability to change the overall volume of the entire computer at once).

Posted by Jud at Tue Feb 10 23:44:05 2009
By this logic, it also seems to mean that if I adjust the highest-volume program, all of the other applications playing sound are automatically adjusted too(A), even if I didn't touch them.  It does sound a little inconsistent, but perhaps I didn't understand completely.

(A) Since the overall device volume is changed to match the loudest-program volume, this inadvertently effects all programs.

Posted by Michael at Tue Feb 10 23:46:58 2009
Ok... so is Flat Volume like what I have with SoundBlaster's SB XFi Smart Volume Management under XP that basically keeps the average volume constant, based on your set volume?

I think it is a running average. Individual bits in a song that are close to each other can have a broad dynamic range. But sounds that are distant from each other in time will have roughly the same volume. I guess it's sort of an autogain mode.

Or is it something completely different. I've not used the Vista feature.

BTW, the XFi volume controll app under XP completely sucks... as soon as it loses focus it disappears. Which, since I have focus follow the mouse means it's as soon as I move off the button that opened it. Besides that it's big and slow. /rantoff

Posted by Michael at Wed Feb 11 00:02:14 2009
Ok... so is Flat Volume like what I have with SoundBlaster's SB XFi Smart Volume Management under XP that basically keeps the average volume constant, based on your set volume?

I think it is a running average. Individual bits in a song that are close to each other can have a broad dynamic range. But sounds that are distant from each other in time will have roughly the same volume. I guess it's sort of an autogain mode.

Or is it something completely different. I've not used the Vista feature.

BTW, the XFi volume controll app under XP completely sucks... as soon as it loses focus it disappears. Which, since I have focus follow the mouse means it's as soon as I move off the button that opened it. Besides that it's big and slow. /rantoff

Posted by Jef Spaleta at Wed Feb 11 00:29:36 2009
Is there something specific I can read up on with regard to the current bluetooth situation? I have a bt headset now and I'd love to be able to help getting it working..even if it means doing custom kernel testing and whatnot.

-jef

Posted by Bastien at Wed Feb 11 01:07:21 2009
Just need to get that nice PA pre-release into rawhide!

Posted by Anon at Wed Feb 11 09:33:00 2009
Interesting. Looks like what you write here is slowly creeping out to the masses - <a href="http://slashdot.org/comments.pl?sid=1120565&cid=26775711">http://slashdot.org/comments.pl?sid=1120565&cid=26775711</a> (read the comment below it).

Posted by bkor at Wed Feb 11 11:42:35 2009
I always disable that flat-volume (used to be a module, now appears to be a daemon option). It changes the volume which I hear, really strange/annoying results (volume is suddenly loud etc). I often have an pulseaudio using application running for only a while (e.g. mplayer). It mofifies how loud either mplayer or audacious is (not exactly sure, I just disable it asap). Sounds like it is not meant to be that way, so plan to file a bug.

Posted by Adam Williamson at Wed Feb 11 15:21:53 2009
"On-the-fly Reconfiguration of Devices (aka "S/PDIF Support")"

produces small trumpet

blows trumpet

yaaay.

Posted by Matt Wheeler at Thu Feb 12 16:51:53 2009
With regards to RAOP, AirFoil Speakers (http://www.rogueamoeba.com/airfoil/) enables the use of a computer as a RAOP server, don't know if this is something you (or Jon) has already looked at but I thought it was worth a mention. Perhaps the key could be recovered from there?

Posted by Lennart at Thu Feb 12 17:23:14 2009
Matt: Nope, As I understood Airfoil those Airfoil speakers are compatible with Airfoil and that's it, i.e. you cannot use them with iTunes.

Posted by Stoffe at Fri Feb 13 15:24:01 2009
Aw, too bad about the bluetooth thing, but good to know it's just a question of time. :)

Keep it up!

Posted by Vadim P. at Sun Feb 15 21:25:16 2009
From:

"Linux challenges (technical)

"There were a few small technical hurdles, but Maks is either a genius, or the port was not much trouble at all! One technical hurdle was with Pulse Audio, which apparently comes standard on major distros like Ubuntu. It introduces quite a bit of audio lag. This would be fine for most applications, but it's not good for games, where the goal is to build an extremely responsive system that feels snappy. We were able to work with it, and get the game feeling right, but it took a bit of effort. I realize I'll get shot for saying this, but in Windows, it just worked right away!""

Rather sad - application developers get bashed for not doing their audio "right", application developers bash the new technology as introducing "quite a bit of audio lag".

Posted by Vadim P. at Sun Feb 15 21:26:02 2009
Sorry, from http://linuxlock.blogspot.com/2009/02/linux-gets-gooey-on-friday-13th.html

New game wants to use PA, claims PA as one of the biggest Linux challenges.

Posted by grendelkhan at Thu Feb 19 17:42:51 2009
Vadim, I can imagine it would be, since Lennart doesn't recommend using PA for games [http://0pointer.de/blog/projects/guide-to-sound-apis.html], unless they're simple ones which just use a few event sounds, in which case he points to libcanberra.

Out of curiosity, are there still plans to develop libsydney? As I recall, that was supposed to be the main method for general-purpose apps to connect with PA, but the mailing list has been dark for more than a year now.

Posted by Andrea R at Wed Feb 25 15:42:42 2009
Any hope to get equalizer support soon?

Posted by Sam at Wed Feb 25 16:55:06 2009
Yeah an equalizer would be AWESOME !

Posted by tvst at Thu Feb 26 07:17:09 2009
Yes, it's about time we get a proper system-wide equalizer. In the meantime, you can hack one together using the mbeq plugin for ladspa and adding this to the end of your /etc/pulse/default.pa

.nofail
load-module module-ladspa-sink sink_name=equalized_out master=[NAME OF YOUR SOUNDCARD] plugin=mbeq_1197 label=mbeq control=-2,-2,-1,-1,0,0,0,0,1,1,2,3,4,5,5
# 50Hz, 100Hz, 156Hz, ... , 5kHz, 10kHz, 20kHz
# set from -70 to 30
.fail
.nofail
set-default-sink equalized_out
.fail

where [NAME OF YOUR SOUNDCARD] is found in padevchooser > manager > default sink

You have to mess with the control numbers manually and restart pulseaudio. FUN TIMES.

Posted by radio_listener at Sun Mar 8 00:05:09 2009
Keep up the good work and thank you in advance for the bluetooth support. I'm trying to unclutter my desk. Therefore having the ability to use bluetooth speakers and headphones will come in really handy.

Posted by Albert at Tue Apr 14 14:54:28 2009
Any news on the issues with skype?

Posted by Albert at Tue Apr 14 14:54:34 2009
Any news on the issues with skype?

Posted by James at Sun Apr 19 10:26:10 2009
Congratulations! I just tried out 0.9.15 and it is fantastic. The new control panel, with the "on the fly" reconfiguration is really neat, and easy to use. I look forward to trying some of the other features like bluetooth and RAOP support.
Pulseaudio is really bringing much better usability to sound on the linux desktop.

Posted by Livio at Thu May 21 20:41:34 2009
I guess you feel like a hero now.

I don't know what to say.

Crackling, skipping, not remembering settings by pavucontrol and crashes are annoying but from the other side, per-app sliders are neat.


I hope that heavy latencies are because of kernel config...

Posted by Pure at Wed Jun 3 12:37:34 2009
When you make a fully working 5.1 sound on sb live easy to adjust. Now it's quite hard for non linux user. I have still problems with lfe channel etc..

Ubuntu 9.04

Leave a Comment:

Your Name:


Your E-mail (optional):


Comment:


As a protection against comment spam, please type the following number into the field on the right:
Secret Number Image

Please note that this is neither a support forum nor a bug tracker! Support questions or bug reports posted here will be ignored and not responded to!


It should be obvious but in case it isn't: the opinions reflected here are my own. They are not the views of my employer, or Ronald McDonald, or anyone else.

Please note that I take the liberty to delete any comments posted here that I deem inappropriate, off-topic, or insulting. And I excercise this liberty quite agressively. So yes, if you comment here, I might censor you. If you don't want to be censored your are welcome to comment on your own blog instead.


Lennart Poettering <mzoybt (at) 0pointer (dot) net>
Syndicated on Planet GNOME, Planet Fedora, planet.freedesktop.org, Planet Debian Upstream. feed RSS 0.91, RSS 2.0
Archives: 2005, 2006, 2007, 2008, 2009, 2010

Valid XHTML 1.0 Strict!   Valid CSS!