Commit graph

9094 commits

Author SHA1 Message Date
Arnaud Rebillout
f6abc6841e meson: Move shm_dep check where it belongs
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2019-06-08 10:32:14 +02:00
Arnaud Rebillout
a9b55dbbd4 meson: Add some symbol checks
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2019-06-08 10:32:14 +02:00
Arnaud Rebillout
a144c25176 meson: Add a check for sys/eventfd.h header
This test is present in the configure.ac, it was forgotten in
meson.build.

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2019-06-08 10:32:14 +02:00
Arnaud Rebillout
9a10eccea3 meson: Add a dependency object for libpulse_mainloop_glib
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2019-06-08 10:32:14 +02:00
Sangchul Lee
8a4e0c167b sink: Set monitor source's avoid-resampling value to its sink's
It was omitted. This patch fixes unexpected behavior that avoid-
resampling does not work in some cases.

Signed-off-by: Sangchul Lee <sangchul1011@gmail.com>
2019-06-07 22:35:19 +09:00
Arun Raghavan
37dbeae031 build-sys: Fix up meson install paths
Brings things in line with the autotools build, and adds ALSA mixer
paths and profile-sets into the meson build system as well.

The module installation path is also now customisable.
2019-06-06 18:49:59 +02:00
Tanu Kaskinen
91bb9b77e4 loopback: fix callback name in comment 2019-05-29 11:07:01 +03:00
Tanu Kaskinen
9de4b10093 loopback: remove an unnecessary level of pointer dereferencing
The userdata struct has a pointer to the core itself, no need to go via
u->module to get to it.
2019-05-29 10:44:29 +03:00
Felipe Sateler
fd9e3452e2 i18n: Don't compile with -ffast-math
This flag results in calls to (at least) isfinite() and isnan() becoming
skipped, and a constant false returned. This caused volume-test to fail
on Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=916504

Since PulseAudio deals with negative infinities with volume dB values,
this is not a problem only in volume-test. We shouldn't use -ffast-math
at all.
2019-05-28 19:16:49 +03:00
Friedel Wolff
1434b51d8b i18n: New translation for Afrikaans (af) 2019-05-27 11:58:50 +00:00
Georg Chini
755884d131 core: add simple message interface
This patch adds a new feature to the core which allows to send messages
to objects. An object can register/unregister a message handler with
pa_message_handler_{register, unregister}() while a message can be sent
to the handler using the pa_message_handler_send_message() function.
A message has 4 arguments (apart from passing the core):

object_path: The path identifying the object that will receive the message
message: message command
message_parameters: A string containing additional parameters
response: Pointer to a response string that will be filled by the
          message handler. The caller is responsible to free the string.

The patch is a precondition for the following patches that allow clients
to send messages to pulseaudio objects.

There is no restriction on object names, except that an object path
always starts with a "/". The intention is to use a path-like syntax,
for example /core/sink_1 for a sink or /name/instances/index for modules.
The exact naming convention still needs to be agreed.
2019-05-25 15:28:41 +03:00
Georg Chini
ab9fed9523 core-util: Avoid usage of pa_strbuf in pa_escape()
The current code uses a pa_strbuf to construct the escaped string. This
will generate a linked list member for each character which may be very
inefficient.
This patch avoids the use of pa_strbuf by allocating a sufficiently large
string which can be filled with the output data.
2019-05-25 15:28:41 +03:00
Nate Brown
f34ea0f0c3 Expose control param to alsa-card module 2019-05-23 14:15:55 +00:00
Tanu Kaskinen
59005d16f1 core: send subscription events when the configured default sink or source changes
These events were missing, because the
pa_core_update_default_sink/source() calls were assumed to send the
subscription events when necessary. Often that indeed is the case, but
if the current configured default sink doesn't exist, and then the
current default sink is set as the configured default sink, the
configured default sink changes but the default sink doesn't, and in
this case pa_core_update_default_sink() doesn't send the change event.

