Commit graph

10090 commits

Author SHA1 Message Date
Georg Chini
656179a8fe resampler: Add pa_resampler_prepare() and pa_resampler_get_delay() functions
The pa_resampler_get_delay() function allows to retrieve the current resampler
delay in input samples for all supported resamplers. The return value is a double
to maintain precision when using variable rate resamplers. Because in many places
the delay is needed in usec, pa_resampler_get_delay_usec() was also supplied.

The speex resampler now skips leading zero samples to provide meaningful delay values.

In the next patch, the pa_resampler_prepare() function will be used to train the
resampler after a rewind. It takes data from a history memblockq and runs it through
the resampler. The output data is discarded.

To make this logic possible, the soxr resampler had to be converted to use variable
rate. The fixed rate version has a variable delay, therefore the logic above could
not be applied. Additionally, with fixed rate, the delay is larger than 150ms in
some situations, while with variable rate the delay is fixed and comparable to the
other resamplers.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/120>
2021-11-03 18:37:31 +00:00
Georg Chini
1bfabd6512 sink-input: Add history memblockq
A new memblockq is added to the sink input code to keep some history of the
input data. The queue is kept in sync with the render memblockq. The old input
data will be used to prepare the resampler after a rewind.

pa_resampler_request() and pa_resampler_result() have been changed to round
as good as possible to avoid loosing or duplicating samples during rewinds.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/120>
2021-11-03 18:37:31 +00:00
Igor V. Kovalenko
90ccfc1688 null-sink: Recalculate max_request and max_rewind while resuming sink
When sink is suspended for reconfiguration changing sample spec, upon resume
internal thread_info max_request and max_rewind are out of date and possibly
not aligned to frame size anymore.

Recalculate thread max_request and max_rewind before resuming sink.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/658>
2021-11-03 15:59:22 +00:00
Igor V. Kovalenko
15c9ee5fec x11: Close session manager connection on ICE I/O error callback
When ICE I/O error occurs ICE connection is closed via IceCloseConnection.
This causes crash while releasing session manager connection later because
this ICE connection was initiated and is managed by session manager, and it will
attempt to close this ICE connection again.

Fix this by closing session manager connection instead.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/650>
2021-11-03 15:29:02 +00:00
Igor V. Kovalenko
696ffb464c message-params: Remove unwanted translations from log statements
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/655>
2021-10-24 13:37:47 +03:00
Igor V. Kovalenko
c0ad3efc18 bluetooth: Release container with device UUID strings
Stop leaking container with UUID strings when releasing adapter.

Fixes: 4b55b8a9d ("bluetooth: Keep a list of local adapters' UUIDs")
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/652>
2021-10-22 09:18:01 +03:00
Marijn Suijten
44ac675a8b bluetooth/native: Include util header for pa_msleep
Commit 7fd89e491 ("bluetooth: Try to reconnect SCO") introduces a call
to pa_msleep but failed to include the header, resulting in a:

    ../pulseaudio/src/modules/bluetooth/backend-native.c: In function ‘sco_acquire_cb’:
    ../pulseaudio/src/modules/bluetooth/backend-native.c:336:17: warning: implicit declaration of function ‘pa_msleep’ [-Wimplicit-function-declaration]
      336 |                 pa_msleep(300);
          |                 ^~~~~~~~~

(Un)fortunately this implicit declaration gets resolved at link-time,
otherwise the issue would have been caught sooner.

Fixes: 7fd89e491 ("bluetooth: Try to reconnect SCO")
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/651>
2021-10-22 00:24:33 +02:00
Marijn Suijten
ca9b723afa daemon/cmdline: Invert log-level list to match numerical values
Just like the manpage these written out log levels should correspond to
the numerical values listed before, intead of being in the opposite
order and provoking thoughts of the relation being the wrong way around
where 0=debug and 4=error.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/647>
2021-10-20 17:16:21 +02:00
Igor V. Kovalenko
8262815e94 message-params: If message paremeters is not JSON, wrap into JSON string
Requiring user to invoke send-message with correctly quoted parameters string
is not good for usability. Wrap parameters string into JSON string and try
again. If that works, log a warning use wrapped JSON string with parameters.

