Age | Commit message (Collapse) | Author | Files | Lines |
|
Silences these warnings:
[509/574] Compiling C object 'src/tests/a4ccf2d@@alsa-mixer-path-test@exe/alsa-mixer-path-test.c.o'.
../src/tests/alsa-mixer-path-test.c:24:20: warning: ‘load_makefile’ defined but not used [-Wunused-function]
static pa_strlist *load_makefile() {
^~~~~~~~~~~~~
../src/tests/alsa-mixer-path-test.c:17:20: warning: ‘get_default_paths_dir’ defined but not used [-Wunused-function]
static const char *get_default_paths_dir(void) {
^~~~~~~~~~~~~~~~~~~~~
|
|
The release notes, on which the NEWS file is based on, weren't complete
at the time of release. Now the notes should be complete.
|
|
This was missing, so it was building another tunnel-source instead.
Fixes https://bugs.archlinux.org/task/63755
|
|
Seems this happened because the order of automake variables for modules
is not consistent.
|
|
Signed-off-by: Milo Casagrande <milo@milo.name>
|
|
|
|
|
|
|
|
The comment has been incorrect for a while now. Thanks to Jan Steffens
for pointing this out.
|
|
|
|
Minor implementation change since last release (we now load X11
properties only for SSH connections).
|
|
|
|
Newer versions of Plasma no longer use this module, and the consensus
seems to be that module-switch-on-connect works better for most cases.
Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/509
|
|
Reading properties from the X11 root window is meant to provide 1:1 results
with reading the configuration directly in the local case. This configuration
is essentially different only in remote cases.
Add an extra check for the SSH_CONNECTION envvar, so we don't even need
opening a X11 display connection for IPC in the most usual case.
|
|
Add a second whitespace at the end of the line to force a newline in the
output.
|
|
Just like with handle_set_active_port, we need to look up the profile
corresponding to the provided path rather than doing a name comparison.
Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/709
|
|
This avoids a potential divide-by-zero when we try to decide how much to
write to the sink in the source thread when there is no sink.
Fixes https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/717
|
|
Subdirectories add to the top-level cdata (specifically, the SIMD
detection happens in the pulsecore meson.build), so we were missing
HAVE_MMX/SSE2/NEON defines without this fix.
|
|
|
|
|
|
|
|
We're seeing CI failures due to once-test sometimes taking long. Let's
give ourselves a little more space per test (2 min -> 5 min) to avoid
this.
|
|
There are potentially unresolved issues around the EAGAIN logic, but
this should prevent an infinite loop and log flood in the mean time.
Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/695
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Without this check we won't ever define HAVE_STDINT_H, which isn't used
in pulse directly, but is needed by e.g. the speex headers to work
correctly.
|
|
pulseaudio does not link against libbluetooth, as it's only talking to the
bluez daemon over dbus. So the build dependency on libbluetooth is overly
restrictive, as some embedded systems choose to ship without libbluetooth
but still have bluez daemon support.
This syncs the meson to the autotools configuration behavior by changing
the bluez option to a default on boolean.
|
|
Sync the meson NEON build files list with the autotools build
sources list. Fixes "ERROR: File svolume_neon.c does not exist."
|
|
Fixes https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/712
|
|
I don't know why these options were being passed to configure
(--sysconfdir has been there from the very beginning, --localstatedir
got added when the system mode was added). Overwriting system files by
default is not good, so let's not set these options.
|
|
- Header and function checks from configure.ac
(some libc, some libpthread, dladdr from libdl)
- Find iconv and check constness
|
|
|
|
* Fixed typo.
* Fixed use of double quotes.
Signed-off-by: Milo Casagrande <milo@milo.name>
|
|
As we currently still generate our tarballs using autotools, let's make
sure the meson build system is distributed with the tarball.
|
|
The various software volume implementations were being built as part of
libpulsecommon for some reason. These should only ever be used in the
daemon, so they should be in libpulsecore.
|
|
|
|
Adds the -version-script linker argument that we use with autotools to
version symbols in our public API.
|
|
Removes a warning from HAVE_GCONF not being set, and fixes generation of
a large section that depends on OS_IS_WIN32 being explicitly set to 0.
We can't set OS_IS_WIN32 to 0 by default since a bunch of code uses it
via an ifdef rather than by value.
|
|
This was being done automatically by autotools, now we need to manually
specify this for each executable/library with a dependency in a
non-standard directory.
|
|
This mirrors the autotools option for all server-side dynamic libraries.
|
|
|
|
To match Autotools:
- internal.h should not be installed
- Install simple.h and version.h
|
|
For ease of maintaining both build systems, use the same version info
sequences as configure.ac. This should be simplified after Autotools has
been dropped.
|
|
- Rename "pulsedspdir" to the same "padsplibdir" that Autotools uses.
- Add a new option "pulsedsp-location" that is only used for padsp.in,
just like Autotools' --with-pulsedsp-location.
- Use 'set' instead of 'set_quoted' to avoid PULSEDSP_LOCATION getting
quoted twice.
|
|
Rename struct rtp_payload to rtp_sbc_payload as it is specific for SBC
codec payload.
Add proper checks for endianity in rtp.h header and use uint8_t type
where appropriated.
Field frame_count is only 4 bit number, so add checks to prevent overflow.
And because is_fragmented field is not parsed by decoder there is no
support for decoding fragmented SBC frames. So throw an error in this case.
|
|
SBC codec reset() method may fail, so propagate this failure to caller.
|
|
methods
Add explanation why minimal bitpool value is used in SBC codec as initial
bitpool value for A2DP source.
Set buffer size for reading/writing from/to A2DP socket to exact link MTU
value. This would ensure that A2DP codec does not produce larger packet as
maximal possible size which can be sent.
Because A2DP socket is of SOCK_SEQPACKET type, it is guaranteed that
we do not read two packets via one read/recvmsg call.
Properly check for all return values of encode/encode methods of A2DP codec
functions. They may fail at different levels. Also encode or decode API
method may return zero length buffer (e.g. because of algorithmic delay of
codec), so do not fail in this case.
|
|
conditions this may lead to massive slowdown of floating point operations
when underflows or denormals are encountered. In particular, this problem
was observed with the soxr resampler after applying
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/merge_requests/120
Therefore this patch adds -ffast-math to the link flags of the pulseaudio
daemon. Linking with -ffast-math adds a procedure set_fast_math() to the
startup code of the daemon. On x86, the procedure sets bit 6 and 15 of the
mxcsr register. When these bits are set, denormals and results of
underflowing operations are truncated to 0.
|
|
|
|
Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/706
|
|
For all our MMX/SSE code, we use a temporary channel variable, assigned
to the DI register, which is zero'ed as the very first operation in the
inline assembly code, before any other code is run.
With GCC 9.1, while using -O2, the DI register is also used for the
input operand. This is perfectly legal, but causes our code to become
incorrect because the output operand that is assigned to DI is not
explicitly marked as being clobbered before inputs are read.
This change fixes the problem by adding an earlyclobber annotation (&)
to the DI output argument.
|
|
|
|
This profile set was missing from the installation.
|
|
|
|
|
|
We've added new API and updated an enum. A bunch of function parameters
have been marked as const, but this probably shouldn't count as a change
anyway.
|
|
The original code that was written was trying to detect what hypervisor
we were running under, rather than testing the presence bit first. We
don't really need the former, so let's use the more comprehensive latter
instead.
Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/684
|
|
If process_rewind() is called with nbytes = 0, process_rewind() will
nevertheless request a rewrite of the render memblockq.
This patch fixes the problem by adding the render memblockq length to the
rewrite amount only if nbytes > 0.
|
|
Currently the rewind logic for the source output is broken if the output
does not implement a process_rewind() callback. In that case, the read
index of the delay memblockq is rewound. This is wrong, because the data
that is going to be re-written was not yet read. Instead the write index
should be rewound and the read index left untouched. This is the reason
for the rewind glitches of monitor sources.
|
|
This crash occurs when PA is connected to a phone through the oFono
backend.
When disabling the Bluetooth adapter, pa_bluetooth_device is removed before
hf_audio_card. Both keep refs on pa_bluetooth_transport. Those removal will
call pa_bluetooth_transport_free() from device_free() (bluez5-util.c) and
hf_audio_card_free() (backend-ofono.c).
In the end, the call to pa_bluetooth_transport_free() calls
pa_hasmap_remove() through pa_bluetooth_transport_unlink(), but since
memory has already been freed, the second try results in a segfault.
Triggering hf_audio_card removal during pa_bluetooth_device removal allows
hf_audio_card to be freed at the right time.
|
|
setup_stream() crashes when calling set_nonblock() with an invalid
stream_fd.
On a new call, the ofono backend gets notified of a new connection.
The ofono backend sets the transport state to playing, and that triggers
a profile change, which sets up the stream for the first time.
Then module-bluetooth-policy sets up the loopbacks. The loopbacks get
fully initialized before the crash.
After module-bluetooth-policy has done its things, the execution
continues in the transport state change hook. The next hook user is
module-bluez5-device, whose handle_transport_state_change() function
gets called. It will then set up the stream again even though it's
already set up. I'm not sure if that's a some kind of a bug.
setup_stream() can handle the case where it's unnecessarily called,
though, so this second setup is not a big problem.
The crash happens, because the connection died due to POLLHUP in the IO
thread before the second setup_stream() call.
|
|
Gets rid of > 65,000 unnecessary close() syscalls
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Needed for FIONREAD on Solaris
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Without this, meson on Solaris exits with:
src/daemon/meson.build:138:15: ERROR: Unknown variable "systemd_dep".
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
|
"Failed to initialize daemon" is not as informative message as it could
be. This change was inspired by the discussion in this bug:
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/597
|
|
Signed-off-by: Topi Miettinen <toiwoton@gmail.com>
|
|
The warnings:
modules/bluetooth/a2dp-codec-sbc.c: In function ‘default_bitpool’:
modules/bluetooth/a2dp-codec-sbc.c:161:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
switch (mode) {
^~~~~~
modules/bluetooth/a2dp-codec-sbc.c:169:9: note: here
case SBC_SAMPLING_FREQ_44100:
^~~~
modules/bluetooth/a2dp-codec-sbc.c:170:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
switch (mode) {
^~~~~~
modules/bluetooth/a2dp-codec-sbc.c:180:9: note: here
case SBC_SAMPLING_FREQ_48000:
^~~~
These were valid warnings in that an invalid channel mode would result
in unintended fallthroughs, but the end result would anyway been a crash
in the pa_assert_not_reached() at the end of the function, so
functionally there's no change.
|
|
|
|
The original atomic implementation in pulseaudio based on
libatomic stated that the intent was to use full memory barriers.
According to [1], the load and store implementation based on
gcc builtins matches sequential consistent (i.e. full memory barrier)
load and store ordering only for x86.
I observed random crashes in client applications using memfd srbchannel
transport on an armv8-aarch64 platform (cortex-a57).
In all those crashes the first read on the pstream descriptor
(the size field) was wrong and looked like it contained old data.
I boiled the relevant parts of the srbchannel implementation down to
a simple test case and could observe random test failures.
So I figured that the atomic implementation was broken for armv8
with respect to cross-cpu memory access ordering consistency.
In order to come up with a minimal fix, I used the newer
__atomic_load_n/__atomic_store_n builtins from gcc.
With
aarch64-linux-gnu-gcc (Linaro GCC 7.3-2018.05) 7.3.1 20180425
they compile to
ldar and stlxr on arm64, which is correct according to [1] and [2].
The other atomic operations based on __sync builtins don't need
to be touched since they already are of the full memory barrier
variety.
[1] https://www.cl.cam.ac.uk/~pes20/cpp/cpp0xmappings.html
[2] <https://community.arm.com/developer/ip-products/processors
/b/processors-ip-blog/posts/armv8-a-architecture-2016-additions>
|
|
|
|
See the added comments for why this is necessary.
Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/667
|
|
The function calculates the correct timeout (in microseconds) to assign
in the `u` variable, but then assigns `m->prepared_timeout` the value
of the `timeout` argument (in milliseconds).
|
|
We met two problems recently, one happened on a Lenovo machine with
dual analogue codecs, the other happened on a Dell machine with
a digital mic directly connected to PCH. The two problems are
basically same, there is an internal mic and an external mic, the
internal mic always shows up in the gnome-control-center, the external
mic only shows up when it is plugged. After the external mic is
plugged and users select it from gnome-control-center, the
gnome-control-center will read all saved streams through extension_cb,
and bind the source of external mic to all streams, after that the
apps only record sound via the source of external mic, after the
external mic is unplugged, the internal mic will automatically be
selected since it is the only left input device in the
gnome-control-center, since users don't select it, all streams are
still bond the source of external mic. When users record sound via
apps, they can't record any sound even the default_source is the
source of internal mic and the internal mic is selected in the UI.
It is very common that a machine has internal mic and external mic,
but this problem didn't expose before, that is because both internal
mic and external mic belong to one source, but for those two
machines, the internal mic belongs to one source, while the external
mic belongs to another source (they are in differnt codecs or one is
in the codec and the other is from PCH),
To fix it with a mininal change, we just check if the active_port is
PA_AVAILABLE_NO or not when building a new stream, if it is, don't
restore the device to the new built stream, let pa_source_output_new()
decide the source device for this stream.
And we also do the same change to sink_input.
This change only affects the new built streams, it will not change
the database, so the users' preference is still saved in the database,
after the active_port is not PA_AVAILABLE_NO, the new streams will
still restore to the preferred device.
Signed-off-by: Hui Wang <hui.wang@canonical.com>
|
|
|
|
This avoids the running the longer daemon tests by default to make CI
faster.
|
|
These weren't meant to be run, so we skip then while generating meson
tests.
|
|
The fields weren't used, and were incorrectly munged during generation.
This makes validation succeed.
|
|
This test relies on parsing the generated Makefile. A meson equivalent
requires to re-write all the parser.
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
|
|
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
|
|
This solves numerous timeout failures
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
|
|
Unlike autotools, we use the option --coverage, which is a synonym for
-profile-arcs and -ftest-coverage (when compiling) and -lgcov (when
linking).
For reference, see:
https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#Instrumentation-Options
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
|
|
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
|
|
For now esound is not supported with the meson build, although it
wouldn't be that hard to support it.
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
|
|
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
|
|
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
|
|
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
|
|
As it'sdone in the autotools
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
|
|
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
|
|
Like it was with the aututools
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
|
|
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
|
|
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
|
|
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
|
|
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
|
|
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
|
|
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
|
|
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
|
|
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
|
|
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
|
|
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
|
|
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
|
|
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
|
|
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
|
|
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
|
|
This seems to be the common way to handle that, until meson decides to
address #1602: https://github.com/mesonbuild/meson/issues/1602
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
|
|
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
|
|
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
|
|
There's already a hook that modifies the search path when run from the
build tree.
if (pa_run_from_build_tree()) {
pa_log_notice("Detected that we are run from the build tree, fixing search path.");
#ifdef MESON_BUILD
c->dl_search_path = pa_xstrdup(PA_BUILDDIR PA_PATH_SEP "src" PA_PATH_SEP "modules");
#else
c->dl_search_path = pa_xstrdup(PA_BUILDDIR);
#endif
} else
I'm not sure how it works behind the hood, but by setting
--dl-search-path, we get errors in the logs when running `make
check-daemon`:
E: [pulseaudio][daemon/ltdl-bind-now.c:75 bind_now_open()] Failed to open module /home/arno/proj/pulse/src/pa.up/src/.libs/.libs/module-native-protocol-unix.so:
/home/arno/proj/pulse/src/pa.up/src/.libs/.libs/module-native-protocol-unix.so: cannot open shared object file: No such file or directory
I: [pulseaudio][pulsecore/module.c:197 pa_module_load()] Loaded "module-native-protocol-unix" (index: #3; argument: "").
So basically, PA tries two paths, fails the first time (obviously we can
see the path is not correct), then tries again with another path (where
does it gets it?) and succeeds. So there's no obvious error if you don't
look at the log.
This commit removes the useless `--dl-search-path`, which has the effect
to remove the errors in the logs.
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
|
|
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
|
|
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
|
|
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
|
|
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
|
|
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
|
|
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
|
|
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
|
|
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
|
|
This test is present in the configure.ac, it was forgotten in
meson.build.
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
|
|
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
|
|
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>
|
|
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.
|
|
|
|
The userdata struct has a pointer to the core itself, no need to go via
u->module to get to it.
|
|
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.
|
|
|
|
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.
|
|
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.
|
|
|
|
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
|
|
Suggested by R. Diez:
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/613
|
|
|
|
|
|
|
|
|
|
|
|
|
|
https://gitlab.freedesktop.org/wwmm/pulseaudio into allow-to-disable-null-sink-rewinds
|
|
|
|
|
|
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>
|
|
This is needed for currently used features (disabler and install in
configure_file).
|
|
The recent bluetooth patches didn't update the Meson build system.
|
|
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
|
|
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.
|
|
|
|
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.
|
|
|
|
|
|
|
|
Signed-off-by: David Heidelberg <david@ixit.cz>
|
|
Signed-off-by: David Heidelberg <david@ixit.cz>
|
|
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.
|
|
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.
|
|
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.
|
|
We have optimised 2-channel->4-channel rearrange remap functions. Test
them.
|
|
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.
|
|
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>
|
|
Translated in sync with the guidelines at
http://l10n.lrn.ru/wiki/Pulseaudio
|
|
Signed-off-by: Sangchul Lee
|
|
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>
|
|
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
|
|
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>
|
|
|
|
|
|
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.
|
|
Currently, virtual sinks and sources are not suspended when the master sink
or source is suspended. To implement this, the slave must be able to track
the suspend cause of the master.
With this patch, the sink input suspend callback will not only be called
when the sink or source is changing state, but also when the suspend cause
changes. Similar to the set_state_in_*_thread_cb() functions, the suspend
callback receives a state and a suspend cause as additional arguments.
Because the new state and suspend cause of the sink or source have already
been set, the old values are passed to the callback.
|
|
Currently, when a system is waking up from suspend, the resume process of the
ALSA sink and source is unstable. Sometimes the device needs to be restarted
multiple times and when the system was suspended between snd_pcm_mmap_begin()
and snd_pcm_mmap_commit(), pulseaudio crashes on resume.
Additionally, variables are not reset after the resume, so that sink/source
report wrong latencies.
This patch fixes the issues by closing and re-opening the PCM if recovery
from an error condition is not possible. Additionally, the variables are
reset, so that latencies are reported correctly.
|
|
After a suspend/resume cycle of a system, it may be possible that module-loopback
accumulates several seconds of audio in the memblockq before the alsa sink becomes
active again. Also it may be possible for other reasons that the actual loopback
latency is too different from the target latency to be adjusted in a reasonable
time by the normal rate controller.
This patch adds the option fast_adjust_threshold_msec to module-loopback. If set,
the latency will be forcefully adjusted to the target latency by dropping or
inserting samples if the actual latency differs more than fast_adjust_threshold_msec
from the target latency.
Also the calculation of the real adjust time would fail when the system was
suspended because that case was not considered. Now the real adjust time
calculation is skipped if the time passed between two calls of adjust_rates()
appears significantly too long.
|
|
|
|
Signed-off-by: Milo Casagrande <milo@milo.name>
|
|
pa_split_in_place() and pa_split_spaces_in_place() are modifed
to use size_t type instead of integer type.
alsa-ucm.c is revised according to this change.
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
|
|
The old minimum version was set in commit 57e3ccaf51 based on what the
commit author happened to have installed at the time. Russell Treleaven
now confirmed that Debian 8's gettext version, 0.19.3, works fine too,
or at least PulseAudio builds without errors. There might be room to
lower the required version even further, but that requires someone to
test older gettext versions.
|
|
The word "identical" was being used in a weird way that could make the
comment a bit difficult to undertand.
|
|
In a former commit 37358e42c49a ("alsa: Suppress udev detection of sound
card for some units on IEEE 1394 bus"), PulseAudio has udev rules to
suppress handling some units on IEEE 1394 bus for a below issue:
Bug 199365 - repeating bus resets on Firewire bus with Focusrite Saffaire 26/io
https://bugzilla.kernel.org/show_bug.cgi?id=199365
However, I found that the rules match another model; Focusrite Liquid
Saffire 56. For detail, refer to below patch for Linux sound subsystem:
[alsa-devel] [PATCH] ALSA: bebob: use more identical mod_alias for
Saffire Pro 10 I/O against Liquid Saffire 56
https://mailman.alsa-project.org/pipermail/alsa-devel/2019-February/146003.html
For PulseAudio, the udev rule should be improved, because Liquid Saffire 56
(an application of TCAT TCD2200 ASIC, a.k.a Dice Jr.) can be handled by
pulseaudio without the issue.
This commit changes udev rule with model name instead of model_id from
configuration ROM. Below is data on udevd for Liquid Saffire 56, for
your information:
$ udevadm info -q all -p /sys/bus/firewire/devices/fw1.0/sound/card2/
P: /devices/pci0000:00/0000:00:01.2/0000:03:00.2/0000:04:07.0/0000:0a:00.0/0000:0b:00.0/fw1/fw1.0/sound/card2
E: DEVPATH=/devices/pci0000:00/0000:00:01.2/0000:03:00.2/0000:04:07.0/0000:0a:00.0/0000:0b:00.0/fw1/fw1.0/sound/card2
E: ID_BUS=firewire
E: ID_FOR_SEAT=sound-pci-0000_0b_00_0
E: ID_ID=firewire-0x00130e04018001e9
E: ID_MODEL=LIQUID_SAFFIRE_56
E: ID_MODEL_FROM_DATABASE=XIO2213A/B/XIO2221 IEEE-1394b OHCI Controller [Cheetah Express]
E: ID_MODEL_ID=0x000006
E: ID_PATH=pci-0000:0b:00.0
E: ID_PATH_TAG=pci-0000_0b_00_0
E: ID_PCI_CLASS_FROM_DATABASE=Serial bus controller
E: ID_PCI_INTERFACE_FROM_DATABASE=OHCI
E: ID_PCI_SUBCLASS_FROM_DATABASE=FireWire (IEEE 1394)
E: ID_SERIAL=0x00130e04018001e9
E: ID_SERIAL_SHORT=0x00130e04018001e9
E: ID_VENDOR=Focusrite
E: ID_VENDOR_FROM_DATABASE=Texas Instruments
E: ID_VENDOR_ID=0x00130e
E: SOUND_INITIALIZED=1
E: SUBSYSTEM=sound
E: SYSTEMD_WANTS=sound.target
E: TAGS=:seat:systemd:
E: USEC_INITIALIZED=9802422583
Fixes: 37358e42c49a ("alsa: Suppress udev detection of sound card for some units on IEEE 1394 bus")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
|
|
This broke during a refactor of sink/source state-change.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Similar to module-tunnel-sink-new, module-virtual-source did not create
a rtpoll for the uplink sink. This lead to a crash when the uplink sink
was used by module loopback, because module-loopback relies on the sink
to provide a rtpoll. Additionally, the sink was not unlinked when the
module was unloaded.
This patch fixes both issues. The rtpoll created is never run by the sink,
so the patch is no real fix but just a workaround to make module-loopback
happy.
|
|
|
|
pa_card_profile_set_available needs to check if the card is linked
before firing PA_CORE_HOOK_CARD_PROFILE_AVAILABLE_CHANGED, so callbacks
connected to it receive a fully initialized card object.
This fixes a crash introduced by commit 30a551bbc
"switch-on-port-available: Check if we need to change the active
profile".
|
|
|
|
If one device tries to use PulseAudio to send audio over A2DP to another
device with bluez-alsa, that doesn't work because PulseAudio uses an
incorrect RTP payload type and bluez-alsa checks that the RTP payload
type is correct. According to the A2DP spec, the payload type should be
set to a number between 96 and 127.
Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/591
|
|
Mostly deals with failure more gracefully, and NULL-initialises the
format array for safety.
|
|
We split out some of the check-daemon tests that take a long time to
run, and also reduce how long we wait for the daemon to start up. This
should make the CI process quicker.
|
|
This allows us to disable automatically updating build system files in
case things change. This is desirable in the common case, but not
necessarily for CI, where we want the ability to take a build directory
as an artifact from one stage to the next (i.e. into a fresh checkout).
|
|
|
|
|
|
We dropped HAL support years ago.
|
|
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
|
|
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
|
|
client.conf
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
|