module-default-device-restore relies on getting a notification whenever
the configured default sink changes, and the missing event meant that
the files containing the configured sink and source weren't updated in
some cases.

Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/648
2019-05-23 07:37:15 +00:00
Tanu Kaskinen
a15cde4179 i18n: a couple of improvements to the Spanish translation
Suggested by R. Diez:
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/613
2019-05-22 18:07:09 +03:00
Fran Diéguez
c6832b1472 i18n: Update Galician translations 2019-05-21 11:57:18 +00:00
Yuri Chornoivan
a4545a2e5d [l10n] Update Ukrainian translation 2019-05-21 09:56:29 +00:00
Rafael Fontenelle
fe4a9025ce Update Brazilian Portuguese translation 2019-05-20 10:57:14 +00:00
Josef Andersson
a01ac57711 Update Swedish Translation 2019-05-20 09:44:10 +00:00
Wellington Wallace
eadd987a66 null-sink: setting maximum latency to 50 ms when rewinds are disabled 2019-05-08 12:05:49 -03:00
Wellington Wallace
e74a154f29 null-sink: add an option that allows rewinds to be disabled 2019-05-07 11:58:45 -03:00
Wellington Wallace
2102f09895 Merge branch 'allow-to-disable-null-sink-rewinds' of https://gitlab.freedesktop.org/wwmm/pulseaudio into allow-to-disable-null-sink-rewinds 2019-05-07 11:06:59 -03:00
Wellington Wallace
16a7f1e02c null-sink: add an option that allows rewinds to be disabled 2019-05-04 16:39:16 +00:00
Wellington Wallace
851e884516 null-sink: add an option that allows rewinds to be disabled 2019-05-04 13:21:21 -03:00
Takashi Iwai
b89d33bb18 alsa: Fix inclusion of use-case.h
The recent change in ALSA upstream stripped -I$include/alsa path from
pkgconfig.  We already fixed for this change in some places but still
the code for UCM was overlooked, and this resulted in the unresolved
symbols in alsa card module. Fix them as well.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-04-22 11:06:43 +03:00
Arun Raghavan
b943caa17f build-sys: Update meson dependency to 0.50.0
This is needed for currently used features (disabler and install in
configure_file).
2019-04-17 15:58:45 +05:30
Tanu Kaskinen
2f6a46ca1a build-sys: Fix the Meson build
The recent bluetooth patches didn't update the Meson build system.
2019-04-12 16:05:51 +03:00
Pali Rohár
1b6e5b8554 bluetooth: Set correct endianity of audio samples for SBC codec
Pulseaudio SBC codec defines that audio samples are in PA_SAMPLE_S16LE
format which is little endian. But libsbc library expects audio samples by
default in host endianity which is big endian on big endian system. So SBC
support on big endian system is broken. To fix this problem tell libsbc
library that audio samples are in little endian to match PA_SIMPLE_S16LE
sample format.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=91359
2019-04-12 15:09:49 +03:00
Pali Rohár
63add82c82 bluetooth: Clean up SBC bitpool calculation
Remove dead code and replace numeric bitpool values by macro definitions.

Maximal bitpool value in fill_capabilities() was reduced from 64 to 53
(SBC_BITPOOL_HQ_JOINT_STEREO_44100) because default_bitpool() already set
maximal value to 53.

This patch does not change SBC behavior as maximal bitpool was already
limited to 53. So it is just clean up.
2019-04-12 15:09:33 +03:00
Pali Rohár
745c161cc0 bluetooth: Add missing validations for SBC codec parameters 2019-04-12 15:09:16 +03:00
Pali Rohár
106aa91477 bluetooth: Modular API for A2DP codecs
This patch introduce new modular API for bluetooth A2DP codecs. Its
benefits are:

* bluez5-util and module-bluez5-device does not contain any codec specific
  code, they are codec independent.

* For adding new A2DP codec it is needed just to adjust one table in
  a2dp-codec-util.c file. All codec specific functions are in separate
  codec file.

* Support for backchannel (microphone voice). Some A2DP codecs (like
  FastStream or aptX Low Latency) are bi-directional and can be used for
  both music playback and audio call.

* Support for more configurations per codec. This allows to implement low
  quality mode of some codec together with high quality.

Current SBC codec implementation was moved from bluez5-util and
module-bluez5-device to its own file and converted to this new A2DP API.
2019-04-12 15:09:08 +03:00
Pali Rohár
e8c4638f79 bluetooth: Update a2dp-codecs.h from upstream bluez project 2019-04-12 13:56:28 +03:00
Pali Rohár
e81e7a2ca5 bluetooth: policy: Remove BlueZ 4 related code 2019-04-12 13:56:25 +03:00
Moo
f08443e186 l10n: Update lt.po 2019-04-10 17:15:06 +00:00
David Heidelberg
44c15e6001 meson: when avahi is disabled, do not build it's code
Signed-off-by: David Heidelberg <david@ixit.cz>
2019-04-10 17:09:40 +00:00
David Heidelberg
f5f474dc67 meson: fix build with simple
Signed-off-by: David Heidelberg <david@ixit.cz>
2019-04-10 17:09:40 +00:00
Arun Raghavan
363b1ae69c thread-mainloop: Add API for running a callback unlocked
This adds API to allow clients to schedule a callback in the mainloop
thread without the mainloop lock being held. This is meant for a case
where the client might be dealing with locking its own objects in
addition to the mainloop thread itself. In this case, it might need ton
control the locking order of the two, to match the order in other
threads, as it might not always be able to allow for its objects to be
locked after the mainloop thread lock.
2019-03-31 09:18:37 +00:00
Georg Chini
824e685ac0 null-source: fix multiple bugs
The current null-source implementation has several bugs:

