Bug 3222 - Upgrade PulseAudio to upstream version
Summary: Upgrade PulseAudio to upstream version
Status: CLOSED FIXED
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Sound (show other bugs)
Version: 3.0.0
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.0.0
Assignee: Peter Åstrand
URL:
Keywords: aaron_tester
Depends on:
Blocks: 2505 3701
  Show dependency treegraph
 
Reported: 2009-08-25 11:34 CEST by Peter Åstrand
Modified: 2012-11-28 12:12 CET (History)
0 users

See Also:
Acceptance Criteria:


Attachments

Description Peter Åstrand cendio 2009-08-25 11:34:34 CEST
Upgrade PulseAudio to upstream version.
Comment 1 Pierre Ossman cendio 2009-09-03 11:29:24 CEST
This bug needs to be done together with bug 2505, otherwise we'll ship a version without Solaris and Windows support.
Comment 2 Pierre Ossman cendio 2009-09-04 11:20:57 CEST
The current pulseaudio has a few new dependencies, but they were easy to add to the new build system. It also seems to build properly.

So the work that needs to be done on this bug is to:

 - Modify the build system slightly
 - Check that we don't get any new runtime dependencies
 - Check that the parameters we pass from tlclient still make sense
 - General testing to see that it still behaves like we want

It's really only the fourth item that can cause any major problems.
Comment 3 Peter Åstrand cendio 2010-03-17 09:00:34 CET
When doing this bug, check that we are building the PA binaries without -fPIC. 
Comment 4 Aaron Sowry cendio 2011-09-28 09:09:13 CEST
PulseAudio 1.0 is out now; with Windows support!

http://lists.freedesktop.org/archives/pulseaudio-discuss/2011-September/011451.html
Comment 5 Henrik Andersson cendio 2012-07-05 08:35:32 CEST
Pulseaudio 2.0 is out, 

