profile/ivi/pulseaudio.git
14 years agoSubject: rtpoll: better support for DEBUG_TIMING logs
Pierre-Louis Bossart [Wed, 23 Dec 2009 19:57:03 +0000 (13:57 -0600)]
Subject: rtpoll: better support for DEBUG_TIMING logs

On all the platforms I tested, PulseAudio is frequently awaken and
doesn't sleep for the duration specified for the poll timeout.
Sometimes wake-ups occur within milliseconds of the poll call for no
good reason; this seems to be related to ALSA issues (see my posts on
the ALSA mailing list on null poll events).
This patch enables a better log of requested sleep times v. actual
sleep times. Enable DEBUG_TIMING to see actual messages. Please let me
know if you see odd behaviors like the one below
- Pierre

E: rtpoll.c: rtpoll_run
E: rtpoll.c: poll timeout: 188 ms
E: rtpoll.c: Process time 0 ms; sleep time 48 ms
E: rtpoll.c: rtpoll_run
E: rtpoll.c: rtpoll finish
E: rtpoll.c: rtpoll_run
E: rtpoll.c: poll timeout: 139 ms
E: rtpoll.c: Process time 0 ms; sleep time 49 ms
E: rtpoll.c: rtpoll_run
E: rtpoll.c: rtpoll finish
E: rtpoll.c: rtpoll_run
E: rtpoll.c: poll timeout: 189 ms
E: rtpoll.c: Process time 0 ms; sleep time 0 ms
E: rtpoll.c: rtpoll_run
E: rtpoll.c: rtpoll finish
E: rtpoll.c: rtpoll_run
E: rtpoll.c: poll timeout: 189 ms
E: rtpoll.c: Process time 0 ms; sleep time 49 ms

14 years agoFix typo in log message: s/may no be/may not be/
chocolateboy [Sat, 26 Dec 2009 01:46:32 +0000 (01:46 +0000)]
Fix typo in log message: s/may no be/may not be/

Hi, Lennart.

Spotted another typo. Patch attached.

Best wishes,
chocolateboy.

14 years agoalsa: add profile set for M-Audio FastTrack Pro USB
David Kågedal [Tue, 5 Jan 2010 19:14:11 +0000 (20:14 +0100)]
alsa: add profile set for M-Audio FastTrack Pro USB

14 years agoudev: Use SOUND_CLASS instead of SOUND_FORM_FACTOR when checking for modem
Daniel T Chen [Tue, 5 Jan 2010 02:53:36 +0000 (21:53 -0500)]
udev: Use SOUND_CLASS instead of SOUND_FORM_FACTOR when checking for modem

The fact whether an ALSA card is a modem is stored in the SOUND_CLASS,
not the SOUND_FORM_FACTOR property. So read it from there.

Patch from Whoopie.

14 years agothreaded-mainloop: Properly initialise m->n_waiting_for_accept to prevent deadlock
Daniel T Chen [Tue, 5 Jan 2010 02:44:37 +0000 (21:44 -0500)]
threaded-mainloop: Properly initialise m->n_waiting_for_accept to prevent deadlock

Compiler optimisations have been seen to initialise
m->n_waiting_for_accept to a positive non-zero value, so the while() in
pa_threaded_mainloop_signal() never proceeds. Fix this by properly
initializing m->n_waiting_for_accept in pa_threaded_mainloop_new().

Patch from Iain Bucław.

https://bugs.launchpad.net/bugs/502992

14 years agoMore src/pulsecore/cpu-arm.c FTBFS fixes
Daniel T Chen [Thu, 17 Dec 2009 04:55:05 +0000 (23:55 -0500)]
More src/pulsecore/cpu-arm.c FTBFS fixes

Fix missing argument to pa_read(), and be consistent with declaration of
state variable in pa_cpu_init_arm().

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
14 years agoFix the following warnings (which now cause buildd failures in Ubuntu 10.04):
Daniel T Chen [Thu, 17 Dec 2009 03:53:18 +0000 (22:53 -0500)]
Fix the following warnings (which now cause buildd failures in Ubuntu 10.04):

