Commit graph

10086 commits

Author SHA1 Message Date
Igor V. Kovalenko
823e46fba0 build-sys: meson: Make module-console-kit optional
Default build configuration would fail to run on a system without systemd-logind
(or elogind) and without ConsoleKit daemon responding on dbus interface. Here,
module-console-kit would fail to initialize, preventing daemon from starting.

Make module-console-kit an optional build feature to allow opt-out.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/719>
2022-06-13 21:33:29 +00:00
redfast00
9f32b7d7ee rtp: fix 'size mismatch' on BSD style operating systems
On FreeBSD (and probably other BSDs as well), the FIONREAD ioctl
on UDP sockets does not return the size of the next datagram (like
it does on Linux), but returns the size of the output buffer: this
count contain multiple datagrams and also contains the headers.

We fixed this by taking the result of the FIONREAD as lower bound
for the size, adding an upper bound and then removing the check
that the sizes should be exactly the same.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/718>
2022-06-13 20:41:16 +00:00
Igor V. Kovalenko
d7a633df89 rtp: Initialize SDP info struct field added for OPUS
Turned out that pa_sdp_info::enable_opus is never initialized, which seldom
makes module-rtp-recv believe it will be playing OPUS-encoded stream even though
discovered SDP record does not indicate OPUS codec in metadata.

Fix this by adding missing initializer.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/720>
2022-06-13 19:51:37 +00:00
Jaechul Lee
a8a2a31408 sound-file-stream: Fix crash when playing a file which is not aligned
pulseaudio crash occurred when I play a file using pacmd play-file command.
The file is not aligned with its frame size and the last rendering size
is also not aligned. Thus, an assertion was generated at the end of the
file as the following.

memblockq.c: Assertion 'uchunk->length % bq->base == 0' failed at
../src/pulsecore/memblockq.c:288, function pa_memblockq_push(). Aborting.

When I play the file using paplay, it works good. So, I changed to
pa_memblockq_push_align instead of pa_memblockq_push to prevent the
assertion.

Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/717>
2022-06-09 11:18:48 +09:00
Sean Greenslade
05c06afa58 pactl: fix parsing of percentages with decimal points
The logic for detecting which type of volume was given incorrectly interpreted
any value with a decimal as a VOL_LINEAR. It also could set multiple flags,
which would put the flags variable into an indeterminate state. Additionally,
the flags stack variable was uninitialized which could also lead to an
indeterminate flag state.

Percentages are now prioritized over all other types, and only one type flag
can be set.
2022-06-04 00:24:49 -07:00
Igor V. Kovalenko
b55bcc3df3 rtp: Accept CRLF delimiters in SDP as required by RFC 4566
RFC 4566 states that SDP record is terminated with CRLF, and parsers should be
able to accept records terminated with just LF. Pulseaudio only accepts LF here.

