Commit graph

10261 commits

Author SHA1 Message Date
Georg Chini
9f70ad3c95 virtual-source-common: Integrate uplink sink into virtual source library
This patch integrates the uplink sink feature of module-virtual-source into
the virtual source library, so that every virtual source can use it.

The patch also introduces latency handling and rewinding for the uplink sink.
Similar to the monitor source, the only useful definition of the latency
appears to be the negative of the master source latency. Rewinding will not
be possible in most situations, because the underlying memblockq is nearly
always empty.
module-combine-sink and module-suspend-on-idle required some changes to
deal correctly with this type of sink.
2024-01-13 11:41:25 +01:00
Georg Chini
0b26ed9b0c virtual source: Factor out common code
Analog to the virtual sink consolidation series, the common code of virtual sources
is moved to a library. The library adds support for fixed block size filters and
parameter changing. Rewinding has been dropped because virtual sources do not need
it.
2024-01-13 11:41:25 +01:00
Georg Chini
b6ccb7e76d source: Introduce vsource structure
This patch introduces a vsource structure analog to the vsink structure.
The structure will be used for virtual source consolidation.
2024-01-13 11:41:25 +01:00
Georg Chini
95be21c736 core: Allow rescue of filter streams
Since 14.0, filter streams would be killed if the master sink or source disappeared. This
patch changes the behavior to allow rescuing of filter streams.
2024-01-13 11:41:09 +01:00
Georg Chini
ed4074ae08 sink: Remove input_to_master variable from sink structure
The variable is now unused.
2024-01-13 11:41:09 +01:00
Georg Chini
668a22e902 virtual-surround-sink: Use common code
Using the library fixes a crash bug in module-virtual-surround sink when used with
use_volume_sharing=0. The old code did not remap the volumes.
2024-01-13 11:41:09 +01:00
Georg Chini
8098bfde4a echo-cancel: Use common code
This module cannot be fully consolidated, but still there are significant savings.
With some re-ordering, probably even more of the code could be converted.
2024-01-13 11:41:09 +01:00
Georg Chini
3aaa764de7 equalizer-sink: Use common code
This patch also fixes a couple of crash bugs that can happen if the sink
cannot be initialized properly.
2024-01-13 11:41:09 +01:00
Georg Chini
e5f852ab7b ladspa-sink: Use common code 2024-01-13 11:41:09 +01:00
Georg Chini
bbbf7baa5a remap-sink: Use common code 2024-01-13 11:41:09 +01:00
Georg Chini
1edc7eb655 virtual sink: Factor out common code
This patch moves the code for the virtual sink callbacks and initialization to
a separate file. The code is re-factored, extended and built as library, so that
it can be used by other virtual sinks as well. The suspend-virtual-on-master-suspend
fix for the ladspa sink (!68) was incorporated into the common code as well as the
sink part of !78 which fixes a crash with stacked virtual sinks. !68 has a bug
which leaves a virtual sink unavailable when the master sink disappears. This bug
is also fixed.

Additionally, fixed block size filters, fixed window size filters  and updating filter
parameters are supported by the library. Fixed window size filters always deliver the
same number of frames to the filter, padding new data with history frames if necessary.
Rewinding can be disabled or or limited to the number of frames that the virtual sink
supports. Thanks to Alexander E. Patrakov for pointing out how to rewind fixed block
size filters.

The library implements following command line arguments if they are enabled in
valid_modargs: sink_name, sink_properties, sink_input_properties, force_flat_volume,
remix, resample_method and autoloaded.
2024-01-13 11:41:09 +01:00
Georg Chini
d18756fda9 sink: Introduce structure needed to consolidate virtual sink code
This patch introduces the vsink structure which holds all data needed
by virtual sinks. This is in preparation of the consolidation of the
virtual sink code. The input_to_master field of the sink will be moved
to the vsink structure after the consolidation. Until all virtual sinks
are converted, sink->input_to_master and sink->vsink->input_to_master
must both be supported.
2024-01-13 11:41:09 +01:00
Alper Nebi Yasak
ed3d4f0837 alsa-ucm: Replace port device UCM context assertion with an error
The pa_alsa_ucm_set_port() function is passed both a mapping context and
a device port, and both of these refer to their respective UCM device.
While switching over to having one port per mapping per UCM device, I
expected both of these to be the same device struct, so added an assert
checking so.