pulsecore/cpu-arm.c: In function 'get_cpuinfo':
pulsecore/cpu-arm.c:70: warning: implicit declaration of function 'pa_read' [-Wimplicit-function-declaration]
pulsecore/cpu-arm.c:72: warning: implicit declaration of function 'pa_close' [-Wimplicit-function-declaration]
pulsecore/cpu-arm.c: In function 'pa_cpu_init_arm':
pulsecore/cpu-arm.c:110: warning: implicit declaration of function 'pa_split_spaces' [-Wimplicit-function-declaration]
pulsecore/cpu-arm.c:110: warning: assignment makes pointer from integer without a cast
Function `pa_split_spaces' implicitly converted to pointer at pulsecore/cpu-arm.c:110

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
14 years agoAdd a configure option to change 'udevrulesdir'
Arun Raghavan [Sun, 6 Dec 2009 07:01:25 +0000 (12:31 +0530)]
Add a configure option to change 'udevrulesdir'

This patch serves two purposes:

  1) Allows something other than the de-facto standard udev rules dir or
     /lib/udev/rules.d to be used (the udev build system allows you to
     customise this)

  2) Allows a prefixed, non-root install (right now, the /lib/... path
     is hard-coded into the build system

14 years agoMark shared variables as volatile
Arun Raghavan [Sun, 6 Dec 2009 06:50:53 +0000 (12:20 +0530)]
Mark shared variables as volatile

'n_waiting' and 'n_waiting_for_accept' may be accessed from mulitple
threads, and thus need to be marked as volatile to suppres certain
compiler optimisations. All uses are protected by a mutex, so we don't
need to worry about cache issues (added documentation for this as well).

This addresses bug #738.

14 years agostream-restore: At startup, create dbus entries only for valid database entries.
Tanu Kaskinen [Thu, 3 Dec 2009 13:34:26 +0000 (15:34 +0200)]
stream-restore: At startup, create dbus entries only for valid database entries.

14 years agostream-restore: Add a missing pa_xnew0() call in handle_add_entry().
Tanu Kaskinen [Thu, 3 Dec 2009 13:32:23 +0000 (15:32 +0200)]
stream-restore: Add a missing pa_xnew0() call in handle_add_entry().

14 years agostream-restore: Fix a few assertion misuses with the D-Bus code.
Tanu Kaskinen [Thu, 3 Dec 2009 13:31:11 +0000 (15:31 +0200)]
stream-restore: Fix a few assertion misuses with the D-Bus code.

14 years agodbus: Add a missing break statement in handle_message_cb().
Tanu Kaskinen [Thu, 3 Dec 2009 13:30:01 +0000 (15:30 +0200)]
dbus: Add a missing break statement in handle_message_cb().

14 years agodbus: Handle the cases when a non-existing interface is detected in an incoming message.
Tanu Kaskinen [Thu, 3 Dec 2009 13:28:36 +0000 (15:28 +0200)]
dbus: Handle the cases when a non-existing interface is detected in an incoming message.

14 years agolibpulse: Store pa_stream pointers to hashmaps instead of dynarrays.
Tanu Kaskinen [Thu, 3 Dec 2009 11:22:05 +0000 (13:22 +0200)]
libpulse: Store pa_stream pointers to hashmaps instead of dynarrays.

Since the stream identifiers (channels) are monotonically growing integer, it
isn't a good idea to use them as index to a dynamic array, because the array
will grow all the time. This is not a problem with client connections that
don't create many streams, but, for example, long-running clients that use
libcanberra for playing event sounds, this means that the client connection
effectively leaks memory.

14 years agoMerge remote branch 'tanuk/master'
Colin Guthrie [Mon, 30 Nov 2009 14:55:57 +0000 (14:55 +0000)]
Merge remote branch 'tanuk/master'

14 years agoMerge branch 'master' of ssh://rootserver/home/lennart/git/public/pulseaudio
Lennart Poettering [Mon, 23 Nov 2009 04:45:33 +0000 (05:45 +0100)]
Merge branch 'master' of ssh://rootserver/home/lennart/git/public/pulseaudio

14 years agoMerge remote branch 'phish3/master'
Lennart Poettering [Mon, 23 Nov 2009 03:48:31 +0000 (04:48 +0100)]
Merge remote branch 'phish3/master'

14 years agoMerge branch 'master' of ssh://rootserver/home/lennart/git/public/pulseaudio
Lennart Poettering [Sun, 22 Nov 2009 20:40:15 +0000 (21:40 +0100)]
Merge branch 'master' of ssh://rootserver/home/lennart/git/public/pulseaudio

14 years agofreebsd: implement pa_get_binary_name
Joe Marcus Clarke [Sat, 21 Nov 2009 00:13:35 +0000 (01:13 +0100)]
freebsd: implement pa_get_binary_name

Stolen from
http://www.freebsd.org/cgi/cvsweb.cgi/ports/audio/pulseaudio/files/patch-src_pulse_util.c?rev=1.1
and fixed for indentation.

14 years agosrc/utils/qpaeq: added more friendly error messages to common errors
Jason Newton [Fri, 20 Nov 2009 23:18:59 +0000 (15:18 -0800)]
src/utils/qpaeq: added more friendly error messages to common errors

14 years agoMakefile.am: added qpaeq to installed scripts
Jason Newton [Fri, 20 Nov 2009 23:34:02 +0000 (15:34 -0800)]
Makefile.am: added qpaeq to installed scripts

14 years agoSimplify Makefile.am handling of ALSA-related files.
Diego Elio 'Flameeyes' Pettenò [Fri, 20 Nov 2009 23:53:00 +0000 (00:53 +0100)]
Simplify Makefile.am handling of ALSA-related files.

Instead of declaring extra variables for the ALSA profiles and PATHS, and
using EXTRA_DIST for the udev rule, use the dist_ prefix when declaring
them for conditional installation.

This relies on the fact that automake *is* smart enough to know that there
exist *no* conditional dist, and will always distribute all of them.

14 years agoAvoid using devname as a variable name.
Diego Elio 'Flameeyes' Pettenò [Fri, 20 Nov 2009 23:47:44 +0000 (00:47 +0100)]
Avoid using devname as a variable name.

On FreeBSD, devname() is a system function, and was overshadowed.

14 years agoRename all the signal parameters and variables to something more explicit.
Diego Elio 'Flameeyes' Pettenò [Fri, 20 Nov 2009 23:30:46 +0000 (00:30 +0100)]
Rename all the signal parameters and variables to something more explicit.

Without this change, on FreeBSD you'll be bothered by tons of warnings
about overshadowing signal(2).

14 years agoSince now we have FreeBSD atomic operations, don't require libatomic_ops.
Diego Elio 'Flameeyes' Pettenò [Fri, 20 Nov 2009 23:27:35 +0000 (00:27 +0100)]
Since now we have FreeBSD atomic operations, don't require libatomic_ops.

This lets the original configure script to pass on FreeBSD.

14 years agoSimplify handling of NetBSD atomic ops discovery.
Diego Elio 'Flameeyes' Pettenò [Fri, 20 Nov 2009 23:17:33 +0000 (00:17 +0100)]
Simplify handling of NetBSD atomic ops discovery.

Instead of having a parameter to enable/disable them (which was also
ignored by the source code side), simply identify NetBSD 5 (when the atomic
ops were implemented the first time) in a $host switch and ignore checking
for libatomic_ops.

14 years agoMerge branch 'master' of git://git.0pointer.de/pulseaudio
Diego Elio 'Flameeyes' Pettenò [Fri, 20 Nov 2009 23:10:37 +0000 (00:10 +0100)]
Merge branch 'master' of git://git.0pointer.de/pulseaudio

14 years agoremove .py extension from qpaeq
Jason Newton [Fri, 20 Nov 2009 23:07:47 +0000 (15:07 -0800)]
remove .py extension from qpaeq

14 years agoMerge remote branch 'phish3/master'
Lennart Poettering [Fri, 20 Nov 2009 23:05:02 +0000 (00:05 +0100)]
Merge remote branch 'phish3/master'

14 years agofreebsd: fix atomic ops implementations
Joe Marcus Clarke [Fri, 20 Nov 2009 23:02:33 +0000 (00:02 +0100)]
freebsd: fix atomic ops implementations

Stole from

http://www.freebsd.org/cgi/cvsweb.cgi/ports/audio/pulseaudio/files/patch-src_pulsecore_atomic.h?rev=1.6

14 years agoadded qpaeq script for GUI equalizer control to src/util
Jason Newton [Fri, 20 Nov 2009 22:56:07 +0000 (14:56 -0800)]
added qpaeq script for GUI equalizer control to src/util

14 years agoCheck for stow using AC_CHECK_PROG rather than type -p.
Diego Elio 'Flameeyes' Pettenò [Fri, 20 Nov 2009 20:37:16 +0000 (21:37 +0100)]
Check for stow using AC_CHECK_PROG rather than type -p.

The type -p check is not compatible with POSIX shells, and indeed fails
when used with the FreeBSD 8 default shell. Instead the AC_CHECK_PROG macro
is written properly to look for the command.

14 years agoInclude sys/filio.h if present; this makes use of FIONREAD on Solaris.
Diego Elio 'Flameeyes' Pettenò [Fri, 20 Nov 2009 20:25:33 +0000 (21:25 +0100)]
Include sys/filio.h if present; this makes use of FIONREAD on Solaris.

FIONREAD on OpenSolaris is declared in sys/filio.h. The RTP modules already
rely on the presence of FIONREAD, and check for the header, so this brings
the pipe source and sink modules on par with them.

14 years agoDon't declare the variable l if FIONREAD is not defined.
Diego Elio 'Flameeyes' Pettenò [Fri, 20 Nov 2009 20:24:46 +0000 (21:24 +0100)]
Don't declare the variable l if FIONREAD is not defined.

This avoids two warnings due to FIONREAD not being defined.

14 years agoFix build on Solaris: pass the third parameter to pa_cloexec_open.
Diego Elio 'Flameeyes' Pettenò [Fri, 20 Nov 2009 20:22:24 +0000 (21:22 +0100)]
Fix build on Solaris: pass the third parameter to pa_cloexec_open.

14 years agoMove the platform-specific defines after the compiler has been found.
Diego Elio 'Flameeyes' Pettenò [Fri, 20 Nov 2009 20:08:05 +0000 (21:08 +0100)]
Move the platform-specific defines after the compiler has been found.

Without this change, on OpenSolaris, it's possible that the compiler will
be reported, by default, as failing to produce executables, since
_XOPEN_SOURCE=600 requires a C99 compiler to compile even the simples of
the programs.

14 years agoalsa: fix minor sampling rate deviations before adjusting the buffer size
Lennart Poettering [Fri, 20 Nov 2009 19:27:03 +0000 (20:27 +0100)]
alsa: fix minor sampling rate deviations before adjusting the buffer size

14 years agoalsa: fix log output when the audio device refuses to give us again the same period...
Lennart Poettering [Fri, 20 Nov 2009 19:00:26 +0000 (20:00 +0100)]
alsa: fix log output when the audio device refuses to give us again the same period settings we had before

14 years agopulse: ask for timing updates both *before* and *after* triggering a stream state...
Lennart Poettering [Fri, 20 Nov 2009 18:55:47 +0000 (19:55 +0100)]
pulse: ask for timing updates both *before* and *after* triggering a stream state change so that in the STARTED/UNDERFLOW callbacks we accurate transport latency information

14 years agopulse: delay smoother update only when unpausing, not when pausing, since we don...
Lennart Poettering [Fri, 20 Nov 2009 18:48:08 +0000 (19:48 +0100)]
pulse: delay smoother update only when unpausing, not when pausing, since we don't want the timer to advance when we are supposedly already paused

14 years agopulse: try to fix inaccuracy with uncork timing for streams that are created in corke...
Lennart Poettering [Fri, 20 Nov 2009 16:49:30 +0000 (17:49 +0100)]
pulse: try to fix inaccuracy with uncork timing for streams that are created in corked state

14 years agodaemon: complain if user passes too many arguments
Lennart Poettering [Fri, 20 Nov 2009 16:48:04 +0000 (17:48 +0100)]
daemon: complain if user passes too many arguments

14 years agomodule-equalizer-sink: add latency of output_q and input_q to get latency calculation
Jason Newton [Thu, 12 Nov 2009 06:52:52 +0000 (22:52 -0800)]
module-equalizer-sink: add latency of output_q and input_q to get latency calculation

14 years agomodule-equalizer-sink: switch back to reference dsp implementation - cpu usage doesn...
Jason Newton [Thu, 12 Nov 2009 07:16:14 +0000 (23:16 -0800)]
module-equalizer-sink: switch back to reference dsp implementation - cpu usage doesn't really change and there may be
a bug in the vectorized version

14 years agomodule-equalizer-sink: (re)added output memblockq commented out timing debug statements
Jason Newton [Fri, 30 Oct 2009 01:44:04 +0000 (18:44 -0700)]
module-equalizer-sink: (re)added output memblockq commented out timing debug statements

14 years agoMerge branch 'master' of ssh://rootserver/home/lennart/git/public/pulseaudio
Lennart Poettering [Fri, 20 Nov 2009 00:02:01 +0000 (01:02 +0100)]
Merge branch 'master' of ssh://rootserver/home/lennart/git/public/pulseaudio

14 years agorygel: fix itemCount property for sources
Lennart Poettering [Wed, 18 Nov 2009 20:41:38 +0000 (21:41 +0100)]
rygel: fix itemCount property for sources

Fixes http://pulseaudio.org/ticket/721

14 years agobuild-sys: Fix missing trailing slash in 14eaf2
Colin Guthrie [Mon, 16 Nov 2009 23:36:44 +0000 (23:36 +0000)]
build-sys: Fix missing trailing slash in 14eaf2

14 years agobuild-sys: Make sure all alsa path config files are installed
Sjoerd Simons [Sat, 14 Nov 2009 22:23:10 +0000 (22:23 +0000)]
build-sys: Make sure all alsa path config files are installed

While all alsa path configuration files were in EXTRA_DIST not all of them were
in in alsapaths_DATA. Fixed by only defining the list in one place

14 years agodevice-manager: Update docs version -> 0.9.20
Colin Guthrie [Wed, 11 Nov 2009 17:24:57 +0000 (17:24 +0000)]
device-manager: Update docs version -> 0.9.20

Third time is a charm... maybe.

14 years agocore: make cpuid code compile cleanly with 32bit PIC
Lennart Poettering [Wed, 11 Nov 2009 03:50:32 +0000 (04:50 +0100)]
core: make cpuid code compile cleanly with 32bit PIC

14 years agocore: adjust volume only when there is actually a memory block
Lennart Poettering [Wed, 11 Nov 2009 03:18:10 +0000 (04:18 +0100)]
core: adjust volume only when there is actually a memory block

Fixes an assert that is hit in somne niche cases:

https://bugzilla.redhat.com/show_bug.cgi?id=533482

14 years agoprotocol: use the right sample rate for sources
Wim Taymans [Tue, 10 Nov 2009 12:21:55 +0000 (13:21 +0100)]
protocol: use the right sample rate for sources

Use the correct sample rate for reporting about the timing.

14 years agodevice-manager: Update docs version -> 0.9.20
Colin Guthrie [Mon, 9 Nov 2009 21:56:33 +0000 (21:56 +0000)]
device-manager: Update docs version -> 0.9.20

15 years agoramping: minor cleanups
Lennart Poettering [Thu, 5 Nov 2009 21:55:14 +0000 (22:55 +0100)]
ramping: minor cleanups

15 years agoMerge remote branch 'origin/merge-queue'
Lennart Poettering [Thu, 5 Nov 2009 21:54:42 +0000 (22:54 +0100)]
Merge remote branch 'origin/merge-queue'

Conflicts:
src/pulsecore/sink-input.c
src/pulsecore/sink.c

15 years agojack: never try to autoconnect to MIDI ports
Lennart Poettering [Thu, 5 Nov 2009 04:18:10 +0000 (05:18 +0100)]
jack: never try to autoconnect to MIDI ports

Original patch supplied by 'adi'

http://pulseaudio.org/ticket/669

15 years agoman: fix build with --disable-manpages
Lennart Poettering [Thu, 5 Nov 2009 04:08:50 +0000 (05:08 +0100)]
man: fix build with --disable-manpages

http://pulseaudio.org/ticket/698

15 years agolirc,mmkvd: added module parameters volume_limit, volume_step
Vladimir Kokarev [Thu, 5 Nov 2009 03:55:21 +0000 (04:55 +0100)]
lirc,mmkvd: added module parameters volume_limit, volume_step

volume_limit sets maximum volume that can be set from the module
default is PA_VOLUME_NORM*3/2 (150%)
volume_step sets step in volume changing
default is PA_VOLUME_NORM/20
values are of raw pa_volume_t type

15 years agovolume: add pa_cvolume_inc_clamp function
Vladimir Kokarev [Sat, 19 Sep 2009 15:43:24 +0000 (19:43 +0400)]
volume: add pa_cvolume_inc_clamp function

added function to increase volume not exceeding specified limit
simply changed PA_VOLUME_MAX to 'limit' in pa_cvolume_inc
pa_cvolume_inc now calls pa_cvolume_inc_clamp with PA_VOLUME_MAX limit

15 years agoalsa: disable timer-based scheduling inside a VM
Lennart Poettering [Thu, 5 Nov 2009 02:23:08 +0000 (03:23 +0100)]
alsa: disable timer-based scheduling inside a VM

In virtual machines sound card clocks and OS scheduling tend to become
unreliable, adding various 'uneven' latencies. The adaptive algorithm
that handles drop-outs does not handle it this well: in contrast to
drop-outs on real machines that are evenly distributed, small and can
easily be encountered via the adpative algorithms, drop-outs in VMs tend
to happen abruptly, and massively, which is not easy to counter.

This patch simply disables timer based scheduling in VMs reverting to
classic IO based scheduling. This should help make PA perform better in
VMs.

https://bugzilla.redhat.com/show_bug.cgi?id=532775

15 years agodaemon: during startup say whether we run in a VM
Lennart Poettering [Thu, 5 Nov 2009 02:22:48 +0000 (03:22 +0100)]
daemon: during startup say whether we run in a VM

15 years agocore-util: add call to detect if we are called from within a VM
Lennart Poettering [Thu, 5 Nov 2009 02:22:15 +0000 (03:22 +0100)]
core-util: add call to detect if we are called from within a VM

15 years agoalsa: introduce more standard path names
Lennart Poettering [Thu, 5 Nov 2009 02:21:10 +0000 (03:21 +0100)]
alsa: introduce more standard path names

15 years agoalsa: cover 'Analog Output' control
Lennart Poettering [Tue, 3 Nov 2009 23:15:47 +0000 (00:15 +0100)]
alsa: cover 'Analog Output' control

http://pulseaudio.org/ticket/702

15 years agoMerge remote branch 'phish3/master'
Lennart Poettering [Sat, 31 Oct 2009 02:49:02 +0000 (03:49 +0100)]
Merge remote branch 'phish3/master'

15 years agoalsa: create a seperate mixer path for Speaker elements
Lennart Poettering [Sat, 31 Oct 2009 02:43:42 +0000 (03:43 +0100)]
alsa: create a seperate mixer path for Speaker elements

On some cards line-out is independant of Sepaker and it is a good idea
to cover that so that they can independantly be activated.

https://bugzilla.redhat.com/show_bug.cgi?id=520884

15 years agoalsa: leave other headphone control enabled if possible
Lennart Poettering [Sat, 31 Oct 2009 02:42:42 +0000 (03:42 +0100)]
alsa: leave other headphone control enabled if possible

15 years agoalsa: lower priority for Headphone2 path
Lennart Poettering [Sat, 31 Oct 2009 02:41:21 +0000 (03:41 +0100)]
alsa: lower priority for Headphone2 path

15 years agoalsa: cover Input Source:AUX IN
Lennart Poettering [Sat, 31 Oct 2009 02:25:32 +0000 (03:25 +0100)]
alsa: cover Input Source:AUX IN

As seen on some HDA chips:

https://bugzilla.redhat.com/attachment.cgi?id=359804

15 years agoalsa: cover Headphone2 mixer element
Lennart Poettering [Sat, 31 Oct 2009 02:10:00 +0000 (03:10 +0100)]
alsa: cover Headphone2 mixer element

As seen on some drivers:

https://bugzilla.redhat.com/show_bug.cgi?id=498612

15 years agoalsa: cover 'Digital Input Source' element
Lennart Poettering [Sat, 31 Oct 2009 01:56:57 +0000 (02:56 +0100)]
alsa: cover 'Digital Input Source' element

As used by some HDA devices:

https://bugzilla.redhat.com/attachment.cgi?id=365290

15 years agoalsa: cover Mic Jack Mode element
Lennart Poettering [Sat, 31 Oct 2009 01:49:44 +0000 (02:49 +0100)]
alsa: cover Mic Jack Mode element

As used by some HDA chips:

https://bugzilla.redhat.com/attachment.cgi?id=366816

15 years agodaemon: make sure pa has its own session and process group, but is not its leader...
Lennart Poettering [Sat, 31 Oct 2009 01:43:47 +0000 (02:43 +0100)]
daemon: make sure pa has its own session and process group, but is not its leader so that we cannot acquire a tty ever

15 years agobluetooth: do not hand out access to devices that are not fully configured yet
Lennart Poettering [Sat, 31 Oct 2009 01:05:54 +0000 (02:05 +0100)]
bluetooth: do not hand out access to devices that are not fully configured yet

15 years agoconfigure.ac: enable check for CoreAudio
Daniel Mack [Sat, 31 Oct 2009 00:58:26 +0000 (01:58 +0100)]
configure.ac: enable check for CoreAudio

15 years agodaemon: realpath segfault fix
David Yoder [Fri, 30 Oct 2009 14:54:08 +0000 (09:54 -0500)]
daemon: realpath segfault fix

Lennart,

Apparently I was debugging this at the same time as you. I can't figure out
why my Fedora 11 install with glibc-2.10 has a glibc realpath that doesn't
match the gnu documentation and returns null. But it does.

Your commit aa8ce5bb9b159abb2ffb0f43996340566fc2e9c6 almost fixed my
problem, but it needs a tweak.

Thanks,
David Yoder

15 years agoMac OS X: add semaphore implementation
Daniel Mack [Mon, 19 Oct 2009 10:48:00 +0000 (12:48 +0200)]
Mac OS X: add semaphore implementation

On Wed, Sep 16, 2009 at 11:57:04PM +0200, Lennart Poettering wrote:
> On Wed, 16.09.09 15:15, Daniel Mack (daniel@caiaq.de) wrote:
>
> > +    s = pa_xnew(pa_semaphore, 1);
> > +    MPCreateSemaphore(UINT_MAX, value, &(s->sema));
> > +    pa_assert(s->sema != 0);
>
> Hmm, I'd prefer if the ret val of MPCreateSemaphore() would be checked
> here.
>
> Also I find it a bit weird checking for s->sema, though not
> initializing it to 0 in the beginning. If the call actually failed,
> then the assert will check uninitialized memory. Also, comparing
> pointers with 0 sucks. That should be NULL.
>
> Given that this can not realisitically fail, only in OOM or OOM-like
> situations in which case we abort anyway it mght be enough just writing:
>
> pa_assert_se(MPCreateSemaphore(UINT_MAX, value, &s->sema) == 0);
>
> (Assuming that success is signalled by retval == 0 on MacOSX)
>
> > +void pa_semaphore_free(pa_semaphore *s) {
> > +    pa_assert(s);
> > +    MPDeleteSemaphore(s->sema);
>
> Same here.
>
> > +    pa_xfree(s);
> > +}
> > +
> > +void pa_semaphore_post(pa_semaphore *s) {
> > +    pa_assert(s);
> > +    MPSignalSemaphore(s->sema);
>
> And here.
>
> > +}
> > +
> > +void pa_semaphore_wait(pa_semaphore *s) {
> > +    pa_assert(s);
> > +    /* should probably check return value (-ve is error), noErr is ok. */
> > +    MPWaitOnSemaphore(s->sema, kDurationForever);
>
> And here.

Ok, done. See the patch below.

Daniel

>From 26df2fbae6d9215a3ae084876fb5f79e4d9cf4f0 Mon Sep 17 00:00:00 2001
From: Kim Lester <kim@dfusion.com.au>
Date: Wed, 16 Sep 2009 09:23:39 +0800
Subject: [PATCH] Mac OS X: add semaphore implementation

15 years agoWrap clock_gettime and friends
Daniel Mack [Mon, 19 Oct 2009 10:45:30 +0000 (12:45 +0200)]
Wrap clock_gettime and friends

On Wed, Sep 16, 2009 at 11:48:58PM +0200, Lennart Poettering wrote:
> On Wed, 16.09.09 15:15, Daniel Mack (daniel@caiaq.de) wrote:
>
> > From: Kim Lester <kim@dfusion.com.au>
> >
> > OS X does not define clockid_t or clock_gettime() and friends.
> > Add a wrapper to fix this.
>
> Hmpf. I am not particularly happy with this. This adds a lot of
> unnecessary compat code. We don't actually need implementations of
> clock_getres(). All we need is some kind of check whether system
> timers are accurate or whether they are rounded up to scheduling
> slices. On Linux we do that check with clock_getres(), but all the
> information it returns is actually not intertesting at all. We just
> check if this is below some trheshold, that's all.
>
> clock_settime() we don't use at all! We shouldn't carry compat code
> for that.
>
> And clock_gettime we don't really need either. We need some kind of
> accurate system timers (preferably monotonic), and on Linux we use
> clock_gettime() for that. But we already have a fallback there for
> gettimeofday().
>
> Or in other words, the current APIs pa_rtclock_get(),
> pa_rtclock_hrtimer() is supposed to be the abstract API that has
> different backends on different systems. I'd very much prefer if any
> MacOS specific code would simply be plugged in there instead of
> creating various new abstraction interfaces!

Ok - what about the version below? I don't particularily like the

Daniel

>From 9f0a051953ec354ccdb8aa44a9845c408b26ae0b Mon Sep 17 00:00:00 2001
From: Kim Lester <kim@dfusion.com.au>
Date: Wed, 16 Sep 2009 14:40:01 +0800
Subject: [PATCH] Implement pa_rtclock_get() and pa_rtclock_hrtimer() for Darwin

OS X does not define clockid_t or clock_gettime() and friends.
Add wrappers to fix this. Based on a patch from Kim Lester
<kim@dfusion.com.au>.

15 years agoX11: attach X11 properties to Screen, not Display
Leszek Koltunski [Tue, 27 Oct 2009 11:57:43 +0000 (19:57 +0800)]
X11: attach X11 properties to Screen, not Display

15 years agogit: ignore kde related files
Lennart Poettering [Fri, 30 Oct 2009 04:20:00 +0000 (05:20 +0100)]
git: ignore kde related files

15 years agosvolume: fix MMX error
Wim Taymans [Thu, 29 Oct 2009 13:49:52 +0000 (14:49 +0100)]
svolume: fix MMX error

We need to sign extend the lower part of the multiplication before adding it to
the higher part. Makes -1 * 0xffff work again.

15 years agosink: simplify silence checks
Wim Taymans [Thu, 29 Oct 2009 11:47:42 +0000 (12:47 +0100)]
sink: simplify silence checks

15 years agodaemon: don't crash if pa_realpath() fails
Lennart Poettering [Fri, 30 Oct 2009 04:08:48 +0000 (05:08 +0100)]
daemon: don't crash if pa_realpath() fails

15 years agosocket-util: drop redundant casts
Lennart Poettering [Fri, 30 Oct 2009 03:55:13 +0000 (04:55 +0100)]
socket-util: drop redundant casts

15 years agosocket-util: allocate at least sizeof(sockaddr_storage) space
Lennart Poettering [Fri, 30 Oct 2009 03:54:55 +0000 (04:54 +0100)]
socket-util: allocate at least sizeof(sockaddr_storage) space

15 years agouse pa_fopen_cloexec() where applicable
Lennart Poettering [Fri, 30 Oct 2009 03:54:19 +0000 (04:54 +0100)]
use pa_fopen_cloexec() where applicable

15 years agotdb: use O_CLOEXEC if available
Lennart Poettering [Fri, 30 Oct 2009 03:53:15 +0000 (04:53 +0100)]
tdb: use O_CLOEXEC if available

15 years agocore-util: introduce pa_fopen_cloexec()
Lennart Poettering [Fri, 30 Oct 2009 03:20:24 +0000 (04:20 +0100)]
core-util: introduce pa_fopen_cloexec()

15 years agocore-util: make sure to enable FD_CLOEXEC unconditionally to cope with kernels that...
Lennart Poettering [Fri, 30 Oct 2009 03:16:59 +0000 (04:16 +0100)]
core-util: make sure to enable FD_CLOEXEC unconditionally to cope with kernels that silently accept but ignore O_CLOEXEC

15 years agouse cloexec wrappers wherever applicable
Lennart Poettering [Fri, 30 Oct 2009 02:32:38 +0000 (03:32 +0100)]
use cloexec wrappers wherever applicable

15 years agocore-util: introduce FD_CLOEXEC wrappers for open/socket/pipe/accept
Lennart Poettering [Fri, 30 Oct 2009 02:30:42 +0000 (03:30 +0100)]
core-util: introduce FD_CLOEXEC wrappers for open/socket/pipe/accept

15 years agomodule-equalizer-sink:
Jason Newton [Fri, 30 Oct 2009 02:10:16 +0000 (19:10 -0700)]
module-equalizer-sink:
    add premultipliar to sse2 dsp_logic implementation

15 years agomodule-equalizer-sink: try to limit buffering to mempool's max_block_size and disable...
Jason Newton [Mon, 26 Oct 2009 21:55:11 +0000 (14:55 -0700)]
module-equalizer-sink: try to limit buffering to mempool's max_block_size and disable debug output

15 years agodrop redundant alloc call
Jason Newton [Sat, 24 Oct 2009 00:06:30 +0000 (17:06 -0700)]
drop redundant alloc call

15 years agoMerge remote branch 'origin/master'
Lennart Poettering [Thu, 29 Oct 2009 00:54:45 +0000 (01:54 +0100)]
Merge remote branch 'origin/master'

15 years agosimd: update test cases
Lennart Poettering [Thu, 29 Oct 2009 00:52:39 +0000 (01:52 +0100)]
simd: update test cases

15 years agosmoother: add comments about optimization recommendations from Jason Newton
Lennart Poettering [Thu, 29 Oct 2009 00:49:40 +0000 (01:49 +0100)]
smoother: add comments about optimization recommendations from Jason Newton

15 years agolibpulse: introduce PA_STREAM_RELATIVE_VOLUME
Lennart Poettering [Wed, 28 Oct 2009 23:46:22 +0000 (00:46 +0100)]
libpulse: introduce PA_STREAM_RELATIVE_VOLUME