As an example these two commands will now invoke the same action:

    pactl send-message /card/bluez_card... switch-codec '"CODECNAME"'
    pactl send-message /card/bluez_card... switch-codec CODECNAME

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/648>
2021-10-19 09:45:27 +03:00
Tanu Kaskinen
5a03d84c32 i18n: Update .pot and .po files
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/645>
2021-10-08 21:57:34 +03:00
Andika Triwidada
0ed86c5cea Translated using Weblate (Indonesian)
Currently translated at 96.1% (549 of 571 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/id/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/645>
2021-10-08 21:49:12 +03:00
Igor V. Kovalenko
4c71f42fd5 bluetooth: Add missing breaks to profile availability check
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/643>
2021-10-06 19:06:45 +03:00
João Paulo Rechi Vita
48c78f0835 bluetooth: Add debug logging to profile creation
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/638>
2021-10-06 15:07:00 +00:00
João Paulo Rechi Vita
f7acc2ad7d bluetooth: Do not create a card profile for unsupported profiles
Check whether a Bluetooth profile is supported both by the remote device
and the local host before creating a card profile for it.

This is useful when some of the media profiles have not been registered
with bluetoothd because ex., oFono is not running and the headset
backend is not available.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/638>
2021-10-06 15:07:00 +00:00
João Paulo Rechi Vita
ab47d9394b bluetooth: Add debug logging to pa_bluetooth_device_supports_profile
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/638>
2021-10-06 15:07:00 +00:00
João Paulo Rechi Vita
d7f95170a1 bluetooth: Consider adapter UUIDs when evaluating profile support
The remote device list of UUIDs reflects which profiles are supported by
the remote device alone. We currently rely solely on this list to decide
if a certain card profile is supported, and thus should be created and
get connected.

This used to be accurate when the Bluetooth modules were first written,
but now BlueZ is more dynamic and local profile support can be added or
removed during runtime. The adapter's list of UUIDs is an accurate
representation of the profiles supported by the local host at a certain
moment.

This commit combines the list of UUIDs supported by remote device and
the list of UUIDs supported by the local host to determined whether a
Bluetooth profile is actually supported or not, and whether it should be
expected to get connected during device connection.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/638>
2021-10-06 15:07:00 +00:00
Igor V. Kovalenko
b81b995809 thread-mainloop: Release once_unlocked_data object after callback
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/642>
2021-10-06 14:18:24 +00:00
Chupligin Sergey
17a573782a Fix spelling of warning
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/639>
2021-10-01 19:12:14 +03:00
Igor V. Kovalenko
e189924570 Fix expression with side effect in pa_assert
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/641>
2021-09-30 11:20:52 +03:00
Igor V. Kovalenko
733969ac19 socket-server: Move systemd socket activation code to pulsecore
There is no need to support server sockets in client library. Move all related
code and tcp-wrappers dependency to pulsecore library.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/640>
2021-09-27 01:34:42 +00:00
Tanu Kaskinen
96d7d6f243 i18n: Update .pot and .po files
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/637>
2021-09-22 19:05:54 +03:00
Daniel Dantur
be8aeb6387 Translated using Weblate (Spanish)
Currently translated at 98.2% (561 of 571 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/es/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/637>
2021-09-22 19:04:29 +03:00
Jan Kuparinen
944699508b Translated using Weblate (Finnish)
Currently translated at 92.8% (530 of 571 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/fi/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/637>
2021-09-22 19:04:29 +03:00
Gogo Gogsi
8ee4891057 Translated using Weblate (Croatian)
Currently translated at 100.0% (571 of 571 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/hr/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/637>
2021-09-22 19:04:29 +03:00
Karl Ove Hufthammer
713c0edbc7 Translated using Weblate (Norwegian Nynorsk)
Currently translated at 100.0% (571 of 571 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/nn/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/637>
2021-09-22 19:04:29 +03:00
Andika Triwidada
894756d04b Translated using Weblate (Indonesian)
Currently translated at 89.6% (512 of 571 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/id/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/637>
2021-09-22 19:04:29 +03:00
Fran Diéguez
eaf48ba5ee Translated using Weblate (Galician)
Currently translated at 97.3% (556 of 571 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/gl/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/637>
2021-09-22 19:04:29 +03:00
Oğuz Ersen
eff0fd1adc Translated using Weblate (Turkish)
Currently translated at 100.0% (571 of 571 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/tr/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/637>
2021-09-22 19:04:29 +03:00
Jan Kuparinen
b3ae3c117b Translated using Weblate (Finnish)
Currently translated at 91.2% (521 of 571 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/fi/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/637>
2021-09-22 19:04:29 +03:00
Hela Basa
1b1044b403 Translated using Weblate (Sinhala)
Currently translated at 0.1% (1 of 571 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/si/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/637>
2021-09-22 19:04:29 +03:00
Göran Uddeborg
19ae35da3f Translated using Weblate (Swedish)
Currently translated at 100.0% (571 of 571 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/sv/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/637>
2021-09-22 19:04:29 +03:00
Emilio Herrera
6027ee4970 Translated using Weblate (Spanish)
Currently translated at 95.4% (545 of 571 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/es/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/637>
2021-09-22 19:04:29 +03:00
Luna Jernberg
42100109f6 Translated using Weblate (Swedish)
Currently translated at 100.0% (571 of 571 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/sv/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/637>
2021-09-22 19:04:29 +03:00
Yuri Chornoivan
9e78dd41e2 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (571 of 571 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/uk/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/637>
2021-09-22 19:04:29 +03:00
Piotr Drąg
eec1b2e0f0 Translated using Weblate (Polish)
Currently translated at 100.0% (571 of 571 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/pl/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/637>
2021-09-22 19:04:29 +03:00
simmon
8c7d875024 Translated using Weblate (Korean)
Currently translated at 100.0% (571 of 571 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/ko/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/637>
2021-09-22 19:04:29 +03:00
Oğuz Ersen
d10697ce50 Translated using Weblate (Turkish)
Currently translated at 100.0% (571 of 571 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/tr/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/637>
2021-09-22 19:04:29 +03:00
Göran Uddeborg
c954e0ea87 Translated using Weblate (Swedish)
Currently translated at 100.0% (571 of 571 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/sv/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/637>
2021-09-22 19:04:29 +03:00
Yuri Chornoivan
3a0be67354 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (571 of 571 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/uk/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/637>
2021-09-22 19:04:29 +03:00
Oğuz Ersen
ab68ac904d Translated using Weblate (Turkish)
Currently translated at 100.0% (571 of 571 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/tr/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/637>
2021-09-22 19:04:29 +03:00
Luna Jernberg
150dc155cb Translated using Weblate (Swedish)
Currently translated at 99.2% (567 of 571 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/sv/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/637>
2021-09-22 19:04:29 +03:00
Rafael Fontenelle
cf59d17de0 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (571 of 571 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/pt_BR/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/637>
2021-09-22 19:04:29 +03:00
simmon
05c3c585e3 Translated using Weblate (Korean)
Currently translated at 100.0% (571 of 571 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/ko/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/637>
2021-09-22 19:04:29 +03:00
Jan Kuparinen
715e2611ba Translated using Weblate (Finnish)
Currently translated at 90.8% (519 of 571 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/fi/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/637>
2021-09-22 19:04:29 +03:00
Piotr Drąg
1aafaafb3d Translated using Weblate (Polish)
Currently translated at 100.0% (571 of 571 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/pl/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/637>
2021-09-22 19:04:29 +03:00
Rico Tzschichholz
a40774cc4d vala: Couple of libpulse binding fixes
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/635>
2021-09-22 15:56:27 +00:00
Igor V. Kovalenko
60fb0c30c7 ladspa-sink: fix compiled in default LADSPA_PATH string
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/636>
2021-09-22 15:25:52 +00:00
Biswapriyo Nath
37c413d917 Install modules in bindir for Windows
Windows only loads DLLs from the same directory as the executable.
This fixes module loading failure by putting it in same directory.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/633>
2021-09-22 15:19:02 +00:00
Chengyi Zhao
7fd89e491f bluetooth: Try to reconnect SCO
When the SCO connection is in use, if you disconnect first and then connect,
the SCO connection will occasionally fail, and the Bluetooth error code is 42
(0x2A in hexadecimal). This is usually because an error occurred when the SCO
connection was initiated, we need to try to reconnect to optimize the handling
of this problem. The log returned by the kernel is as follows:

Bluetooth: sco_connect_cfm: hcon 0000000003328902 bdaddr 40:ef:4c:0c:11:f0 status 42
Bluetooth: sco_sock_connect status is -38
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/622>
2021-09-22 15:13:26 +00:00
Biswapriyo Nath
f5b94eff76 Fix pointer to integer cast warnings
This fixes warning: cast to pointer from integer of different size.
In Windows platform, long is 4 bytes. So, void* is first cast to
intptr_t then to int.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/630>
2021-09-22 14:43:59 +00:00