Commit graph

10369 commits

Author SHA1 Message Date
Dylan Van Assche
b05e34e092 bluez5-util: move pa_bluetooth_discovery to header
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/631>
2022-08-01 19:16:25 +00:00
Rosen Penev
ff6010b80f meson: fix meson warnings
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/739>
2022-08-01 19:08:41 +00:00
hashitaku
ffbcf36854 shell-completion: add new subcommand get-* for zsh
Added to shell-completion of zsh as there is no completion for the subcommand get-*.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/735>
2022-08-01 18:34:25 +00:00
hashitaku
9f725cafb8 shell-completion: add new subcommand get-* for bash
Added to shell-completion of bash as there is no completion for the subcommand get-*.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/735>
2022-08-01 18:34:25 +00:00
Temuri Doghonadze
dc027d69e8 Translated using Weblate (Georgian)
Currently translated at 43.5% (249 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/736>
2022-07-22 15:18:58 +02:00
Joachim Philipp
9337d4b5b5 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/736>
2022-07-22 15:18:58 +02:00
Arun Raghavan
78f12b7445 sink, source: Document why we force reconfigure on passthrough toggle 2022-07-22 08:34:45 -04:00
Arun Raghavan
bfb5e03e83 pacat: Make writes be frame-aligned, even for raw mode
This will be aligned to the fake sample spec corresponding to the
format, but that is correct and will prevent breakage in libpulse and
the server where we have aligned-ness expectations.
2022-07-22 08:00:33 -04:00
Arun Raghavan
48c57ba4c5 pacat: Make temporary string variables less cryptically named 2022-07-22 08:00:33 -04:00
Arun Raghavan
de137908a8 sink: Only update sink inputs if reconfiguration succeeds 2022-07-22 08:00:33 -04:00
Arun Raghavan
8fff528000 source: Bring some debug logging in sync with what we do for sinks 2022-07-22 08:00:33 -04:00
Arun Raghavan
d666f44fa4 sink, source: Drop return value from reconfigure function
This wasn't actually used anywhere.
2022-07-22 08:00:33 -04:00
Arun Raghavan
3de9f445fa sink-input,source-output: Disallow volume change on passthrough streams
We shouldn't be setting volumes on these streams as that would change
the content.
2022-07-22 08:00:33 -04:00
Arun Raghavan
6815521f11 alsa-sink: Fix AES bit setting for HDMI and S/PDIF
pa_sink_is_passthrough() might not be true at the time of unsuspend, so
we can't count on it to set the AES bits. Let's just remember
passthrough state from reconfiguration and use that.
2022-07-22 08:00:33 -04:00
Arun Raghavan
ce069ebd61 alsa-sink: Set more AES bits for passthrough audio
Based on what PipeWire and Kodi's ALSA engine do.
2022-07-22 08:00:33 -04:00
Arun Raghavan
09e8033c49 alsa-source: Bring reconfigure in line with alsa-sink
This got fixed for new API expectations (channel map will always be
set), so keep things up-to-date.
2022-07-22 08:00:33 -04:00
Arun Raghavan
e79cefb723 alsa-sink: Explicitly handle channel map reconfiguration
We don't actually support it, but handle this path correctly.
2022-07-22 08:00:33 -04:00
Arun Raghavan
9f3e82ac31 sink, source: Fix reconfiguration of monitor sources
We should only reconfigure monitor sources when the corresponding sink
is reconfigured (and when it is, we should unconditionally set it to the
requested spec/map of whatever the sink got reconfigured to).

The previous logic was incorrect on all 3 counts.
2022-07-22 08:00:33 -04:00
Arun Raghavan
2046afe683 sink, source: Merge sink sample spec setter functions into one
It seems better to update the whole sample spec (and channel map) at a
shot rather than piecemeal.
2022-07-22 08:00:33 -04:00
Arun Raghavan
7df1b78ac2 shell-completion: Add --encoding for pacat 2022-07-22 08:00:33 -04:00
Arun Raghavan
3e4dc134d4 man: Document the --encoding option for pacat 2022-07-22 08:00:33 -04:00
Arun Raghavan
50e4c06a44 tests: Fix up an apocryphal variable name 2022-07-22 08:00:33 -04:00
Arun Raghavan
376945dc43 sink, source: Print channel count when reconfiguring
Add this as we might reconfigure the number of channels too.
2022-07-22 08:00:33 -04:00
Arun Raghavan
8d6f415c85 sink, source: Add comment about not reconfiguring channel map
There is no meaningful usecase at the moment for it.
2022-07-22 08:00:33 -04:00
Arun Raghavan
96c119fbe4 sink, source: Add a channel map validity check for reconfiguration
Also move the check to an early assert instead of silently bailing.
2022-07-22 08:00:33 -04:00
Arun Raghavan
5d1184b35a sink, source: Drop redundant restore argument to reconfigure
The sample spec's NULLness is sufficient to determine whether we are
restoring or not.
2022-07-22 07:46:34 -04:00
Arun Raghavan
6afdebb55f sink, source: Don't force refresh while saving volume for passthrough
There's no reason to go to the h/w to refresh the volume when we are
just saving the value for restoration later.
2022-07-22 07:46:34 -04:00
Arun Raghavan
b550fa5628 sink, source: Add API to update sample spec
This is useful to have visibility into when the whole sample spec
changes at runtime (during reconfiguration, for example).
2022-07-22 07:46:34 -04:00
Arun Raghavan
628c0c0b74 alsa: Implement reconfiguration of channel count/map
This is needed at the moment for passthrough support of high bitrate
formats (such as DTS-HD and Dolby TrueHD), which, in addition to setting
a higher sample rate also set channel count to 8. It would be clunky to
require users to reset the HDMI profile based on the format being
played, so for consistency we continue to only allow setting formats on
the stereo profile, and reconfigure channels as needed for the duration
of pakssthrough playback.

We implement the source side as well for consistency.
2022-07-22 07:46:34 -04:00
Arun Raghavan
4693028b9b sink, source: Add API to change channel count
This makes this part symmetrical with the rest of the sample spec, and
will be useful when we implement switching channel count in a sink.
2022-07-22 07:46:34 -04:00
Arun Raghavan
f9d139c3bc pacat: Allow specifying non-PCM encoding for playback
This adds a --encoding argument to allow specifying a non-PCM format for
playback. This is expected to be useful for testing support for
compressed formats.
2022-07-22 07:46:34 -04:00
Arun Raghavan
47298b8de8 sink, source: Add a way to change channel map
This adds functions to allow changing the channel map on a sink or
source. We make module-null-sink use this function instead of changing
the channel map manually to allow for logging and notifications.

The source function is currently unused but we add it to maintain
symmetry with the sink.
2022-07-22 07:46:34 -04:00
Arun Raghavan
e4a085f6d3 null-sink: Add avoid-processing support 2022-07-22 07:46:34 -04:00
Arun Raghavan
ecbe1e8c22 null-sink: Add the ability to dump what we're rendering
This should be useful for manual and automated testing, to examine what
the data coming out of null sink looks like.
2022-07-22 07:46:34 -04:00
Arun Raghavan
d46908f9b6 tests: Add a test to validate sink reconfiguration 2022-07-22 07:46:34 -04:00
Arun Raghavan
52a9d87053 tests: Refactor common client code from passthrough test
This code can be reused for other tests that need to connect to the PA
server and load a NULL sink. The idea is to grow this out with basic
primitives that various tests need to make it easier to add more unit
tests for various situations.
2022-07-22 07:46:34 -04:00
Arun Raghavan
01c26546fa sink, source: Add an avoid-processing mode
This generalises the avoid-resampling concept (don't resample for any
rate above the default/alternate sample rate) to include channel count
and sample format as well. The rationale for this is that users who wish
to send out their data untouched by processing in PulseAudio can do so.

In addition to this, there are opportunities for certain hardware (such
as systems with a DSP connected to a codec) to offload processing to the
DSP (providing potential cost savings).

Finally, this also enables modules that might be able to perform
transformations of (ANY -> sink format), and this allows us to implement
such transformations.
2022-07-22 07:45:45 -04:00
Arun Raghavan
cbaf278f1e sink, source: Consolidate passthrough setup in reconfigure
This moves over the saving+resetting/restoring of volumes and source
suspending/unsuspending while entering/leaving passthrough mode into
reconfigure functions. This makes it easier to reason about exactly what
behaviour occurs at the time, as well as avoids loss of precision during
the remapping of the internal volume values in this case.
2022-07-22 07:07:58 -04:00
Arun Raghavan
0d85b18460 sink, source: Allow reconfigure to change the complete sample spec
For the passthrough case, we allow the entire sink sample spec to be
changed in reconfigure. This will be needed for high bitrate formats. We
duplicate this for sources to keep things in sync as well.

Relatedly, we also restore the original spec on leaving passthrough
mode. We were getting away with not doing so in the past as, while
incorrect, not restoring the rate was not disastrous. With the ability
to change channel count, not restoring breaks the meaning of profiles
entirely. The saving and restoration logic is restricted to sink/source
reconfiguration code to allow it to be self-contained and easier to
reason about.

All this also applies to the channel map. We don't actually explicitly
reconfigure the channel map at the moment, but since
pa_sink/source_reconfigure() can now change the channel count, it seems
to make sense to include the channel map along with that API change for
future use.
2022-07-22 07:07:58 -04:00
Temuri Doghonadze
15f242aee5 Translated using Weblate (Georgian)
Currently translated at 43.5% (249 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/736>
2022-07-21 14:42:18 +02:00
김인수
dbe455ce95 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/736>
2022-07-18 17:19:12 +02:00
Temuri Doghonadze
932b72f417 Translated using Weblate (Georgian)
Currently translated at 29.8% (171 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/736>
2022-07-18 17:19:12 +02:00
Gogo Gogsi
0f6234e320 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/736>
2022-07-18 17:19:12 +02:00
Peter Meerwald-Stadler
9360dce76d raop-client: Fix typo
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/733>
2022-07-18 14:47:38 +00:00
Peter Meerwald-Stadler
e8509ea85c volume: Fix typo
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/733>
2022-07-18 14:47:38 +00:00
Peter Meerwald-Stadler
f71eafe4d9 module-tunnel: Fix typos
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/733>
2022-07-18 14:47:38 +00:00
Peter Meerwald-Stadler
63d0db832c module-combine-sink: Fix indentation
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/733>
2022-07-18 14:47:38 +00:00
Peter Meerwald-Stadler
0b4af61ee7 module-combine-sink: Use fabs() instead of abs() for double
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/733>
2022-07-18 14:47:38 +00:00
Igor V. Kovalenko
07a9fcefba build-sys: meson: Move qpaeq to daemon build
Equalizer control requires server modules only available when daemon is built.
Move qpaeq script to be installed together with daemon.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/734>
2022-07-18 14:03:45 +00:00
Nicolas Cavallari
baa3d24b76 build-sys: Add missing libatomic_ops dependencies
Add libatomic_ops dependencies to libraries/modules that showed a
failure on an arch that does not have native atomic operations support.

Not all optional dependencies were tested, so it is possible that
some optional modules are still missing libatomic_ops dependencies.

Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/732>
2022-07-18 13:59:14 +00:00