1) The latency reported is the negative of the correct latency.
2) The memchunk passed to pa_source_post() is not initialized
with silence.
3) In PA_SOURCE_MESSAGE_SET_STATE the timestamp is always set
when the source transitions to RUNNING state. This should only
happen when the source transitions from SUSPENDED to RUNNING
but also if it changes from SUSPENDED to IDLE.
4) The timing of the thread function is incorrect. It always
uses u->latency_time, regardless of the specified source
latency.
5) The latency_time argument seems pointless because the source
is defined with dynamic latency.

This patch fixes the issues by
1) inverting the sign of the reported latency,
2) initializing the memchunk with silence,
3) changing the logic in PA_SOURCE_MESSAGE_SET_STATE so that
the timestamp is set when needed,
4) using u->block_usec instead of u->latency_time for setting
the rtpoll timer and checking if the timer has elapsed,
5) removing the latency_time option.
2019-03-29 06:11:06 +00:00
Sascha Silbe
034b77823a remap: support S32NE work format
So far PulseAudio only supported two different work formats: S16NE if
it's sufficient to represent the input and output formats without loss
of precision and FLOAT32NE in all other cases. For systems that use
S32NE exclusively, this results in unnecessary conversions from S32NE to
FLOAT32NE and back again.

Add S32NE remap operations and make use of them (for the COPY and
TRIVIAL resamplers) if both input and output format are S32NE. This
avoids the back and forth conversions between S32NE and FLOAT32NE,
significantly improving performance for those cases.
2019-03-29 06:04:28 +00:00
Sascha Silbe
1e4fb61436 tests: test NEON 2-channel->4-channel rearrange
We have optimised 2-channel->4-channel rearrange remap functions. Test
them.
2019-03-29 06:04:28 +00:00
Sascha Silbe
ac4a50268f tests: fix possible segfault in cpu-remap-test
pa_init_remap_func() takes care to initialise pa_remap_t.do_remap to
NULL before calling init_remap_func (the CPU-specific remap init
function) and invokes init_remap_c if init_remap_func did not set
pa_remap_t.do_remap to non-NULL. remap_init_test_channels() calls
init_remap_func() directly so it must make sure pa_remap_t.do_remap is
set to NULL. Otherwise we'll end up with a random value in
pa_remap_t.do_remap if there is no CPU-optimised remap function for the
current operation.
2019-03-29 06:04:28 +00:00
Olaf Hering
993d3fd89e alsa: Use correct header path
Consumers are expected to use <alsa/asoundlib.h> instead of
<asoundlib.h>.

This is in preparation of an change to pkgconfig(alsa) to
not pollute CFLAGS with -I/usr/include/alsa anymore.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
2019-03-27 08:41:55 +00:00
Alexander Potashev
129357f206 i18n: Update Russian translation
Translated in sync with the guidelines at
http://l10n.lrn.ru/wiki/Pulseaudio
2019-03-27 09:54:50 +05:30
Sangchul Lee
a56c8a14d6 stream-interaction: Remove useless condition
Signed-off-by: Sangchul Lee
2019-03-26 14:54:15 +00:00
Sangchul Lee
65cc86f609 role-ducking, role-cork: Add use_source_trigger argument
This is added to keep backward compatibility. The default value of
this new argument is false. Therefore, triggering by source-output
will be activated only if it is set to true explicitly.

Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
2019-03-26 14:54:15 +00:00
Sangchul Lee
5540f728e5 stream-interaction: Use PA_IDXSET_FOREACH macro to iterate idxset
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
2019-03-26 14:54:15 +00:00
Sangchul Lee
0f4f109a3c stream-interaction: Support for triggering ducking/cork by source-output
Previously, media.role property of only sink-input is used to
determine to trigger and apply ducking or cork to sink-inputs.

On the other hand, some use cases require that source-output
also need to trigger the effect to sink-inputs. Therefore this
patch adds logic to retrieve source-ouputs to find trigger role
by checking media.role property and apply ducking/cork to sink-
inputs that meet conditions.

Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
2019-03-26 14:54:15 +00:00
scootergrisen
899b176f39 i18n: Update Danish translation 2019-03-25 16:44:05 +00:00
scootergrisen
54e7373042 i18n: Add danish translation 2019-03-25 13:47:34 +01:00
Georg Chini
d537e1a8ee ladspa-sink: Suspend virtual sink when master is suspended
Currently, the ladspa-sink is not suspended when the master sink is suspended.

With this patch, the ladspa-sink will be suspended with suspend cause
PA_SUSPEND_UNAVAILABLE when the master sink is suspended for other reasons
than PA_SUSPEND_IDLE. This fixes issue #15.
2019-03-25 05:16:15 +00:00