Fix this by accepting both CRLF and LF terminators.
2022-05-30 18:43:35 +00:00
Arun Raghavan
237c5a5c36 build-sys: Bump soversion for 16.0 release
Just a minor time smoother 2 related change in libpulse implementation.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/714>
2022-05-28 11:18:37 -04:00
Arun Raghavan
3962be5ab7 Update NEWS for 16.0
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/714>
2022-05-28 11:16:10 -04:00
Georg Chini
d146a8079b combine-sink: Fix latency reports
The combine sink used the current time and counter when calculating
the latency if smoother_2 was enabled. This lead to wrong latency
reports. This patch fixes the problem by using the snapshot time
and counter instead.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/711>
2022-05-28 14:35:07 +00:00
Georg Chini
2af10cf39b various places: Include resampler delay to latency reports and calculations
The resampler delay was not taken into account in all necessary places.
This patch adds it where required.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/708>
2022-05-28 14:30:59 +00:00
Sergey A
3271020747 Translated using Weblate (Russian)
Currently translated at 100.0% (573 of 573 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/ru/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/713>
2022-05-28 14:23:54 +00:00
Karl Ove Hufthammer
551f4ed30b Translated using Weblate (Norwegian Nynorsk)
Currently translated at 100.0% (572 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/nn/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/713>
2022-05-28 14:23:54 +00:00
Piotr Drąg
118e5c02e2 Translated using Weblate (Polish)
Currently translated at 100.0% (572 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/pl/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/713>
2022-05-28 14:23:54 +00:00
김인수
fb3670ffc4 Translated using Weblate (Korean)
Currently translated at 100.0% (572 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/ko/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/713>
2022-05-28 14:23:54 +00:00
Jan Kuparinen
0cb96dc536 Translated using Weblate (Finnish)
Currently translated at 92.8% (531 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/fi/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/713>
2022-05-28 14:23:54 +00:00
Yuri Chornoivan
e2aa73240d Translated using Weblate (Ukrainian)
Currently translated at 100.0% (572 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/uk/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/713>
2022-05-28 14:23:54 +00:00
Oğuz Ersen
df5e1b8e42 Translated using Weblate (Turkish)
Currently translated at 100.0% (572 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/tr/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/713>
2022-05-28 14:23:54 +00:00
Anders Jonsson
27b40ea382 Translated using Weblate (Swedish)
Currently translated at 100.0% (572 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/sv/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/713>
2022-05-28 14:23:54 +00:00
Göran Uddeborg
ef1985f3e2 Translated using Weblate (Swedish)
Currently translated at 100.0% (572 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/sv/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/713>
2022-05-28 14:23:54 +00:00
Sergey A
a8c84cf460 Translated using Weblate (Russian)
Currently translated at 99.8% (571 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/ru/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/713>
2022-05-28 14:23:54 +00:00
Igor V. Kovalenko
9916f0eace bluetooth: mSBC: Decode packets larger than mSBC frame
Bluetooth transport layer already allows for packets larger than mSBC frame, and
there are up to 1 + MTU / (mSBC packet size) complete frames to be decoded from
each incoming SCO packet.

Now decoder fails when there is more than one complete frame available, which
could happen if MTU size is larger than 1.5 * (mSBC packet size) = 90

Fix this by adding a loop over avialable frames, and adjust decoded buffer size
to allow decoding up to 1 + MTU / (mSBC packet size) frames at once.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/706>
2022-05-27 17:42:38 +00:00
Georg Chini
65889fbdee zeroconf-publish: Fix crash when avahi_client_new() fails
When the module is loaded and avahi_client_new() fails because the client cannot
connect, a shutdown of the module is scheduled. In parallel, the client_callback
is called with AVAHI_ERR_DISCONNECTED and another connection attempt is made
which also fails and triggers a second unload of the module. This crashes PA,
because there is already an unload in progress.
This patch fixes the problem by checking if an unload is already scheduled.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/710>
2022-05-26 16:41:21 +00:00
Georg Chini
5bba8ee621 module-tunnel: Improve latency calculation
The timestamp used for updating the smoother was taken at the wrong time.
It may take some time until an async message is executed (measured up to
2ms), therefore the timestamp used to update the smoother must be taken
before the message is executed and not inside the message.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/705>
2022-05-25 07:04:09 +00:00
Georg Chini
363a384143 tunnel modules: Fix crash when the module was unloaded while waiting for re-init
When the tunnel modules had no connection and a re-init was pending, the module
could be unloaded without cancelling the pending re-init. When the timer expired
in that situation, this lead to a crash. This patch fixes the problem by keeping
a reference when the module is scheduled to be re-initialized.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/705>
2022-05-25 07:04:09 +00:00
Georg Chini
c3d1db2f28 tunnel modules: Fix threading issues
The old tunnel modules switched wrongly between main thread and I/O-thread
while the new tunnel modules sent unnecessary messages to the main thread.
This patch fixes the issues.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/705>
2022-05-25 07:04:09 +00:00
Marijn Suijten
0adb12e099 bluetooth: Demote "No such property 'Volume'" error to warning
The AVRCP service is known to not be connected before the A2DP transport
is, resulting in PulseAudio asking BlueZ for an initial 'Volume' value
but not getting it because the property doesn't exist.

To prevent end-users from conjecturing this to be the source of whatever
issue they're observing, demote it to a warning.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/707>
2022-05-23 15:19:44 +00:00
Dylan Van Assche
7f76edb907 Update NEWS for 16.0
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/694>
2022-05-22 09:06:09 +00:00
Igor V. Kovalenko
1eb010b397 module-tunnel: Initialize auto param default value to false
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/704>
2022-05-17 23:14:49 +03:00
Georg Chini
325108e532 time-smoother-2: Fix integer type problem
The byte_count argument of pa_smoother_2_get_delay() was defined as size_t
which lead to overflow problems on 32-bit architectures. Changed type
to uint_64.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/700>
2022-05-17 11:09:29 +00:00
Tanu Kaskinen
9811c84a54 i18n: Update .pot and .po files
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/703>
2022-05-16 23:56:56 +03:00
Sergey A
778da3aa9e Translated using Weblate (Russian)
Currently translated at 99.1% (567 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/ru/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/703>
2022-05-16 23:54:01 +03:00
Sergey A
fbe78829f4 Translated using Weblate (Russian)
Currently translated at 97.7% (559 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/ru/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/703>
2022-05-16 23:54:01 +03:00
Alexey Rubtsov
ced3f48875 Translated using Weblate (Russian)
Currently translated at 97.7% (559 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/ru/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/703>
2022-05-16 23:54:01 +03:00
Temuri Doghonadze
3c5b12a7ae Added translation using Weblate (Georgian)
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/703>
2022-05-16 23:54:01 +03:00
Gogo Gogsi
7f294933bb Translated using Weblate (Croatian)
Currently translated at 100.0% (572 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/hr/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/703>
2022-05-16 23:54:01 +03:00
Takuro Onoue
a2050cdcd1 Translated using Weblate (Japanese)
Currently translated at 84.2% (482 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/ja/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/703>
2022-05-16 23:54:01 +03:00
Jan Kuparinen
e56d789cd0 Translated using Weblate (Finnish)
Currently translated at 92.8% (531 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/fi/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/703>
2022-05-16 23:54:01 +03:00
Karl Ove Hufthammer
b9fd0ceeed Translated using Weblate (Norwegian Nynorsk)
Currently translated at 100.0% (572 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/nn/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/703>
2022-05-16 23:54:01 +03:00
simmon
35b6af02a1 Translated using Weblate (Korean)
Currently translated at 100.0% (573 of 573 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/ko/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/703>
2022-05-16 23:54:01 +03:00
simmon
19808014c2 Translated using Weblate (Korean)
Currently translated at 100.0% (573 of 573 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/ko/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/703>
2022-05-16 23:54:01 +03:00
Gogo Gogsi
87e43fdb53 Translated using Weblate (Croatian)
Currently translated at 100.0% (572 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/hr/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/703>
2022-05-16 23:54:01 +03:00
Sungjoon Moon
9252464468 Translated using Weblate (Korean)
Currently translated at 100.0% (573 of 573 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/ko/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/703>
2022-05-16 23:54:01 +03:00
Georg Chini
d8b0c9ab50 module-tunnel-sink/source-new: Add PA_STREAM_ADJUST_LATENCY flag at stream creation
Without the flag, the latency on the remote server will not be configured correctly.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/699>
2022-05-16 20:40:09 +02:00
Craig Howard
17eb178f17 module-tunnel: restart module
Defer the creation of the source/sink until after the TCP connection has
been established.  Upon protocol errors, try restarting the module.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/688>
2022-05-16 18:26:16 +00:00
Craig Howard
f81bb09772 tunnel-source-new: add restart/reconnect logic
Applies the same changes as to tunnel-sink-new: defer the source
creation until after the TCP connection is restablished, then attempt to
restart the module on failure.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/688>
2022-05-16 18:26:16 +00:00
Craig Howard
a48bee4f06 tunnel-sink-new: reinit module
When configured, reinitialize the module instead of exiting.  This
allows a restart/reconnect, but the module to appear to always be alive
when the user does: "pactl list modules".  (The sink will still not
exist until the tcp connection is established.)

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/688>
2022-05-16 18:26:16 +00:00
Craig Howard
34d00afc74 tunnel-sink-new: create sink *after* connection
The io thread, after connection, sends a message asking for a sink to be
created.  After the ctl thread is done with creation, it sends a message
back to the io thread so it can continue.  This ensures that the sink
only exists when it's connected to something.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/688>
2022-05-16 18:26:16 +00:00
Craig Howard
117fa0cbe5 tunnel-sink-new: refactor sink creation
Move the sink creation logic to its own function.  This is in
preparation for sinks being created async.  Store the relevant config
parameters in userdata, so create_sink() can access that data.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/688>
2022-05-16 18:26:16 +00:00
Olivier Gayot
c3c84a3691 pactl: fix invalid JSON output by overriding LC_NUMERIC
When the --format json parameter is given on the command line, we
attempt to produce a JSON output for most commands.

Our implementation of the JSON serialization uses vsnprintf to output
numbers. Unfortunately, vsnprintf is affected by the locale and more
specifically the LC_NUMERIC variable.

When LC_NUMERIC is set to, for instance, fr_FR.UTF-8, floating-point
numbers are output with a comma as the decimal separator, which is then
considered invalid JSON.

 $ LC_NUMERIC=fr_FR.UTF-8 pactl --format json list sinks | jq .
 parse error: Objects must consist of key:value pairs at line 1, column 435

This is the token which failed to parse:

 }},"balance":0,00,"base_volume":{

Fixed by overriding the LC_NUMERIC value when we request JSON output.

Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/702>
2022-05-16 18:15:47 +00:00
Igor V. Kovalenko
4f2c8ec002 pa-info: Handle configuration files from .d directories
Pulseaudio reads client.conf.d/*.conf and daemon.conf.d/*.pa, print these too.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/701>
2022-05-16 18:11:47 +00:00