Skip to content

Update to pulseaudio 17.0 #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 817 commits into
base: master
Choose a base branch
from
Open

Update to pulseaudio 17.0 #7

wants to merge 817 commits into from

Conversation

mlehtima
Copy link
Contributor

No description provided.

ogayot and others added 30 commits May 16, 2022 18:15
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 <[email protected]>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/702>
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>
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>
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>
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>
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>
…tream 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>
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>
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>
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>
…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>
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>
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>
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>
jusa and others added 28 commits May 23, 2025 15:56
Signed-off-by: Juho Hämäläinen <[email protected]>
Signed-off-by: Juho Hämäläinen <[email protected]>
Only does anything when headset_head_unit profile
is active.

Signed-off-by: Juho Hämäläinen <[email protected]>
No need to act too much on oFono state changes, as
if the daemon disappears it's either going to appear
again shortly, or we are rebooting, or something similar.

Signed-off-by: Juho Hämäläinen <[email protected]>
When using only module-role-ducking duck streams even if the ducking stream
is in corked state.

Signed-off-by: Juho Hämäläinen <[email protected]>
Use LLIST instead of array for interaction groups, and refactor parsing.
Side effect from refactoring is that module-role-cork also now supports
interaction groups.

Signed-off-by: Juho Hämäläinen <[email protected]>
Stream interaction groups now have hashmaps for all trigger and interaction
states and roles. We track both trigger streams and interaction streams
separately, so that applying interaction (ducking or cork and muting) is
relatively simple.

Signed-off-by: Juho Hämäläinen <[email protected]>
With this enabled when trigger stream is available but
in corked state trigger is already applied to interaction
streams. This is useful when trigger stream pauses for
a while before playing, so that the trigger happens
slightly earlier.

Signed-off-by: Juho Hämäläinen <[email protected]>
When configurations using the module have updated this commit can be
removed.
…#54265 OMP#JOLLA-147

Some apps have different group than the default which means the apps may
try to change ownership of these secure directories. When combined with
sandboxing this fchown call will fail as the app doesn't have write
access to runtime directory. Since the mask is 0700 meaning that owning
group doesn't matter we can avoid this call completely by checking
whether the group needs to be changed.

Signed-off-by: Tomi Leppänen <[email protected]>
Application id is used to identify streams in resource policy.
daemon: use speex-fixed-2
daemon: disable auto-exit
client: disable autospawn

Also add submodule-era changelog entries.

squashed:

sfos: packaging: Do not use gdbm even if available ; JB#44440

Don't use %config(noreplace). JB#44152

Fix aarch64 builds by using systemd macros. JB#49681

sfos: packaging: Add configuration for system-wide mode
Add configuration for system-wide mode. These new unit is not meant to
be started by user but instead required when making emergency calls
outside user session. PartOf ensures that the unit is stopped when
emergency-call.target unit is stopped so that it doesn't collide with
user session pulseaudio.
There are no conflicts to multi-user.target or
systemd-user-sessions.service because otherwise they may not be started
at all if this unit happens to be still running.

sfos: packaging: Fix dependencies of system-wide. JB#45842
Add After=dbus.socket and remove DefaultDependencies=no.

sfos: packaging: Update system-wide user and group creation.
Have static uid and gid for pulse and use only audio as additional
group for user pulse. Fixes JB#46368

sfos: Don't fork pulseaudio processes.

sfos: Prevent user session daemon from starting if system daemon is running.
Wait until system daemon pid file disappears before starting user
session PulseAudio. See JB#49307

sfos: Enable neon optimisation on aarch64 too. Contributes JB#49681

sfos: Workaround for the no audio in call issue.

Needs proper fix later. Contributes to JB#49447

sfos: Use flat volume sinks. Fixes JB#53444

sfos: Packaging depends on bluez5 for building.

BlueZ4 support is dropped from PulseAudio so no point in depending to
the older version. Minor change as nothing is linked against the
library.

sfos: BuildRequire systemd via pkgconfig. JB#55010

This allows to pick systemd-mini inside the builder instead of full
systemd.

sfos: Fix bluez dependency. JB#57121

sfos: Use meson build.

sfos: drop unnecesary intltool dependency

Usage removed in Pulseaudio 13.0 in favor of just gettext.
Perl-xml needed, though, and that was pulled in by intltool.

sfos: Cleanup spec

Co-authored-by: David Greaves <[email protected]>
Co-authored-by: Tomi Leppänen <[email protected]>
Co-authored-by: Niels Breet <[email protected]>
Co-authored-by: Marko Kenttälä <[email protected]>
Co-authored-by: Björn Bidar <[email protected]>
Co-authored-by: Matti Lehtimäki <[email protected]>
Co-authored-by: Pekka Vuorela <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.