summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* bluetooth: Fix crash in setup_stream()Frédéric Danis2019-07-021-2/+24
| | | | | | | | | | | | | | | | | | | | | | 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.
* core-util: Use /proc/fd on Solaris as well in pa_close_allAlan Coopersmith2019-07-011-1/+1
| | | | | | Gets rid of > 65,000 unnecessary close() syscalls Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* meson: check for sys/filio.hAlan Coopersmith2019-07-011-0/+1
| | | | | | Needed for FIONREAD on Solaris Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* meson: fix builds on platorms without libsystemdAlan Coopersmith2019-07-011-4/+4
| | | | | | | 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>
* i18n: update Polish translationPiotr Drąg2019-06-301-32/+41
|
* Update Croatian translationmuzena2019-06-231-416/+526
|
* main: Log more information when executing default.pa failsTanu Kaskinen2019-06-221-4/+10
| | | | | | "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
* daemon: Harden systemd serviceTopi Miettinen2019-06-171-2/+9
| | | | Signed-off-by: Topi Miettinen <toiwoton@gmail.com>
* a2dp-codec-sbc: get rid of compiler warningsTanu Kaskinen2019-06-161-0/+3
| | | | | | | | | | | | | | | | | | | | | | | 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.
* .gitignore: add atomic-testTanu Kaskinen2019-06-151-0/+1
|
* atomic: fix load and store for armv7 and higherThomas Hutschenreuther2019-06-115-1/+198
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* i18n: update Polish translationPiotr Drąg2019-06-101-650/+675
|
* sink, source: Don't change suspend cause when unlinkingTanu Kaskinen2019-06-102-2/+10
| | | | | | See the added comments for why this is necessary. Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/667
* mainloop: fix timeout assignment in pa_mainloop_prepareshdown2019-06-091-1/+1
| | | | | 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).
* stream-restore: Don't restore if the active_port is PA_AVAILABLE_NOHui Wang2019-06-091-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* i18n: Fix copyright information in pt_BR.poMark Filion2019-06-091-1/+1
|
* meson: Duplicate split of long daemon tests from autotools buildArun Raghavan2019-06-081-6/+17
| | | | | This avoids the running the longer daemon tests by default to make CI faster.
* meson: Skip norun testsArun Raghavan2019-06-081-4/+6
| | | | | These weren't meant to be run, so we skip then while generating meson tests.
* daemon: Drop empty fields in desktop fileArun Raghavan2019-06-081-2/+0
| | | | | The fields weren't used, and were incorrectly munged during generation. This makes validation succeed.
* meson: Disable alsa-mixer-path-testArnaud Rebillout2019-06-081-0/+5
| | | | | | | 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>
* meson: Add running-from-build-tree optionArnaud Rebillout2019-06-082-0/+8
| | | | Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
* meson: Increase timeout for testsArnaud Rebillout2019-06-081-1/+2
| | | | | | This solves numerous timeout failures Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
* meson: Add support for gcovArnaud Rebillout2019-06-082-1/+11
| | | | | | | | | | | 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>
* meson: Add ORC supportArnaud Rebillout2019-06-085-16/+59
| | | | Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
* meson: Disable esound modulesArnaud Rebillout2019-06-081-3/+3
| | | | | | | 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>
* meson: Install headersArnaud Rebillout2019-06-081-0/+4
| | | | Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
* meson: Install cmake filesArnaud Rebillout2019-06-081-0/+37
| | | | Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
* meson: Install systemd user serviceArnaud Rebillout2019-06-081-0/+17
| | | | Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
* meson: Build libwebrtc-util as a shared libraryArnaud Rebillout2019-06-082-4/+6
| | | | | | As it'sdone in the autotools Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
* meson: Install utils symlinks, install qpaeqArnaud Rebillout2019-06-081-0/+18
| | | | Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
* meson: Move oss-util in a libraryArnaud Rebillout2019-06-082-1/+19
| | | | | | Like it was with the aututools Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
* meson: Fix udevrulesdirArnaud Rebillout2019-06-081-1/+2
| | | | Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
* meson: Install dbus policy fileArnaud Rebillout2019-06-081-0/+6
| | | | Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
* meson: Fix install pathsArnaud Rebillout2019-06-086-10/+10
| | | | Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
* meson: Build daemon custom targets by defaultArnaud Rebillout2019-06-081-0/+3
| | | | Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
* meson: Translate and install desktop fileArnaud Rebillout2019-06-081-0/+16
| | | | Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
* meson: Add basic po supportArnaud Rebillout2019-06-082-0/+5
| | | | Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
* meson: Install ALSA udevrulesArnaud Rebillout2019-06-081-0/+10
| | | | Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
* meson: Fix various install scriptsArnaud Rebillout2019-06-083-3/+9
| | | | Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
* meson: Add udevrulesdir optionArnaud Rebillout2019-06-082-0/+8
| | | | Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
* meson: Add systemduserunitdir optionArnaud Rebillout2019-06-085-7/+17
| | | | Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
* meson: Fix pulsedspdirArnaud Rebillout2019-06-081-1/+1
| | | | Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
* meson: Install pkg-config filesArnaud Rebillout2019-06-083-1/+41
| | | | Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
* meson: Install vala apisArnaud Rebillout2019-06-082-0/+13
| | | | Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
* meson: Fix man install dirArnaud Rebillout2019-06-082-1/+3
| | | | Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
* meson: Handle man pages symlinks with a meson install scriptArnaud Rebillout2019-06-081-9/+2
| | | | | | | 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>
* meson: Make man page build and install conditionalArnaud Rebillout2019-06-083-8/+11
| | | | Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
* meson: Install completion filesArnaud Rebillout2019-06-084-2/+43
| | | | Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
* test-daemon: No need to define dl-search-pathArnaud Rebillout2019-06-081-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* .gitlab-ci: Add meson test-daemonArnaud Rebillout2019-06-081-0/+1
| | | | Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>