This assertion gets triggered when we have multiple UCM verbs declaring
the same UCM device name. The root cause here is that the ports' UCM
device references are set once while creating the ports for the card, so
they happen to be those of a specific verb and may not match those from
a different UCM verb's profiles' mappings.

Solving the root cause necessitates a larger refactor. What we actually
assume here is that name of the UCM device is same for both the port and
the UCM context, which ends up always true in practice. For now, replace
the assert with a check and error.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/802>
2024-01-12 20:34:54 +00:00
Alper Nebi Yasak
f5cacd94ab alsa-ucm: Check UCM verb before working with device status
Some versions of the ALSA libraries run into a segmentation fault when
we query a UCM device/modifier status without first setting a UCM verb.
It's not a reasonable thing to do anyway, so check for this case and
return an error. Also do the check in other helpers.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/801>
2024-01-12 19:54:29 +00:00
Arun Raghavan
1f020889c9 Update NEWS for 17.0
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/805>
2024-01-12 12:22:09 -05:00
Hui Wang
d7dc04e8f5 backend-native: Handle multi AT commands in a buffer
When we connect Lenovo XT99 bt headset in the Ubuntu 22.04, this
headset could only work in A2DP profile, couldn't work in HFP profile
with a high chance.

This headset supports mSBC, after pulseaudio replies "+BCS:2" to
headset, we expect to receive a "AT+BCS=2\r" from the headset, but
with a high chance, it will receive 2 AT commands in a buffer like
this "AT+CHLD=?\rAT+BCS=2\r", and we also observed other 2 AT commands
in a buffer like this "AT+NREC=0\rAT+CGMI?\r".

Here we don't suppose there is only one AT command in a buffer, we
will find each command by the delimiter "\r" and handle each command
by sequence.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/804>
2024-01-05 23:12:18 +08:00
Igor V. Kovalenko
81a6cc4967 Fix crash running in restricted environment.
When `pwd.h` header is not available (i.e. not using glibc) and environment
variables are not set (e.g. running via `env --ignore-environment`) client
library would crash due to uninitialized variable in `pa_get_home_dir()`.
Add missing initialization to fix that.

Fixes: #3792
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/800>
2023-11-12 15:53:38 +03:00
Igor V. Kovalenko
06ccfbb996 memblockq: Adjust tail chunk offset into memblock after split
If pa_memblockq_push needs to write into the middle of a chunk, target chunk
is split into head and tail sharing the same memblock. Size of head and
tail chunks is adjusted correctly, head chunk pointer into memblock remains
unchanged from target chunk.

The problem is with tail chunk offset into memblock which should be advanced
past write region of memblock, but currently it is left as 0.

This is causing an issue where seeking a few frames back into the middle of
memblock and writing a frame there ends up with tail chunk referencing frames
from very beginning of memblock causing corrupted output from memblockq.

Fix this by adjusting tail chunk offset into memblock past write region and
add a test case.

Fixes #3789

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/798>
2023-10-25 13:21:34 +00:00
Igor V. Kovalenko
13ea94a1b6 shell-completion: Fix typo in --use-pid-file= suggestion
Fixes #3786

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/799>
2023-10-24 22:53:51 +03:00
Arun Raghavan
13ef02da1b build-sys: Bump webrtc-audio-processing wrap to 1.3
Minor pkgconfig fixup.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/797>
2023-09-05 11:32:53 -04:00
Arun Raghavan
6abe0c58d2 build-sys: Bump webrtc-audio-processing wrap to 1.2
Should make builds actually work now.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/795>
2023-09-01 11:21:29 -04:00
Arun Raghavan
63d38a6864 ci: Drop -werror in build
Can't rely on this while building abseil on older Ubuntu (or at all,
perhaps).

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/795>
2023-09-01 11:21:27 -04:00
Arun Raghavan
3e68ebf4ec ci: Add doxygen to build image
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/795>
2023-09-01 11:21:26 -04:00
Arun Raghavan
217c0e90ef ci: Force build of webrtc-aec
Makes sure we build this, either with system deps or the fallback wrap
file. We also bump the CI meson version to support [provide] in the
wrap file.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/795>
2023-09-01 11:21:15 -04:00
Arun Raghavan
9b37e8d9dc build-sys: Add a webrtc-audio-processing wrap file
This will make things easier on systems where this is missing, as well
as allow us to test things in CI until packages land in
Ubuntu/Fedora/...

