Tanu Kaskinen [Thu, 20 Jun 2013 14:24:26 +0000 (17:24 +0300)]
log: Remove pa_log_set_fd()
The function isn't used any more.
João Paulo Rechi Vita [Fri, 12 Jul 2013 17:51:25 +0000 (14:51 -0300)]
build-sys: Fix misuse of "dependant"
Dependant in British English is a person who is financially supported by
someone else. To express software dependency relations "dependent"
should be used instead, which is correct for both British and US
English.
João Paulo Rechi Vita [Fri, 12 Jul 2013 17:51:24 +0000 (14:51 -0300)]
bluetooth: Fix coding style
João Paulo Rechi Vita [Fri, 12 Jul 2013 17:51:23 +0000 (14:51 -0300)]
bluetooth: Remove unused DBusError
João Paulo Rechi Vita [Fri, 12 Jul 2013 17:51:22 +0000 (14:51 -0300)]
module: Fix style
Tanu Kaskinen [Sun, 14 Jul 2013 10:39:32 +0000 (13:39 +0300)]
tunnel: Fix reading state from wrong variable
u->sink->state is not yet updated, so the state must be read from
u->sink->thread_info.state. This makes pausing and resuming of the
smoother happen at the right time.
Thanks to Pierre Ossman for the patch.
Tanu Kaskinen [Sun, 14 Jul 2013 10:26:24 +0000 (13:26 +0300)]
caps: Fix compilation on Windows
Thanks to Pierre Ossman for the patch.
Pierre Ossman [Wed, 10 Jul 2013 14:26:17 +0000 (16:26 +0200)]
alsa: Support ALSA without a use case manager
The ALSA use case manager is a fairly recent addition,
so make sure the ALSA modules can be used on systems that
have an older version of ALSA.
Tanu Kaskinen [Thu, 11 Jul 2013 11:14:29 +0000 (14:14 +0300)]
log: Fix thread name printing
Not all threads have a name.
Thanks to Pierre Ossman for the patch.
Tanu Kaskinen [Thu, 11 Jul 2013 10:35:24 +0000 (13:35 +0300)]
module: Fix crash in pa_module_unload_all()
Previously, if there were no modules loaded when the daemon exited,
pa_module_unload_all() would crash due to giving zero count to
pa_xnew().
Thanks to Pierre Ossman for the patch.
Tanu Kaskinen [Wed, 10 Jul 2013 18:24:04 +0000 (21:24 +0300)]
Revert "resampler: Resample first followed by remapping if have more out channels than in channels"
This reverts commit
30ce3a14e5ae1cd316a18bec95b831c07ac57a1a.
The commit broke the leftover buffer handling, see [1] for more
information.
[1] http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/17479/focus=17487
Tanu Kaskinen [Wed, 3 Apr 2013 15:28:32 +0000 (18:28 +0300)]
sink-input: Keep reference ratio up-to-date
The reference ratio should always be kept up-to-date. If the reference
ratio is not updated when the input volume changes, the stale
reference ratio ends up being used as the new input volume when the
input is moved.
Tanu Kaskinen [Wed, 3 Apr 2013 13:36:43 +0000 (16:36 +0300)]
Use pa_(c)volume_snprint_verbose() everywhere
All pa_cvolume_snprint(), pa_volume_snprint(),
pa_sw_cvolume_snprint_dB() and pa_sw_volume_snprint_dB() calls have
been replaced with pa_cvolume_snprint_verbose() and
pa_volume_snprint_verbose() calls, making the log output more
informative and the code sometimes simpler.
Tanu Kaskinen [Wed, 3 Apr 2013 13:36:42 +0000 (16:36 +0300)]
pulse: Add verbose volume printing functions
For more informative logging.
Mikel Astiz [Mon, 1 Jul 2013 08:27:21 +0000 (10:27 +0200)]
loopback: Fix cork state not updated after move
The source output and sink inputs should be corked if the corresponding
sink/source is suspended, as handled during module initialization. This
also needs to be handled during stream move, because the suspend state
of the destination sink/source might be different to the previous one.
This fixes the issue with an infinite number of "Requesting rewind due
to end of underrun" traces after a stream move.
Peter Meerwald [Tue, 2 Jul 2013 12:06:04 +0000 (14:06 +0200)]
sconv: avoid multiply in ARM NEON s16->float conversion
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Peter Meerwald [Tue, 2 Jul 2013 09:43:35 +0000 (11:43 +0200)]
sconv: avoid multiply in ARM NEON float->s16 conversion
optimization idea taken from libavresample
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Tanu Kaskinen [Thu, 4 Jul 2013 09:20:15 +0000 (12:20 +0300)]
channelmap, volume: Don't refer to bool in the public API documentation
Tanu Kaskinen [Thu, 4 Jul 2013 09:33:47 +0000 (12:33 +0300)]
mainloop-test: Use FALSE instead of false for gboolean
poljar (Damir Jelić) [Fri, 28 Jun 2013 10:55:27 +0000 (12:55 +0200)]
macro: Remove unneeded typedef for pa_bool_t.
poljar (Damir Jelić) [Thu, 27 Jun 2013 23:09:24 +0000 (01:09 +0200)]
Revert windows BOOL variables to use TRUE/FALSE instead of true/false
poljar (Damir Jelić) [Thu, 27 Jun 2013 23:08:31 +0000 (01:08 +0200)]
Revert dbus_bool_t variables to use TRUE/FALSE instead of true/false
poljar (Damir Jelić) [Thu, 27 Jun 2013 23:03:47 +0000 (01:03 +0200)]
Fix alignment issues introduced by the pa_bool -> bool conversion
poljar (Damir Jelić) [Thu, 27 Jun 2013 17:28:09 +0000 (19:28 +0200)]
Remove pa_bool_t and replace it with bool.
commands used for this (executed from the pulseaudio/src directory):
find . -regex '\(.*\.[hc]\|.*\.cc\|.*\.m4\)' -not -name 'macro.h' \
-a -not -name 'reserve.[ch]' -a -not -name 'reserve-monitor.[ch]' \
-a -not -name 'glib-mainloop.c' -a -not -name 'gkt-test.c' \
-a -not -name 'glib-mainloop.c' -a -not -name 'gkt-test.c' \
-a -not -name 'poll-win32.c' -a -not -name 'thread-win32.c' \
-a -not -name 'dllmain.c' -a -not -name 'gconf-helper.c' \
-exec sed -i -e 's/\bpa_bool_t\b/bool/g' \
-e 's/\bTRUE\b/true/g' -e 's/\bFALSE\b/false/g' {} \;
and:
sed -i -e '181,194!s/\bpa_bool_t\b/bool/' \
-e '181,194!s/\bTRUE\b/true/' -e \
'181,194!s/\bFALSE\b/false/' pulsecore/macro.h
Tanu Kaskinen [Wed, 3 Jul 2013 12:20:28 +0000 (15:20 +0300)]
build-sys: Add native-instruments-traktor-audio2.conf to Makefile.am
Thanks to Jan Steffens for reporting the issue.
Tanu Kaskinen [Tue, 2 Jul 2013 14:46:11 +0000 (17:46 +0300)]
device-manager: Refuse to load empty descriptions
David Henningsson [Fri, 28 Jun 2013 14:16:22 +0000 (16:16 +0200)]
Revert "alsa-mixer: Add a couple of assertions"
This reverts commit
2613e4c74733e67d56af165df4637bf902b08508.
Please don't replace correct NULL pointer checks with assertions.
Tanu Kaskinen [Tue, 4 Jun 2013 17:42:48 +0000 (20:42 +0300)]
device-manager: Add a sanity check for reading entries
There is code elsewhere that assumes that if user_set_description is
true, then the description is non-NULL.
Tanu Kaskinen [Fri, 31 May 2013 19:27:19 +0000 (22:27 +0300)]
waveout: Simplify setting the device description
Tanu Kaskinen [Thu, 27 Jun 2013 15:47:12 +0000 (18:47 +0300)]
alsa-mixer: Add a couple of assertions
I checked the code to ensure that the assertions hold currently.
Tanu Kaskinen [Wed, 26 Jun 2013 13:13:47 +0000 (16:13 +0300)]
dynarray: Reimplement with nicer semantics
A dynamic array is a nice simple container, but the old interface
wasn't quite what I wanted it to be. I like GLib's way of providing
the free callback at the container creation time, because that way
the free callback doesn't have to be given every time something is
removed from the array.
The allocation pattern was changed too: instead of increasing the
array size always by 25 when the array gets full, the size gets
doubled now (the lowest non-zero size is still 25).
The array can't store NULL pointers anymore, and pa_dynarray_get() was
changed so that it's forbidden to try to access elements outside the
valid range.
The set of supported operations may seem a bit arbitrary. The
operation set is by no means complete at this point. I have included
only those operations that are required by the current code and some
unpublished code of mine.
Tanu Kaskinen [Wed, 26 Jun 2013 18:21:00 +0000 (21:21 +0300)]
source: Fix an indentation mistake
Tanu Kaskinen [Wed, 19 Jun 2013 15:40:17 +0000 (18:40 +0300)]
object: Initialize allocated memory to zero
This is safer and more convenient for subclasses.
Tanu Kaskinen [Wed, 19 Jun 2013 15:39:58 +0000 (18:39 +0300)]
device-port: Assert that ports have a description
It's easier to work with the port description if it can be assumed
that it's always non-NULL. I have checked that the current code base
always ensures a non-NULL description.
David Henningsson [Mon, 24 Jun 2013 15:29:26 +0000 (17:29 +0200)]
protocol-esound/http/simple: Make sure callers can handle iochannel_write changes
With the new behaviour, you will not always get a callback after a
successful write. Make sure the callers can properly handle this.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
poljar (Damir Jelić) [Tue, 18 Jun 2013 20:17:48 +0000 (22:17 +0200)]
Whitespace cleanup: Remove all multiple newlines
This patch removes all occurrences of double and triple
newlines.
Command used for this:
find . -type d \( -name ffmpeg \) -prune -o \
-regex '\(.*\.[hc]\|.*\.cc\)' \
-a -not -name 'adrian-aec.*' -a -not \
-name reserve.c -a -not -name 'rtkit.*' \
-exec sed -i -e '/^$/{N;s/^\n$//}' {} \;
Two passes were needed to remove triple newlines.
The excluded files are mirrored files from external sources.
poljar (Damir Jelić) [Tue, 18 Jun 2013 20:24:24 +0000 (22:24 +0200)]
Style fix: Remove new lines from opening brackets
This patch replaces every occurrence of ')\n{' with ') {'.
Command used for this:
find . -type d \( -name ffmpeg \) -prune -o \
-regex '\(.*\.[hc]\|.*\.cc\)' \
-a -not -name core-util.c -a -not \
-name adrian-aec.c -a -not -name g711.c \
-exec sed -i -e '/)$/{N;s/)\n{$/) {/}' {} \;
The excluded files are mirrored files from external sources.
poljar (Damir Jelić) [Tue, 18 Jun 2013 14:45:30 +0000 (16:45 +0200)]
Style fix: Add a space between the closing/opening bracket
This patch replaces every occurrence of '){' with ') {'.
The ffmpeg source tree was excluded since it will disappear anyways.
Command used for this:
find . -type d \( -name ffmpeg \) -prune -o \
-regex '\(.*\.[hc]\|.*\.cc\)' \
-exec sed -i -e 's/){/) {/' {} \;
poljar (Damir Jelić) [Tue, 18 Jun 2013 14:45:20 +0000 (16:45 +0200)]
Style fix: Add a space betwen the if statement and the opening bracket
This patch replaces every occurrence of 'if(' with 'if ('.
The ffmpeg source tree was excluded since it will disappear anyways.
Command used for this:
find . -type d \( -name ffmpeg \) -prune -o \
-regex '\(.*\.[hc]\|.*\.cc\)' \
-exec sed -i -e 's/ if(/ if (/' {} \;
poljar (Damir Jelić) [Tue, 18 Jun 2013 19:53:37 +0000 (21:53 +0200)]
Whitespace cleanup: Fix broken indentation by hand
This patch fixes wrong indentation introduced by the last patch.
This was mostly done with vim-s retab feature.
poljar (Damir Jelić) [Tue, 18 Jun 2013 19:39:30 +0000 (21:39 +0200)]
Whitespace cleanup: Remove tabs
This patch removes all tabs hidden inside the source tree and replaces
them with 4 spaces.
Command used for this:
find . -type d \( -name bluetooth \) -prune -o
-regex '\(.*\.[hc]\|.*\.cc\)' -a -not -name 'reserve*.[ch]'
-a -not -name 'gnt*.h' -a -not -name 'adrian*'
-exec sed -i -e 's/\t/ /g' {} \;
The excluded files are mirrored files from external sources containing
tabs.
Tanu Kaskinen [Sun, 23 Jun 2013 07:31:13 +0000 (10:31 +0300)]
.gitignore: Add build-aux
Tanu Kaskinen [Sun, 23 Jun 2013 07:23:10 +0000 (10:23 +0300)]
core-util: Fix log message levels
This code is from heftig, but the mistake that I'm fixing here is my
own. Before applying heftig's patch, I downgraded the level of one of
the log messages. I managed to downgrade a different message than what
I intended, so now I'm undoing that mistake.
Tanu Kaskinen [Thu, 20 Jun 2013 14:19:15 +0000 (17:19 +0300)]
log: Fix error message
file_path contains the last tried file name, including the suffix, so
the error message was wrong:
Tried to open target file '/tmp/test.log.99', '/tmp/test.log.99.1',
'/tmp/test.log.99.2' ... '/tmp/test.log.99.99', but all failed.
Shuai Fan [Wed, 19 Jun 2013 03:59:08 +0000 (11:59 +0800)]
cli, log: Improve the set-log-target functionality
Add a new log target 'newfile:PATH', and refactoring 'pa_log_target_type'.
Signed-off-by: Shuai Fan <shuai900217@126.com>
Tanu Kaskinen [Wed, 5 Jun 2013 14:45:06 +0000 (17:45 +0300)]
bluetooth: Fix too late assertion
u was dereferenced before the assertion that checks that u isn't NULL.
Tanu Kaskinen [Tue, 18 Jun 2013 18:21:08 +0000 (21:21 +0300)]
combine: Fix crash in output freeing
The outputs are removed from the idxset before output_free() is
called. Trying to remove them again in output_free(), and asserting
that it should succeed caused crashing whenever outputs were freed.
This bug was introduced in commit
061878b5a47ed9aa05d12430b039874b63c29a84.
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=65901
Arun Raghavan [Mon, 17 Jun 2013 12:41:08 +0000 (18:11 +0530)]
zeroconf: Fix pa_mainloop_api_once usage
We need the mainloop lock to be taken around pa_mainloop_api_once() to
prevent an assert due to the defer event creation and setting of the
destroy callback not being performed atomically.
Arun Raghavan [Mon, 17 Jun 2013 12:37:42 +0000 (18:07 +0530)]
mainloop: Document need for mainloop lock around pa_mainloop_api_once
This needs us to expose a bit of implementation detail, but this seems
to be the cleanest way without an API change.
The specific problem is that pa_mainloop_api_once() needs to first
create a defer event and then set its destroy callback. If the defer
event is completed before the callback is set, an assert will be
trigerred.
David Henningsson [Mon, 17 Jun 2013 06:52:07 +0000 (08:52 +0200)]
pstream: Fixup hangs caused by recent iochannel patch
Now that we don't *always* get a callback after having written
something, make sure we can continue writing as long as it fully
succeeds.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Arun Raghavan [Sat, 15 Jun 2013 04:12:02 +0000 (09:42 +0530)]
sink-input: Log format negotiation better
This provides more details on format negotiation success and failure to
make debugging problems easier.
Arun Raghavan [Fri, 14 Jun 2013 11:42:03 +0000 (17:12 +0530)]
iochannel: Document modified pa_iochannel_write return value
David Henningsson [Thu, 13 Jun 2013 12:26:09 +0000 (14:26 +0200)]
iochannel: Avoid unnecessary wakeup after successful write
To save some CPU (in low latency scenarios), don't re-enable the
"writable" event after it has succeeded. It is very likely the next
write will succeed right away too.
This means that we always need to handle EAGAIN/EWOULDBLOCK as a
successful write of 0 bytes, so I also verified that all callers to
pa_iochannel_write handled this correctly.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
David Henningsson [Wed, 12 Jun 2013 11:49:05 +0000 (13:49 +0200)]
alsa: Fix "Scheduling delay of..." message
The tsched_watermark is in bytes, not in usecs. Fix this by introducing
a new variable, and also use that variable in some places for optimisation.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Arun Raghavan [Wed, 12 Jun 2013 13:11:08 +0000 (18:41 +0530)]
doc: Fix building doxygen docs out of tree
Tanu Kaskinen [Tue, 7 May 2013 15:00:34 +0000 (18:00 +0300)]
native: Don't enable prebuffering when draining
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=64284
David Henningsson [Tue, 4 Jun 2013 13:41:57 +0000 (15:41 +0200)]
alsa-mixer: Add "Line Out" path
If there is a "Line Out" jack present, then add this path. The fallback
analog-output will be a subset of this path and removed.
I only use the "Line Out Jack" or "Line Out Front Jack" for actual jack
detection - without anything connected to the front jack, it makes little
sense to enable the port.
(Another option could perhaps be to use different paths for stereo line out
and surround line outs, but that could be a possible future improvement.)
Arun Raghavan [Mon, 10 Jun 2013 12:47:39 +0000 (18:17 +0530)]
alsa-mixer: Disable headphones when playing to speakers
Assume that the headphone port volume is lower than the speaker volume.
When plugging in headphones, if the path is active, while the jack is
being inserted and before it is actually detected as being plugged in,
it will still receive the signal being played (which is at a higher
volume than it will be when plugged in completely). The volume
difference manifests as a volume spike when the headphones are plugged
in, before the final volume is set.
This patch is required to prevent such a volume spike when plugging in
headphones. The problem is not fixed completely, but the spike is
shortened. To be fixed completely, we need to apply the port volume
before unmuting the new path.
Jan Alexander Steffens (heftig) [Sun, 9 Jun 2013 16:47:05 +0000 (18:47 +0200)]
core-util: Clamp RLIMIT_RTTIME to what RealtimeKit accepts
In the default configuration, PulseAudio's rlimit-rttime is set to
1000000 (100%), which is higher than what RealtimeKit requires from
its clients (200000, 20%).
Make an attempt to still get realtime scheduling by clamping the
current RLIMIT_RTTIME to what RealtimeKit accepts. Warn about doing
this.
Tanu Kaskinen [Thu, 6 Jun 2013 10:56:30 +0000 (13:56 +0300)]
.gitignore: Add lo-latency-test
Javier Jardón [Thu, 6 Jun 2013 09:25:56 +0000 (11:25 +0200)]
build-sys: Do not AC_SUBST *_CFLAGS and *_LIBS
PKG_CHECK_MODULES() already do that for us
Javier Jardón [Wed, 17 Apr 2013 08:53:41 +0000 (10:53 +0200)]
build-sys: Use build-aux directory to store autogenerated files
Javier Jardón [Wed, 17 Apr 2013 08:53:40 +0000 (10:53 +0200)]
build-sys: Use autoreconf in bootstrap.sh
Arun Raghavan [Mon, 27 May 2013 08:57:42 +0000 (14:27 +0530)]
tests: Make loopback latency test more accurate
This makes sure that we always take the timing at the point when we
write out the pulse, making the overall latency measurement more
accurate.
Arun Raghavan [Thu, 23 May 2013 09:57:40 +0000 (15:27 +0530)]
tests: Factor out loopback setup code
This moves over setup code for the loopback latency test into a private
library so that we can easily write more tests using the same framework.
Arun Raghavan [Wed, 22 May 2013 10:29:24 +0000 (15:59 +0530)]
tests: Adjust latency test calibration
This makes the test more robust by:
1. Decreasing the '1' threshold during calibration - the RMS value for
the sine wave will be 0.5, so the previous code was making us take
the ALSA mixer past 0dB.
2. Using the difference rather than absolute value for 0->1 transitions,
so that we're somewhat independent noise in our calculations.
Arun Raghavan [Wed, 22 May 2013 06:33:47 +0000 (12:03 +0530)]
tests: Make loopback latency test run with rt priority
Arun Raghavan [Tue, 21 May 2013 13:09:30 +0000 (18:39 +0530)]
tests: Add a latency measurement test
This test is intended to measure real latency by playing a sample to a
sink and capturing that over a loopback interface. The loopback can
either be physical (cable running from headphone out to line in) or
virtual (monitor source or module loopback).
Also included in this is calibration code to make sure that volumes are
sufficiently adjusted to be able to detect the played back signal (and
that there aren't false positives due to line noise).
One of the objectives of all this is to later factor out the setup code
to allow us to easily write more loopback tests for various
functionality (volumes, resampling, mixing, etc.).
Tanu Kaskinen [Fri, 24 May 2013 12:17:13 +0000 (15:17 +0300)]
bluetooth: Fix input port description
Arun Raghavan [Wed, 15 May 2013 04:11:19 +0000 (09:41 +0530)]
zeroconf: Make Avahi usage in m-z-publish async
This pushes all avahi-client code to a threaded mainloop from the PA
mainloop context. We need to do this because avahi-client makes blocking
D-Bus calls, and we don't want to block the mainloop for that long.
The only exception to this now that I don't see a workaround for is
during module unload time. However, this shouldn't be a huge problem
since in most cases, this will only happen at server shutdown time.
The bulk of the change is partitioning the data so that PA core objects
only (well, mostly) get accessed in the PA mainloop and Avahi calls
happen only in the Avahi threaded mainloop.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=58758
Arun Raghavan [Wed, 15 May 2013 04:07:45 +0000 (09:37 +0530)]
mainloop: Add API to set thread name for threaded mainloop
Arun Raghavan [Wed, 15 May 2013 04:06:17 +0000 (09:36 +0530)]
pulsecore: Fix assert in pa_msgobject creation
Allows for creation of derived types that don't have any other fields.
poljar (Damir Jelić) [Wed, 22 May 2013 12:58:10 +0000 (14:58 +0200)]
shell-completion: Add list-cards to the pacmd completion.
The list-cards command was missing for both of the shell completions.
This fixes it.
Peter Meerwald [Wed, 15 May 2013 07:57:56 +0000 (09:57 +0200)]
rescue-streams: Fix wording of module description
Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
Peter Meerwald [Wed, 15 May 2013 07:53:30 +0000 (09:53 +0200)]
intended-roles: Fix typo in module description
Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
Peter Meerwald [Wed, 15 May 2013 07:39:26 +0000 (09:39 +0200)]
pactl: Use colon to separate priority in profiles output
for example:
Profiles:
input:analog-stereo: Analog Stereo Input (sinks: 0, sources: 1, priority. 60)
output:analog-stereo: Analog Stereo Output (sinks: 1, sources: 0, priority. 6000)
it should be "priority: xxx", not "priority. xxx"
Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
Mitchell Fang [Wed, 22 May 2013 08:23:27 +0000 (11:23 +0300)]
thread-mainloop: Fix bug in example code
Checking the operation state caused a deadlock, because the state
won't change before my_drain_callback() returns, and it doesn't
return before my_drain_stream_func() calls
pa_threaded_mainloop_accept().
Peter Meerwald [Wed, 15 May 2013 15:49:42 +0000 (17:49 +0200)]
cli: Fix plural in caption of source-outputs list
$ pacmd list-source-outputs
>>> 4 source outputs(s) available.
outputs(s) makes no sense
Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
Mikel Astiz [Fri, 10 May 2013 08:30:47 +0000 (10:30 +0200)]
bluetooth: Support transport auto-release
With BlueZ 5, if the remote device suspends the audio, the transport
state will change to "idle" and the endpoint is not required to release
the transport, since this could introduce race conditions. Therefore,
ignore the call to pa_bluetooth_transport_release() if the transport is
not acquired any more.
Mikel Astiz [Fri, 10 May 2013 08:30:46 +0000 (10:30 +0200)]
bluetooth: Update to new BlueZ 5 transport acquire/release API
The new D-Bus API doesn't support access rights, which weren't used by
PulseAudio anyway, but it does solve a race condition: now optional
acquires can be implemented by bluetooth-util atomically using the D-Bus
TryAcquire() method.
Mikel Astiz [Fri, 10 May 2013 08:30:45 +0000 (10:30 +0200)]
bluetooth: Support media transport's State property
BlueZ 5 exposes a 'State' property in the media transport interface.
With regard to PA, this replaces the profile-specific interfaces, since
they were being used to know if the audio was streaming or not.
Mikel Astiz [Fri, 10 May 2013 08:30:44 +0000 (10:30 +0200)]
bluetooth: Parse media transport's properties
Add the code to parse the properties of the media transport object when
a PropertiesChanged signal is received.
Note that the transport might have an owner other than BlueZ, and thus
the property changes would be emitted from arbitrary senders. For
performance reasons, the installed match considers the interface name
where the property has changed.
It could be possible to install and remove the D-Bus matches dynamically
when a new owner is registered/unregistered, but filtering based on the
interface name seems good enough already.
Mikel Astiz [Fri, 10 May 2013 08:30:43 +0000 (10:30 +0200)]
bluetooth: Support Properties.PropertiesChanged signal
Install matches for signal Properties.PropertiesChanged and process the
properties corresponding to the tracked devices.
Mikel Astiz [Fri, 10 May 2013 08:30:42 +0000 (10:30 +0200)]
bluetooth: Support ObjectManager interface add/remove
Install matches for signals ObjectManager.InterfacesAdded and
ObjectManager.InterfacesRemoved, and process the devices that are
registered and unregistered dynamically.
Arun Raghavan [Mon, 23 Jul 2012 08:50:05 +0000 (14:20 +0530)]
core: Add an "internal" suspend cause
This lets us suspend devices from within the core for short periods
without having to overload one of the existing suspend causes.
https://bugs.freedesktop.org/show_bug.cgi?id=64118
Nikolay Amiantov [Sun, 5 May 2013 11:22:53 +0000 (15:22 +0400)]
pactl: Flush stdout buffer when printing subscribe events.
"pactl subscribe" is running continuously, and without flushing its output is
not usable for "process-on-arrival" per-line tasks, such as grepping. This
patch should fix this. For example, now:
pactl subscribe | grep 'server'
should print only server events as they arrive.
Mikel Astiz [Mon, 29 Apr 2013 16:28:04 +0000 (18:28 +0200)]
bluetooth: BlueZ 5 interface rename to org.bluez.MediaTransport1
Use the new interface name if BlueZ 5 has been detected.
Mikel Astiz [Mon, 29 Apr 2013 16:28:03 +0000 (18:28 +0200)]
bluetooth: BlueZ 5 interface rename to org.bluez.Media1
Use the new interface name if BlueZ 5 has been detected.
Mikel Astiz [Mon, 29 Apr 2013 16:28:02 +0000 (18:28 +0200)]
bluetooth: BlueZ 5 interface rename to org.bluez.MediaEndpoint1
Use the new interface name if BlueZ 5 has been detected.
Tanu Kaskinen [Wed, 1 May 2013 10:39:36 +0000 (13:39 +0300)]
bluetooth: Fix error checking style
Mikel Astiz [Mon, 29 Apr 2013 16:27:59 +0000 (18:27 +0200)]
bluetooth: Parse the tree returned by ObjectManager
Parse the result of ObjectManager.GetManagedObjects(), which includes
all objects registered, their interfaces and the corresponding
properties per interface.
Mikel Astiz [Mon, 29 Apr 2013 16:27:58 +0000 (18:27 +0200)]
bluetooth: Detect BlueZ 5
Check the existence of ObjectManager to detect the version of the
running daemon. If the interface exists, it should be BlueZ 5.
Tanu Kaskinen [Mon, 29 Apr 2013 13:46:13 +0000 (16:46 +0300)]
module: Assign the index before calling init()
Any code that runs inside the init() callback sees an invalid module
index. Sometimes init() does things that cause hooks to be fired. This
means that any code that uses hooks may see an invalid module index.
Fix this by assigning the module index before init() is called.
There are no known issues in the upstream code base where an invalid
module index would be used, but an out-of-tree module
(module-murphy-ivi) had a problem with this.
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=63923
João Paulo Rechi Vita [Sat, 27 Apr 2013 00:24:52 +0000 (21:24 -0300)]
bluetooth: Remove the 'bluez.name' property
The 'Name' property of the Device interface became optional in BlueZ 5
and may not be present anymore (that happens when testing against the
PTS 4.7.0), so it's better not to expose it to clients so they don't
rely on its existence.
João Paulo Rechi Vita [Sat, 27 Apr 2013 00:26:36 +0000 (21:26 -0300)]
bluetooth: Use 'Alias' value as the device description
The 'Alias' property should be preffered over the 'Name' property,
according to the BlueZ API documentation.
João Paulo Rechi Vita [Fri, 26 Apr 2013 15:30:24 +0000 (12:30 -0300)]
bluetooth: Add 'bluez.alias' property
Peter Meerwald [Wed, 17 Apr 2013 07:49:03 +0000 (09:49 +0200)]
.gitignore: Ignore src/*.gcno files created when building with --enable-gcov
Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
poljar (Damir Jelić) [Fri, 19 Apr 2013 14:35:14 +0000 (16:35 +0200)]
switch-on-port-available: Silence gcc warning.
This silences this gcc warning:
module-switch-on-port-available.c:111:12: warning:
'good' may be used uninitialized in this function
Ismo Puustinen [Fri, 12 Apr 2013 14:38:12 +0000 (17:38 +0300)]
module: initialize module index to invalid value.
m->init() was called while m->index was uninitialized, which was bad
style.
Peter Meerwald [Tue, 9 Apr 2013 14:10:16 +0000 (16:10 +0200)]
fdsem: Remember pa_write() type in pa_fdsem_post()
pa_write() knows two types of operation:
calling send() and calling write()
there is a flag (a pointer to an int) passed to pa_write()
which can remember which write type was successful
if the pointer is NULL or the int is 0, send() is tried first,
with a fallback to write() if send() resulted in ENOTSOCK
pa_fdsem_post() calls pa_write() with a NULL pointer;
unfortunately (at least with HAVE_SYS_EVENTFD_H #define'd) send()
always fails here and write() is called -- causing an extra syscall
quite frequently
strace:
send(17, "\1\0\0\0\0\0\0\0", 8, MSG_NOSIGNAL) = -1 ENOTSOCK (Socket operation on non-socket)
write(17, "\1\0\0\0\0\0\0\0", 8) = 8
the patch adds a write_type field to pa_fdsem to the successful
pa_write() type can be remembered and unnecessary send() calls are
avoided
Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>