Tanu Kaskinen [Fri, 4 Nov 2016 12:43:57 +0000 (14:43 +0200)]
raop: add compatibility with openssl 1.1.0
Openssl 1.1.0 made all structs opaque, which caused a build failure in
raop_client.c. The struct member assignments are now replaced with a
call to RSA_set0_key().
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=96726
Reviewed-by: Felipe Sateler <fsateler@debian.org>
Anton Lundin [Tue, 25 Oct 2016 19:31:34 +0000 (21:31 +0200)]
raop: Correct spelling of KTH
KTH is a Swedish institution of higher education, and in its full name
spelled Kungliga Tekniska högskolan.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Cédric Valmary [Thu, 13 Oct 2016 12:28:43 +0000 (15:28 +0300)]
i18n: update Occitan translation
Mario Blättermann [Wed, 5 Oct 2016 12:16:20 +0000 (15:16 +0300)]
i18n: update German translation
Pali Rohár [Sun, 11 Sep 2016 15:16:38 +0000 (17:16 +0200)]
bluetooth: Add support for automatic switch between hsp and a2dp profiles also for bluez5
Bluez5 uses different profile names as bluez4, so we need to check for
a2dp_sink and headset_head_unit too for bluez5 support.
Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Philip Withnall [Tue, 20 Sep 2016 17:26:00 +0000 (10:26 -0700)]
zeroconf-discover: fix a memory leak
Coverity CID: #1358700
https://bugs.freedesktop.org/show_bug.cgi?id=97876
Deepak Srivastava [Mon, 19 Sep 2016 08:36:10 +0000 (14:06 +0530)]
xen: Fixed possible memory leak.
module-xenpv-sink.c - In pa__init(...), memory for pa_modargs *ma is not released before returning from function.
Signed-off-by: Deepak Srivastava <srivastava.d@samsung.com>
Pali Rohár [Thu, 15 Sep 2016 15:52:40 +0000 (17:52 +0200)]
bluetooth: bluez5: Add profile name to sinks and sources
See commit
380a7fc2401ea26151e0383adff05314a263ac31.
Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Marcin Lewandowski [Thu, 30 Jun 2016 10:38:14 +0000 (12:38 +0200)]
core-util: log error if we hit file descriptors limit
Jan Alexander Steffens (heftig) [Fri, 9 Sep 2016 20:09:35 +0000 (22:09 +0200)]
launch: Remove the already implicit After=pulseaudio.socket
Also clarify the comment as to what can actually happen here.
Tanu Kaskinen [Thu, 8 Sep 2016 13:20:04 +0000 (16:20 +0300)]
daemon-conf: enable memfd by default
memfd support was introduced in 9.0, but disabled by default. No issues
have been reported - now is a good time to enable it by default.
Tanu Kaskinen [Mon, 5 Sep 2016 15:57:17 +0000 (18:57 +0300)]
zeroconf-publish: unref D-Bus connection
pa_dbus_bus_get() increments the bus connection refcount, but unreffing
the connection was never done.
Tanu Kaskinen [Mon, 5 Sep 2016 15:55:37 +0000 (18:55 +0300)]
zeroconf-publish: fix uninitialized variable
get_icon_name() returns the icon_name variable, and without this
change the function might exit before icon_name is initialized.
Sylvain Baubeau [Thu, 1 Sep 2016 09:14:05 +0000 (11:14 +0200)]
zeroconf: use local icon for shared devices
systemd-hostnamed provides an icon for the machine it is running on.
If it is running, module-zeroconf-publish uses this icon for the
'icon-name' attribute in the Avahi properties. module-zeroconf-discover
passes this icon to module-tunnel using the module parameter
{sink/source}_properties.
This allows to display a portable, desktop or phone instead of
the generic sound card icon.
Peter Meerwald-Stadler [Thu, 18 Aug 2016 14:08:45 +0000 (16:08 +0200)]
sample: Assert validity of sample_spec
passing an invalid sample_spec to
pa_sample_size_of_format(),
pa_frame_size(),
pa_bytes_per_second(),
pa_bytes_to_usec(),
pa_usec_to_bytes()
currently gives a result of 0
this is problematic as
(a) it leads to many potential divide-by-zero issues flagged by Coverity,
(b) pa_sample_spec_valid() is called often and the mostly unnecessary validation
of the sample_spec cannot be optimized away due to pa_return_val_if_fail()
(c) nobody checks the result for 0 and the behaviour is not documented
this patch replaces pa_return_val_if_fail() with pa_assert()
note that this commit changes the API!
note that pa_return_val_if_fail() strangely logs an assertion, but then happily
continues...
fixes numerious CIDs
Peter Meerwald-Stadler [Thu, 18 Aug 2016 07:24:41 +0000 (09:24 +0200)]
tests: Assert granularity range in stripnul.c
granularity must not be larger than buffer size
CID 1138482
Peter Meerwald-Stadler [Wed, 17 Aug 2016 23:06:47 +0000 (01:06 +0200)]
core: Replace PA_PAGE_SIZE with pa_page_size()
PA_PAGE_SIZE using sysconf() may return a negative number
CID 1137925, CID 1137926, CID 1138485
instead of calling sysconf() directly, add function pa_page_size()
which uses the guestimate 4096 in case sysconf(_SC_PAGE_SIZE) fails
using PA_ONCE to only evaluate sysconf() once
Peter Meerwald-Stadler [Wed, 17 Aug 2016 21:52:17 +0000 (23:52 +0200)]
padsp: Fix flush and improve error handling
read() can return a number of bytes read less than k
in addition, handle EAGAIN and EOF
CID 1137981
Piotr Drąg [Fri, 26 Aug 2016 14:26:03 +0000 (16:26 +0200)]
i18n: fix errors and warnings in Belarusian and Korean translations
Balázs Úr [Wed, 24 Aug 2016 05:34:08 +0000 (07:34 +0200)]
i18n: update Hungarian translation
Viktar Vaŭčkievič [Wed, 24 Aug 2016 14:35:03 +0000 (17:35 +0300)]
i18n: add Belarusian translation
Peter Meerwald-Stadler [Tue, 16 Aug 2016 13:56:40 +0000 (15:56 +0200)]
bluetooth: Fix negative array index write
CID 1533121
Peter Meerwald-Stadler [Tue, 16 Aug 2016 13:33:24 +0000 (15:33 +0200)]
bluetooth: Reorganize code to avoid Coverity NULL dereference warning
CID 1353122
this is a false-positive because
if (dbus_message_has_interface(p->message, "org.bluez.Manager") ||
dbus_message_has_interface(p->message, "org.bluez.Adapter"))
d = NULL;
else if (!(d = pa_hashmap_get(y->devices, dbus_message_get_path(p->message)))) {
pa_log_warn("Received GetProperties() reply from unknown device: %s (device removed?)",
dbus_message_get_path(p->message));
goto finish2;
}
d can be NULL only if p->message interface is org.bluez.Manager or
org.bluez.Adapter. If
dbus_message_is_method_call(p->message, "org.bluez.Device", "GetProperties")
returns true, we know that the interface is org.bluez.Device.
thanks, Tanu!
Peter Meerwald-Stadler [Tue, 16 Aug 2016 05:42:16 +0000 (07:42 +0200)]
bluetooth: Fix dead code
CID 1353115
Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Peter Meerwald-Stadler [Tue, 16 Aug 2016 05:16:31 +0000 (07:16 +0200)]
bluetooth: Don't free modargs twice
CID1353139
Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Peter Meerwald-Stadler [Tue, 16 Aug 2016 05:03:25 +0000 (07:03 +0200)]
Remove newline at end of log messages
Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Peter Meerwald-Stadler [Tue, 15 Sep 2015 14:42:58 +0000 (16:42 +0200)]
modules: Use pa_assert_se() to check return value of dbus_message_iter_close_container()
CID 1140353
... as it is done everythere else
Peter Meerwald-Stadler [Tue, 15 Sep 2015 20:34:48 +0000 (22:34 +0200)]
tests: Check pa_rtpoll_run() return value
CID 1138499
Peter Meerwald-Stadler [Tue, 15 Sep 2015 14:49:14 +0000 (16:49 +0200)]
modules: Check pa_threaded_mainloop_start() return value
CID 1138500
Peter Meerwald-Stadler [Tue, 15 Sep 2015 21:11:29 +0000 (23:11 +0200)]
stream: Check pa_tagstruct_get_format_info() retval in pa_create_stream_callback()
CID 1137984
Peter Meerwald-Stadler [Mon, 14 Sep 2015 14:48:10 +0000 (16:48 +0200)]
tests: Assert fillrate > 0 in alsa-time-test
CID 1323592
assert that fillrate is strictly positive
Peter Meerwald-Stadler [Mon, 15 Aug 2016 21:11:50 +0000 (23:11 +0200)]
alsa: Check pa_modargs_get_value_boolean() retval for use_ucm
CID 1137983
Peter Meerwald-Stadler [Mon, 15 Aug 2016 17:08:49 +0000 (19:08 +0200)]
sink-input,source-output: Fix logging, don't overwrite old_value when value == 0
John Paul Adrian Glaubitz [Mon, 4 Jul 2016 18:23:17 +0000 (20:23 +0200)]
core-util: Use _SC_NPROCESSORS_ONLN instead of _SC_NPROCESSORS_CONF
pa_ncpu() is supposed to report the number of processors available on
the system. For that, it currently calls sysconf(_SC_NPROCESSORS_CONF).
However, since the operating system can disable individual processors,
we should call sysconf(_SC_NPROCESSORS_ONLN) to determine the number
of processors currently available [1]. Consequently, the once-test will
fail since pthread_setaffinity_np() is called with CPUs that are
currently not available.
It might also be advisable to change the code in the future to use CPU
sets on Linux as even the suggested change is not 100% safe but at least
it improves over the existing code. If PulseAudio was to be run in a CPU
set [2], the number of processors available to PulseAudio could be even
less than the number of CPUs currently online (_SC_NPROCESSORS_CONF).
[1] https://www.gnu.org/software/libc/manual/html_node/Processor-Resources.html
[2] http://man7.org/linux/man-pages/man7/cpuset.7.html
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=96809
Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Nils Schneider [Thu, 11 Aug 2016 15:58:24 +0000 (17:58 +0200)]
pipe-sink: align buffer
The pipe buffer is likely to be a power of 2 (e.g. 4096 bytes). This
works nicely for 16 bit stereo samples but breaks when using 24 bit
samples.
This patch aligns the buffer using pa_frame_align().
Tanu Kaskinen [Sat, 30 Jul 2016 23:44:55 +0000 (02:44 +0300)]
bluetooth: don't create the HSP/HFP profile twice
create_card_profile() used to get called separately for HSP and HFP,
so if a headset supports both profiles, a profile named
"headset_head_unit" would get created twice. The second instance would
get immediately freed, so that wasn't a particularly serious problem.
However, I think it makes more sense to create the profile only once.
This patch makes things so that before a profile is created, we check
what name that profile would have, and if a profile with that name
already exists, we don't create the profile.
A couple of Yocto releases (jethro and krogoth) have non-upstream
patches that suffer from this double creation. The patches add
associations between profiles and ports, and those associations use
the profile name as the key. When the second profile gets freed, the
associations between the profile and its ports get removed, and since
the profile name is used as the key, this erroneously affects the
first profile too. Crashing ensues.
BugLink: https://bugzilla.yoctoproject.org/show_bug.cgi?id=10018
Tanu Kaskinen [Sun, 7 Aug 2016 15:45:54 +0000 (18:45 +0300)]
bluetooth: refactor BlueZ 4 transport state setting
Add transport_set_state() that encapsulates changing the variable,
logging and firing the change hook.
I also made a cosmetic change to the corresponding BlueZ 5 log
message so that both messages have the format that I like.
Tanu Kaskinen [Sun, 7 Aug 2016 15:45:53 +0000 (18:45 +0300)]
bluetooth: unify BlueZ 4 and BlueZ 5 profile constant names
This should make it slightly easier to copy code between BlueZ 4 and
BlueZ 5.
Tanu Kaskinen [Sun, 7 Aug 2016 15:45:52 +0000 (18:45 +0300)]
bluetooth: unify BlueZ 4 and BlueZ 5 UUID handling
A hashmap is more convenient than a linked list for storing the UUIDs,
so change the BlueZ 4 code accordingly.
Rename the BlueZ 4 UUID constants to match the BlueZ 5 naming.
The only changes to the BlueZ 5 code are the addition of one comment
and making another comment a bit clearer.
Tanu Kaskinen [Sun, 7 Aug 2016 15:45:51 +0000 (18:45 +0300)]
bluetooth: update device's valid flag after parsing properties
The properties_received flag affects whether the device should be
considered valid, so let's update the valid flag after setting the
properties_received flag.
There's a call to device_update_valid() anyway later when setting
the device adapters, so this change isn't strictly necessary, but
this makes it more obvious that the code is correct (and less
fragile).
Tanu Kaskinen [Sun, 7 Aug 2016 15:45:50 +0000 (18:45 +0300)]
bluetooth: remove a redundant assignment
pa_bluetooth_transport_put() assigns the transport to the device's
transports array, so the caller doesn't have to do that.
Tanu Kaskinen [Sun, 7 Aug 2016 15:45:49 +0000 (18:45 +0300)]
card-restore: don't switch profiles when availability changes
module-card-restore should only restore the initial state of new
cards, but profile_available_changed_callback() changed the profile
whenever the saved profile became available. That caused interference
with module-bluetooth-policy, which also sets card profiles based on
the availability changes.
The original reason for having this code was to work around the
problem that bluetooth cards used to be created with only one profile
available, and other profiles would become available soon after the
card creation. Now the bluetooth card creation is delayed until all
profiles are available, so this bad workaround can be removed.
Discussion:
https://lists.freedesktop.org/archives/pulseaudio-discuss/2016-August/026575.html
Tanu Kaskinen [Sun, 7 Aug 2016 15:45:48 +0000 (18:45 +0300)]
bluetooth: wait for all profiles to connect before creating card
The CONNECTION_CHANGED hook is used to notify the discovery module
about new and removed devices. When a bluetooth device connects, the
hook used to be called immediately when the first profile connected.
That meant that only one profile was marked as available during the
card creation, other profiles would get marked as available later.
That makes it hard for module-card-restore to restore the saved
profile, if the saved profile becomes available with some delay.
module-card-restore has a workaround for this problem, but that turned
out to interfere with module-bluetooth-policy, so the workaround will
be removed in the next patch.
The BlueZ 4 code doesn't need changes, because we use the
org.bluez.Audio interface to get a notification when all profiles are
connected.
Arun Raghavan [Wed, 10 Aug 2016 15:53:44 +0000 (21:23 +0530)]
stream-interaction: Fix a memory leak
CID: 1352053
Arun Raghavan [Wed, 10 Aug 2016 16:13:32 +0000 (21:43 +0530)]
shm: Wrap memfd-specific code in relevant ifdef
Doesn't really affect logic, but Coverity reports this as dead-code, and
I figure it makes sense to be consistent about our use of HAVE_MEMFD.
CID: 1352045
Arun Raghavan [Wed, 10 Aug 2016 16:07:12 +0000 (21:37 +0530)]
source-output: Fix copy-pasto
CID: 1352047
Arun Raghavan [Wed, 10 Aug 2016 15:59:56 +0000 (21:29 +0530)]
sink-input,source-output: Fix a leak during property change logging
CID: 1352052
Peter Meerwald [Wed, 10 Aug 2016 13:22:16 +0000 (15:22 +0200)]
build: Check version of check library, require >= 0.9.10
tests/core-util-test.c uses ck_assert_int_lt() which was introduced
in check 0.9.10
make this dependency (with --enable-tests) explicit in configure.ac
Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Peter Meerwald [Wed, 10 Aug 2016 13:22:15 +0000 (15:22 +0200)]
tests: Include signal.h in core-util-test.c
on oldish Ubuntu 12.04:
tests/core-util-test.c: In function ‘main’:
tests/core-util-test.c:269:66: error: ‘SIGABRT’ undeclared (first use in this function)
tcase_add_test_raise_signal(tc, modargs_test_replace_fail_1, SIGABRT);
Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Dušan Kazik Kazik [Thu, 28 Jul 2016 06:50:40 +0000 (12:20 +0530)]
i18n: Update Polish translation
Pali Rohár [Sat, 2 Jul 2016 20:26:17 +0000 (22:26 +0200)]
bluetooth: Add support for automatic switch between hsp and a2dp profiles
With this patch module-bluetooth-policy automatically switch from a2dp profile
to hsp profile if some VOIP application with media.role=phone wants to start
recording audio.
By default a2dp profile is used for listening music, but for VOIP calls is
needed profile with microphone support (hsp). So this patch will switch to
hsp profile if some application want to use microphone (and specify it in
media.role as "phone). After recording is stopped profile is switched back
to a2dp. So this patch allows to use bluetooth microphone for VOIP applications
with media.role=phone automatically without need of user interaction.
Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Pierre Ossman [Thu, 19 May 2016 13:54:08 +0000 (15:54 +0200)]
memblockq: remove internal "missing" state variable
It was a very confusing state variable that required a lot of
fiddling. It was also redundant in that it can be computed from
the other variables, removing any risk of it getting out of sync.
In the same spirit, make sure "requested" also always contains a
sane value, even though it may not be used by every caller.
Romain Naour [Wed, 6 Jul 2016 14:04:27 +0000 (16:04 +0200)]
build-sys: C++11 is only required for WebRTC support
Make C++11 support optional and explicitly check for gnu++11.
Stop the build only if no C++11 support has been found and WebRTC
support has been requested.
Fixes:
http://autobuild.buildroot.net/results/d89/
d897a94a8b6a52eba03d04c24536f554a7643000
Signed-off-by: Romain Naour <romain.naour@gmail.com>
Arun Raghavan [Fri, 22 Jul 2016 09:51:20 +0000 (15:21 +0530)]
memblockq-test: Rename test to something more relevant
We now have a separate test for _pop_missing().
Ulrich Eckhardt [Sun, 26 Jun 2016 19:15:44 +0000 (21:15 +0200)]
memblockq-test: Add a test for missing data behaviour
This involves in particular pa_memblockq_missing() and
pa_memblockq_pop_missing(). The test demonstrates that the latter
doesn't work as expected. It should report whenever queue level is
drained below target level. Instead, it reports any case that the queue
level is drained, even when it is still above target level.
Ulrich Eckhardt [Thu, 19 May 2016 19:34:22 +0000 (21:34 +0200)]
memblockq-test: Add test changing the parameters of a queue
When changing e.g. the maximum length, the target length may may have to
be adjusted, too.
Ulrich Eckhardt [Thu, 19 May 2016 20:06:12 +0000 (22:06 +0200)]
memblockq-test: Add a test that checks initial properties
Make sure that e.g. the initial size is zero and the initially missing
bytes are exactly the target length etc.
Ulrich Eckhardt [Thu, 19 May 2016 18:00:46 +0000 (20:00 +0200)]
memblockq-test: Some refactoring
- Set the loglevel once in the main entry code instead of in each test function.
- Check pool allocation succeeded.
- Reduce code by using utility function to allocate chunks.
- Improve coverage by using utility function to validate queue invariants.
Ulrich Eckhardt [Sat, 28 May 2016 09:15:49 +0000 (11:15 +0200)]
memblockq-test: Utility function to validate queue invariants
In particular, the relations between base, minreq, tlength, length,
missing, maxlength follow certain rules. On change, these invariants can
be violated, which requires additional code to restore them. Setting one
value can thus cause a cascade of changes. This utility function can
assert those invariants after changing something.
Ulrich Eckhardt [Thu, 19 May 2016 19:32:22 +0000 (21:32 +0200)]
memblockq-test: Utility function to alloc chunks
This eases creating a chunk from a string for writing tests.
Pierre Ossman [Sun, 26 Jun 2016 21:39:11 +0000 (23:39 +0200)]
tests: add test to verify correct minreq behaviour
Fixed up by Ulrich Eckhardt <ulrich.eckhardt@base-42.de>.
Signed-off-by: Arun Raghavan <arun@arunraghavan.net>
Pierre Ossman [Thu, 19 May 2016 13:26:08 +0000 (15:26 +0200)]
memblockq: move minreq handling in to memblockq
Having it handled in the callers proved to be a poor fit as it
became difficult to handle a shrinking minreq sanely. It could end
up in a state where the request was never sent downstream to the
client.
Tanu Kaskinen [Wed, 20 Jul 2016 20:39:59 +0000 (23:39 +0300)]
launch: explain why .service depends on .socket
The reason for depending on the socket unit is rather unobvious, so
let's add a comment to help people reading the service unit file. Felipe
Sateler explained the rationale well in the commit message of
7cb524a77b89, so I just copied the same text into the comment.
Felipe Sateler [Wed, 20 Jul 2016 13:57:13 +0000 (09:57 -0400)]
launch: make pulseaudio.service properly order and require the socket
This commit fixes two problems:
1. Because there are no implicit dependencies between sockets and services,
the socket, as set up by systemd will race with the socket, as set up
by the pulseaudio daemon. This can cause the pulseaudio.socket unit to
fail (even though the pulseaudio service started just fine), which can
confuse users.
2. While it is possible to use the service without the socket, it is not
clear why it would be desirable. And a user installing pulseaudio and
doing `systemctl --user start pulseaudio` will not get the socket
started, which might be confusing and problematic if the server is to
be restarted later on, as the client autospawn feature might kick in.
Arun Raghavan [Thu, 14 Jul 2016 02:38:35 +0000 (11:38 +0900)]
daemon: Tone down system mode snarkiness
We do support system mode for the cases where it makes sense, so it's
really not sensible to be unconditionally snarky at our users for doing
it.
Signed-off-by: Arun Raghavan <arun@arunraghavan.net>
Georg Chini [Sun, 5 Jun 2016 19:05:11 +0000 (21:05 +0200)]
loopback: Stop tracking max_request and min_memblockq_length
They are not needed any longer because the regulation is now based on the
difference between current and configured latency.
Georg Chini [Sun, 5 Jun 2016 19:05:10 +0000 (21:05 +0200)]
loopback: Adjust rate based on latency difference
Replace the current latency controller with a modified P-controller. For
better readability separate the controller function. For small latency
differences, the controller forms a classical P-controller while it saturates
at 1% deviation from the base rate for large latency differences.
Georg Chini [Sun, 5 Jun 2016 19:05:09 +0000 (21:05 +0200)]
loopback: Restart timer after 1/3 second
After switching source or sink, call adjust_rates after a third of a second
instead of waiting one full adjust time. This will ensure that latency regulation
starts as soon as possible.
Georg Chini [Sun, 5 Jun 2016 19:05:08 +0000 (21:05 +0200)]
loopback: Move timer restart and snapshots to timer callback
Restaring the timer and obtaining the latency snapshots belong to the timer callback.
To maintain an adjust time as near as possible to the configured value, the timer is
now restarted immediately at the beginning of the timer callback.
Georg Chini [Sun, 5 Jun 2016 19:05:07 +0000 (21:05 +0200)]
loopback: Change memblockq length
The size of the memblockq must be increased to allow for long latencies
at high sample rates.
Georg Chini [Sun, 5 Jun 2016 19:05:06 +0000 (21:05 +0200)]
loopback: Improve latency estimation
To improve the overall latency estimation, the delay between the two snapshots
is taken into account. To minimize the snapshot delay, the order of the snapshots
is reverted. Additionally the latency at the base rate is calculated. It will be
used later as the input to the latency controller.
Georg Chini [Sun, 5 Jun 2016 19:05:05 +0000 (21:05 +0200)]
loopback: Improve latency estimation in snapshots
The delay and render memblockq are using the source and sink sample specs,
so using pa_bytes_to_usec() will produce better estimates of the delays than
using pa_resmpler_result(). Because the delays are considered to be part of
the sink or source latency, they are added to them. source_output_buffer
becomes obsolete.
Georg Chini [Sun, 5 Jun 2016 19:05:04 +0000 (21:05 +0200)]
loopback: Save time stamps during latency snapshots
Saving the time stamps is necessary to account for the delay between the two
latency snapshots. Time stamps will be used in later patches.
Ulrich Eckhardt [Wed, 6 Jul 2016 18:00:54 +0000 (20:00 +0200)]
modargs: Document behaviour on missing arguments
The behaviour is to leave the value unchanged. The idea is to init the value
with a default before the call and not treat a missing value as error. That
way, only parsing errors or validating errors actually return error codes.
Ahmed S. Darwish [Sat, 2 Jul 2016 22:08:06 +0000 (00:08 +0200)]
protocol-native: DRY: Remove pdispatch callbacks declarations
Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Tanu Kaskinen [Fri, 23 Oct 2015 10:37:11 +0000 (13:37 +0300)]
alsa: set availability for (some) unavailable profiles
The alsa card hasn't so far set any availability for profiles. That
caused an issue with some HDMI hardware: the sound card has two HDMI
outputs, but only the second of them is actually usable. The
unavailable port is marked as unavailable and the available port is
marked as available, but this information isn't propagated to the
profile availability. Without profile availability information, the
initial profile policy picks the unavailable one, since it has a
higher priority value.
This patch adds simple logic for marking some profiles unavailable:
if the profile only contains unavailable ports, the profile is
unavailable too. This can be improved in the future so that if a
profile contains sinks or sources that only contain unavailable ports,
the profile should be marked as unavailable. Implementing that
requires adding more information about the sinks and sources to
pa_card_profile, however.
BugLink: https://bugzilla.yoctoproject.org/show_bug.cgi?id=8448
Tanu Kaskinen [Fri, 23 Oct 2015 10:50:35 +0000 (13:50 +0300)]
card: remove pa_card_new_data.active_profile
It's not being used any more.
Tanu Kaskinen [Fri, 23 Oct 2015 09:59:53 +0000 (12:59 +0300)]
card: move profile selection after pa_card_new()
I want module-alsa-card to set the availability of unavailable
profiles before the initial card profile gets selected, so that the
selection logic can use correct availability information.
module-alsa-card initializes the jack state after calling
pa_card_new(), however, and the profile selection happens in
pa_card_new(). This patch solves that by moving parts of pa_card_new()
to pa_card_choose_initial_profile() and pa_card_put().
pa_card_choose_initial_profile() applies the profile selection policy,
so module-alsa-card can first call pa_card_new(), then initialize the
jack state, and then call pa_card_choose_initial_profile(). After that
module-alsa-card can still override the profile selection policy, in
case module-alsa-card was loaded with the "profile" argument. Finally,
pa_card_put() finalizes the card creation.
An alternative solution would have been to move the jack
initialization to happen before pa_card_new() and use pa_card_new_data
instead of pa_card in the jack initialization code, but I disliked
that idea (I want to get rid of the "new data" pattern eventually).
The order in which the initial profile policy is applied is reversed
in this patch. Previously the first one to set it won, now the last
one to set it wins. I think this is better, because if you have N
parties that want to set the profile, we avoid checking N times
whether someone else has already set the profile.
Tanu Kaskinen [Tue, 7 Jun 2016 13:51:00 +0000 (16:51 +0300)]
card: don't allow the CARD_NEW hook to fail
There is currently no use for allowing modules to cancel card creation,
and I don't see need for that in the future either. Let's simplify
things by removing the failure handling code.
Tanu Kaskinen [Fri, 23 Oct 2015 09:36:34 +0000 (12:36 +0300)]
alsa, bluetooth: fail if user-requested profile doesn't exist
If we can't fulfill the user request fully, I think we shouldn't
fulfill it at all, to make it clear that the requested operation
didn't succeed.
Ahmed S. Darwish [Thu, 16 Jun 2016 08:27:37 +0000 (10:27 +0200)]
pstream: Add rationale for pa_cmsg_ancil_data_close_fds()
Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Arun Raghavan [Tue, 3 May 2016 12:56:51 +0000 (18:26 +0530)]
modargs: Add a mechanism to append modargs
This allows us to parse an extra set of modargs to tack on to an
existing set. Duplicates in the second set are ignored, since this fits
our use best. In the future, this could be extended to support different
merge modes (ignore dupes vs. replace with dupes), but I've left this
out since there isn't a clear need and it would be dead code for now.
Arun Raghavan [Tue, 3 May 2016 12:52:09 +0000 (18:22 +0530)]
alsa: Use pa_device_port->impl_free() for freeing port data
This allows us to clean up ucm port data associated with a port during
port clean up, instead of having to track this separately using a
dynarray.
Arun Raghavan [Tue, 3 May 2016 12:52:08 +0000 (18:22 +0530)]
device-port: Add mechanism to free implementation data
This will be needed if the implementation data stores pointers to
additional data that needs to be freed as well.
Chris Billington [Sat, 23 Jan 2016 01:31:34 +0000 (12:31 +1100)]
sink, source, device-port: renames to distinguish latency offsets
Renamed all variables pertaining to latency offsets of sinks and sources,
calling them "port_latency_offset" or similar instead. All of these variables
refer to latency offsets inherited from ports, rather than being unique to
the sinks or sources themselves.
This change is to pave the way for additional functionality for setting
latency offsets on sources and sinks independenly from the value they inherit
from their port. In order to implement them we first need this rename so that
the two latency offsets can be stored individually and summed when reporting
the total latency of the source or sink.
The renames made are:
pa_sink_set_latency_offset() -> pa_sink_set_port_latency_offset()
pa_source_set_latency_offset() -> pa_source_set_port_latency_offset()
sink->latency_offset -> sink->port_latency_offset
sink->thread_info.latency_offset -> sink->thread_info.port_latency_offset
source->latency_offset -> source->port_latency_offset
source->thread_info.latency_offset -> source->thread_info.port_latency_offset
PA_SINK_MESSAGE_SET_LATENCY_OFFSET -> PA_SINK_MESSAGE_SET_PORT_LATENCY_OFFSET
PA_SOURCE_MESSAGE_SET_LATENCY_OFFSET -> PA_SOURCE_MESSAGE_SET_PORT_LATENCY_OFFSET
Tanu Kaskinen [Thu, 2 Jun 2016 13:00:51 +0000 (16:00 +0300)]
webrtc: improve comment about mic geometry
The first mic channel position is not relevant for the target
direction definition.
Chris Billington [Sat, 23 Jan 2016 01:31:33 +0000 (12:31 +1100)]
source: Fixed bug: pa_source_set_port() did not update the latency_offset.
Unlike pa_sink_set_port(), which calls pa_sink_set_latency_offset() to update
the latency offset of the sink to match that of its newly set port,
pa_source_set_port() did not do so. This patch adds the appropriate call to
pa_source_set_latency_offset() in pa_source_set_port() to fix this.
Arun Raghavan [Wed, 1 Jun 2016 11:48:39 +0000 (17:18 +0530)]
json: Drop refcounting of json objects
We don't actually use the refcounting bits.
Signed-off-by: Arun Raghavan <arun@arunraghavan.net>
Arun Raghavan [Wed, 1 Jun 2016 11:48:38 +0000 (17:18 +0530)]
json: Add some more negative test cases
Signed-off-by: Arun Raghavan <arun@arunraghavan.net>
Arun Raghavan [Wed, 1 Jun 2016 11:48:37 +0000 (17:18 +0530)]
json: Add a positive test for nested objects
Signed-off-by: Arun Raghavan <arun@arunraghavan.net>
Arun Raghavan [Wed, 1 Jun 2016 11:48:36 +0000 (17:18 +0530)]
json: Error out for objects and arrays that are nested too deep
Signed-off-by: Arun Raghavan <arun@arunraghavan.net>
Arun Raghavan [Wed, 1 Jun 2016 11:48:35 +0000 (17:18 +0530)]
json: Handle error cases while parsing numbers
Signed-off-by: Arun Raghavan <arun@arunraghavan.net>
Arun Raghavan [Wed, 1 Jun 2016 11:48:34 +0000 (17:18 +0530)]
json: Add overflow checks for integer and float parsing
Signed-off-by: Arun Raghavan <arun@arunraghavan.net>
Arun Raghavan [Wed, 1 Jun 2016 11:48:33 +0000 (17:18 +0530)]
json: Correctly handle bad strings with missing closing quotes
Also add a test for this case.
Signed-off-by: Arun Raghavan <arun@arunraghavan.net>
Arun Raghavan [Wed, 1 Jun 2016 11:48:32 +0000 (17:18 +0530)]
format: Drop dependency on json-c
json-c has a symbol clash (json_object_get_type) with json-glib (which
at least a number of our GNOME clients use). This patch moves to our own
JSON parser so that we can avoid this kind of situation altogether.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=95135
Signed-off-by: Arun Raghavan <arun@arunraghavan.net>
Arun Raghavan [Wed, 1 Jun 2016 11:48:31 +0000 (17:18 +0530)]
pulse: Add a JSON-parsing library
Adding this to be able to drop dependency on json-c.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=95135
Signed-off-by: Arun Raghavan <arun@arunraghavan.net>
John Paul Adrian Glaubitz [Mon, 16 May 2016 18:53:13 +0000 (20:53 +0200)]
pulsecore: Fix incorrect architecture mapping on sparc64.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=95432
Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Signed-off-by: Arun Raghavan <arun@arunraghavan.net>
Juho Hämäläinen [Fri, 13 May 2016 14:39:41 +0000 (17:39 +0300)]
pulsecore: Don't allow unreferencing linked object.
Sink(-input) and source(-output) called unlink function when reference
count dropped to zero. This would result in unlink hooks being called
with an object having a reference count of zero, and this is not a
situation we want modules to have to deal with. It is better to just
remove the redundant unlinking code from sink(-input) and
source(-output) and assert on reference count in unlink functions as well.
It is expected that in well behaving code the owner of an object will
always unlink the object before unreferencing.
Signed-off-by: Arun Raghavan <arun@arunraghavan.net>
Aidan Gauland [Wed, 25 May 2016 10:26:42 +0000 (22:26 +1200)]
qpaeq: Don't set font-size on widgets
Setting the font-size CSS property on a widget overrides the system
font-size, and since qpaeq provides no mechanism for setting the
application's font-size, we should not do this.
This commit also removes the font-size property from commented-out calls to
setStyleSheet() so that if these are ever reinstated, this behaviour is
not reintroduced.
Signed-off-by: Arun Raghavan <arun@arunraghavan.net>
KimJeongYeon [Thu, 19 May 2016 02:35:44 +0000 (11:35 +0900)]
ladspa-sink: avoid to configure invalid format
LADSPA allows float format only, but module-ladspa-sink possibly
could be loaded with ***any*** 'format' parameter. Therefore noisy
sound heard. This patch avoids to be configured as invalid format.
Signed-off-by: KimJeongYeon <jeongyeon.kim@samsung.com>
Signed-off-by: Arun Raghavan <arun@arunraghavan.net>