The wrap file is taken as-is from the GStreamer project.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/795>
2023-09-01 11:21:12 -04:00
Arun Raghavan
e2b63d157f build-sys: Bump cpp_std to c++17
Match it with webrtc-audio-processing, which is what we care about.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/795>
2023-09-01 11:21:11 -04:00
Rudi Heitbaum
421cf15486 shm: allow for older versions of Linux without MFD_NOEXEC_SEAL
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/794>
2023-08-13 09:37:32 +00:00
김인수
eb302240cc 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/741>
2023-08-12 12:25:19 -04:00
Temuri Doghonadze
cb9b14c84b Translated using Weblate (Georgian)
Currently translated at 57.8% (331 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/ka/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/741>
2023-08-12 12:25:19 -04:00
김인수
707c3b6864 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/741>
2023-08-12 12:25:19 -04:00
김인수
6ec914182d 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/741>
2023-08-12 12:25:19 -04:00
Temuri Doghonadze
43a543e84f Translated using Weblate (Georgian)
Currently translated at 50.6% (290 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/ka/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/741>
2023-08-12 12:25:18 -04:00
Asier Sarasua Garmendia
e046e25b08 Translated using Weblate (Basque)
Currently translated at 2.4% (14 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/eu/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/741>
2023-08-12 12:25:18 -04:00
Asier Sarasua Garmendia
2dd87e4dd0 Added translation using Weblate (Basque)
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/741>
2023-08-12 12:25:18 -04:00
Sabri Ünal
51ce576c70 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/741>
2023-08-12 12:25:18 -04:00
Fran Diéguez
89be4c6cd6 Translated using Weblate (Galician)
Currently translated at 100.0% (572 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/gl/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/741>
2023-08-12 12:25:18 -04:00
grimst
a3445976af Translated using Weblate (French)
Currently translated at 85.3% (488 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/fr/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/741>
2023-08-12 12:25:18 -04:00
Temuri Doghonadze
6b8a6156b4 Translated using Weblate (Georgian)
Currently translated at 50.1% (287 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/ka/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/741>
2023-08-12 12:25:18 -04:00
mooo
e2e5161175 Translated using Weblate (Lithuanian)
Currently translated at 91.9% (526 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/lt/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/741>
2023-08-12 12:25:18 -04:00
Temuri Doghonadze
940346a51f Translated using Weblate (Georgian)
Currently translated at 48.0% (275 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/ka/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/741>
2023-08-12 12:25:18 -04:00
Fran Diéguez
e3bf4223d2 Translated using Weblate (Galician)
Currently translated at 99.6% (570 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/gl/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/741>
2023-08-12 12:25:18 -04:00
Jan Kuparinen
d7806e93b7 Translated using Weblate (Finnish)
Currently translated at 100.0% (572 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/741>
2023-08-12 12:25:18 -04:00
Toni Estevez
996c84d497 Translated using Weblate (Spanish)
Currently translated at 100.0% (572 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/es/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/741>
2023-08-12 12:25:18 -04:00
Temuri Doghonadze
7d66068eea Translated using Weblate (Georgian)
Currently translated at 47.5% (272 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/ka/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/741>
2023-08-12 12:25:18 -04:00
Toni Estevez
01cca9fce7 Translated using Weblate (Spanish)
Currently translated at 100.0% (572 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/es/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/741>
2023-08-12 12:25:18 -04:00
Toni Estevez
7596337cac Translated using Weblate (Spanish)
Currently translated at 100.0% (572 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/es/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/741>
2023-08-12 12:25:18 -04:00
Ettore Atalan
70b0f4e01a Translated using Weblate (German)
Currently translated at 94.9% (543 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/de/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/741>
2023-08-12 12:25:18 -04:00
김인수
9b4625851b 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/741>
2023-08-12 12:25:18 -04:00
Philip Goto
105328fe14 Translated using Weblate (Dutch)
Currently translated at 99.1% (567 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/nl/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/741>
2023-08-12 12:25:18 -04:00
Temuri Doghonadze
39834c4052 Translated using Weblate (Georgian)
Currently translated at 44.5% (255 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/ka/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/741>
2023-08-12 12:25:18 -04:00