Im going for a test build, deps on intltool 0.50 and json-c 0.9
starting off to update our buildsystem.
Comment 6 Henrik Andersson cendio 2012-07-05 10:06:12 CEST
intltool is available but outdated and currently not used in cendbuild
environment, needs to be updated to 0.50 for pulseaudio, intltool have 
a dep on perl-xml-parser which also is outdated and don't compile on
all archs...
Comment 8 Henrik Andersson cendio 2012-07-09 15:13:46 CEST
(In reply to comment #5)
> Pulseaudio 2.0 is out, 
> 
> Im going for a test build, deps on intltool 0.50 and json-c 0.9
> starting off to update our buildsystem.

json-c v0.9 added to buildsystem in commit r25459.
Comment 9 Henrik Andersson cendio 2012-07-09 15:26:23 CEST
(In reply to comment #6)
> intltool is available but outdated and currently not used in cendbuild
> environment, needs to be updated to 0.50 for pulseaudio, intltool have 
> a dep on perl-xml-parser which also is outdated and don't compile on
> all archs...

intltool is updated to version 0.50.2 in cmomit r25460.
Comment 10 Henrik Andersson cendio 2012-07-12 07:20:35 CEST
pulseaudio does also use regex gcc builtin but have support for pcre,
which is needed for mingw builds.
Comment 11 Henrik Andersson cendio 2012-07-12 07:43:05 CEST
Windows binaries are built but is built upon pulseaudio v1.1,
the build is hosted on openSUSE build service and is crosscompiled
using mingw64 for both 43/64bit, (i686-w64-mingw32)

https://build.opensuse.org/project/monitor?arch_i586=1&defaults=0&project=home%3Amkbosmans%3Amingw32%3Apulseaudio&repo_openSUSE_11_4=1&succeeded=1

However one need to patch src/Makefile.am due to rtp module
is not ported and are not built on Windows platform, however
if OPENSSL is found its pulled as a dep of raop module.


--- src/Makefile.am	2012-07-10 10:49:13.000000000 +0200
+++ src/Makefile.am	2012-07-10 10:49:37.000000000 +0200
@@ -1242,7 +1242,8 @@
 		proximity-helper
 endif
 
-if HAVE_OPENSSL
+if HAVE_OPENSSL 
+if !OS_IS_WIN32
 modlibexec_LTLIBRARIES += \
 		libraop.la \
 		module-raop-sink.la
@@ -1251,6 +1252,7 @@
 		module-raop-discover.la
 endif
 endif
+endif
 
 if HAVE_DBUS
 if HAVE_FFTW
Comment 12 Henrik Andersson cendio 2012-07-12 07:54:12 CEST
(In reply to comment #10)
> pulseaudio does also use regex gcc builtin but have support for pcre,
> which is needed for mingw builds.

commit r25466 add pcre to build system.
Comment 13 Henrik Andersson cendio 2012-07-12 07:56:02 CEST
(In reply to comment #8)
> (In reply to comment #5)
> > Pulseaudio 2.0 is out, 
> > 
> > Im going for a test build, deps on intltool 0.50 and json-c 0.9
> > starting off to update our buildsystem.
> 
> json-c v0.9 added to buildsystem in commit r25459.

Commit r25465, Adds cached values for AM_AC_MALLOC/REALLOC on windows builds
Comment 14 Pierre Ossman cendio 2012-09-14 12:47:27 CEST
We get crashes when loading module-alsa-*.so. This is caused by a glibc bug:

http://sourceware.org/bugzilla/show_bug.cgi?id=14577

The provoking cause for this is that pulseaudio uses the NODELETE flag, which was added here:

http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/src/Makefile.am?id=84cd23303550cdc3aa605add9f8a2faa3fc1c3e1

We can probably just remove it, since it was added to work around problems when applications uses libpulse. Or we could restrict it to just libpulse*.so.
Comment 15 Peter Åstrand cendio 2012-09-17 11:00:15 CEST
TODO:

* Remove the nodelete flags from the .so files

* There are currently 4 different methods for "ld bind now": 1 in tlclient, 3 in PulseAudio. Probably want to disable a few of them. 

* Do a build for Pierre to test. 

* Downgrade Alsa in build system, or disable those functions not available on common dists.
Comment 16 Peter Åstrand cendio 2012-09-17 12:48:12 CEST
(In reply to comment #15)
> TODO:
> 
> * Remove the nodelete flags from the .so files

Done in working copy. 

> * There are currently 4 different methods for "ld bind now": 1 in tlclient, 3
> in PulseAudio. Probably want to disable a few of them. 

Done in working copy. 

> * Do a build for Pierre to test. 

Done. 

> * Downgrade Alsa in build system, or disable those functions not available on
> common dists.

We have decided to try to downgrade to some common version. Need to check what dists are using.
Comment 17 Peter Åstrand cendio 2012-09-17 13:05:01 CEST
(In reply to comment #16)

> > * Downgrade Alsa in build system, or disable those functions not available on
> > common dists.
> 
> We have decided to try to downgrade to some common version. Need to check what
> dists are using.

The functions that are problematic on CentOS 6 was introduced with Alsa 1.0.24 (sometimes called 1.0.24.1?). Dist versions:

Ubuntu 8.04 LTS: 1.0.15
RHEL5: 1.0.17
SLE*11 SP2: 1.0.18
RHEL6: 1.0.22
Ubuntu 10.04 LTS: 1.0.22

In other words, if we skip Ubuntu 8.04, the lowest version is 1.0.17. However, PulseAudio requires (since a long time ago) alsa-lib 1.0.19. I don't think we want to change this requirement. Besides, we used alsa-lib 1.0.21 earlier. So I guess 1.0.21 is my suggestion.
Comment 18 Peter Åstrand cendio 2012-09-17 15:07:53 CEST
Note: The ambition for Solaris is just to have something that builds, since the current implementation does not work either. See bug 3934.
Comment 19 Pierre Ossman cendio 2012-09-21 09:57:08 CEST
Upstream has screwed something up. pulseaudio (the daemon) is linked against libpulse (the client library). Someone probably put stuff incorrectly in there when it should have been in libpulsecommon.
Comment 20 Pierre Ossman cendio 2012-09-21 10:33:15 CEST
(In reply to comment #19)
> Upstream has screwed something up. pulseaudio (the daemon) is linked against
> libpulse (the client library). Someone probably put stuff incorrectly in there
> when it should have been in libpulsecommon.

https://bugs.freedesktop.org/show_bug.cgi?id=55180 and r25851.
Comment 21 Pierre Ossman cendio 2012-09-25 13:58:28 CEST
Added protection against opening virtual PulseAudio devices in ALSA in r25893. Tester should verify that this protection works reliably.
Comment 22 Pierre Ossman cendio 2012-09-26 10:36:34 CEST
Let's see if we can load module-wavout twice, to avoid the requirement of having a mic connected on vista/7.
Comment 23 Peter Åstrand cendio 2012-09-26 15:04:12 CEST
TODO: The Auto shutdown feature is apparently active on Windows.
Comment 24 Pierre Ossman cendio 2012-09-26 15:06:54 CEST
--fail=false isn't working. Need to have another look.
Comment 25 Pierre Ossman cendio 2012-09-26 16:41:30 CEST
(In reply to comment #24)
> --fail=false isn't working. Need to have another look.

Fixed in r25911.
Comment 26 Pierre Ossman cendio 2012-09-26 17:00:43 CEST
(In reply to comment #22)
> Let's see if we can load module-wavout twice, to avoid the requirement of
> having a mic connected on vista/7.

Fixed in r25913.
Comment 27 Peter Åstrand cendio 2012-09-27 10:19:09 CEST
(In reply to comment #23)
> TODO: The Auto shutdown feature is apparently active on Windows.

Also on other platforms. Fixed in 25917.
Comment 28 Peter Åstrand cendio 2012-09-27 10:33:22 CEST
Windows installer does not ship the necessary PA files.
Comment 29 Peter Åstrand cendio 2012-09-27 10:58:01 CEST
(In reply to comment #28)
> Windows installer does not ship the necessary PA files.

25918.
Comment 30 Pierre Ossman cendio 2012-09-28 11:25:40 CEST
Two problems noticed on the demo system:

 - VLC has buffering issues. You get constants underruns.

 - Audio sync is off. Tested both totem and mplayer.
Comment 31 Peter Åstrand cendio 2012-10-01 10:57:21 CEST
(In reply to comment #30)
> Two problems noticed on the demo system:
> 
>  - VLC has buffering issues. You get constants underruns.
> 
>  - Audio sync is off. Tested both totem and mplayer.

Verified problems both on Windows XP and CentOS 6.
Comment 32 Peter Åstrand cendio 2012-10-01 11:12:27 CEST
(In reply to comment #30)
> Two problems noticed on the demo system:
> 
>  - VLC has buffering issues. You get constants underruns.

From VLC -v:

> 
>  - Audio sync is off. Tested both totem and mplayer.

[0x251abb8] pulse audio output: No. of Audio Channels: 2
[0x252d748] freetype spu text error: failed to load font file /usr/share/fonts/truetype/freefont/FreeSerifBold.ttf
[0x251abb8] main audio output warning: PTS is out of range (-9078), dropping buffer
[0x251abb8] main audio output warning: PTS is out of range (-21053), dropping buffer
[0x251abb8] main audio output warning: output date isn't PTS date, requesting resampling (259486)
[0x251abb8] main audio output warning: output date isn't PTS date, requesting resampling (42556)
[0x251abb8] main audio output warning: audio drift is too big (302041), dropping buffer
[0x251abb8] main audio output warning: audio drift is too big (280708), dropping buffer
[0x251abb8] main audio output warning: audio drift is too big (259375), dropping buffer
[0x251abb8] main audio output warning: audio drift is too big (238041), dropping buffer
[0x251abb8] main audio output warning: audio drift is too big (216708), dropping buffer
[0x251abb8] main audio output warning: audio drift is too big (195375), dropping buffer
[0x251abb8] main audio output warning: audio drift is too big (174041), dropping buffer
[0x251abb8] main audio output warning: audio drift is too big (152708), dropping buffer
[0x251abb8] main audio output warning: audio drift is too big (131375), dropping buffer
[0x251abb8] main audio output warning: buffer is 110041 late, triggering upsampling
[0x251abb8] main audio output warning: output date isn't PTS date, requesting resampling (41498)
[0x251abb8] main audio output warning: audio drift is too big (151373), dropping buffer
[0x251abb8] main audio output warning: audio drift is too big (130040), dropping buffer
[0x251abb8] main audio output warning: output date isn't PTS date, requesting resampling (47413)
[0x251abb8] main audio output warning: audio drift is too big (156098), dropping buffer
[0x251abb8] main audio output warning: audio drift is too big (134764), dropping buffer
[0x251abb8] main audio output warning: output date isn't PTS date, requesting resampling (80538)
[0x251abb8] main audio output warning: output date isn't PTS date, requesting resampling (42606)
[0x251abb8] main audio output warning: output date isn't PTS date, requesting resampling (42619)
[0x251abb8] main audio output warning: output date isn't PTS date, requesting resampling (41987)
[0x251abb8] main audio output warning: audio drift is too big (321077), dropping buffer
Comment 34 Peter Åstrand cendio 2012-10-01 16:02:26 CEST
(In reply to comment #30)
> Two problems noticed on the demo system:
> 
>  - VLC has buffering issues. You get constants underruns.

We believe this is a VLC problem, probably fixed in more recent versions. The developers says that you really need to use 1.1.12 or never for proper pulse support, but we are unable to install that on eudemo.thinlinc.com without a lot of hacks. 

I've tried against my home server which is CentOS 6 with VLC 2.0.3, and although the connection is too slow for video playback, the problem seems to be gone. 

I have switched to Totem on eudemo. 


>  - Audio sync is off. Tested both totem and mplayer.

Created bug 4411.
Comment 35 Karl Mikaelsson cendio 2012-10-04 11:04:32 CEST
PulseAudio crashes on Solaris 10, because a null pointer (the current thread name) is passed into a printf function.

#0  0xfeeb20d0 in strlen () from /lib/libc.so.1
#1  0xfef1d66c in _ndoprnt () from /lib/libc.so.1
#2  0xfef1fd8c in vsnprintf () from /lib/libc.so.1
#3  0xff0291d0 in pa_vsnprintf (str=0xffbfecf8 <error reading variable>, size=128, 
    format=0xff0a9f90 <error reading variable>, ap=0xffbfabb8) at pulsecore/core-util.c:2171
#4  0xff02934c in pa_snprintf (str=0xffbfecf8 <error reading variable>, size=128, 
    format=0xff0a9f90 <error reading variable>) at pulsecore/core-util.c:2157
#5  0xff034e2c in pa_log_levelv_meta (level=PA_LOG_WARN, file=0xff0a7738 <error reading variable>, line=72, 
    func=0xff0a7788 <error reading variable>, format=0xff0a7750 <error reading variable>, ap=0xffbfee58)
    at pulsecore/log.c:308
#6  0xff0344fc in pa_log_level_meta (level=PA_LOG_WARN, file=0xff0a7738 <error reading variable>, line=72, 
    func=0xff0a7788 <error reading variable>, format=0xff0a7750 <error reading variable>) at pulsecore/log.c:449
#7  0xff025a08 in pa_cstrerror (errnum=<value optimized out>) at pulsecore/core-error.c:72
#8  0xff027274 in pa_raise_priority (nice_level=-1) at pulsecore/core-util.c:829
#9  0x000183f8 in main (argc=16, argv=0xffbff154) at daemon/main.c:893

(disregard the <error reading variable> errors, they're an artifact of using gdb 7.2 on Solaris)
Comment 36 Pierre Ossman cendio 2012-10-04 11:12:44 CEST
(In reply to comment #35)
> PulseAudio crashes on Solaris 10, because a null pointer (the current thread
> name) is passed into a printf function.
> 

Fixed in r25955.
Comment 40 Aaron Sowry cendio 2012-10-26 11:30:47 CEST
Tested on:

Fedora 17
Fedora 18 alpha
Ubuntu 12.10
Windows 7
Windows XP Embedded
WYSE Linux v6

Everything seems to work as far as I can tell. Closing.
Comment 41 Peter Åstrand cendio 2012-11-08 08:53:19 CET
Reopening due to bug 921, comment #19:

2012-11-07T16:39:37: pulseaudio: E: [pulseaudio] core-util.c: Home directory
/home/elux not ours.
Comment 42 Peter Åstrand cendio 2012-11-08 09:38:28 CET
(In reply to comment #41)
> Reopening due to bug 921, comment #19:
> 
> 2012-11-07T16:39:37: pulseaudio: E: [pulseaudio] core-util.c: Home directory
> /home/elux not ours.

Hopefully fixed in 26142.
Comment 43 Aaron Sowry cendio 2012-11-12 15:40:43 CET
Tested latest rc on eLux (3.8) machine in conference room. Got sound, glee ensued. Closing.

Note You need to log in before you can comment on or make changes to this bug.