Compare commits

...

865 commits

Author SHA1 Message Date
Fco. Javier F. Serrador
eee0e8f22f 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/
2025-10-01 05:20:04 +02:00
Fco. Javier F. Serrador
b50c28af2c 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/
2025-10-01 05:20:04 +02:00
Martin Srebotnjak
210f4742e7 Translated using Weblate (Slovenian)
Currently translated at 100.0% (572 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/sl/
2025-10-01 05:20:04 +02:00
Temuri Doghonadze
53532e63bf Translated using Weblate (Georgian)
Currently translated at 79.3% (454 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/ka/
2025-10-01 05:20:04 +02:00
Jim Spentzos
6834e0041c Translated using Weblate (Greek)
Currently translated at 100.0% (572 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/el/
2025-10-01 05:20:04 +02:00
김인수
329c05b04f 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/
2025-10-01 05:20:04 +02:00
Jim Spentzos
76320675d8 Translated using Weblate (Greek)
Currently translated at 100.0% (572 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/el/
2025-10-01 05:20:04 +02:00
Salvatore Cocuzza
d5b58d29ea Translated using Weblate (Italian)
Currently translated at 99.6% (570 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/it/
2025-10-01 05:20:04 +02:00
Salvatore Cocuzza
511926ab4b Translated using Weblate (Italian)
Currently translated at 99.3% (568 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/it/
2025-10-01 05:20:04 +02:00
Fco. Javier F. Serrador
f6e1124942 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/
2025-10-01 05:20:04 +02:00
Fco. Javier F. Serrador
c7db9d60a6 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/
2025-10-01 05:20:04 +02:00
Fco. Javier F. Serrador
7493990c84 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/
2025-10-01 05:20:04 +02:00
김인수
79455f69f7 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/
2025-10-01 05:20:04 +02:00
Remus-Gabriel Chelu
a1fef186d0 Translated using Weblate (Romanian)
Currently translated at 100.0% (572 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/ro/
2025-10-01 05:20:04 +02:00
Sergey A
4fa2e83ac3 Translated using Weblate (Russian)
Currently translated at 100.0% (572 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/ru/
2025-10-01 05:20:04 +02:00
Temuri Doghonadze
f081327511 Translated using Weblate (Georgian)
Currently translated at 78.8% (451 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/ka/
2025-10-01 05:20:04 +02:00
Rafael Fontenelle
d3f1e217e7 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (572 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/pt_BR/
2025-10-01 05:20:04 +02:00
Zayed Al-Saidi
5a3b45cda1 Translated using Weblate (Arabic)
Currently translated at 34.4% (197 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/ar/
2025-10-01 05:20:04 +02:00
Rômulo Borges
b4b3889f3c pactl: add JSON output format
Previously, using the -f json or --format=json flags did not return JSON for the following commands:
- get-sink-volume
- get-source-volume
- get-sink-mute
- get-source-mute

This change adds proper JSON output for these commands.
2025-09-28 12:25:49 -03:00
Jonathan Marler
6358bcdf15 ci: Fetch tags by default before building
The CI for merge requests is failing because the meson script is unable
to parse the version. With some print debugging I determined that the
version string being generated on the CI is empty because it has no
git tags. I've added a command to fetch the tags before the build.
2025-09-15 13:15:55 -04:00
Arun Raghavan
1699a78f5b test: Demote once-test failure for meson to skip
Since this fails on CI (presumably due to pthread_setffinity_np() not
being permitted, let's make this a soft failure.
2025-09-15 13:06:54 -04:00
Arun Raghavan
17e471868e stream: Minor whitespace fixups 2025-09-15 13:06:54 -04:00
Jonathan Marler
1fbc6b0e0e stream: fix array out-of-bounds in stream_get_timing_info_callback
This issue was found by enabling ubsan. For me it consistently triggered
after about 28 seconds running a simple example that plays a sine wave
via the mainloop api.

I added a log and confirmed that before the ubsan is triggered the
index variable j is indeed 32 which is out-of-bounds.

Co-authored-by: Arun Raghavan <arun@asymptotic.io>
2025-09-13 12:19:35 -06:00
Yauhen Bugamol
98c7c9eafb Translated using Weblate (Belarusian)
Currently translated at 93.0% (532 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/be/
2025-05-01 08:49:06 +02:00
Yauhen Bugamol
20c853d84b Translated using Weblate (Belarusian)
Currently translated at 91.9% (526 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/be/
2025-05-01 02:34:19 +02:00
Weblate Translation Memory
7daeec45ff Translated using Weblate (Arabic)
Currently translated at 32.5% (186 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/ar/
2025-04-27 14:48:30 +02:00
Zayed Al-Saidi
a6d0341209 Translated using Weblate (Arabic)
Currently translated at 32.5% (186 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/ar/
2025-04-27 14:48:30 +02:00
Zayed Al-Saidi
6403e29230 Translated using Weblate (Arabic)
Currently translated at 29.3% (168 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/ar/
2025-04-27 10:33:19 +02:00
Weblate Translation Memory
7dce3ffcb6 Translated using Weblate (Arabic)
Currently translated at 29.3% (168 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/ar/
2025-04-27 10:33:19 +02:00
Ricky Tigg
a2d6f37bce 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/
2025-04-22 18:19:14 +02:00
Salvatore Cocuzza
92993fa4c2 Translated using Weblate (Italian)
Currently translated at 98.9% (566 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/it/
2025-04-18 20:51:23 +02:00
Temuri Doghonadze
73e9692118 Translated using Weblate (Georgian)
Currently translated at 78.8% (451 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/ka/
2025-04-13 22:52:44 +02:00
hsu zangmen
e2e1aabc19 Translated using Weblate (Chinese (Traditional) (zh_TW))
Currently translated at 91.9% (526 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/zh_TW/
2025-04-09 03:53:35 +02:00
Remus-Gabriel Chelu
ca39322d5a Translated using Weblate (Romanian)
Currently translated at 100.0% (572 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/ro/
2025-02-23 21:53:05 +01:00
Remus-Gabriel Chelu
8d7da0d505 Translated using Weblate (Romanian)
Currently translated at 0.3% (2 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/ro/
2025-02-19 14:59:47 +01:00
Ricky Tigg
8d12c147af 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/
2024-12-20 13:38:35 +01:00
DK Guy
c03faae6be Translated using Weblate (Danish)
Currently translated at 98.6% (564 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/da/
2024-12-13 18:38:37 +01:00
Andika Triwidada
5cd579acc3 Translated using Weblate (Indonesian)
Currently translated at 100.0% (572 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/id/
2024-11-03 11:40:38 +01:00
Andika Triwidada
0296a5cefc Translated using Weblate (Indonesian)
Currently translated at 98.4% (563 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/id/
2024-11-02 17:07:00 +01:00
Arif Budiman
7c5c877a52 Translated using Weblate (Indonesian)
Currently translated at 95.6% (547 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/id/
2024-10-25 13:11:28 +02:00
Hugo Carvalho
31f4c27a5c Translated using Weblate (Portuguese)
Currently translated at 100.0% (572 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/pt/
2024-10-17 17:38:41 +02:00
Remus-Gabriel Chelu
ed789a4dc2 Added translation using Weblate (Romanian) 2024-10-11 18:01:03 +02:00
Rafael Fontenelle
93459a47c0 Translated using Weblate (Portuguese (Brazil))
Currently translated at 99.4% (569 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/pt_BR/
2024-10-11 18:01:02 +02:00
Giannis Antypas
906362119e Translated using Weblate (Greek)
Currently translated at 100.0% (572 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/el/
2024-09-04 18:38:33 +02:00
Giannis Antypas
60a85fb304 Translated using Weblate (Greek)
Currently translated at 99.3% (568 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/el/
2024-09-01 13:38:29 +02:00
Giannis Antypas
3e2bb8a1ec Translated using Weblate (Greek)
Currently translated at 98.7% (565 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/el/
2024-08-22 11:38:37 +02:00
bert
8ef0d597a1 rtp-recv: Remove inappropriate byte order conversion
Conversion of the `service` argument of `getaddrinfo()` to big-endian
byte order causes module-rtp-recv to bind to an incorrect port (37670)
for SAP announcements on little-endian architectures

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/828>
2024-08-21 13:22:14 +00:00
Martin Srebotnjak
90124125de Translated using Weblate (Slovenian)
Currently translated at 100.0% (572 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/sl/
2024-08-17 20:38:38 +02:00
Martin Srebotnjak
2c379c1a3d Translated using Weblate (Slovenian)
Currently translated at 91.2% (522 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/sl/
2024-08-16 18:38:37 +02:00
Giannis Antypas
3b3f763380 Translated using Weblate (Greek)
Currently translated at 96.8% (554 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/el/
2024-08-16 18:38:36 +02:00
Martin Srebotnjak
cba313d8f5 Translated using Weblate (Slovenian)
Currently translated at 33.9% (194 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/sl/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/826>
2024-08-05 23:18:43 +00:00
Arun Raghavan
3da5e62741 ci: Add workflow rules to create merge request pipelines
This should make Weblate MRs run again.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/827>
2024-08-05 19:14:12 -04:00
Martin Srebotnjak
7341e5d16d Translated using Weblate (Slovenian)
Currently translated at 33.3% (191 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/sl/
2024-08-04 21:41:21 +02:00
김인수
246b3ecf60 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/
2024-08-04 21:41:20 +02:00
Giannis Antypas
398103a15a Translated using Weblate (Greek)
Currently translated at 96.6% (553 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/el/
2024-08-03 09:49:52 +02:00
Oğuz Ersen
a14239d2dc 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/
2024-08-01 06:41:28 +02:00
Giannis Antypas
e3d30f8020 Translated using Weblate (Greek)
Currently translated at 96.3% (551 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/el/
2024-07-30 22:41:57 +02:00
Martin Srebotnjak
5c65aa5c11 Translated using Weblate (Slovenian)
Currently translated at 30.4% (174 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/sl/
2024-07-26 15:38:50 +02:00
Giannis Antypas
2502f98666 Translated using Weblate (Greek)
Currently translated at 87.2% (499 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/el/
2024-07-20 02:38:56 +02:00
Scrambled 777
aa36bebf23 Translated using Weblate (Hindi)
Currently translated at 100.0% (572 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/hi/
2024-07-20 02:38:56 +02:00
Martin Srebotnjak
608d92e9a6 Translated using Weblate (Slovenian)
Currently translated at 28.8% (165 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/sl/
2024-07-20 02:38:56 +02:00
Martin Srebotnjak
565c129e90 Translated using Weblate (Slovenian)
Currently translated at 28.1% (161 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/sl/
2024-07-20 02:38:56 +02:00
Martin Srebotnjak
b30d1a0a45 Translated using Weblate (Slovenian)
Currently translated at 27.4% (157 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/sl/
2024-07-20 02:38:56 +02:00
Martin Srebotnjak
5de032e69b Added translation using Weblate (Slovenian) 2024-07-20 02:38:56 +02:00
Sabri Ünal
1678ede2be 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/
2024-07-20 02:38:56 +02:00
김인수
22cef109b9 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/
2024-07-20 02:38:56 +02:00
mooo
eacc110590 Translated using Weblate (Lithuanian)
Currently translated at 96.6% (553 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/lt/
2024-07-20 02:38:56 +02:00
김인수
c3af288ab9 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/
2024-07-20 02:38:56 +02:00
Matěj Valášek
3230a92540 Translated using Weblate (Czech)
Currently translated at 92.6% (530 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/cs/
2024-07-20 02:38:56 +02:00
Charles Lee
ea836fab31 Translated using Weblate (Chinese (Simplified) (zh_CN))
Currently translated at 94.7% (542 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/zh_CN/
2024-07-20 02:38:56 +02:00
김인수
ea0045e725 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/
2024-07-20 02:38:56 +02:00
Temuri Doghonadze
0e862b4508 Translated using Weblate (Georgian)
Currently translated at 76.9% (440 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/ka/
2024-07-20 02:38:56 +02:00
Sergey A
3639b05767 Translated using Weblate (Russian)
Currently translated at 100.0% (572 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/ru/
2024-07-20 02:38:56 +02:00
Temuri Doghonadze
d6b74207da Translated using Weblate (Georgian)
Currently translated at 76.7% (439 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/ka/
2024-07-20 02:38:56 +02:00
Yousef Alzahrani
5839e00127 Translated using Weblate (Arabic)
Currently translated at 11.7% (67 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/ar/
2024-07-20 02:38:56 +02:00
Yousef Alzahrani
ee3c2499fa Added translation using Weblate (Arabic) 2024-07-20 02:38:56 +02:00
mooo
aa395c4094 Translated using Weblate (Lithuanian)
Currently translated at 96.1% (550 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/lt/
2024-07-20 02:38:56 +02:00
Temuri Doghonadze
2ad14f33d8 Translated using Weblate (Georgian)
Currently translated at 75.0% (429 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/ka/
2024-07-20 02:38:56 +02:00
Arun Raghavan
874a609959 json: Allow non-ASCII UTF-8 strings
Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1398
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/813>
2024-07-02 14:15:43 +00:00
Arun Raghavan
3b09ca3a15 echo-cancel: Fix multichannel processing
Missed the new parameters in the webrtc-audio-processing 1.0 move.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/823>
2024-06-25 15:35:42 -04:00
Mohamed Akram
c1990dd026 build-sys: Fix running on macOS
Ensure modules are built as .so files so that they are found by ltdl at
runtime.

Fix HAVE_COREAUDIO not being set on macOS leading to sound not working
in the default configuration.

Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/3808
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/817>
2024-05-01 21:54:17 +04:00
kwangshik.kim
6c77b0191a cli-command: Fix wrong condition check of pa_module_load
pa_module_load API's return value is integer which is
enum pa_error_code_t with minus such as -PA_ERR_IO
if the module loading is failed.
pa_cli_command_load gets a return value of pa_module_load
as pa_error_code_t which is wrong.
Minus integer value could not covert to enum which is defined
equal or larger than 0 so that pa_cli_command_load would
recognize the return value as larger than 0 if pa_module_load
return value (integer) is minus.

To fix this issue, I modified return value check logic
of pa_module_load API.
As same as pa_module_load's return type, integer would be used
to check if module load is failed in pa_cli_command_load
and the return value would be compared with minus.

Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/3801
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/814>
2024-04-05 09:31:47 -04:00
Arun Raghavan
84f5b742e3 tests: Don't run volume tests with impossible alignments
This worked so far somehow, but we were sending in some samples at
unrealistic alignments (given that pa_memblockq will be frame-aligned,
and we expect all operations to occur per-frame as well).

Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/3803
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/812>
2024-03-22 11:17:35 -04:00
Arun Raghavan
21d7a63e8c build-sys: Add a wrap file for Orc
Makes building Orc as a subproject easier.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/811>
2024-03-22 08:53:46 -04:00
Martin Tournoij
5d7cd8bd0b Don't log battery level and dock status every minute
My log files get completely clobbered by this; thousands of lines of:

	Jan 18 18:14:44 pulseaudio[29946]: [pulseaudio] backend-native.c: Dock Status: undocked
	Jan 18 18:15:39 pulseaudio[29946]: [pulseaudio] backend-native.c: Battery Level: 50%
	Jan 18 18:15:39 pulseaudio[29946]: [pulseaudio] backend-native.c: Dock Status: undocked
	Jan 18 18:16:34 pulseaudio[29946]: [pulseaudio] backend-native.c: Battery Level: 50%
	Jan 18 18:16:34 pulseaudio[29946]: [pulseaudio] backend-native.c: Dock Status: undocked
	Jan 18 18:17:29 pulseaudio[29946]: [pulseaudio] backend-native.c: Battery Level: 50%
	Jan 18 18:17:29 pulseaudio[29946]: [pulseaudio] backend-native.c: Dock Status: undocked
	Jan 18 18:18:25 pulseaudio[29946]: [pulseaudio] backend-native.c: Battery Level: 50%
	Jan 18 18:18:25 pulseaudio[29946]: [pulseaudio] backend-native.c: Dock Status: undocked
	Jan 18 18:19:20 pulseaudio[29946]: [pulseaudio] backend-native.c: Battery Level: 50%
	Jan 18 18:19:20 pulseaudio[29946]: [pulseaudio] backend-native.c: Dock Status: undocked
	Jan 18 18:20:15 pulseaudio[29946]: [pulseaudio] backend-native.c: Battery Level: 50%

This seems like it should be a debug log, not a notice.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/810>
2024-03-18 23:44:09 +00:00
matoro
26ccd1167a tests: remove check2 timeouts in favor of meson
Meson already handles timeouts, configurable on the command line with
--timeout-multiplier.  They are set to 300s for all tests.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/807>
2024-01-30 12:39:47 -05: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
김인수
e6ffceb528 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
Toni Estevez
97cf85940c Translated using Weblate (Spanish)
Currently translated at 99.8% (571 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
262baea15d Translated using Weblate (Catalan)
Currently translated at 71.8% (411 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/ca/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/741>
2023-08-12 12:25:18 -04:00
Temuri Doghonadze
0368430316 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/741>
2023-08-12 12:25:18 -04:00
Jiri Grönroos
6f85dc39b1 Translated using Weblate (Finnish)
Currently translated at 93.3% (534 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
Jordi Mas
f778345cad Translated using Weblate (Catalan)
Currently translated at 71.5% (409 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/ca/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/741>
2023-08-12 12:25:18 -04:00
Jordi Mas
b8e10711d6 Translated using Weblate (Catalan)
Currently translated at 71.1% (407 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/ca/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/741>
2023-08-12 12:25:18 -04:00
Hugo Carvalho
58d784ace2 Translated using Weblate (Portuguese)
Currently translated at 100.0% (572 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/pt/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/741>
2023-08-12 12:25:18 -04:00
Balázs Meskó
5736a00e44 Translated using Weblate (Hungarian)
Currently translated at 100.0% (572 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/hu/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/741>
2023-08-12 12:25:18 -04:00
Arun Raghavan
fec36f3508 build-sys: Bump .so version 16.99.1
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/793>
2023-08-12 16:22:10 +00:00
SimonP
095ad5f4f8 alsa-mixer: Respect XDG base directory spec when loading profile sets
Try $XDG_DATA_HOME, then $XDG_DATA_DIRS, and finally fall back to old behaviour.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/311>
2023-08-12 16:03:30 +00:00
Rudi Heitbaum
7d063d6544 shm: use MFD_NOEXEC_SEAL for shared memory
ref: https://lore.kernel.org/lkml/20221207154939.2532830-4-jeffxu@google.com/

The new MFD_NOEXEC_SEAL and MFD_EXEC flags allows application to
set executable bit at creation time (memfd_create).

When MFD_NOEXEC_SEAL is set, memfd is created without executable bit
(mode:0666), and sealed with F_SEAL_EXEC, so it can't be chmod to
be executable (mode: 0777) after creation.

when MFD_EXEC flag is set, memfd is created with executable bit
(mode:0777), this is the same as the old behavior of memfd_create.

Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/792>
2023-08-12 15:58:11 +00:00
Arun Raghavan
84c53066c6 build-sys: Bump webrtc-audio-processing dependency
The package name and versioning are changing upstream, so prepare for
that.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/395>
2023-05-25 18:41:19 -04:00
Eero Nurkkala
22bbb5b3ba echo-cancel: add webrtc AEC3 support
Drop a number of now unsupported features, and add new parameters for
pre-/post-amplification.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/395>
2023-05-25 18:40:13 -04:00
Arun Raghavan
b16b107171 echo-cancel-test: Drop references to internal message queue
We don't actually initialise or use it in the test, and this just causes
a crash at the end.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/395>
2023-05-25 18:39:22 -04:00
Gioele Barabucci
e96d278bfc daemon/meson.build: Install dbus policy in /usr, not /etc
From https://bugs.debian.org/1006631:

> dbus supports policy files in both `/usr/share/dbus-1/system.d` and
> `/etc/dbus-1/systemd`. [The] recently released dbus 1.14.0, officially
> deprecates installing packages' default policies into `/etc/dbus-1/systemd`,
> instead reserving it for the sysadmin. This is the same idea as the
> difference between `/usr/lib/udev/rules.d` and `/etc/udev/rules.d`.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/783>
2023-04-21 20:10:24 +00:00
Arun Raghavan
c8af4920f7 ci: Use built-in distribution image name mechanism
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/789>
2023-04-21 16:04:14 -04:00
Arun Raghavan
39ff05e96d ci: Update to freedesktop/ci-templates
The upstream repo changed quite some time ago.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/788>
2023-04-21 15:40:17 -04:00
Georg Chini
86e9c90128 pactl, pacmd: Allow to unset the configured default sink or source
Currently there is no way to unset the default sink or source once it was
configured manually by the user.
This patch introduces the special name @NONE@, which can be used with the pacmd
or pactl set-default-sink and set-default-source commands to unset the user
configured default. When the default is unset, pulseaudio will return to the
standard default sink or source selection mechanism based on priority.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/785>
2023-03-25 20:55:48 +00:00
Weijia Wang
25bfdb3ab8 echo-cancel: Fix macOS build
Signed-off-by: Weijia Wang <contact@weijia.wang>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/786>
2023-03-22 20:09:38 +02:00
Hector Martin
3e038c6d88 alsa: ucm: Fix spurious mixer path removal on initial profile set
The code that removes the mixer path if probing fails can be called in
the path that sets a non-off device profile on hotplug *before*
card->active_profile is updated, which results in spuriously removing
the mixer path. By this point, context->ucm->active_verb would be set
to the same as the profile name, so we can use that instead to avoid
the issue.

On Apple Silicon machines with the UCM profiles in the Asahi Linux repo,
this manifests as the headphones jack having hardware volume controls
*only* if PA is started with headphones connected and until they are
disconnected. Hotplugs end up triggering the bad codepath, and it falls
back to software volume (which is particularly a problem when the
hardware volume happens to be very low or 0 at that point).

Fixes: a9cc1373e2 ("alsa: ucm - update the mixer path also after volume probe")
Signed-off-by: Hector Martin <marcan@marcan.st>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/752>
2023-03-19 21:22:32 +00:00
Alper Nebi Yasak
7005eafee3 alsa-ucm: Fix more instances of profile-verb conflation
The ucm_get_device_property() function adds to each UCM device's
playback_volumes (or capture_volumes) hash map an associated volume
mixer keyed with the UCM verb. These key-value pairs are then iterated
over in various places which assume the key is a profile name. This
assumption is no longer true since we can generate multiple profiles to
use conflicting devices.

A previous commit 4527890416 ("alsa-ucm: Stop conflating profile name
with UCM verb name") fixes some instances of this assumption, but misses
the relation explained above. Fix more instances of misleading
"profile"s where the UCM verb name is actually meant.

Fixes: 4527890416 ("alsa-ucm: Stop conflating profile name with UCM verb name")
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/771>
2023-03-19 21:09:00 +00:00
Alper Nebi Yasak
45509ff9bc alsa-ucm: Consider devices using the same PCM as incompatible
Although it's a valid UCM configuration to have multiple devices using
the same PlaybackPCM or CapturePCM, it's unclear how PulseAudio should
handle the cases where multiple of these devices are enabled. Some
options I can think of are:

- Merge all devices sharing the same PCM into the same mapping, open
  only one PCM substream for this mapping, and add 'combination ports'
  that enable combinations of the devices. This has been the case until
  recently, although the combination port logic was broken. A problem
  with this is that we can't independently control device volumes. We
  most likely cannot use hardware volumes either.

- Have one mapping for each device in the same profile, and open one PCM
  substream for each mapping. This is the current state, and it fails
  when there are fewer substreams than devices. Otherwise it works, but
  it's still confusing, as sound directed to a device-specific mapping
  might end up playing at multiple devices.

- Make multiple profiles each with combinations of upto-substream-count
  devices, and have one mapping/substream per device. This still causes
  the confusion mentioned above. And it's likely that the substream
  count will almost always be one, where this case degenerates into the
  last one.

- Have one mapping for each device in the same profile, but open only
  one PCM substream. I assume this is possible with software mixing, but
  it is still confusing like the above, and probably less performant.

- Generate multiple profiles each with one of the shared-PCM devices,
  again with one mapping/substream for that one device. The trade-off
  with this is that we can't use multiple of these devices at the same
  time. However, this doesn't have the output device confusion,
  combination port's volume problems, or the substream count limitation.

This patch takes a short-cut to achieve the last option, by considering
shared-PCM devices implicitly conflicting with each other.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/743>
2023-03-19 20:54:18 +00:00
Alper Nebi Yasak
b74269016c alsa-ucm: Disable old modifiers when switching profiles of same verb
While switching profiles of the same UCM verb, existing code first
disables devices that are only on the first profile to avoid conflicts.
However, it only disables devices, not modifiers. Even worse, modifiers
which have PlaybackPCM/CapturePCM are incorrectly treated as devices and
result in a segmentation fault.

Check what we are disabling, and call the appropriate disable function
for both devices and modifiers. Modifiers are disabled before devices,
because _dismod calls fail when the modifier's supported devices are
disabled.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/742>
2023-03-19 20:51:00 +00:00
Alper Nebi Yasak
b382a00f8b alsa-ucm: Add enable, disable, status helpers for modifiers
These are mostly the same as the device helpers added in c83b345169
("alsa-ucm: Add enable, disable, status helpers for devices"), but for
modifiers instead.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/742>
2023-03-19 20:51:00 +00:00
Georg Chini
3aaeb5113d switch-on-connect: Do not overwrite user configured default sink/source
Currently module-switch-on-connect overwrites the default sink or source that
the user has configured. This means that when the overwritten default sink or
source becomes unavailable, the new default will be chosen based on priority
and the default will not return to the originally configured value.
This patch solves the issue by introducing new core variables for the sink
or source chosen by the policy module which have higher priority than the
user configured defaults.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/784>
2023-03-16 20:19:39 +00:00
Biswapriyo Nath
39b6a4c123 meson: Add DEF file to export APIs in Windows
This helps to export correct APIs for compiler toolchain which
does not support version script file. For example, mingw clang.
The APIs in libpulse.def are similar with map-file except those
are in pulse-simple and pulse-mainloop-glib. Those are exported
in different shared library in Windows platform.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/761>
2023-03-16 13:05:44 +05:30
Igor V. Kovalenko
15e76a69bf memblockq: Drop check for chunk index alignment, require aligned length
There is no requirement for chunk index to be aligned, we only need chunk length
to be multiple of sample frame size.

Fixes: 6434853b0 ("memblockq: Do not allow non-frame indices in the memblock queue")
Fixes: 22827a5e1 ("protocol-native: Fail if trying to push unaligned memblock into queue")
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/779>
2023-02-26 19:42:03 +00:00
Igor V. Kovalenko
5ab2b9cb0e alsa-util: Fix pa_alsa_get_supported_formats fallback.
Looks like original intention was to scan over sample formats supported by PA,
but code does the scan by list of alsa formats. Reverse the map and adjust
fallback case which now can use the same map.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/782>
2023-02-25 12:00:38 +00:00
Igor V. Kovalenko
aed52c507f alsa-util: Perform format and rate detection before setting HW params
Perform detection of supported sample format and rates just after device is
opened, before `snd_pcm_hw_params()` is called for the first time. This fixes a
problem where device restricts available sample rates after HW params are set
preventing sample rate detection (seen with UAC2 devices and kernel 6.1.9)

Bug: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1414
Bug: https://github.com/alsa-project/alsa-lib/issues/119
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/782>
2023-02-25 12:00:38 +00:00
Ataberk Özen
b8e2198d34 alsa-profiles: rename mappings for Xonar SE
Remove descriptions as well.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/754>
2023-02-20 18:37:36 +03:00
Ataberk Özen
9e85059c64 alsa-profiles: import Asus Xonar SE profile from pipewire
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/754>
2023-02-20 15:33:36 +00:00
Igor V. Kovalenko
300db77922 pstream: Pass frame size to keep split memblock parts aligned
`pa_pstream_send_memblock()` would split incoming memblock into parts not
exceeding maximum pool block size.

To make sure split parts of memblock are still frame-aligned add new `align` arg
to `pa_pstream_send_memblock`, find out required alignment from stream sample
format and pass it there. Bump default alignment to 256 which is good up to
32bit 64ch frames.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/780>
2023-02-10 12:45:48 +00:00
Igor V. Kovalenko
5830e03036 bluetooth: Do not attempt decoding too short faststream packet data
Looks like sbc_decode() would seldom access more than specified input length
bytes from input buffer if input length is less than expected frame size.

Fix potential access past allocated memory by checking if input contains
complete frame before calling sbc_decode()

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/781>
2023-02-10 00:25:11 +03:00
Alistair Leslie-Hughes
5cefef591e rtp-recv: Use getaddrinfo to improve support for ipv6.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/774>
2023-02-08 20:50:48 +00:00
Alistair Leslie-Hughes
f44cb36374 rtp-send: Use getaddrinfo to improve support for ipv6 on source address
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/774>
2023-02-08 20:50:48 +00:00
Igor V. Kovalenko
1cfa737823 resampler: Fix oversized memblock pushed from resampler
The assumption that the format enum is ordered by size is not valid for quite
some time, since 24bit formats were appended to format enum later than 32bit
formats. This causes resampler to produce properly aligned memblock of size
larger than maximum mempool block size if input format is 24bit and output
format is 32bit.

Oversized block is getting split by `pa_pstream_send_memblock()` into parts of
size not exceeding maximum mempool block size. This usually works well but for
32ch 32bit 48000Hz stream the frame alignment is 128 bytes and maximum mempool
block size value is multiple of 64 but not 128 bytes, therefore resulting parts
are misaligned.

On receiving side this causes extra allocation of 128 byte chunk while `mcalign`
helper reassembles properly aligned frame out of second block of misaligned
size. While first and second properly aligned frames are retrieved successfully
from `mcalign` helper, third retrieved frame would end up with properly aligned
size but misaligned memblock index (in this example, that would be 64 bytes.)
Attempt to push a chunk with misaligned memblock index causes assertion failure

  Assertion 'uchunk->index % bq->base == 0' failed at memblockq.c:289,
    function pa_memblockq_push(). Aborting.

Fix oversized block issue by checking proper size of format instead of enum
value.

Fixes: a67c21f09 ("merge 'lennart' branch back into trunk.")
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/778>
2023-02-08 20:43:52 +03:00
Georg Chini
6ae3961001 tunnel-sink-new: Fix hang when used in combination with module-combine-sink
When tunnel-sink-new was used in combination with module-combine-sink, PA
would hang because the main thread was blocked waiting for the execution
of the latency snapshot message. The message would never be processed
because the rtpoll associated with the control_inq of module-combine-sink
was never run.
This patch fixes the problem by running the rtpoll in the thread function
to process incoming messages. Though there are no users of the rtpoll for
module-tunnel-source-new, the same change is applied there.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/773>
2023-02-07 09:25:48 +00:00
Igor V. Kovalenko
3e5db72ab7 bluetooth: Amend writeout to send more initial frames
When bluetooth transport has both both sink and source, pulseaudio would
synchronize writing out frames with reading frames from peer to make fair
schedule of reads and writes. Pulseaudio allows two blocks of data to be sent to
peer before synchronizing writes with reads just in case that peer implements
similar write schedule.

It could happen that first blocks are still missed by peer, which would cause
pulseaudio writes to stall waiting for first frames from peer.

Fix this by allowing more data frames out until data from peer is actually
received.

Closes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1424
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/777>
2023-02-06 18:55:47 +00:00
Igor V. Kovalenko
86c5fbab57 alsa-util: Add more standard sample rates.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/776>
2023-02-06 18:48:56 +00:00
Igor V. Kovalenko
8152f39603 alsa-util: Dump probed rates
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/775>
2023-02-06 18:09:30 +03:00
Alistair Leslie-Hughes
f8b9010582 rtp-send: Use getaddrinfo to improve support for ipv6.
inet_pton isn't guarantee to support IPV6 address when a scope has been specified.

Using getaddrinfo instead, we can safely pass through INET6+scope and have it translated
to a usable address.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/766>
2023-01-21 10:10:02 +00:00
Georg Chini
6473e9ed0e stream-interaction: Fix regression when a trigger role is also a cork role
If the same role is named in trigger_roles and cork_roles, a stream with that
role will crash PA. This patch fixes the crash and re-introduces the old
behavior, so that for example specifying trigger_roles=alarm, phone and
cork_roles=alarm, multimedia means that a phone stream will cork alarm and
multimedia streams while an alarm stream will only cork multimedia streams.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/767>
2023-01-21 10:06:57 +00:00
Georg Chini
94dd7b4b7b stream-interaction: Extend trigger groups to module-role-cork
For module-role-ducking, trigger and ducking groups were introduced some years
ago. This patch extends the functionality to module-role-cork, so that trigger
and cork roles may now contain "/" separated groups.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/767>
2023-01-21 10:06:57 +00:00
Igor V. Kovalenko
33129c88dc backend-native: Fix parsing comma-delimited response
Incoming RFCOMM string has extra end-of-command terminating character which
breaks both AT+BIA= and AT+BAC= parsers which only expect a comma.

This leads to error parsing last element of response in both cases and could
prevent detecting mSBC availability if mSBC codec id comes last, e.g. AT+BIA=1,2

Fix this by additionally checking for delimiters in both parsers.

Fixes: 3c63f8e6d ("backend-native: Fix stack corruption reading RFCOMM AT+BIA= response")
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/768>
2023-01-19 21:38:05 +03:00
flyingOwl
c3eae5d00c time-smoother-2: Fix time calculation by comparing timestamps
This fixes the rare case of resume_time being bigger than time_stamp. Which
happens sometimes when a gstreamer client is quickly seeking through a
media file. The resulting integer underflow then causes a huge value in
current_time which will break the playback.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/764>
2022-12-30 00:16:03 +01:00
Alistair Leslie-Hughes
96bd4e57b5 pulsecore: Set errno before calling read
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/759>
2022-12-14 13:29:20 +11:00
Mart Raudsepp
89ce6321bd proplist-util: Don't assume gdkx is there as gtk could be built without it
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/757>
2022-12-10 09:01:58 +00:00
Shunsuke Shimizu
47a6918739 build-sys: Fix macOS build
* Enable macOS specific modules (module-bonjour-publish,
  module-coreaudio-detect and module-coreaudio-device)
* Correctly set `PA_SOEXT` (.so, .dylib and .dll)
* Build `poll-posix.c` and `semaphore-osx.c`
* Drop linker flag `-Wl,-z,nodelete` on Darwin
* Drop linker flag `-Wl,--no-undefined` on Darwin
* Prefer to `clock_gettime` over compat impl for old Darwin
* Disable SCM credential on Darwin

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/746>
2022-12-07 10:57:01 +00:00
Alistair Leslie-Hughes
e4517da353 pactl: Stop a crash when setting the volume which is out of range
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/758>
2022-12-06 18:37:33 +11:00
Igor V. Kovalenko
0cbbc408ae module-combine-sink: Suspend while unloading to fix crash moving sinks
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/756>
2022-11-27 22:47:30 +03:00
Igor V. Kovalenko
37c72c2072 module-combine-sink: Do not set up rate adjustment timer at load time
Rate adjustment timer is set up when combine sink is resumed and relased when
combine sink is suspended. Do not create this timer again while module is loaded
to prevent duplicate effort causing assertion in time_callback.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/756>
2022-11-27 22:31:51 +03:00
Igor V. Kovalenko
3c63f8e6dc backend-native: Fix stack corruption reading RFCOMM AT+BIA= response
On-stack buffer size is too short for sscanf to read AT+BIA= and AT+BAC=
response strings which have variable length.

Fix this by replacing sscanf with proper copy of input string.

Fixes: cca0d6937 ("bluetooth: add AT+BIA support")
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/755>
2022-11-26 17:01:08 +03:00
Alistair Leslie-Hughes
e650c2b33e Ensure fds are closed when exec functions are used.
When usng shm_open, FD_CLOEXEC is set explicitly.

However when using memfd_create, we must pass the MFD_CLOEXEC flag
to ensure the same fcntl value (FD_CLOEXEC) is set.

Fixes #1394

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/751>
2022-11-24 21:58:53 +00:00
Wim Taymans
3349e1c471 sndfile: handle sndfiles with s24 format
Samples with s24 format should be read with the readf_int read
function instead of the raw function.

This fixes playback of flac/wav with s24 sample format.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/750>
2022-11-10 17:13:58 +01:00
Alistair Leslie-Hughes
3f9455411c Propagate return value from pa_pstream_attach_memfd_shmid
Using wine,
The mmap call in shm_attach sometimes fails with ENOMEM which isn't propagated
up the call stack.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/747>
2022-10-19 08:06:46 +11:00
Igor V. Kovalenko
f2b748e851 bluetooth: Add 20dB boost for faststream source volume
Some devices unexpectedly return stereo backchannel stream with wrong frequency,
and volume of backchannel stream appears too low.

If this happens, boost source volume by 20dB.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/628>
2022-10-17 09:07:09 +03:00
Igor V. Kovalenko
76e01b25f5 bluetooth: Handle fragmented faststream frames
Incoming frames can span multiple packets, add support for this.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/628>
2022-10-17 09:07:09 +03:00
Igor V. Kovalenko
697a1a309a bluetooth: Use stereo sample spec for faststream backchannel
Faststream backchannel decoder does not know whether incoming stream is mono or
stereo before first packet is decoded, and some devices return stereo stream.

As it is not easy to change source sample spec after source is created, use
stereo sample spec always and perform conversion if mono stream is found.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/628>
2022-10-17 09:07:09 +03:00
Igor V. Kovalenko
cddb9f144a bluetooth: Add faststream codec
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/628>
2022-10-17 09:07:09 +03:00
Igor V. Kovalenko
0498e7a3d0 bluetooth: Do not use hardware volume control for A2DP backchannel
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/628>
2022-10-17 09:07:09 +03:00
Igor V. Kovalenko
48f40352a6 bluetooth: Free memblock after codec errors
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/628>
2022-10-17 09:07:09 +03:00
acheronfail
45df212d66 pactl: SUBSCRIBE add a newline after every json message
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/748>
2022-09-27 08:58:50 +00:00
wael
68a0603d76 meson: use proper type for bools
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/749>
2022-09-21 07:06:45 +00:00
Georg Chini
8fe50bbc31 time-smoother-2: Fix stream time when stream starts paused
When a stream is started but has not yet called smoother_2_put(), pa_smoother_2_get()
returns the time since the start of the stream even if the stream was started paused.
When the stream is started paused, pa_smoother_2_get() should return 0 instead. This
patch fixes the problem.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/745>
2022-08-25 08:11:04 +02:00
Marijn Suijten
8188b49bed backend-native: Remove uninformative "Profile unavailable" debug message
This message would print for all transports while not even conveying
the profile of the transport, and might be printed for non-`HFP_HF`
profiles which is the only transport-profile we're interested in.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/740>
2022-08-16 08:16:24 +03:00
Marijn Suijten
518ca03019 backend-native: Update all CIND indicators
When `indicator` is initialized to `1`:
- it always succeeds the `indicator == CIND_CALL_INDICATOR` check;
- hence always calls `continue`;
- hence never reaches the end of the `while` loop where `indicator++` is
  called;
- hence `indicator` never contains any other value than `1` meaning
  `cind_enabled_indicators` is ever updated.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/740>
2022-08-16 08:16:24 +03:00
Marijn Suijten
6ec084e2b3 Revert "bluez5-util: move pa_bluetooth_discovery to header"
This reverts commit b05e34e092.

Now that backend-native uses a different way to get to its own
`native_backend` instance - without going through
`pa_bluetooth_discovery` - this patch can be reverted again, as nothing
outside bluez5-util is supposed to know the internals of this struct.
That's what the many functions are for which all take pointers to this
(at that point) opaque struct instead.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/740>
2022-08-16 08:16:24 +03:00
Marijn Suijten
391dac58a9 backend-native: Add backend pointer to transport_data
This removes the inverse/recursive dependency of backend-native on the
`pa_bluetooth_discovery` struct, which is supposed to be opaque outside
of `bluez5-util` in favour of the many accessor functions defined in
`bluez5-util.h`.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/740>
2022-08-16 08:16:15 +03:00
Marijn Suijten
c6bd6656a2 backend-native: Fix indentation and whitespace style
Replace tabs with spaces, remove trailing whitespace, remove bracing
around single-line `if` blocks.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/740>
2022-08-16 08:13:46 +03:00
Yureka
de8b0c1124 Make gio-2.0 optional when gsettings is disabled
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/654>
2022-08-15 14:42:54 +00:00
Fabrice Fontaine
c789bc5fe3 meson.build: fix build without C++
Fix the following build failure without C++:

../output-1/build/pulseaudio-16.1/meson.build:1:0: ERROR: Unknown compiler(s): [['/home/autobuild/autobuild/instance-1/output-1/per-package/pulseaudio/host/bin/powerpc64-buildroot-linux-gnu-g++']]
The following exception(s) were encountered:
Running "/home/autobuild/autobuild/instance-1/output-1/per-package/pulseaudio/host/bin/powerpc64-buildroot-linux-gnu-g++ --version" gave "[Errno 2] No such file or directory: '/home/autobuild/autobuild/instance-1/output-1/per-package/pulseaudio/host/bin/powerpc64-buildroot-linux-gnu-g++'"

Fixes:
 - http://autobuild.buildroot.org/results/6526a21bd4da3b8458188f27c1ec04c381e4b673

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/737>
2022-08-15 17:37:10 +03:00
Dylan Van Assche
1b031ecee6 bluetooth: hook up UPower backend
Hook up the UPower backend to backend-native to report
the host battery level to the HF.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/631>
2022-08-01 19:16:25 +00:00
Dylan Van Assche
3621731050 bluetooth: add UPower backend
UPower provides information about the power supply and battery
level of the host. Add a backend to retrieve the host battery level.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/631>
2022-08-01 19:16:25 +00:00
Dylan Van Assche
cca0d69375 bluetooth: add AT+BIA support
AT+BIA is used to enable/disable CIND indicators by Bluetooth HFP spec.
By default, all indicators are enabled on connection.
AT+BIA will configure which indicators should be disabled then,
the disabled indicators may be enabled later on again with AT+BIA.
When the connection is lost and recovered, all indicators are enabled
again. The HF will reconfigure the indicators again with an AT+BIA
command.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/631>
2022-08-01 19:16:25 +00:00
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
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
Nicolas Cavallari
fd81201f28 build-sys: Fix atomic support detection
Attempting to use atomics operations on an architecture that does not
support them generally results in a link error:

ld: /tmp/ccjYcMPP.o: in function `func':
testfile.c:(.text+0x1c): undefined reference to `__sync_bool_compare_and_swap_4'

The current build system uses cc.compiles() to check if atomic ops are
supported, but cc.compiles() does not attempt to link, so the test fails
to enable libatomics_opts.

Fix this by using cc.links() instead of cc.compiles().

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
Jaroslav Kysela
81a051089f alsa-mixer: extend pa_alsa_mixer_find with the subdevice check
The full identifier check must be executed for the new melem
creation, otherwise the duplicate control element code check
is reached.

Example (using the snd-aloop driver):

numid=56,iface=PCM,name='PCM Notify',device=1,subdevice=1
numid=62,iface=PCM,name='PCM Notify',device=1,subdevice=2

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/730>
2022-07-18 13:51:33 +00:00
Jaroslav Kysela
d1675df0cd alsa-mixer: fix the re-attach code for the mixer control element
The new helem must be tracked and old helem must be cleared
to make the code work properly. Introduce the pointer to helem
as the private value for melem and add the necessary code.

Also, add a check for the duplicate mixer elements. The duplicate
mixer element invokes the abort check in alsa-lib. Print a warning
instead and handle the exit gracefully.

Fixes: def8eb074 ("alsa-mixer: allow to re-attach the mixer control element")
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/730>
2022-07-18 13:51:33 +00:00
Jaroslav Kysela
eb870fcba9 alsa-ucm: remove extra space from the device.intended_roles property
Before:
  device.intended_roles = " voice"

After:
  device.intended_roles = "voice"

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/731>
2022-06-29 17:03:46 +02:00
Alper Nebi Yasak
5dd411190d alsa-ucm: Create multiple profiles per verb for conflicting devices
Right now we try to add all UCM devices of a verb to a single profile.
But if some devices using different PCMs are configured as conflicting
with one another, we will only be able to utilize one of them, chosen
seemingly based on the order in the UCM config file.

This is not a problem with conflicting devices sharing a PCM, as they
are assigned to the same mapping and the ports mechanism only enables
one of them to be active at a time.

To utilize all devices in a UCM verb even when there are conflicting
devices using different PCMs, calculate subsets of devices which
can be simultaneously used and create a profile for each such set.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/596>
2022-06-28 15:15:08 +03:00
Alper Nebi Yasak
e49da7bcd6 alsa-ucm: Disable old devices when switching profiles of same verb
While switching profiles, it was enough to switch UCM verbs since that
disables all enabled UCM devices and every profile had a distinct verb.
However, switching to the current verb does not disable any devices.

To support multiple profiles for a verb we need to explicitly disable
the old profile's devices, since they might be conflicting with the new
profile's devices and will prevent them from being enabled. Compare both
profiles' mappings, and disable the devices not in the new mappings.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/596>
2022-06-28 15:15:08 +03:00
Alper Nebi Yasak
4821a0569e alsa-ucm: Make mapping UCM contexts have only one modifier
After previous patches, we should be generating no combination ports, so
we don't need to store multiple modifiers per mapping. Simplify the code
based on this.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/596>
2022-06-28 15:15:08 +03:00
Alper Nebi Yasak
084d70a1e2 alsa-ucm: Make mapping UCM contexts have only one device
After previous patches, we should be generating no combination ports, so
we don't need to store multiple devices per mapping. Simplify the code
based on this.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/596>
2022-06-28 15:15:07 +03:00
Alper Nebi Yasak
bf1708213b alsa-ucm: Make ports store only one device
After previous patches, we should be generating no combination ports, so
we don't need to store multiple devices per port. Simplify the code
based on this.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/596>
2022-06-28 15:12:37 +03:00
Alper Nebi Yasak
0789a8fb76 alsa-ucm: Remove combination port generation logic
A previous commit makes mapping names depend on the UCM device name.
Since UCM device names are unique, this means a mapping will at most
have one port and thus no combination ports can be generated.

This removes the dead code in the pa_alsa_ucm_add_ports_combination()
function, unrolls the remaining code in its helper functions that it
used, and renames it to pa_alsa_ucm_add_port() to signal that it no
longer generates combinations.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/596>
2022-06-28 15:11:56 +03:00
Alper Nebi Yasak
a50330a4a5 alsa-ucm: Make one input/output mapping per UCM device
PulseAudio combines UCM devices that have the same PlaybackPCM or
CapturePCM value into a single mapping with multiple ports. It also
creates ports in the same mapping for each valid combination of those
UCM devices.

Since mappings are the things we put in profiles, we can put in a
profile either all devices of a joint mapping or none of them. This
causes some complications with device conflicts. For example, a
different UCM device might be marked as conflicting with some (but not
all) of the devices in a joint mapping. In this case we can do one of
three things:

- Include all devices in one profile, and hope the conflicting device
  isn't chosen as the mapping's active port. We shouldn't do this as it
  puts conflicting devices in the same profile.

- Make one profile with the joint group, and one with the other device.
  This is somewhat acceptable as we have no conflicts, but we sacrifice
  some compatible combinations of devices.

- Do not group the devices into the same mapping, and make one profile
  for each compatible combination of devices. This appears to be the
  best option, one where we can always have the maximum number of
  working devices.

This patch chooses the third option and makes one input and/or output
mapping per UCM device, by using UCM device names instead of PCM device
strings in the mapping names.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/596>
2022-06-28 15:11:56 +03:00
Alper Nebi Yasak
e8e2f4320c alsa-ucm: Split out helpers for device set name, description, priority
Combination port logic calculates some useful properties for device
groups that we could reuse while generating multiple profiles to support
conflicting devices. Split them into their own functions.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/596>
2022-06-28 15:11:56 +03:00
Alper Nebi Yasak
5245117781 alsa-ucm: Fix device conformance check
Right now this check is rejecting devices whose UCM config specifies
neither a conflicting device nor a supported device list, and accepting
devices which specify both. However, a device without neither list is
actually unrestricted, and a device with both lists is a configuration
error. Fix the check to accept the former.

Furthermore, this is missing another case where an already selected
device might have a supported devices list that doesn't have the
candidate device. Make this function also check against that, and also
make it accept devices already in the set.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/596>
2022-06-28 15:11:56 +03:00
Alper Nebi Yasak
0f26022843 alsa-ucm: Rewrite conformant device group generation with idxsets
The existing code meant to generate device groups for combination ports
is tightly coupled to port creation. Similar functionality would be
useful to generate nonconflicting device groups for multiple profiles as
well, so this tries to rewrite it into a more reusable state.

Several things (e.g devices, mapping contexts) use idxsets to store a
device selection. This also switches this conformance check and device
group generation to using idxsets to make it easier to work with those,
with the eventual aim to unify device group representations.

Also try to adjust users of these functions to use idxsets these will
need/return, without causing too much interference.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/596>
2022-06-28 15:11:56 +03:00
Alper Nebi Yasak
638574c0b7 alsa-ucm: Split profile creation into verb and profile parts
To support having multiple profiles per UCM verb, split the profile
creation into two parts based on whether they should run once for each
verb or for each profile (maybe multiple times per verb).

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/596>
2022-06-28 15:11:55 +03:00
Alper Nebi Yasak
aa5ced3887 alsa-ucm: Make mapping creation independent from indvidual profiles
The ucm_create_mapping() function is not idempotent. It looks like it
was meant to be called once per device for the devices of a UCM verb
and takes a profile argument simply because a verb has generated a
single profile so far.

Make sure creating mappings per device and adding those mappings to the
profiles happens as separate steps to make it easier to split UCM verbs
and profiles as concepts.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/596>
2022-06-28 15:11:20 +03:00
Alper Nebi Yasak
4527890416 alsa-ucm: Stop conflating profile name with UCM verb name
So far each profile had the exact name as their associated UCM verb,
which caused the one to be used where the other should have been.
Explicitly get and use the verb name where that was intended, and make
sure things about profiles aren't named after verbs.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/596>
2022-06-28 15:11:17 +03:00
Alper Nebi Yasak
9fc7064b9a alsa-ucm: Let profiles know their associated UCM verb
Currently each UCM verb generates one profile named the same as the
verb, meaning it's trivial to know which verb the profile belongs to.
This will be slightly harder to do when we generate multiple profiles
per UCM verb (e.g. to make use of conflicting devices).

It would still be possible to parse the profile name to get the UCM
verb, but instead let's keep track of the struct instance representing
the profile's associated verb. This also lets us remove a block of code
searching for the verb by its name.

Co-authored-by: Jaroslav Kysela <perex@perex.cz>
[Alper: Reused Jaroslav's UCM profile context changes for UCM verb
instead of combined devices.]

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/596>
2022-06-28 15:10:26 +03:00
Jaroslav Kysela
880ff393f1 alsa-ucm: Set profiles by their struct instance, not their name
While switching profiles, it's possible that we will want to do more
work besides switching UCM verbs. The alsa-card module already has our
profiles as structs, but passes in only the names instead of the entire
struct. Make things work with the struct instead, so we can add other
things (like a UCM context) to it and use those here.

Co-authored-by: Tanu Kaskinen <tanuk@iki.fi>
[Alper: Split into its own commit and integrated Tanu's snippet.]

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/596>
2022-06-28 15:08:45 +03:00
Alper Nebi Yasak
c83b345169 alsa-ucm: Add enable, disable, status helpers for devices
Right now manipulating device status is done inline once while setting a
port. However, we will need to reuse this code to disable conflicting
devices of a device we want to enable. Split it into enable and disable
helper functions.

There is another issue with the device enable logic, where trying to
disabling an already disabled device sometimes fails. To avoid that,
implement a status helper and check if the device we want to enable is
already enabled/disabled before trying to do so.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/596>
2022-06-28 15:08:45 +03:00
Alper Nebi Yasak
9b06e8fef4 alsa-ucm: Make modifiers track conflicting/supported devices as idxsets
Modifiers currently keep their conflicting and supported devices's
names, and these names are resolved to devices every time we need to use
them. Instead, resolve these device names while creating the modifier
struct and keep track of the resulting device structs in idxsets, same
as how device structs keep track of their support relations.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/596>
2022-06-28 15:08:45 +03:00
Alper Nebi Yasak
d8c89de24d alsa-ucm: Always create device conflicting/supported device idxsets
This is intended to make the current and upcoming code a bit clearer, as
we won't need to constantly check for the existence of these idxsets
before using or operating on them.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/596>
2022-06-28 15:08:45 +03:00
Alper Nebi Yasak
97d9c28579 idxset: Add reverse iteration functions
Add complementary functions to the existing idxset iterate(),
steal_first(), first(), next() functions that work in the reverse
direction: reverse_iterate(), steal_last(), last() and previous().

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/596>
2022-06-28 15:08:45 +03:00
Alper Nebi Yasak
ec668ac44b idxset: Add set comparison operations
Add isdisjoint(), issubset(), issuperset() and equals() functions that
element-wise compare two idxsets.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/596>
2022-06-28 15:08:45 +03:00
Alper Nebi Yasak
fb63e58931 idxset: Add set contains() function
This is functionally equivalent to get_by_data(s, p, NULL) == p, but
with a more obvious name and form because some existing code is instead
manually iterating through idxsets to check for existence of an item.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/596>
2022-06-28 15:08:45 +03:00
Jaroslav Kysela
def8eb074e alsa-mixer: allow to re-attach the mixer control element
It may be possible that the ALSA control element appears
again. Allow this combination by checking, if the pulseaudio
mixer element already exists. Do not create the duplicate
mixer element in this case.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/729>
2022-06-27 22:23:45 +03:00
Takashi Sakamoto
4bdf4c9966 alsa-mixer: avoid assertion at alsa-lib mixer API when element removal
PulseAudio v5.99 or later hits assertion at alsa-lib mixer API due to
wrong handling of removal event for mixer element.

pulseaudio: mixer.c:149: hctl_elem_event_handler: Assertion `bag_empty(bag)' failed.

The removal event is defined as '~0U', thus it's not distinguished from
the other type of event just by bitwise operator.

At the removal event, class implementator for mixer API should detach
mixer element from hcontrol element in callback handler since alsa-lib
has assertion to check the list of mixer elements for a hcontrol element
is empty or not after calling all of handlers. In detail, please refer to
MR to alsa-lib:

 * https://github.com/alsa-project/alsa-lib/pull/244

This commit fixes the above two issues. The issue can be regenerated by
`samples/ctl` Python 3 script of alsa-gobject.

 * https://github.com/alsa-project/alsa-gobject/

It adds some user-defined elements into sound card 0. When terminated by
SIGINT signal, it removes the elements. Then PulseAudio dies due to the
assertion.

Fixes: 1fd8848e64 ("alsa-util: Add functions for accessing mixer elements through mixer class")
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/728>
2022-06-27 22:08:13 +03:00
peijiankang
ffd7a60767 fix translation error of pulseaudio
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/726>
2022-06-23 09:27:15 +00:00
Tanu Kaskinen
2270081fca Update NEWS for 16.1
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/727>
2022-06-21 13:41:30 +03:00
Tanu Kaskinen
089287caf1 i18n: Update .pot and .po files
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/724>
2022-06-18 09:52:36 +03:00
Seong-ho Cho
82bbf2260c 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/724>
2022-06-18 09:49:13 +03:00
Jan Palus
dd4dc5e8bc bluetooth/gst: Correct var type for GST_TYPE_BITMASK
GST_TYPE_BITMASK is 64-bit bit mask while corresponding channel_mask in
pulseaudio is int therefore usually 32-bit. Switch to uint64_t instead
to match internal representation in gstreamer.

Fixes pulseaudio crash on ARM 32-bit when pulseaudio is compiled with
gstreamer and either LDAC or aptX support is available.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/723>
2022-06-17 19:12:57 +00:00
Georg Chini
ee8bfb49ad combine-sink: Fix threading issue during underrun
A recent commit added i->origin sink for the sink inputs of the combine sinks.
Therefore pa_sink_process_input_underruns() treated the combine sink like
filter sinks. pa_sink_process_input_underruns() calls itself with the
origin sink, which is only correct for filter sinks because they run in the
thread context of the origin sink. The combine sink however has its own
thread context, so pa_sink_process_input_underruns() was executed in the
wrong context.
This patch fixes the issue by skipping the section for module-combine-sink.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/722>
2022-06-17 12:57:24 +00:00
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
Igor V. Kovalenko
8bf8a98052 module-device-destore: Log restored port name
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/698>
2022-05-16 18:08:16 +00:00
Igor V. Kovalenko
bb5823a3c9 module-suspend-on-idle: Allow suspending a sink when the monitor source becomes idle
When monitor source becomes idle it may happen that monitored sink has no
uncorked inputs anymore and can now be suspended. To allow this, detect if state
is changed for monitor source and check state of monitored sink instead.

This change allows pulseaudio to suspend devices when pavucontrol volume meters
are disabled and corresponding peaks resampled streams are corked.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/697>
2022-05-16 18:05:03 +00:00
Igor V. Kovalenko
a4e690bda5 bluetooth: Make sure there is at least one SBC frame to encode
If SBC frame plus RTP header exceeds MTU size, let block size be at least one
frame to make sure bluetooth code can make progress reading and writing data.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/695>
2022-05-16 18:01:39 +00:00
Igor V. Kovalenko
a4402bb4f4 bluetooth: Limit effective SBC bitpool of incoming bluetooth connection
Turned out that SelectConfiguration is only used for outgoing connections, and
incoming connection from bluetooth headset using SBC codec ends up with a
bitpool as large as declared by headset. When resulting bitpool is so large that
SBC frame size plus RTP header size exceeds write MTU size, number of frames per
packet becomes zero causing crash dividing by zero in update_sink_buffer_size()

Fix this by limiting available bitpool value exposed for SBC endpoints.

Fixes: 89082cbfa ("bluetooth: a2dp dual channel SBC XQ codec configurations")
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/695>
2022-05-16 18:01:39 +00:00
Igor V. Kovalenko
1729e38a3e thread-test: Increase test timeout
This is not a performance test, but progress test of pa_cond_signal,
pa_cond_broadcast and pa_cond_wait in presence of multiple threads.

Increase test timeout to make it pass on slower hardware.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/696>
2022-05-09 09:34:46 +03:00
Josef Haider
852c15954e alsa-profiles: Add NI Komplete Audio 6 MK2 profiles
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/691>
2022-03-07 18:04:35 +01:00
Marijn Suijten
5af2afba85 bluetooth/gst: Timestamp encoding buffers according to PA clock
Commit c6d6ca541 ("bluetooth/gst: Replace buffer accumulation in adapter
with direct pull") removed the `timestamp` parameter from GStreamer
transcoders due to being unused, but these should instead be propagated
to the GStreamer encoding buffers.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/494>
2022-02-21 12:33:18 -05:00
Marijn Suijten
5f37914eb8 bluetooth/gst: Replace buffer accumulation in adapter with direct pull
Bluetooth codecs should always have fixed in/output and are hence able
to have their results directly read from the codec, instead of
accumulating in a buffer asynchronously that is subsequently only read
in the transcode callback.  The Bluetooth backends calling encode/decode
also expect these fixed buffer sizes.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/494>
2022-02-21 12:31:32 -05:00
Marijn Suijten
201dc6542b bluetooth/gst: Use GStreamer synchronously within PA's IO thread
Handling multiple threads does not come without overhead, especially
when the end-goal is to ping-pong them making the whole system run
serially.  This patch rips out all that thread handling and instead
"chains" buffers to be encoded/decoded directly into the pipeline,
making them execute their work on the current thread.  The resulting
buffer can be pulled out from appsink immediately without require extra
locking and signalling.  While the overhead on modern systems is found
to be negligible or unnoticable, code complexity of such locking and
signalling systems is prevalent making it the main drive behind this
refactor.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/494>
2022-02-21 12:31:32 -05:00
Arun Raghavan
62deab21a3 build-sys: Bump libpulse soversion for 16.0
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/690>
2022-02-21 17:20:51 +00:00
Sanchayan Maity
516c691f69 bluetooth: Rename rtp_sbc_payload to rtp_payload
Now that we use RTP payload structure for LDAC as well, rename
rtp_sbc_payload to rtp_payload. PipeWire also uses the same naming.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/689>
2022-02-21 12:15:47 +05:30
Sanchayan Maity
9f0a18b290 bluetooth: ldac: Fix RTP payloading of encoded packet
Drop rtpldacpay and payload the LDAC encoded output manually in the
RTP header.

The RTP payload seems to be required as it carries the frame count
information. Right now, rtpldacpay does not add this so construct
the RTP header and payload manually.

Strangely some devices like Shanling MP4 and Sony XM3 would still
work without this while some like the Sony XM4 does not.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/689>
2022-02-21 12:15:47 +05:30
guest271314
4b996e2a7b pacat: Include the special default device names in documentation
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/684>
2022-01-26 17:13:53 +00:00
Tanu Kaskinen
16f0a4d7f4 alsa-mixer: Add analog-input path to TI PCM2902 mappings
At least Behringer Xenyx 302USB doesn't have any Mic mixer elements (or
indeed any capture mixer elements), so having analog-input-mic as the
only input path caused the input mappings to not show up on this sound
card.

Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1325
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/685>
2022-01-26 16:57:52 +00:00
liaohanqin
b8c15e8787 pactl: optimized code
some if statements are redundant, use switch instead of it.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/686>
2022-01-25 16:09:32 +08:00
baek inchan
cfd8fb9398 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/682>
2022-01-11 07:16:32 +01:00
Daniel Hernandez
db18873a41 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/682>
2022-01-11 07:16:32 +01:00
Yuri Chornoivan
b460564bdd 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/682>
2022-01-10 02:16:34 +01:00
Oğuz Ersen
523b8ea8cb 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/682>
2022-01-10 02:16:34 +01:00
Anders Jonsson
7d2248a3ff 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/682>
2022-01-10 02:16:34 +01:00
Piotr Drąg
0344c01e91 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/682>
2022-01-08 17:04:55 +01:00
Sungjoon Moon
fcc553f26c 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/682>
2022-01-08 09:14:00 +01:00
Tanu Kaskinen
0b920f8095 meson: Enable GStreamer-based RTP by default (when available)
The feature was added in 14.0 and was declared experimental at that
point. It should be stable enough to enable by default now.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/680>
2022-01-05 17:36:14 +02:00
Jaroslav Kysela
bc3a07dd4f alsa: ucm - use possible mixer private device prefix for ELD controls
If UCM defines the private alsa-lib configuration, the ELD controls
are expected to use this device configuration too.

With this change:

  I: [pulseaudio] alsa-util.c: Successfully attached to mixer '_ucm0009.hw:Loopback'

Without:

  I: [pulseaudio] alsa-util.c: Successfully attached to mixer '_ucm0009.hw:Loopback'
  I: [pulseaudio] alsa-util.c: Successfully attached to mixer 'hw:4'

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/673>
2021-12-29 16:13:43 +00:00
Jaroslav Kysela
f5c8b82c3b alsa: mixer - more clever alias cache implementation
The hw: device can be addressed using the card index (hw:0)
or the card identifier (ASCII string - hw:Loopback). Both
mixers are equal.

The previous code was fine for the mixers without the UCM
private prefixes (_ucmXXXX). Make code more robust, create
two aliased mixer structures in the mixers array.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/673>
2021-12-29 16:13:43 +00:00
Diederik de Haas
1883355f1b conf: Note configuration snippets must end in .pa
At least on Debian (based) systems, the convention for configuration
files is .conf, but for PA they need to be .pa, so mention that.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/678>
2021-12-18 19:56:46 +01:00
BtbN
5b000acb1a channelmap: make channel map tables static
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/674>
2021-12-17 23:39:15 +00:00
Tanu Kaskinen
c95ba1f07f i18n: Update .pot and .po files
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/672>
2021-12-16 18:45:25 +02:00
Luna Jernberg
8e60659e5d 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/672>
2021-12-16 18:44:38 +02:00
Anders Jonsson
88943a8ee9 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/672>
2021-12-16 18:44:38 +02:00
Karl Ove Hufthammer
1f2ddcef5f 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/672>
2021-12-16 18:44:38 +02:00
Ettore Atalan
6733df0686 Translated using Weblate (German)
Currently translated at 94.7% (542 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/672>
2021-12-16 18:44:38 +02:00
Lv Genggeng
2590e6a4c7 Translated using Weblate (Chinese (Simplified) (zh_CN))
Currently translated at 94.7% (542 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/zh_CN/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/672>
2021-12-16 18:44:38 +02:00
Luna Jernberg
d62d44a563 Translated using Weblate (Swedish)
Currently translated at 99.8% (571 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/672>
2021-12-16 18:44:38 +02:00
Oğuz Ersen
e9e9d7c23a 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/672>
2021-12-16 18:44:38 +02:00
Jan Kuparinen
5178ae55b4 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/672>
2021-12-16 18:44:38 +02:00
Gogo Gogsi
de69787aa8 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/672>
2021-12-16 18:44:38 +02:00
Yuri Chornoivan
c626434153 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/672>
2021-12-16 18:44:38 +02:00
simmon
efc05ddb6b 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/672>
2021-12-16 18:44:38 +02:00
Ovari
f70949e78a Translated using Weblate (Hungarian)
Currently translated at 96.5% (552 of 572 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/hu/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/672>
2021-12-16 18:44:38 +02:00
Piotr Drąg
a927e4fb63 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/672>
2021-12-16 18:44:38 +02:00
Andika Triwidada
d0f61991da 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/672>
2021-12-16 18:44:38 +02:00
Laurent Bigonville
6e45a64478 util: Fix getting the binary name for GNU/Hurd
This fixes the get-binary-name-test test

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/671>
2021-12-16 16:26:11 +01:00
Laurent Bigonville
ea20555378 iochannel: Fix FTBFS on GNU/Hurd
This is a followup patch for 0efc38e95f

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/671>
2021-12-16 16:17:13 +01:00
Jaroslav Kysela
a9cc1373e2 alsa: ucm - update the mixer path also after volume probe
The mixer path is cached in the port structure. The function
probe_volumes (alsa-ucm.c) may wipe the mixer path when
the control probe fails, so it is required to update
the mixer path for the port again.

BugLink: https://github.com/alsa-project/alsa-ucm-conf/issues/100
BugLink: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1849
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/670>
2021-12-16 14:21:00 +02:00
Jaroslav Kysela
663e41f933 alsa: ucm - fix h/w mute mixer control probe
BugLink: https://github.com/alsa-project/alsa-ucm-conf/issues/100
BugLink: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1849
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/670>
2021-12-16 12:41:11 +01:00
Jaroslav Kysela
4d98c8bbf1 alsa: ucm - remove duplicate assignment
The data pointer is already set few lines before.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/670>
2021-12-16 12:41:11 +01:00
Mathy Vanvoorden
2101078c22 jackdbus-detect: Allow to configure multiple sinks/sources
This makes it possible to define multiple sinks/sources on detection
of the jack server. This allows one to for example create a separate
sink for conferencing software and route that in jack to another
channel on their audio interface.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/669>
2021-12-16 11:25:41 +00:00
Tanu Kaskinen
ece71de3fd alsa-mixer: Improve documentation in texas-instruments-pcm2902.conf
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/667>
2021-12-16 12:48:20 +02:00
simple
741a96f20b alsa-mixer: Rename behringer-umc22.conf to texas-instruments-pcm2902.conf
The USB ID that Behringer UMC22 uses actually belongs to Texas
Instruments PCM2902, which is a generic chip used in multiple products.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/667>
2021-12-16 12:36:26 +02:00
simple
7f02f3a0c0 alsa-mixer: Fix mono input for Texas Instruments PCM2902
Even though the file name is currently behringer-umc22.conf, the USB ID
actually belongs to Texas Instruments PCM2902, which is a generic chip
used in multiple products. Some products have true mono input unlike
Behringer UMC22, which has two mono inputs combined into one stereo PCM
device.

This patch removes the "mono,mono" mapping from Behringer UMC22, which
hopefully won't be missed too much (there are still "mono,aux1" and
"aux1,mono" mappings available for mono recording).

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/667>
2021-12-16 12:36:03 +02:00
Mathy Vanvoorden
cc8df06b9d jackdbus-detect: Make it possible to disable sink or source
In some cases you might not want to enable the autogenerated sink or
source because you only have a need for the other. An argument was
added that is checked before the module-jack-{source,sink} is loaded.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/668>
2021-12-09 13:53:09 +01:00
Hui Wang
484b69863f card-restore: setting preferred ports in entry_from_card
If the preferred ports are not set in this function, the
entrys_equal() always returns false in the card_put_hook_callback().
This will make the entry be written into the metadata and the
preferred ports will be cleaned by a mistake.

And we met a hdmi audio bug which has sth to do with this issue, on
the machines with the legacy HDA audio driver, the hdmi port has lower
priority than speaker, users need to manually select the hdmi to be
active output port, then the preferred output port is hdmi for this
sound card, after reboot, the card_put_hook_callback() in the
module-card-restore.c will be called and the preferred ports are
cleaned by a mistake, then the hdmi output port or hdmi sink couldn't
switch to be active after reboot or resume automatically. That is
because the preferred ports are cleaned and hdmi port has lower
priority than speaker, the profile_good_for_output() in the
module-switch-on-port-available.c always returns false.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
2021-11-18 12:04:16 +08:00
Arun Raghavan
197fda6b27 tests: Add passthrough test back to daemon tests
This got dropped during the move to meson.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/665>
2021-11-17 16:44:29 -05:00
Igor V. Kovalenko
56a9743fcb build-sys: meson: Make glib and fftw common dependencies
GSettings module (daemon) requires both gio and glib, move glib to common block.
qpaeq requires fftw, move fftw to common block.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/659>
2021-11-17 16:06:23 +00:00
Igor V. Kovalenko
5fcc70e2e8 build-sys: meson: Fix indentation in daemon/client blocks
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/659>
2021-11-17 16:06:23 +00:00
Igor V. Kovalenko
5f43173209 build-sys: meson: Rearrange shell completion between daemon and client
Rename bash completion file to pactl and install it with client build.
Completions specific to daemon are now just symlinks, create target directory
first to install them.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/659>
2021-11-17 16:06:23 +00:00
Igor V. Kovalenko
80c0a497d3 build-sys: meson: Rearrange dependencies under client and daemon options
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/659>
2021-11-17 16:06:23 +00:00
Igor V. Kovalenko
6dd14ad9f1 build-sys: meson: Move remaining tests under daemon and client builds
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/659>
2021-11-17 16:06:23 +00:00
Igor V. Kovalenko
6928714b64 build-sys: meson: change daemon-only to client
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/659>
2021-11-17 16:06:23 +00:00
Mart Raudsepp
4cf4a1fd5b build-sys: meson: Allow building the daemon only
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/659>
2021-11-17 16:06:23 +00:00
Mart Raudsepp
a67f894775 build-sys: meson: Relax sanity checks for daemonless builds
Echo canceller, udev and speex resampling is only used by the daemon, so
don't error or warn about those in -Ddaemon=false builds.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/659>
2021-11-17 16:06:23 +00:00
Igor V. Kovalenko
1a3ffd4cee bluetooth: Fix device->adapter dependency while releasing discovery
Change d7f95170a1 added a dependency on device
adapter pointer being valid while checking if bluetooth profile is supported by
device.

When adapter object is released, each device holding pointer to adapter being
released is notified to reset that to NULL. Since adapter objects are released
first when discovery object is unreferenced, each device will have adapter
pointer reset before the time device objects are released.

Fix observed crash by examining device adapter pointer. If it is NULL report
that device does not support any bluetooth profile instead of looking at UUIDs
supported by adapter.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/646>
2021-11-17 15:30:03 +00:00
Marijn Suijten
0c5672390b bluetooth/backend-native: Replace tab-indents with spaces
Fixes: 7fd89e491 ("bluetooth: Try to reconnect SCO")
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/649>
2021-11-17 15:25:00 +00:00
Georg Chini
fdf37d9a91 loopback: Add log_interval parameter
Add a log_interval parameter to control the amount of logging. Default is
no logging. Like for adjust_time, the parameter is a double to allow values
below 1s.
If the log interval is too small, logging will occur on every iteration.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/56>
2021-11-07 18:17:37 +00:00
Georg Chini
0f91b2146d loopback: Change adjust_time parameter to double to allow adjust times below 1s
The adjust_time parameter is changed to double to allow better granularity
and adjust times below 1s. This may be useful for a better latency control,
although with alsa devices and the current smoother code no significant
improvement could be found for values below 500ms.
This patch also changes the default adjust time to 1s, the old value of 10s
does not allow a tight control of the end to end latency and would lead to
unnecessary jitter.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/56>
2021-11-07 18:17:37 +00:00
Georg Chini
dd18b06321 loopback: Only use controller weight after target latency has been crossed twice
The previous patch slows down initial convergence. Therefore do not use
the controller weight until we can assume that we reached an equilibrium.
Because it takes some time before the reported latency values are reliable,
assume that a steady state is reached when the target latency has been
crossed twice.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/56>
2021-11-07 18:17:37 +00:00
Georg Chini
edbf8fb509 loopback: Add adjust_threshold_usec parameter
In many situations, the P-controller is too sensitive and therefore exhibits rate hunting.
To avoid rate hunting, the sensibility of the controller is set by the new parameter
adjust_threshold_usec. The parameter value is the deviation from the target latency in usec
which is needed to produce a 1 Hz deviation from the optimum sample rate.
The default is set to 250 usec, which should be sufficient in most cases. If the accuracy
of the latency reports is bad and rate hunting is observed, the parameter must be increased,
while it can be lowered to achieve less latency jitter if the latency reports are accurate.
More details at
https://www.freedesktop.org/software/pulseaudio/misc/rate_estimator.odt

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/56>
2021-11-07 18:17:37 +00:00
Georg Chini
66e6a5ca88 loopback: Track prediction error; debug and cosmetic changes
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/56>
2021-11-07 18:17:37 +00:00
Georg Chini
68f7aee7c0 loopback: Add latency prediction and Kalman filter
A Kalman filter is added to further reduce noise. The Kalman filter needs a
latency prediction as input, so estimate the next expected latency as well.
Again, theory is at
https://www.freedesktop.org/software/pulseaudio/misc/rate_estimator.odt

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/56>
2021-11-07 18:17:37 +00:00
Georg Chini
6a906e54cc loopback: Optimize adaptive re-sampling
The current code assumes that the time domains of source and sink are
equal. This leads to a saw-tooth characteristics of the resulting end
to end latency.
This patch adds an iterative calculation of an optimum rate which accounts
for the difference between the source and sink time domains, thereby massively
enhancing the latency stability. Theoretical background for the calculation
can be found at
https://www.freedesktop.org/software/pulseaudio/misc/rate_estimator.odt

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/56>
2021-11-07 18:17:37 +00:00
Georg Chini
285427ce30 loopback: Limit controller step size to 2.01‰
The current loopback controller can produce a rate jump of up to 1% at startup,
which may be audible. To prevent large initial jumps, a second controller is
introduced, which produces a rate, that is not more than 2‰ away from the last
rate. Only during the startup phase, the rates produced by this controller will
be nearer to the base rate than those produced by the original controller.
Therefore choosing the rate which is nearer to the base rate will ensure that
the secondary controller only moderates the startup phase and has no influence
during continued operation.
The maximum step size of the original controller after the initial jump is
limited to 2.01‰ of the base rate, see documentation at
https://www.freedesktop.org/software/pulseaudio/misc/rate_estimator.odt

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/56>
2021-11-07 18:17:37 +00:00
Georg Chini
e7abd862b1 loopback: Do not detect underruns during initial latency adjustments
Currently module-loopback detects underruns even if sink_input_pop_cb()
was not yet called twice and initial latency adjustments are active.
This leads to unnecessary rewind requests.

This patch delays detecting underruns until the initial adjustments
are done.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/56>
2021-11-07 18:17:37 +00:00
Igor V. Kovalenko
fa3b66d249 lirc: Fix module version
Including lirc_client.h header overrides PACKAGE_VERSION with the one from lirc
packege. Fix this by moving lirc_client.h include after module definition block.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/660>
2021-11-06 13:45:30 +03:00
Marijn Suijten
add6e71e4c pulsecore/shm: Remove shm_marker struct packing for pa_atomic_t fields
Taking addresses of fields in a packed struct are not guaranteed to be
aligned, resulting in warnings such as:

    ../src/pulsecore/shm.c: In function 'sharedmem_create':
    ../src/pulsecore/shm.c:198:25: error: taking address of packed member of 'struct shm_marker' may result in an unaligned pointer value [-Werror=address-of-packed-member]
      198 |         pa_atomic_store(&marker->pid, (int) getpid());
          |                         ^~~~~~~~~~~~

The struct already has its fields and types laid out in such a way that
the desired packing (without padding) is guaranteed - enforce this with
a `static_assert` to get rid of the unaligned pointer warning.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/653>
2021-11-05 07:50:56 +00:00
Marijn Suijten
6e1ba7179c tests/mix-test: Don't pass unnecessary NULL fmt argument to fail_unless
GCC warns on all these `fail_unless` calls:

    warning: too many arguments for format [-Wformat-extra-args]

`fail_unless` only takes an expression and optionally a string literal
as message with formatting args.  Passing NULL for this message should
not be necessary as indicated by all the other tests not passing it
either.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/653>
2021-11-05 07:50:56 +00:00
Marijn Suijten
76652c8cdd gitlab-ci: Turn on Werror for meson builds
Prevent simple warnings like !651 from slipping into the build.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/653>
2021-11-05 07:50:56 +00:00
Marijn Suijten
874788433c gitlab-ci: Bump Ubuntu image to 20.04
e04f14eb/dc9dc70f introduced preprocessor warnings to deny the use of
any `alsa-lib` older than `1.2.1`, and with a future patch disallowing
warnings entirely through `-Werror` we now need a distribution that
serves a new enough `alsa-lib`.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/653>
2021-11-05 07:50:56 +00:00
Georg Chini
0497821afc solaris: Allow module-solaris to use alternative smoother code
This is untested.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/55>
2021-11-03 21:13:38 +00:00
Georg Chini
a92f566e36 raop-sink: Allow module-raop-sink to use alternative smoother code
This is untested.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/55>
2021-11-03 21:13:38 +00:00
Georg Chini
74585e1632 esound-sink: Allow module-esound-sink to use alternative smoother code
This is untested.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/55>
2021-11-03 21:13:38 +00:00
Georg Chini
a7c970e208 tunnel: Allow module-tunnel to use alternative smoother code
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/55>
2021-11-03 21:13:38 +00:00
Georg Chini
79aaec7bb3 combine-sink: Allow module-combine-sink to use alternative smoother code
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/55>
2021-11-03 21:13:38 +00:00
Georg Chini
1b5f3fc577 stream: Allow stream.c to use alternative smoother code
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/55>
2021-11-03 21:13:38 +00:00
Georg Chini
84ec08e6f1 bluetooth: Allow bluetooth to use alternative smoother code
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/55>
2021-11-03 21:13:38 +00:00
Georg Chini
8db67737d4 alsa sink/source: Allow alsa to use alternative smoother code
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/55>
2021-11-03 21:13:38 +00:00
Georg Chini
6f16203144 Add configuration option enable-smoother-2 to enable alternative smoother code
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/55>
2021-11-03 21:13:38 +00:00
Georg Chini
156b572954 pulsecore: Add alternative time smoother implementation
This patch adds an alternative time smoother implementation based on the theory
found at https://www.freedesktop.org/software/pulseaudio/misc/rate_estimator.odt.

The functions were written to replace the current smoother functions nearly on
a one-to-one basis, though there are a few differences:
- The smoother_2_put() function takes a byte count instead of a sound card
  time as argument. This was changed because in most places a sample count
  was converted to a time before passing it to the smoother.
- The smoother needs to know sample rate and frame size to convert byte
  counts to time.
- A smoother_2_get_delay() function was added to directly retrieve the stream
  delay from the smoother.
- A hack for USB devices was added which works around an issue in the alsa
  latency reports for USB devices.

The smoother delivers much better precision than the current implementation.
For results, see the document referenced above.

The new functions are still unused. The following patches will convert all
callers of the smoother functions so that they can use both smoother
implementations, depending on a configure option.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/55>
2021-11-03 21:13:38 +00:00
Georg Chini
851c377d6b tests: Add resampler rewind test
This patch adds a test program that generates a square wave of a given frequency,
length and sample rate. This is then resampled to another rate, rewound and the
rewound part is run through the resampler again. After that, the results of the
first and second resampler pass are compared.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/120>
2021-11-03 18:37:31 +00:00
Georg Chini
a37fd7eada sink-input: Query sink inputs for max_rewind value when setting max_rewind
This patch is in preparation of allowing virtual sinks to specify their own
max_rewind limit.

Currently pa_sink_set_max_rewind_within_thread() simply sets the value of
max_rewind and informs the sink inputs about the new value. Virtual sinks
may however provide their own limit on max_rewind.

This patch allows to query the active sink inputs for the max_rewind value
they support and sets max_rewind to the minimum supported value. This way,
the max_rewind value from the virtual sinks can be communicated to the master
sink.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/120>
2021-11-03 18:37:31 +00:00
Georg Chini
5c6d91a97c sink-input: Limit rewinding to max_rewind for virtual sinks
This patch is in preparation of allowing virtual sinks to specify their own
max_rewind limit.
Currently, virtual sinks cannot specify their max_rewind limit, but just copy
the value from the master sink. This may not be correct, if the DSP code of the
virtual sink has limited (or no) rewinding capability.
Because the DSP code of the virtual sink is rewound in the process_rewind()
callback of the sink input, it must be ensured, that rewinding a sink input
to the master of a virtual sink is limited similar to rewinding a sink.
There are two remaining exceptions:

1) If an underrun is detected. In that case, the filter should be reset anyway.
2) When the sink input of the filter is moved and attached to the destination
sink.

The move case is handled without involvement of the implementer, so the implementer
can only receive a rewind larger than max_rewind when the filter should be reset
anyway.

All existing virtual sinks do not distinguish between reset and rewind of the
filter.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/120>
2021-11-03 18:37:31 +00:00
Georg Chini
f121779f88 loopback: Add resampler delay to latency snapshots
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/120>
2021-11-03 18:37:31 +00:00
Georg Chini
129a59a2f0 virtual sources: Include resampler delay in latency reports
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/120>
2021-11-03 18:37:31 +00:00
Georg Chini
d55fde2fed source-output: Fix rewinding
If the output implements a process_rewind() callback, the resampler delay is
not taken into account. This leads to glitches during volume changes when
source and source output rates differ.

This patch fixes the problem.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/120>
2021-11-03 18:37:31 +00:00
Georg Chini
a275a0b811 sink-input: Change move logic
The introduction of the history queue makes it possible to implement moving
of streams without involving the implementer. Instead of dropping all data
from the render memblockq and requesting the implementer to rewrite the
data, the render memblockq is now reconstructed from the history queue.

Additionally, the render queue will be filled with silence matching the
amount of audio that is left playing on the old sink to avoid playing
the same audio twice.

This patch slightly breaks moving for virtual sinks because they do not
yet include the resampler delay in their latency reports. This will be
fixed in a different patch set.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/120>
2021-11-03 18:37:31 +00:00
Georg Chini
da539ed336 sink-input: Implement resampler pseudo rewinding
This patch uses the two previous patches to implemnt pseudo-rewinding for the
resamplers by feeding some old data into the resampler after a reset. This is
necessary because PA is using external resamplers that do not implement
rewinding.

To get exactly the same output data from the resampler after a rewind if possible,
the matching period is calculated. This is the number of input samples that produces
an integral number of output samples. After the matching period, the resampler state
repeats. If the matching period is not too large, feeding history into the resampler
will start at a point that is a multiple of the matching period back in time. Then
the resampler will produce exactly the same samples.

The PA_RESAMPLER_MAX_HISTORY value has been replaced by PA_RESAMPLER_MAX_DELAY_USEC
and the required number of history samples is calculated from the sink input sample
rate. The number of history samples can be as large as about 12500.

This fixes glitches during volume changes when the sink runs on a rate different
from the sink input rate.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/120>
2021-11-03 18:37:31 +00:00
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
tensorknower69
747efc1017 fix a single typo in pulse-client.conf.5.xml.in
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/634>
2021-09-20 02:33:43 +00:00
Igor V. Kovalenko
c94a3a9fb5 combine-sink: Add remix modarg
When module-combine-sink is used to create virtual surround card it is expected
that each slave channel receives data for exactly one combined sink channel.
Currently this is not the case because module-combine-sink would follow
core->disable_remixing setting. Usually this means that multiple channels of
combined sink are getting remixed into slave channel, and there is no option to
disable this behavior just for combined sink.

Improve this by implementing "remix" modarg for module-combine-sink,
default to original behavior (follow core->disable_remixing setting).

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/627>
2021-09-08 15:16:20 +00:00
Igor V. Kovalenko
af2e50c515 alsa-mixer: add support for SteelSeries Arctis Pro + GameDAC
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/626>
2021-09-08 14:23:34 +00:00
Igor V. Kovalenko
10384d807f mainloop-test: Disarm io callback on EOF
Mainloop test uses io callback for PA_IO_EVENT_INPUT on stdin.

With glib enabled PA_IO_EVENT_INPUT translates to glib G_IO_IN event which also
matches descriptor in EOF state. While io callback does not check for EOF after
reading from file descriptor this is causing mainloop-test to repeatedly read 0
bytes once EOF is reached, rearm defer callback and spam test log.

Fix this by disarming io callback when EOF is reached in test run.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/625>
2021-08-30 11:31:32 +03:00
Sibo Dong
53e3b53408 shell-completion: bash: Localize word variable
The word variables used in the _pactl and _pacmd functions are
unlocalized. Thus, the variable appears in the user's environment when
tab-completing with pactl or pacmd. This may clobber another variable
of the same name, which is undesirable.

Localize the word variable to fix this issue.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/623>
2021-08-25 15:54:35 +00:00
Tanu Kaskinen
2c7c0f0912 build-sys: Remove version number from the module path
When packaging a new version for OpenEmbedded, I use the
buildhistory-diff tool to check what changed between the versions. The
version number in the module directory means that I get tons of diff
output due to changes in file paths. There are many removed and added
files and it's hard to see if something else than just the version
number changed.

That motivated me to write this patch. Removing the version number has
the downside that it makes it easier to have version mismatches between
the daemon and the modules, but
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/merge_requests/249
will make the handling of such situations better.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/230>
2021-08-25 18:43:35 +03:00
Georg Chini
735eb05e64 tunnel: Make fixed latency configurable
Currently, module-tunnel uses the default fixed latency of 250ms as fixed
latency.

There is no reason for such a large latency. This patch adds a parameter
latency_msec to the module to set the fixed latency at load time of the
module. The parameter can range from 5 to 500 milliseconds. With this
patch, I was able to run a tunnel sink at 7ms latency without problems.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/53>
2021-08-25 15:32:22 +00:00
Georg Chini
4c180214c8 tunnel: Fix latency calculations
Currently module-tunnel uses only a rough estimate of the current stream
latency and reports wrong latencies in certain situations. This leads to
very inexact and unstable latency reports for the virtual sink.

This patch fixes the issue by introducing latency snapshots like they
are used in module-loopback. Because the latency reports are now correct,
the update interval for latency re-calculations can be reduced to 1s.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/53>
2021-08-25 15:32:22 +00:00
Georg Chini
45a5e6f0f1 combine-sink: Use configured resampler, reduce update time to 1s
Currently the combine-sink uses the trivial resampler by default.

This patch changes the default to the configured resampler.
Also the default update time is changed from 10s to 1s to achieve
faster convergence and higher precision.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/53>
2021-08-25 15:32:22 +00:00
Georg Chini
9d1a43ae8d combine-sink: Improve initial latency reports
Currently, it takes one adjust time before the smoother is updated after an
unsuspend. Before the first update, the smoother will not be aware of the
slave sink latencies, leading to incorrect latency reports.

This patch moves the first smoother update to one latency time after the
sink was unsuspended, thereby improving initial latency reports. This
only partially resolves the problem because the smoother takes multiple
updates to adapt to the slave sink latencies.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/53>
2021-08-25 15:32:22 +00:00
Georg Chini
54baa223bb combine-sink: Add rate controller
This patch adds a rate controller similar to the one used in module-loopback
to limit step size and maximum deviation from the base rate. Rate changes
are handled more smoothly by the controller. The patch has not much impact
on the behavior of the module, except that there is less rate hunting.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/53>
2021-08-25 15:32:22 +00:00
Georg Chini
ab78f8ed39 combine-sink: Fix latency calculations
Currently module-combine-sink uses only a rough estimate of the current
slave sink latencies to calculate the rate for the various sink inputs.
This leads to very inexact and unstable latency reports for the virtual
sink.

This patch fixes the issue by introducing latency snapshots like they
are used in module-loopback. It also changes the definition of the
target latency to ensure that there is always one sink which uses the
base rate.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/53>
2021-08-25 15:32:21 +00:00
Juho Hämäläinen
b1057f1a37 bluetooth: Only remove cards belonging to the device.
Commit f89d64b98e fixed a crash
when disabling adapters. However, now if any device is removed
ofono card is removed, even if it belongs to different device.

Add a check for the device being unlinked to our callback to fix.

Signed-off-by: Juho Hämäläinen <juho.hamalainen@jolla.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/624>
2021-08-25 15:20:57 +00:00
Chengyi Zhao
3e2dacdb38 alsa-mixer: Recognize rear mic jack mixer of USB audio
Add "- Input" suffix to a new "[Jack]" section of rear mic
in the path file, and the rear mic jack is probed and its
state is compared with the expected "Rear Mic - Input".

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/620>
2021-08-25 15:06:47 +00:00
Igor V. Kovalenko
d517a204de bluetooth: Allow SCO socket packet size to be larger than mSBC frame
With USB Alternate Setting 3 size of HCI payload is 72 bytes which is already
larger than mSBC frame size. Largest known size of HCI payload is with USB
Alternate Setting 5 (144 bytes), make it the default SCO socket MTU.

Reserve additional space in bluetooth encoder buffer to cover this case.

Since mSBC encoder and decoder will now work with larger packet sizes, drop
assertions about MTU larger than mSBC frame size.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/617>
2021-08-25 15:00:28 +00:00
Igor V. Kovalenko
ade71b8ce7 alsa-mixer: Add EPOS/Sennheiser GSP 670 and GSA 70
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/616>
2021-08-25 14:45:55 +00:00
Arun Raghavan
404795ad05 combine-sink: Set origin_sink for each output stream
While the threading model for combine is different from other filters
(which expect to just piggy-back on the I/O thread of the most
downstream sink), it might still be valuable to set this field to
indicate that this sink input is intended to behave as a filter stream
rather than a conventional stream.

At the very least, routing behaviour and cycle detection should act on
these streams as with any other filter.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/399>
2021-08-23 17:14:13 +00:00
acheronfail
19adddee31 pactl: add format flag for JSON output
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/497>
2021-08-11 15:31:05 +00:00
Igor V. Kovalenko
1b96b49f65 build-sys: meson: Check if cpuid.h header is usable
With clang compiler including cpuid.h will produce error if architecture is not
x86-based, and cheching if cpuid.h exists via Meson has_header() is not enough.

Fix this by creating a list of headers checked to be usable via Meson
check_header() function, and move cpuid.h to that list.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/614>
2021-08-11 15:16:55 +00:00
Igor V. Kovalenko
42af3ee083 build-sys: meson: Require xice, xsm and xtst for daemon only
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/613>
2021-08-11 15:09:43 +00:00
Takashi Sakamoto
3fcd5e398d Revert "udev: use ID_MODEL/ID_VENDOR to give friendly name for FireWire devices"
This reverts commit 3ac73598c6.

Systemd v249 has new entries of hwdb for node and unit in IEEE 1394 bus
(hwdb.d/80-ieee1394-unit-function.hwdb). It can obsolete my workaround
added by commit 3ac73598c6 ("udev: use ID_MODEL/ID_VENDOR to give
friendly name for FireWire devices"). The hwdb entry is handy prepared.
When user finds missing entry, it's preferable to file issue or merge
request in systemd project site.

IEEE 1394 bus is enough legacy and it's easy to expect that few developer
can evaluate the change. For reviewers, I describe the original issues and
the integration of hwdb in systemd side.

In systemd, udev rule for sound card (rules.d/78-sound-card.rules) has
below line to assign information in hwdb to instance for sound card.

```
IMPORT{builtin}="hwdb"
```

In the case, the udev hwdb builtin finds information according to
modalias by following nodes in device topology tree toward root. For
sound card associated to unit in node in IEEE 1394 bus, it's inconvenient
since hwdb had no entry for the unit. The instance for node in IEEE 1394
bus doesn't have modalias. As a result, the builtin reaches 1394 OHCI
controller in PCI Express bus which maintains the IEEE 1394 bus, then the
value for ID_VENDOR_FROM_DATABASE and ID_MODEL_FROM_DATABASE properties
from hwdb of pci device (hwdb.d/20-pci-vendor-model.hwdb) for the sound
card.

For example, when two nodes are in IEEE 1394 bus and one of them has
unit instance for audio and music functions, the topology of the bus is
depicted in following diagram:

```
 * 1394 OHCI controller (pci*, modalias)
   * node A - (pci*/fw0, /dev/fw0)
   * node B - (pci*/fw1, /dev/fw1)
     * unit B-1 - (pci*/fw1/fw1.0, modalias)
       * sound card 0 - (pci*/fw1/fw1.0/sound/card0, card0)
```

In the case,  the udev hwdb builtin picks up from hwdb of pci device for
the sound card:

```
$ udevadm test-builtin hwdb /sys/class/sound/card2
Load module index
Parsed configuration file /usr/lib/systemd/network/99-default.link
Parsed configuration file /usr/lib/systemd/network/73-usb-net-by-mac.link
Created link configuration context.
ID_PCI_CLASS_FROM_DATABASE=Serial bus controller
ID_PCI_SUBCLASS_FROM_DATABASE=FireWire (IEEE 1394)
ID_PCI_INTERFACE_FROM_DATABASE=OHCI
ID_VENDOR_FROM_DATABASE=Texas Instruments
ID_MODEL_FROM_DATABASE=XIO2213A/B/XIO2221 IEEE-1394b OHCI Controller [Cheetah Express]
Unload module index
Unloaded link configuration context.
```

The aim of my workaround is to avoid using ID_VENDOR_FROM_DATABASE and
ID_MODEL_FROM_DATABASE for sound card associated to unit in IEEE 1394
bus. Instead, ID_VENDOR and ID_MODEL properties are used.

However, it has another issue. For the properties, the udev rule for
sound card has the other lines for sound card associated to unit in
IEEE 1394 bus, below:

```
SUBSYSTEMS=="firewire", ATTRS{guid}=="?*", \
  ENV{ID_BUS}="firewire", ENV{ID_SERIAL}="$attr{guid}", ENV{ID_SERIAL_SHORT}="$attr{guid}", \
  ENV{ID_VENDOR_ID}="$attr{vendor}", ENV{ID_MODEL_ID}="$attr{model}", \
  ENV{ID_VENDOR}="$attr{vendor_name}", ENV{ID_MODEL}="$attr{model_name}"
SUBSYSTEMS=="firewire", GOTO="skip_pci"
```

The values of ID_VENDOR and ID_MODEL properties come from vendor_name and
model_name attributes in parent instance of the sound card, therefore
they come from audio and music units in IEEE 1394 bus. Unfortunately
these attributes are not available always.

All of nodes in IEEE 1394 bus should have configuration ROM in place
according to IEEE 1212 and Linux FireWire subsystem parses the content of
ROM to detect units in the node. At the same time, the subsystem manages
to detect information about vendor and model according to standard layout
defined by 1394 Trading Association[1].

When the content of ROM is against the standard, the subsystem is
discouraged the name detection.  In the case, vendor_name and model_name
attributes are not available, and supplemental information should be from
software implementation.

The new hwdb (hwdb.d/80-ieee1394-unit-function.hwdb) added to systemd v249
can solve the above issues. The prepared names for vendor and model in
hwdb are assigned to both node and unit. The udev hwdb builtin can find
the vendor and model names for the unit according to modalias before
arriving at pci-device. Regardless of standard or non-standard
configuration ROM, the hwdb gives prepared names of vendor and model.

This is an example of Mark of the Unicorn (MOTU) Traveler. The search
finishes at instance for unit in IEEE 1394 bus expectedly:

```
$ udevadm test-builtin hwdb /sys/class/sound/card2
Load module index
Parsed configuration file /usr/lib/systemd/network/99-default.link
Parsed configuration file /usr/lib/systemd/network/73-usb-net-by-mac.link
Created link configuration context.
ID_MODEL_FROM_DATABASE=Traveler
ID_VENDOR_FROM_DATABASE=MOTU
IEEE1394_UNIT_FUNCTION_AUDIO=1
IEEE1394_UNIT_FUNCTION_MIDI=1
Unload module index
Unloaded link configuration context.
```

[1] Configuration ROM for AV/C Devices 1.0 (Dec. 12, 2000, 1394 Trading
    Association, TA Document 1999027)

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/610>
2021-08-11 15:04:07 +00:00
Igor V. Kovalenko
1a575bb0a7 rtp: Initialize adapter to NULL for early pipeline error
If gstreamer pipeline immediately returns error, adapter pointer would not be
initialized and pa_rtp_recv may crash calling gst_object_unref() on it.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/615>
2021-08-06 22:45:26 +03:00
Igor V. Kovalenko
49b07edcaf alsa-mixer: Set mdev to NULL if there is no mapping
We check if mapping is NULL but if so we never set mdev, set it to NULL as well.

Fixes: 79cb1369fc
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/615>
2021-08-06 22:45:16 +03:00
Will Thompson
da60f8af1d CONTRIBUTING.md: fix another typo
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/611>
2021-07-30 13:13:46 +00:00
Will Thompson
e2891c5ad6 CONTRIBUTING.md: fix typo
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/611>
2021-07-30 13:13:46 +00:00
Sanchayan Maity
86d1dd0d70 rtp: Enable support for OPUS
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/510>
2021-07-30 13:10:08 +00:00
João Paulo Rechi Vita
0b9ef4cd0a bluetooth: backend-native: Handle RegisterProfile failure
Try to register profile support again after RegisterProfile fails, when
BlueZ indicates no one else is implementing the profiles we are
interested in.

Ideally this would rely on a list of UUIDs supported by the profile
manager instead of the adapter, but BlueZ has no such API.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/593>
2021-07-30 12:52:04 +00:00
João Paulo Rechi Vita
cd0a8a5a0c bluetooth: Create PA_BLUETOOTH_HOOK_ADAPTER_UUIDS_CHANGED
This hook will be fired any time the UUIDs property on the adapter
object changes.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/593>
2021-07-30 12:52:04 +00:00
João Paulo Rechi Vita
a84914f7b3 bluetooth: backend-native: Keep track of profiles' status
Track the profile status changes for the profiles implemented by this
backend.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/593>
2021-07-30 12:52:04 +00:00
João Paulo Rechi Vita
2f7c4969db bluetooth: Add mechanism to track profile's status
Create pa_bluetooth_profile_status_t to represent all stages an external
Bluetooth profile can go through:

 0. Inactive: Initial state, no D-Bus object has been registered for
    this profile yet.
 1. Active: an object implementing the org.bluez.Profile1 interface has
    been registered on the system bus.
 2. Registering: RegisterProfile has been called.
 3. Registered: RegisterProfile succeeded.

This will be useful to handle RegisterProfile failures, as well as
dynamically register and un-register a profile based on the current
active seat.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/593>
2021-07-30 12:52:04 +00:00
João Paulo Rechi Vita
28fd9bc319 bluetooth: backend-native: Pass profile id in register_profile*
Passing the profile id to register_profile and register profile reply
makes a clearer debug and will allow easier tracking of the profile
status changes.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/593>
2021-07-30 12:52:04 +00:00
João Paulo Rechi Vita
a631d4c07c bluetooth: backend-native: Rename profile to object in register_profile*
This string contains a object path name, not a profile name, so lets
make this accurate.

This commit brings no functional change apart from a small change in the
text of one log message.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/593>
2021-07-30 12:52:04 +00:00
João Paulo Rechi Vita
4b55b8a9d0 bluetooth: Keep a list of local adapters' UUIDs
This commit stores the UUID list when an adapter is discovered and
updates it whenever a PropertiesChanged signal notifies it has changed.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/593>
2021-07-30 12:52:04 +00:00
Marijn Suijten
a246bb77c7 bluetooth/native: Accept and report battery HF indicator value
HF indicator 2 (see [assigned-numbers], Hands-Free Profile) is able to
report battery percentage at 1% intervals (in range [0, 100]), contrary
to the `+XAPL` `+IPHONEACCEV` extension which only supports 10%
increments.  This does not guarantee increased granularity however, as
peers may still be limited to imprecise battery measurements internally
or round to coarser percentages.
Supporting both additionally broadens the range of devices for which PA
can report its battery level.

[assigned-numbers]: https://www.bluetooth.com/specifications/assigned-numbers/

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/482>
2021-07-28 09:11:43 +02:00
Marijn Suijten
713e3f0680 bluetooth: Deregister battery provider when profile disconnects
Whenever a device disconnects the device is not removed from BlueZ, only
the profiles that had an active connection are disconnected. Since we
were providing this battery level based on AT commands received through
HSP/HFP these services should be responsible for deregistering it again.

Deregister the interface to signal BlueZ (And UPower in return) that the
battery level won't be accurate/updated anymore.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/482>
2021-07-28 09:11:43 +02:00
Marijn Suijten
f7955eeb48 bluetooth: Register as BlueZ experimental BatteryProvider1
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/482>
2021-07-28 09:11:43 +02:00
Marijn Suijten
c667befe9a bluetooth: Provide (HSP/HFP-received) battery level as device property
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/482>
2021-07-28 09:11:43 +02:00
Marijn Suijten
d2c97190ef bt/native: Parse specified number of arguments in IPHONEACCEV
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/482>
2021-07-28 09:11:43 +02:00
Marijn Suijten
e6157c8b1f bt/native: Answer AT command with ERROR if unhandled
The peer will wait some time and eventually time out the connection if
no reply is sent back. When sending `ERROR` the peer can decide to break
the RFCOMM connection immediately or continue when a command is not
critical.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/482>
2021-07-28 09:11:43 +02:00
Marijn Suijten
4cbac23894 bluetooth/native: Signal support for dock status in XAPL reply
The previous commit parses both battery level and dock status (if only
for printing to logs). Make sure bit `2` is set in the `+XAPL=` reply to
signify support for reading this, too.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/482>
2021-07-28 09:11:43 +02:00
Sebastian Reichel
7a84a24652 bluetooth: backend-native: add battery level reporting
Devices for Apple's iOS uses a few extra HFP AT commands to
inform the iPhone about the headphone's battery status.
Apple documented the AT commands in the following document:

https://developer.apple.com/hardwaredrivers/BluetoothDesignGuidelines.pdf

The patch has been tested with a Bose QC35, which results
in the following communication:

D: [pulseaudio] backend-native.c: RFCOMM << AT+VGS=14
D: [pulseaudio] backend-native.c: RFCOMM >> OK
D: [pulseaudio] backend-native.c: RFCOMM << AT+XAPL=009E-400C-0129,3
D: [pulseaudio] backend-native.c: RFCOMM >> +XAPL=iPhone,2
D: [pulseaudio] backend-native.c: RFCOMM >> OK
D: [pulseaudio] backend-native.c: RFCOMM << AT+XEVENT=Bose SoundLink,158
D: [pulseaudio] backend-native.c: RFCOMM >> OK
D: [pulseaudio] backend-native.c: RFCOMM << AT+IPHONEACCEV=2,1,4,2,0
N: [pulseaudio] backend-native.c: Battery Level: 50%
N: [pulseaudio] backend-native.c: Dock Status: undocked
D: [pulseaudio] backend-native.c: RFCOMM >> OK

[Marijn: Adapt for recent HSP/HFP code changes]

Co-authored-by: Marijn Suijten <marijns95@gmail.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/482>
2021-07-28 09:11:43 +02:00
Marijn Suijten
66e2672360 bt/bluez5-device: Update link to assigned Baseband numbers
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/482>
2021-07-28 09:11:43 +02:00
Arun Raghavan
6329a2498e build-sys: Fix a warning related to avahi and config data
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/608>
2021-07-27 12:59:58 -04:00
Arun Raghavan
08a43be634 build-sys: Fix a warning related to gsettings and config data
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/607>
2021-07-27 12:49:24 -04:00
Arun Raghavan
fc40f046dd Update NEWS for 15.0
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/606>
2021-07-27 12:42:33 -04:00
Evan Miller
bea3fa7d21 Fix a strict-prototypes warning
Some older compilers complain about the empty arg list in
pa_memfd_is_locally_supported.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/603>
2021-07-14 15:07:46 +00:00
Laurent Bigonville
0efc38e95f iochannel: Fix FTBFS on Debian kfreebsd
Fixes: #1233
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/605>
2021-07-13 10:49:01 +02:00
Igor V. Kovalenko
5febac482d alsa-ucm: fix persistent port names with alsa-lib >= 1.2.5
Alsa UCM device string can contain private configuration prefix required to make
correct device open call. Private prefix is dynamically generated by UCM manager
depending on internal state. Since pulseaudio sink/source port names currently
contain device string, these may change between runs breaking volume database
and module arguments referring to sink/source.

Fix this by skipping UCM private prefix available via `_alibpref` key while
creating UCM mapping name. Mapping object will still contain unmodified
device string for device open call.

See also https://github.com/alsa-project/alsa-ucm-conf/issues/104

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/598>
2021-07-12 13:49:21 +03:00
Tanu Kaskinen
13fd21a9c9 stream-restore: make version check stricter when dropping old entries
If we increment ENTRY_VERSION in the future, the old code would drop
entries with version 2, but we only want to drop entries with version 1.

This issue was spotted by Igor Kovalenko:
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/298#note_983365

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/604>
2021-07-09 12:32:27 +03:00
Tanu Kaskinen
02cc1f8b91 i18n: Update .pot and .po files
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/602>
2021-07-05 14:02:37 +03:00
Alexey Rubtsov
b1d173c7ee Translated using Weblate (Russian)
Currently translated at 98.2% (556 of 566 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/ru/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/601>
2021-07-05 13:48:04 +03:00
Igor V. Kovalenko
0555d4f5a5 module-gsettings: Handle I/O hangup
When child `gsettings-helper` terminates prematurely, unconditionally reading
from child pipe fails in a busy loop until child process is reaped.

Fix this by terminating module upon PA_IO_EVENT_HANGUP or PA_IO_EVENT_ERROR.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/600>
2021-07-04 11:14:37 +03:00
Alper Nebi Yasak
7580ef31a1 alsa-ucm: Log about the correct path value when probing volumes
These two log messages are most likely intended for the path that was
just tried, but they are mistakenly printing the name of the port's
current path. Fix them.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/594>
2021-06-30 15:09:14 +00:00
Robin Lahtinen
fd5f5caf98 Translated using Weblate (Finnish)
Currently translated at 91.1% (516 of 566 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/fi/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/597>
2021-06-29 22:27:17 +02:00
Toni Estevez
a638ff1cd3 Translated using Weblate (Spanish)
Currently translated at 94.8% (537 of 566 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/es/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/597>
2021-06-28 17:04:22 +02:00
Emilio Herrera
8292fa191c Translated using Weblate (Spanish)
Currently translated at 94.8% (537 of 566 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/es/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/597>
2021-06-28 17:04:22 +02:00
simmon
32bfecd47d Translated using Weblate (Korean)
Currently translated at 100.0% (566 of 566 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/ko/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/597>
2021-06-22 12:04:21 +02:00
Igor V. Kovalenko
c817dfb5a4 build-sys: meson: Require bluez dependency if bluez5 feature is enabled
Build breaks if bluez5 and bluez5-native-headset are both enabled
but bluez headers are not available.

Fix this by changing `bluez5` to Meson feature requiring `bluez` dependency.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/583>
2021-06-21 10:50:08 +00:00
Igor V. Kovalenko
58052e0e04 build-sys: meson: require GIO dependency for RTP-GStreamer
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/584>
2021-06-21 03:25:32 +03:00
Hui Wang
36fcfeb211 alsa-sink/source: set volume to hw immediately if ucm_port changing
Recently we found an issue of output volume on speaker and headphone,
they should have their own volume but in practice they share one
output volume.

This issue happens on the laptops which use the ucm2 sof-hda-dsp,
originally the speaker has output volume A while the headphone has the
output volume B, suppose the speaker is the active port at the moment
and the output volume is A, users plug a headphone to the jack and the
headphone becomes the active port, in this process, ucm_set_port()
calls _disdev/_enadev which triggers the io_mixer_callback(), in the
meanwhile, the module_device_restore will restore the headphone's
volume to B, it will call set_volume_cb() to set the volume to B, but
this value is not written to hw immediately, during the time of
waiting for the B to be written to the hw, the io_mixer_callback()
calls get_volume_cb(), it reads hw volume and gets the volume A, then
it overrides the output volume to A, this results in the headphone
gets the volume A instead of B.

If a machine doesn't use the ucm, this issue will not happen since the
set_port_cb() will not trigger the io_mixer_callback(). If the ports
don't belong to the same sink/source, this issue also doesn't happen.

BugLink: http://bugs.launchpad.net/bugs/1930188
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/577>
2021-06-16 19:58:24 +03:00
Patrick Gaskin
ce962563eb win32: Add DACLs for directories created by system daemon
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/549>
2021-06-16 09:17:27 +00:00
Patrick Gaskin
4f3ca10d9e daemon: Add support for running as a service on win32
* Minimal implementation of --system on win32.
* Wrap main with a Windows Service on win32 (with a fallback to
  running it directly).
* Update PA_SYSTEM_{RUNTIME,STATE,CONFIG}_PATH and HOME dynamically
  on Windows (overrides the build config, similar to the existing
  config path replacement logic).

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/549>
2021-06-16 09:17:27 +00:00
Hui Wang
87b4d68978 alsa-mixer: only use switch to mute Front in the Headphone path
According to the alsa-info.txt in the pipewire issues of 747 and 1206,
the Front Playback Volume is shared by Headphone and Lineout or
Headphone and Speaker, But Headphone, Lineout or Speaker they all have
independent Playback Switch, change to only use switch to mute the
Lineout or Speaker. This could resolve the issues of 747 and 1206.

BugLink: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1206
BugLink: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/747
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/565>
2021-06-16 09:13:58 +00:00
Patrick Gaskin
6222f610e8 win32: Misc Unix socket fixes
* Make pa_parse_address recognize Unix socket addresses with
  Windows-style absolute paths.
* Treat WASEINVAL as a stale socket.
* Make HAVE_AF_UNIX in config templates recognize winsock2.h.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/546>
2021-06-16 09:05:58 +00:00
Patrick Gaskin
a01cce726f win32: Fix environment variables set with pa_{unset,set}_env not taking effect
SetEnvironmentVariable is not visible to getenv.

See https://github.com/curl/curl/issues/4774.
See https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/getenv-wgetenv.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/546>
2021-06-16 09:05:58 +00:00
Patrick Gaskin
ac8e786026 win32: Fix minimum Windows version for inet_{ntop,pton}
https://docs.microsoft.com/en-us/windows/win32/api/ws2tcpip/nf-ws2tcpip-inet_ntop#requirements

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/546>
2021-06-16 09:05:58 +00:00
Scott Worley
9d27317873 gsettings: Emit glib logs on stderr, not stdout
Having G_MESSAGES_DEBUG=all set in the environment (a normal thing to do
when debugging Gnome troubles) causes gsettings-helper to emit a bunch
of helpful gnome debug logs (which is good), but before this change they
were printed on stdout rather than stderr (which was bad!).  Rather than
going somewhere the user could see, these log messages were being sent
to the pulesaudio server and interpreted as the src/modules/stdin-util.c
protocol.  pulseadio waits to see a '!' message from gsettings-helper
before continuing startup.  With the log messages mixed in messing up
the stdin-util protocol, pulseaudio never saw the '!' message, and so
never completed startup.

This simple fix relies on a recent glib > 2.68 (Mar 2021), so builds
against old versions of glib will still have this problem!  We consider
this good enough until some complains otherwise.

Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1222
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/579>
2021-06-15 11:46:20 -07:00
Igor V. Kovalenko
1a4fb0ff63 alsa-mixer: updated Sennheiser GSX 1200 device ID
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/581>
2021-06-15 09:20:41 +03:00
Igor V. Kovalenko
424c7ab166 doc: link to site documentation for IRC channels
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/580>
2021-06-14 18:55:33 +03:00
Johannes Wolf
ba7198d5c8 alsa-profiles: Add NI Komplete Audio 6 profiles
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/564>
2021-06-10 12:54:27 +00:00
Igor V. Kovalenko
e576bd924f card: handle sticky profile flag
New card database entry version 5 for card profile is sticky flag.
New messaging API handlers set-profile-sticky and get-profile-sticky.

When card profile is sticky, always restore it even if it is unavailable,
and prevent switching from it when ports become unavailable.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/568>
2021-06-10 10:30:58 +00:00
Igor V. Kovalenko
79cb1369fc alsa-mixer: check if mapping is NULL before using it
Fix Debian bullseye bug where adding this line makes pulseaudio crash on startup

`load-module module-alsa-sink device=hw:1,0 control=Wave`

See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=989103

Fixes: dacfcbb09 ("alsa-ucm: use the proper mixer name for ucm pcm sink/source")
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/576>
2021-06-07 12:13:49 +03:00
garrison
6d2a49a6a1 build-sys: meson: check if NEON code can be compiled on arm
When Meson SIMD module returns HAVE_NEON=1 on arm host, do extra compile check
to verify compiler can actually handle NEON code.

Related Meson issue #6361 https://github.com/mesonbuild/meson/issues/6361

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/574>
2021-06-05 15:14:59 +00:00
Igor V. Kovalenko
e0d9231bf4 build-sys: meson: check HAVE_MMX and HAVE_SSE before calling initializers
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/575>
2021-06-05 15:16:37 +03:00
Igor V. Kovalenko
2a5497bac5 json: remove json from public API
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/570>
2021-06-03 21:15:48 +00:00
Felipe Sateler
a12d90e2ed tests: fix json test for large numbers
PRIu64 means print a uint64_t, not an unsigned long. This
is warned by the compiler:

warning: format '%llu' expects argument of type 'long long unsigned int', but argument 2 has type 'long unsigned int'

This causes build failures on some 32-bit archs

https://buildd.debian.org/status/fetch.php?pkg=pulseaudio&arch=i386&ver=14.99.1%2Bdfsg1-2&stamp=1622553415&raw=0

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/571>
2021-06-03 18:41:39 +00:00
Igor V. Kovalenko
a7d44750af build-sys: meson: restore big endian detection
Autotools used AC_C_BIGENDIAN to set WORDS_BIGENDIAN, add Meson implementation.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/572>
2021-06-03 18:38:06 +00:00
Ilja van Sprundel
c096193512 webrtc: Avoid using dynamic strings as format strings
Properly call format functions, dynamic strings shouldn't be passed as
format strings. Instead a format string of "%s" should be used, with the
dynamic string as it's argument.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/563>
2021-06-03 21:26:25 +03:00
Ricky Tigg
a7c2cad4bf Translated using Weblate (Finnish)
Currently translated at 90.9% (515 of 566 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/fi/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/573>
2021-06-03 21:02:44 +03:00
scootergrisen
b3ebe1dd24 Translated using Weblate (Danish)
Currently translated at 100.0% (566 of 566 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/da/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/573>
2021-06-03 21:02:44 +03:00
scootergrisen
eef9723ecb Translated using Weblate (Danish)
Currently translated at 97.7% (553 of 566 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/da/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/573>
2021-06-03 21:02:44 +03:00
Yuri Chornoivan
f28d2a3f6f Translated using Weblate (Ukrainian)
Currently translated at 100.0% (566 of 566 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/uk/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/573>
2021-06-03 21:02:44 +03:00
Yaron Shahrabani
22a6d11d3a Translated using Weblate (Hebrew)
Currently translated at 29.6% (168 of 566 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/he/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/573>
2021-06-03 21:02:44 +03:00
Yaron Shahrabani
c159a56a5d Translated using Weblate (Hebrew)
Currently translated at 28.6% (162 of 566 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/he/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/573>
2021-06-03 21:02:44 +03:00
Anders Jonsson
6fc43663a1 Translated using Weblate (Swedish)
Currently translated at 100.0% (566 of 566 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/sv/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/573>
2021-06-03 21:02:44 +03:00
Milo Casagrande
eb7f34718e Translated using Weblate (Italian)
Currently translated at 98.5% (558 of 566 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/it/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/573>
2021-06-03 21:02:44 +03:00
scootergrisen
bb8587d8db Translated using Weblate (Danish)
Currently translated at 97.3% (551 of 566 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/da/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/573>
2021-06-03 21:02:44 +03:00
simmon
69ee2d07a1 Translated using Weblate (Korean)
Currently translated at 100.0% (566 of 566 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/ko/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/573>
2021-06-03 21:02:44 +03:00
Toni Estevez
cf836c3a66 Translated using Weblate (Spanish)
Currently translated at 91.5% (518 of 566 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/es/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/573>
2021-06-03 21:02:44 +03:00
simmon
1fd26b8a56 Translated using Weblate (Korean)
Currently translated at 100.0% (566 of 566 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/ko/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/573>
2021-06-03 21:02:44 +03:00
simmon
01a0329806 Translated using Weblate (Korean)
Currently translated at 100.0% (566 of 566 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/ko/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/573>
2021-06-03 21:02:44 +03:00
Pjotr Vertaalt
cd62e27786 Translated using Weblate (Dutch)
Currently translated at 99.1% (561 of 566 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/nl/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/573>
2021-06-03 21:02:44 +03:00
Pjotr Vertaalt
fc08d4b9af Translated using Weblate (Dutch)
Currently translated at 99.1% (561 of 566 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/nl/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/573>
2021-06-03 21:02:44 +03:00
simmon
912bae6806 Translated using Weblate (Korean)
Currently translated at 100.0% (566 of 566 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/ko/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/573>
2021-06-03 21:02:44 +03:00
Yaron Shahrabani
55442705a0 Translated using Weblate (Hebrew)
Currently translated at 27.0% (153 of 566 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/he/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/573>
2021-06-03 21:02:44 +03:00
Göran Uddeborg
49c7aee241 Translated using Weblate (Swedish)
Currently translated at 100.0% (566 of 566 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/sv/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/573>
2021-06-03 21:02:44 +03:00
Pjotr Vertaalt
d2a17dc8a7 Translated using Weblate (Dutch)
Currently translated at 98.9% (560 of 566 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/nl/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/573>
2021-06-03 21:02:44 +03:00
Pjotr Vertaalt
7e7bb477fd Translated using Weblate (Dutch)
Currently translated at 97.5% (552 of 566 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/nl/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/573>
2021-06-03 21:02:44 +03:00
Pjotr Vertaalt
9af69d1b30 Translated using Weblate (Dutch)
Currently translated at 97.5% (552 of 566 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/nl/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/573>
2021-06-03 21:02:44 +03:00
simmon
108d9d7a13 Translated using Weblate (Korean)
Currently translated at 100.0% (566 of 566 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/ko/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/573>
2021-06-03 21:02:44 +03:00
Milo Casagrande
754dbb82ca Translated using Weblate (Italian)
Currently translated at 97.8% (554 of 566 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/it/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/573>
2021-06-03 21:02:44 +03:00
Karl Ove Hufthammer
40fb98949e Translated using Weblate (Norwegian Nynorsk)
Currently translated at 100.0% (566 of 566 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/nn/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/573>
2021-06-03 21:02:44 +03:00
Oğuz Ersen
7cc1bb5a26 Translated using Weblate (Turkish)
Currently translated at 100.0% (566 of 566 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/tr/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/573>
2021-06-03 21:02:44 +03:00
Ricky Tigg
d670c2d4dd Translated using Weblate (Finnish)
Currently translated at 90.9% (515 of 566 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/fi/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/573>
2021-06-03 21:02:44 +03:00
Piotr Drąg
790eb47fe2 Translated using Weblate (Polish)
Currently translated at 100.0% (566 of 566 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/pl/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/573>
2021-06-03 21:02:44 +03:00
Yaron Shahrabani
b17700ae5e Translated using Weblate (Hebrew)
Currently translated at 26.0% (147 of 564 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/he/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/573>
2021-06-03 21:02:44 +03:00
Igor V. Kovalenko
411c087095 alsa-mixer: prevent double-free on decibel fixes object key
When decibel fixes object is cloned, there is only a shallow copy of `key`
string member of original object. This may lead to double-free crash reported in
pipewire tracker https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1125

Fix this by doing a deep copy of `key` string to maintain correct ownership.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/569>
2021-06-01 20:34:54 +03:00
Felipe Sateler
3a1affa175 Don't link libpulsecommon with GLib and GTK
This was the behaviour with the autotools build.

Fixes #1210

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/559>
2021-05-31 16:18:08 +00:00
Takashi Sakamoto
4d825dad42 udev: fix match expression to Focusrite Saffire Pro i/o series for ignorance
It seems that in sound context environment variable is not available for
match expression.

This commit utilizes walkthrough to refer to attributes in fw node. The
combination of vendor, model, units is enough to match the node since
the attributes of fw unit doesn't have vendor.

Fix: 37358e42c4 ("alsa: Suppress udev detection of sound card for some units on IEEE 1394 bus")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/566>
2021-05-30 13:22:29 +09:00
Igor V. Kovalenko
e818899e51 alsa-mixer: Add support for usb audio in the Dell dock WD19
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/562>
2021-05-19 21:03:01 +03:00
Sanchayan Maity
94e7cf10f5 bluetooth: aptX: Improve error message for when aptX element is not found
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/561>
2021-05-19 19:25:08 +05:30
Sanchayan Maity
8dbe5f7ad4 bluetooth: ldac: Fix missing check for RTP LDAC payloader element
While at it, improve the error message to include the name of the
element which was not found.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/560>
2021-05-19 18:09:43 +05:30
Igor V. Kovalenko
edae28e9b5 build-sys: meson: make doxygen optional
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/558>
2021-05-19 01:05:42 +03:00
Igor V. Kovalenko
6e04c0a704 build-sys: meson: only require libltdl if daemon is built
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/557>
2021-05-18 19:37:28 +03:00
Arun Raghavan
188f9772c8 build-sys: Fix a couple of meson warnings
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/556>
2021-05-17 16:07:33 -04:00
Arun Raghavan
f8c2f4c1c2 build-sys: Bump libpulse soversion
Lots of changes, particularly related to the messaging API.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/555>
2021-05-17 11:39:57 -04:00
Jason Nader
9a4280988b Apply 3 suggestion(s) to 1 file(s)
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/430>
2021-05-17 15:35:07 +00:00
Jason Nader
05d8185552 Apply 1 suggestion(s) to 1 file(s)
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/430>
2021-05-17 15:35:07 +00:00
Jason Nader
ee6af0be23 Apply 1 suggestion(s) to 1 file(s)
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/430>
2021-05-17 15:35:07 +00:00
Jason Nader
4979fa649c Apply 1 suggestion(s) to 1 file(s)
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/430>
2021-05-17 15:35:07 +00:00
Klaas van Schelven
29860175c7 pactl: add get-(source|sink)-mute commands
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/430>
2021-05-17 15:35:07 +00:00
Jason Nader
bc8d615c1b pactl: add get_source_volume command
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/430>
2021-05-17 15:35:07 +00:00
Jason Nader
258bc97fb1 pactl: add get_default_source command
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/430>
2021-05-17 15:35:07 +00:00
Jason Nader
75390822b4 pactl: add get-sink-volume command
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/430>
2021-05-17 15:35:07 +00:00
Jason Nader
0e4a92ca69 pactl: add get_default_sink command
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/430>
2021-05-17 15:35:07 +00:00
Marijn Suijten
d9db47bdb5 bluetooth: Add avrcp_absolute_volume module flag for disablement
Not all peers might work fine with Absolute Volume, provide the user
with an option to disable it without impairing other AVRCP-related
commands like media status and playback controls.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/239>
2021-05-17 14:50:03 +00:00
Marijn Suijten
25426bc029 bluetooth: Delay A2DP Absolute Volume setup until property is available
The Volume property on org.bluez.MediaTransport1 is required to utilize
Absolute Volume, but it will only become availabe if the peer device
supports the feature.  This happens asynchronously somewhere after the
transport itself has been acquired, after which the callbacks are
attached and software volume is reset.

To prevent race conditions availability of the property is also checked
on startup through a "Get" call.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/239>
2021-05-17 14:50:03 +00:00
Marijn Suijten
c6b771537e bluetooth: Report a2dp_source volume changes to the source device
Write the current volume to the `Volume` DBus property to keep the
volume on the remote in sync.  Without this the remote device shows the
wrong volume, and any attempts to change it will cause an unexpected
jump when the local volume has also been adjusted.

Thanks to prior investments to improve volume synchronization, setting
up callbacks and sending initial volume to the peer for HFP/HSP
implementing this feature is as easy as unconditionally assigning a
valid function to `set_source_volume`.  `source_setup_volume_callback`
is already responsible for attaching a `SOURCE_VOLUME_CHANGED` hook and
sending initial (restored) volume to the peer (signifying support for
Absolute Volume - if not derived from the presence of FEATURE_CATEGORY_2
on the profile yet).

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/239>
2021-05-17 14:50:03 +00:00
Marijn Suijten
ac21b07ad6 bluetooth: Synchronize AVRCP Absolute Volume with A2DP sink
Like the previous commit this handles `Volume` property changes but
applies them to an A2DP sink instead of source stream.  As mentioned in
the AVRCP spec v1.6.2 §5.8 the rendering device (A2DP sink) is
responsible for performing volume attenuation meaning PulseAudio should
pass through audio as-is without performing any attenuation in SW.
Setting a valid pointer to `set_sink_volume` and returning `true` from
`should_attenuate_volume` attaches a hardware callback to `pa_sink` such
that no volume attenuation is performed anymore.

In addition to receiving volume change notifications it is also possible
to control remote volume by writing a new value to the DBus property.
This is especially useful when playing back to in-ear audio devices
which usually lack physical buttons to adjust the final volume on the
sink.

While software volume (used before this patch) is generally fine it is
annoying to crank it up all the way to 100% when a previous connection
to a different device left saved volume on the peer at a low volume.
Providing this bidirectional synchronization is most natural to users
who wish to use physical controls on their headphones, are used to this
from their smartphone, or aforementioned volume mismatches where both PA
as source and the peer as sink/rendering device are performing
attenutation.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/239>
2021-05-17 14:50:03 +00:00
Marijn Suijten
710a35cdc3 bluetooth: Update source software volume on AVRCP SetAbsoluteVolume
The A2DP spec mandates that the audio rendering device - the device
receiving audio, in our case a `pa_source` - is responsible for
performing attenuation:

AVRCP v1.6.2, §5.8:
    The SetAbsoluteVolume command is used to set an absolute volume to be used by the rendering device.

BlueZ models this call as a change of the `Volume` property on the
`org.bluez.MediaTransport1` interface.  Supporting Absolute Volume is
optional but BlueZ unconditionally reports feature category 2 in its
profile, mandating support.  Hence remote devices (ie. a phone) playing
back audio to a machine running PulseAudio assume volume is to be
changed through SetAbsoluteVolume, without performing any local
attenuation.

Future changes will implement this feature the other way around: setting
an initial value for the `Volume` property as well as propagating
`pa_source` volume changes back to the peer.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/239>
2021-05-17 14:50:03 +00:00
Marijn Suijten
c098a75d10 bluetooth: Move HSP_MAX_GAIN to header for reuse in n_volume_steps
Instead of hardcoding the number `16`, use `HSP_MAX_GAIN + 1`.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/239>
2021-05-17 14:50:03 +00:00
Georg Chini
dbaf450394 null-sink: Request no more than the configured latency from sink-input
In the case, where the latency is larger than the maximum block size,
module-null-sink will request multiples of the maximum block size from
the sink input instead of limiting the requested amount of data to the
the configured latency.

This patch fixes the problem.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/554>
2021-05-17 14:40:15 +00:00
Hui Wang
80efd7a64c Revert "alsa-mixer: Set "Front" control to 0 dB on headphone path"
This reverts commit 96369919e5.

The commit was originally for the issue of Headphone can't output
sound, that was because the Headphone and Lineout share the 1st alsa
mixer and DAC, but this commit introduced a new issue of the speaker
is not muted after switching to headphone.

A recent merged kernel commit (f48652bbe3ae@linux) could fix the 1st
issue, so we could revert the fix of the 1st issue from PA, then the
2nd issue is fixed automatically.

BugLink: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/747
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/553>
2021-05-17 14:30:33 +00:00
Jan Alexander Steffens (heftig)
2a07c83cfc build-sys: meson: Add missing include dir
Otherwise building module-echo-cancel fails here:

    FAILED: src/modules/module-echo-cancel.so.p/echo-cancel_adrian-aec.c.o
    cc -Isrc/modules/module-echo-cancel.so.p -I. -I../pulseaudio -Isrc -I../pulseaudio/src -I/usr/include/orc-0.4 -flto=auto -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu11 -march=x86-64 -mtune=generic -O2 -p>
    ../pulseaudio/src/modules/echo-cancel/adrian-aec.c:30:10: fatal error: adrian-aec-orc-gen.h: No such file or directory
       30 | #include "adrian-aec-orc-gen.h"
          |          ^~~~~~~~~~~~~~~~~~~~~~

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/552>
2021-05-12 21:10:54 +02:00
Christopher Arndt
2af43a8baf Add port order metadata to JACK sink / source ports
Adds JACK metadata property to ports created by *module-jack-sink*
and *module-jack-source* with key `JACK_METADATA_ORDER`, the port index
(1-based, in order of creation) as value and type
`http://www.w3.org/2001/XMLSchema#int`.

This allows JACK applications, which use JACK metadata, to list or display
these ports in correct order.

See also: https://jackaudio.org/api/group__Metadata.html

Signed-off-by: Christopher Arndt <chris@chrisarndt.de>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/550>
2021-05-03 12:19:17 +00:00
Patrick Gaskin
39125a0f2b win32: Use DACLs when setting socket permissions
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/548>
2021-05-03 11:43:10 +00:00
Patrick Gaskin
a238a58186 cli-command: Replace config dir with toplevel for .include on win32
This makes the behaviour match pa_{open,find}_config_file by
replacing PA_DEFAULT_CONFIG_DIR with the toplevel.

This fixes the hardcoded paths for {default,system}.pa.d introduced
in 45abd0b43c (!361).

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/545>
2021-05-03 10:58:45 +00:00
Igor V. Kovalenko
4ec89c27c9 bluetooth: adjust sync to source with different sample spec
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/544>
2021-05-03 10:49:32 +00:00
Patrick Gaskin
d21d0d89a5 build-sys: meson: Merge system_conf config data from default_conf
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/547>
2021-04-23 01:52:55 -04:00
Georg Chini
1c1d0c7827 stream-restore: Fix use of uninitialized variable
The variable card_name in sink_input_preferred_sink_changed_cb and
source_output_preferred_source_changed_cb could be used uninitialized,
which leads to invalid database entries.

This patch fixes the problem.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/543>
2021-04-20 12:18:43 +02:00
Igor V. Kovalenko
f760143c22 build-sys: meson: do not install manpages for disabled parts
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/540>
2021-04-19 18:48:59 +00:00
Igor V. Kovalenko
424580a901 build-sys: meson: allow building client libraries only
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/540>
2021-04-19 18:48:59 +00:00
Martin Wilck
1a73fb9eb9 parecord: really fix recording OGG
432a91ed ("fix "Failed to open audio file" for FLAC and OGG)" claimed
to fix recording of OGG files with pacat, but it really fixed only
FLAC. This patch must be added on top to fix OGG, too.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/542>
2021-04-19 18:24:34 +02:00
Georg Chini
468e3669aa loopback: Fix crash bug
The loopback message may be called after the sink input is already destroyed which causes
a crash. Also memory is leaked because the message object is not correctly freed.

This patch fixes the problems by adding a "dead" flag to the message structure and freeing
the message object on exit.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/541>
2021-04-19 15:21:07 +00:00
Igor V. Kovalenko
38905a096c alsa-mixer: Allow selected fallback mappings in all profile sets
When fallback mapping is selected all subsequent profile sets containing
selected mapping are ignored. When there are only e.g. fallback input mappings
available, admitted profile set will only contain one profile with selected
first input fallback mapping and no outputs, and rest of profiles will only
contain outputs and no inputs. When there are only fallback input and output
mappings, there will be no profiles admitted at all.

Fix this by making sure that selected first fallback input or output mapping
is actually allowed to exist in all probed profile sets.

Note while this change allows selected fallback mappings to be found in duplex
configuraitons, probing fallbacks still can fail if there is more than one input
fallback and first one (selected) does not work in duplex configurations.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/539>
2021-04-19 14:48:36 +00:00
Martin Wilck
432a91ed43 parecord: fix "Failed to open audio file" for FLAC and OGG
This patch fixes the following error:

$ pacat --file-format=ogg -r test.ogg
Failed to open audio file.
$ parecord sep.flac
Failed to open audio file.

libsndfile errors out if a WAV or OGG file is set to have anything but
SF_ENDIAN_FILE:

f4d1646e5c

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/526>
2021-04-19 13:35:48 +00:00
Igor V. Kovalenko
fec9eb178d bluetooth: disable HSP HS profile by default
A few headsets have issues if HFP HF profile connection is attempted before
HSP HS profile connection is closed. Looks like this could happen because
bluez bluetoothd alows to make simultaneous HSP HS and HFP HF peer connections.

One of affected headsets is WH-1000XM2

Until we find out how to prevent simultaneous HSP HS and HFP HF connections,
when native backend has HFP HF profile enabled (this is the default) do disable
HSP HS completely unless user explicitly request it via discovery modarg.

Do this by adding module-bluetooth-discover arg enable_native_hsp_hs,
default to inverse of enable_native_hfp_hf.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/538>
2021-04-16 08:33:42 +03:00
Igor V. Kovalenko
e3fa937508 bluetooth: handle HFP codec list in any order
HFP HF peer can send +BAC= list of codecs in any order and pa only expects "1,2"
Fix this by actually parsing codec list elements while looking for "2" (mSBC)

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/537>
2021-04-14 21:30:27 +00:00
Lyndon Brown
651e0db07b proplist: tweak documentation for pa_proplist_get()
to clarify that only mutating proplist calls potentially invalidate results
of earlier get requests, thus addressing the confusion found at [1].

[1]: https://github.com/jnqnfe/pulse-binding-rust/issues/38

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/536>
2021-04-09 01:47:58 +01:00
Igor V. Kovalenko
1a194c9918 bluetooth: mSBC: log lost input audio packets at debug level
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/507>
2021-04-05 15:43:32 +00:00
Igor V. Kovalenko
6a92940796 bluetooth: add modarg to allow disabling mSBC codec
Add module-bluetooth-discover argument enable_msbc, default is true (enabled)

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/507>
2021-04-05 15:43:32 +00:00
Igor V. Kovalenko
310e2877a0 bluetooth: split BT codec from A2DP SEP configuration api
Common API for all bluetooth codecs is now pa_bt_codec.
API to negotiate and configure A2DP SEP over Bluez is now pa_a2dp_endpoint_conf.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/507>
2021-04-05 15:43:32 +00:00
Igor V. Kovalenko
c7c9ca22ab bluetooth: set initial packet size to 60
Raise initial MTU size to fix frame size when hci can do 60 byte frames.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/507>
2021-04-05 15:43:32 +00:00
Igor V. Kovalenko
9de895fe23 bluetooth: add more call indicators
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/507>
2021-04-05 15:43:32 +00:00
Igor V. Kovalenko
436a98a50b bluetooth: produce silence on mSBC decoding error
We are supposed to conceal packet loss. This is not trivial but we can at least
produce silence instead of breaking on mSBC decoding error.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/507>
2021-04-05 15:43:32 +00:00
Igor V. Kovalenko
436813d8a8 bluetooth: remember negotiated HFP codec in native backend
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/507>
2021-04-05 15:43:32 +00:00
Igor V. Kovalenko
ddad63a23c bluetooth: show negotiated HFP codec
While codec switching for HFP is not implemented, show current codec via
messaging api.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/507>
2021-04-05 15:43:32 +00:00
Igor V. Kovalenko
f0d32e9454 bluetooth: add mSBC to backend-ofono
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/507>
2021-04-05 15:43:32 +00:00
Igor V. Kovalenko
030dc8b968 bluetooth: prepare to redo transport writeout scheduling
Bluetooth SCO is synchronous stream, make our writes more uniformly paced.
To do this, first separate writing to socket from rendering a frame.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/507>
2021-04-05 15:43:32 +00:00
Igor V. Kovalenko
976fc1d099 bluetooth: mSBC: ignore empty encoded frame
If input block size is shorter than SBC frame codesize, encoder will return 0.
Log this and skip whole input block.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/507>
2021-04-05 15:43:32 +00:00
Igor V. Kovalenko
7d191b64d9 bluetooth: mSBC: ignore all-zero packets
This is a workaround for hardware/driver which inserts all-zero packets in what
otherwise looks like a valid mSBC stream.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/507>
2021-04-05 15:43:32 +00:00
Igor V. Kovalenko
6c0c9cf845 bluetooth: use helper to set multiple transport object attributes
For mSBC to work correctly the following must be set correctly
- codec object
- transport write method
- transport setsockopt method

Use helper method to set all three simultaneously.
Static configuration structure may be cleaner solution.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/507>
2021-04-05 15:43:32 +00:00
Igor V. Kovalenko
62776cc815 bluetooth: apply write MTU detection based on read packet size
HFP Audio Connection SCO configuration is negotiated symmetrically in both
directions, and USB HCI SCO packet framing is also symmetric in both directions.
This means that packet size will be the same for reads and writes over HFP SCO
socket.

HFP profile specification states that valid speech data shall exist on the
Synchronous Connection in both directions after the Audio Connection is
established.

This guarantees that an incoming packet will arrive shortly after SCO connection
is established. Use it's size to fix write MTU in case kernel value is wrong.

Discussion here https://lore.kernel.org/patchwork/patch/1303411/

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/507>
2021-04-05 15:43:32 +00:00
James Bottomley
4444ecad6f bluetooth: add wideband audio codec negotiation to HFP
The HFP protocol supports the ability to negotiate codecs if that is
supported by both AG and HF.  This patch adds advertising of codec
negotiation support and the ability to negotiate a codec change.  The
only currently supported extra codec (as of HF 1.7.1) is mSBC.  mSBC
requires that the transmission be done over an eSCO link with
Transparent Data.  The linux kernel ensures the former, but we have to
manually set the socket to transparent data.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/507>
2021-04-05 15:43:32 +00:00
James Bottomley
f22cfa8f81 bluetooth: add support for mSBC codec
Adding processing support for the mSBC codec is somewhat problematic,
because, although it is a SBC codec, the a2dp handling can't simply be
reused because the codec is used on an eSCO link with transparent
data, meaning the transmission unit has to be 48 bytes (fragmenting
the codec packets) and reassembly and boundary detection is required
to be done by the implementation.  Therefore we have to implement
separate render and push routines for msbc that do this fragmentation.

Fragmentation is done by emulating circular buffers.  The receive
(push) buffer is easy, since the mSBC packet size is 60, simply have a
buffer of this size in the sbc_info area where the fragments are
reassembled.  Once we have a full 60 bytes, decode and restart from
zero.  The send (render) buffer is more problematic, since the
transmit must be done from contiguous memory.  This means that the
buffer must be the lowest common multiple of the transmission unit and
the packet size.  This value is 240 since 240/48 == 5 and 240/60 == 4.
So the buffer pointers are reset at 240 which is a whole number of
both rendered packets and eSCO transmission units.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/507>
2021-04-05 15:43:32 +00:00
Igor V. Kovalenko
a7b21fb555 bluetooth: add CVSD codec implementation
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/507>
2021-04-05 15:43:32 +00:00
Igor V. Kovalenko
913e7767d6 bluetooth: unify decoder code paths
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/507>
2021-04-05 15:43:32 +00:00
Igor V. Kovalenko
3902cee4a5 bluetooth: unify encoder code paths
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/507>
2021-04-05 15:43:32 +00:00
Tanu Kaskinen
8a87af380a stream-restore: Fix NULL preferred device handling
When an application sets a device for a newly created stream, we treat
that as a temporary setting, and don't save it as the preferred device
for future streams. The handling for this was broken, however: if the
stream already had a preferred device saved in the stream-restore
database, that was unset.

This was a regression introduced in
bc0e728320 and
70bbbcdc84. These commits tried to detect
in subscribe_callback() when the preferred device is cleared, but as a
side effect the preferred device started to get cleared from the
database also when a stream was created with a device set by the
application.

There's no way for subscribe_callback() to distinguish the different
cases of the preferred device being NULL. This problem is solved by
using the PREFERRED_SINK/SOURCE_CHANGED hooks. The hooks are only called
when the preferred device really changes.

Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1063
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/535>
2021-04-05 15:17:15 +00:00
Tanu Kaskinen
737ebcdfdb sink-input, source-output: Add hooks for preferred device changes
The hooks are fired when the preferred device changes. This is useful
for module-stream-restore.

I added new set_preferred_sink/source() functions for firing the hooks.
The functions also log the preferred device changes.

There was already pa_sink_input_set_preferred_sink(), but that had a
side effect of moving the stream, so I needed a new function. Since it
can be confusing when the two similarly named functions should be
called, I added a comment for pa_sink_input_set_preferred_sink() that
explains the different situations.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/535>
2021-04-05 15:17:15 +00:00
Igor V. Kovalenko
1f204a1357 bluetooth: prioritize native backend HFP HF connection
Bluez prepends newly registered profile to a list of supported profiles,
and new peer profile connections are attempted in reverse order of profile
registration.

Currently native backend would register HFP AG profile before HSP AG profile.
When peer supports both HFP HF and HSP HS profiles, this registration order
causes extra HSP HS connection attempt before native backend would reject it
to make sure peer is reconnected with HFP HF profile.

Reorder HSP AG profile registration before HFP AG to make sure peer supporting
both profiles connects with HFP HF profile first.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/534>
2021-04-03 08:48:06 +03:00
Igor V. Kovalenko
7ca50bab2f bluetooth: update messaging api reference
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/525>
2021-03-27 11:18:22 +00:00
Igor V. Kovalenko
a2db3fcfb2 message-params: clean up
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/525>
2021-03-27 11:18:22 +00:00
Igor V. Kovalenko
1dd05f4a9b message-params: use JSON instead of custom format
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/525>
2021-03-27 11:18:22 +00:00
Igor V. Kovalenko
0ba768b2e9 json: add JSON encoder
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/525>
2021-03-27 11:18:22 +00:00
Igor V. Kovalenko
1df4a311d4 json: improve supported numbers
Use 64bit signed integers and fix double value conversion.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/525>
2021-03-27 11:18:22 +00:00
Marijn Suijten
02027518af bluetooth: Only use hardware volume callbacks for peer attenuation
Setting these callbacks adds the HW_{VOLUME,MUTE}_CTRL flag even when
PulseAudio is solely responsible for performing attenuation whilst only
keeping the peer posted on changes.  For this case the hardware callback
is not registered at all but instead a hook is attached to catch
PA_CORE_HOOK_{SINK,SOURCE}_VOLUME_CHANGED.  Only when the peer performs
attenuation (the peer is in HeadSet/HandsFree role) are the callbacks
used, without touching PA software volume at all.  A future change could
potentially use software volume to compensate for the extremely coarse
16 steps of volume control in HSP and HFP, and to allow volume over
100%.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/519>
2021-03-26 21:09:36 +01:00
Georg Chini
015028d7e3 alsa-sink: Do not increase watermark when requested to rewind 0 bytes
Since commit cb91d7a1 the watermark is increased when there is nothing to rewind.
This is also done in the case when there was actually no rewind requested at all,
so the watermark is increased needlessly.
This patch fixes the issue by skipping the rewind if none is requested.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/530>
2021-03-25 02:29:42 +00:00
Edward Lee
169f8c5f2c Win32: Use WAVEFORMATEX for multi-channel audio output on Windows.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/359>
2021-03-23 13:12:38 -04:00
Edward Lee
e12ba8eaee Win32: Fix build issues.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/359>
2021-03-23 13:12:18 -04:00
Marijn Suijten
8db4dff2c5 bluetooth: Set up hardware gain control if init volume is received late
Originally written for A2DP this rework of that patch enables late-bound
hardware volume control on HFP and HSP.  As per the specification the
headphones (where gain control for both speaker and microphone could
happen in hardware on the peer) are supposed to send initial values for
these before the SCO connection is created; these `AT+VG[MS]` commands
are also used to determine support for it.  PA uses this information in
`add_{sink,source}` to attach hardware volume callbacks, _if_ it is
supported.  Otherwise PA performs the attenuation in software.

Unfortunately headphones like the WH-1000XM3's connect to A2DP
initially and only send `AT+VGS` (microphone hardware gain is not
supported) _during_ SCO connection when the user switches to the HFP
profile afterwards; the callbacks set up dynamically in
`rfcomm_io_callback` are written after the sink and source have been
created (`add_{sink,source}`), leaving them without hardware volume
callbacks and with software volume when adjusted on the PA side.  (The
headphones can still send volume updates resulting in abrupt changes if
software and peer volume differ.  Furthermore the same attenuation is
applied twice - once in PA software, once on the peer).

To solve this problem we simply check whether the callbacks have been
attached whenever the peer sends a volume change, and if not attach the
callbacks to the sink/source and reset software volume.

Fixes: d510ddc7f ("bluetooth: Perform software attenuation until HF/HS reports gain control")
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/528>
2021-03-17 22:57:38 +01:00
Igor V. Kovalenko
f553afd2df bluetooth: accept +VGM/+VGS unsolicited reply with '=' and ':' separator
HFP specs states both '=' and ':' should be accepted as a valid
separator for +VGM and +VGS unsolicited result codes.

This change is cherry-picked from Rodrigo Araujo's work here:
https://lists.freedesktop.org/archives/pulseaudio-discuss/2017-September/028820.html

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/521>
2021-03-16 10:48:59 +01:00
Marijn Suijten
d510ddc7fb bluetooth: Perform software attenuation until HF/HS reports gain control
HF/HS hardware attenuation is optional on HFP: the peer indicates
support with the AT+BRSF command, when bit 4 is set.  That does not
explicitly mandate speaker or microphone gain control; either is
dynamically detected as soon as `AT+VG[MS]=` is received.  Otherwise
software attenuation is performed.

It is also optional on HSP but nothing is mentioned about feature
detection, assume it is the same as HFP: perform software attenuation
until the HF/HS peer sends an `AT+VG[MS]=` command.

When PA is a HS/HF (and the peer the AG) we attenuate both channels in
software and unconditionally keep the peer up to date with
`AT+VGM/AT+VGS` commands.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/521>
2021-03-16 10:48:59 +01:00
Marijn Suijten
9c847b16a8 bluetooth: Move attenuation decision to shared function
Generalize the distinction between local and peer-attenuated volumes
into a function, paving the way for future changes where this needs to
be checked in more places and when A2DP Absolute Volume support is
added.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/521>
2021-03-16 10:48:58 +01:00
Marijn Suijten
d84ca03080 bluetooth: Generalize speaker/microphone naming to sink/source
Sink and source naming is more generic when dealing with audio that is
directional in the sense that it either goes to or comes from the other
device, but not necessarily a microphone or speaker. A concrete example
is the swapped meaning when the current device is in the HeadSet
profile. The incoming audio can come from any source, not necessarily a
microphone. Likewise, audio captured by the microphone of the headset is
not necessarily played back by a speaker on the AG, it is merely acting
as a sink for the data: further handling is irrelevant to the naming.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/521>
2021-03-16 00:19:45 +01:00
Marijn Suijten
bfb3aeac1c bluetooth: backend-native: Round volume to closest instead of up
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/521>
2021-03-16 00:04:51 +01:00
Marijn Suijten
a575006aa8 bluetooth: Move HSP gain conversions into backend-native
For the upcoming A2DP AVRCP Absolute Volume feature the code in BlueZ5
has to be generic to be reusable. Move this conversion so that it
becomes possible to implement A2DP volume - which uses different values
- on top without duplicating existing callback functionality.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/521>
2021-03-16 00:04:50 +01:00
Marijn Suijten
cefee393fb bluetooth: switch_codec should start with pa_blueooth_device_
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/521>
2021-03-15 21:44:12 +01:00
Igor V. Kovalenko
a82e019de9 build-sys: meson: fix meson dist version
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/516>
2021-03-15 18:25:06 +00:00
Igor V. Kovalenko
f4bce0bb98 build-sys: drop autotools build system
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/516>
2021-03-15 18:25:06 +00:00
Tanu Kaskinen
4d7242d831 i18n: Update .pot and .po files
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/523>
2021-03-08 16:28:01 +02:00
Ricky Tigg
9be73e5cd1 Translated using Weblate (Finnish)
Currently translated at 90.9% (513 of 564 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/fi/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/523>
2021-03-07 18:01:47 +01:00
Ricky Tigg
675e1de11b Translated using Weblate (Finnish)
Currently translated at 87.2% (492 of 564 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/fi/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/523>
2021-03-06 15:01:48 +01:00
Hela Basa
f3683932bc Added translation using Weblate (Sinhala)
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/523>
2021-03-06 15:01:48 +01:00
Yaron Shahrabani
d267b93d18 Translated using Weblate (Hebrew)
Currently translated at 25.1% (142 of 564 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/he/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/523>
2021-03-06 15:01:48 +01:00
Igor V. Kovalenko
046ce91c4b bluetooth: correct rfcomm command and reply formatting
The format of COMMAND line sent from HS to AG is COMMAND<cr>
The format of RESPONSE line sent from AG to HS is <cr><lf>RESPONSE<cr><lf>

Split rfcomm_write into rfcomm_write_command and rfcomm_write_response to handle
line formatting correctly.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/520>
2021-03-05 16:32:22 +03:00
Igor V. Kovalenko
24c2a527f0 bluetooth: fix typo checking if target codec is available
A2DP switch-codec command implementation must check if target codec is good,
not the one we want to switch from.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/518>
2021-03-03 22:23:37 +00:00
Faidon Liambotis
458c763989 buildsys/autotools: add pulseaudio-x11.service.in
Commit 4868fcf5f3 ("daemon: Rely on
systemd unit file for X11 plugin initialization") added a new systemd
unit file, pulseaudio-x11.service, generated from a respective .in file.

Unfortunately, this was only hooked up to meson, and is not currently
installed by autotools. Among other breakage, "make dist" produces a
tarball that meson is then unable to build (because a file is missing).

Signed-off-by: Faidon Liambotis <paravoid@debian.org>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/514>
2021-03-01 15:25:09 +00:00
Faidon Liambotis
2afecd637c tests: fix use of uninitialized variable cpu_info
On cpu-volume-test, cpu_info is initialized only on i386/amd64 systems,
and otherwise passed on to pa_cpu_init_orc() uninitialized.

If one was unlucky enough, they could end up with cpu_info.cpu_type ==
PA_CPU_X86 on a non-x86 system, and use and test the Orc codepath
without that being functional, and thus with the test failing.

This has been observed in the wild on the ppc64el Debian buildds. See
Debian bug #982740 for more context.

Define cpu_info here in the same way as in other tests.

Signed-off-by: Faidon Liambotis <paravoid@debian.org>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/511>
2021-03-01 15:02:11 +00:00
Jan Kuparinen
8f59e3e275 Translated using Weblate (Finnish)
Currently translated at 86.7% (489 of 564 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/fi/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/515>
2021-03-01 16:07:37 +02:00
Jan Kuparinen
858e085e52 Translated using Weblate (Finnish)
Currently translated at 78.9% (445 of 564 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/fi/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/515>
2021-03-01 16:07:37 +02:00
Göran Uddeborg
8148cd046b Translated using Weblate (Swedish)
Currently translated at 100.0% (564 of 564 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/sv/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/515>
2021-03-01 16:07:37 +02:00
Ricky Tigg
2a73d4e937 Translated using Weblate (Finnish)
Currently translated at 78.1% (441 of 564 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/fi/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/515>
2021-03-01 16:07:37 +02:00
Göran Uddeborg
e36d629baa Translated using Weblate (Swedish)
Currently translated at 95.9% (541 of 564 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/sv/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/515>
2021-03-01 16:07:37 +02:00
Göran Uddeborg
5e8313eaac Translated using Weblate (Swedish)
Currently translated at 94.1% (531 of 564 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/sv/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/515>
2021-03-01 16:07:37 +02:00
Karl Ove Hufthammer
0f5591558b Translated using Weblate (Norwegian Nynorsk)
Currently translated at 100.0% (564 of 564 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/nn/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/515>
2021-03-01 16:07:37 +02:00
Carmen Bianca Bakker
2e8aaa08bb Translated using Weblate (Esperanto)
Currently translated at 23.5% (133 of 564 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/eo/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/515>
2021-03-01 16:07:37 +02:00
Carmen Bianca Bakker
fc658f9c4d Added translation using Weblate (Esperanto)
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/515>
2021-03-01 16:07:37 +02:00
Yaron Shahrabani
5a55c940fe Translated using Weblate (Hebrew)
Currently translated at 22.1% (125 of 564 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/he/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/515>
2021-03-01 16:07:37 +02:00
Piotr Drąg
259471cc55 Translated using Weblate (Polish)
Currently translated at 100.0% (564 of 564 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/pl/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/515>
2021-03-01 16:07:37 +02:00
Piotr Drąg
b3e36ad6d7 Translated using Weblate (Polish)
Currently translated at 100.0% (564 of 564 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/pl/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/515>
2021-03-01 16:07:37 +02:00
Piotr Drąg
3c64ce970e Translated using Weblate (Polish)
Currently translated at 95.3% (538 of 564 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/pl/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/515>
2021-03-01 16:07:37 +02:00
Jan Kuparinen
f04b3aa383 Translated using Weblate (Finnish)
Currently translated at 73.2% (413 of 564 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/fi/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/515>
2021-03-01 16:07:37 +02:00
Yuri Chornoivan
e34f4f99fb Translated using Weblate (Ukrainian)
Currently translated at 100.0% (564 of 564 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/uk/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/515>
2021-03-01 16:07:37 +02:00
Oğuz Ersen
a04b39f3d9 Translated using Weblate (Turkish)
Currently translated at 100.0% (564 of 564 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/tr/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/515>
2021-03-01 16:07:37 +02:00
Felipe Sateler
67e99bf6db treewide: fix a bunch of typos
Detected by lintian, the debian package linter

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/512>
2021-02-26 19:58:41 -03:00
Hui Wang
f0f07c7db5 alsa-mixer: increase the max number of HDMI/DP output device to 11
Intel TGL HDMI/DP codec provides 9 pins (Linux kernel, 9a11ba7388f16:
ALSA: hda: hdmi - add Tigerlake support), and with the DP MST enabled,
the linux kernel will build 11 output devices (3, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16), and the alsa-lib will map 11 PCM devices from HDMI:0
to HDMI:10, but current pulseaudio only supports 8 HDMI/DP devices,
if users plug the HDMI/DP monitor to the last 3 ports, the users will
not see the output device from pulseaudio or gnome.

We have experienced this issue on a dell TGL machine with a dock, we
plugged 2 HDMP/DP monitors on the dock, but we could only see 1
HDMI/DP output device from pulseaudio or gnome, through investigation,
we found one monitor is plugged in the 2nd port from last.

Here we add 3 HDMI/DP output devices.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/495>
2021-02-24 16:51:05 +00:00
Igor V. Kovalenko
45d896f8eb bluetooth: clean up rfcomm_write usage
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/491>
2021-02-23 06:54:39 +00:00
Igor V. Kovalenko
0a36c1544d bluetooth: rename enable_hs_role to enable_shared_profiles
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/491>
2021-02-23 06:54:39 +00:00
Igor V. Kovalenko
c884ae8c74 bluetooth: use device flag to prevent assertion failure during shutdown
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/491>
2021-02-23 06:54:39 +00:00
Igor V. Kovalenko
698fb3bc26 bluetooth: complete bluetooth profile separation
This is a follow-up change to review of these series on pulseaudio-discuss
https://lists.freedesktop.org/archives/pulseaudio-discuss/2017-September/028801.html

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/491>
2021-02-23 06:54:39 +00:00
Igor V. Kovalenko
815dd2d627 bluetooth: prefer headset HFP HF connection with native backend
When HFP HF support is enabled in native backend, peer HFP HF profile connection
is preferred over same peer HSP HS profile connection if peer supports both
profiles.

Enforce the preference by rejecting HSP HS profile connections from such peer.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/491>
2021-02-23 06:54:39 +00:00
Igor V. Kovalenko
70171158ee bluetooth: fix headset=auto ofono handover
Native backend implements HFP AG but not HFP HF yet, therefore headset=auto
functionality is still needed if HFP HF is required.

To make headset=auto work again, drop both HFP AG and HSP AG roles while
performing handover from native backend when oFono is detected running.

While at it, restore profile description to Headset Head Unit (HSP/HFP)
to note that HFP may be still provided via oFono backend.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/491>
2021-02-23 06:54:39 +00:00
Igor V. Kovalenko
8491477b3e bluetooth: enable module-bluez5-discover argument enable_native_hfp_hf
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/491>
2021-02-23 06:54:39 +00:00
James Bottomley
cb193e19ee bluetooth: make native the default backend
Change default backend from 'auto' to 'native' so that in the usual
install pulseaudio uses the native backend with HFP_HF handling.

set default to false unless the backend is the native one, in which
case the default becomes true.

Additionally set default value of enable_native_hfp_hf to false unless
the backend is the native one, in which case the default becomes
true. so that we only bind the HFP_HF end point in the native case
(leaving it free for ofono in the ofono backend or auto case)

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/491>
2021-02-23 06:54:39 +00:00
James Bottomley
485a64642e bluetooth: add correct HFP rfcomm negotiation
HFP 1.6 requires a stateful negotiation of AT commands.  The prior
version got away with initialising HFP simply by replying 'OK' to
every negotiation attempt.  This one actually tries to parse the state
and make sure the negotiation occurs correctly

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>

---

v4:

- Update for PA 11.0
- Finally sort out CIND negotiaton for complex headsets

v3:

- remove internal debugging
- added comment for t->config being not null for hfp
- removed unused returns from hfp_rfcomm_handle()
- remove rfcomm comment
- use pa_startswith
- simplify negotiation

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/491>
2021-02-23 06:54:39 +00:00
James Bottomley
66ed99a13d bluetooth: separate HSP and HFP
When all headsets supported both HSP and HFP, life was good and we
only needed to implement HSP in the native backend.  Unfortunately
some headsets have started supporting HFP only.  Unfortuantely, we
can't simply switch to HFP only because that might break older HSP
only headsets meaning we need to support both HSP and HFP separately.

This patch separates them from a joint profile to being two separate
ones.  The older one retains the headset_head_unit name, meaning any
saved parameters will still select this (keeping us backward
compatible).  It also introduces a new headset_handsfree.

For headsets that support both HSP and HFP, the two profiles will
become separately visible and selectable.  This will only matter once
we start adding features to HFP that HSP can't support (like wideband
audio).

Signed-off-by: <James.Bottomley@HansenPartnership.com>

---
v6:

- merge profile switching fixes patch from Rodrigo Araujo

v5:

- rename option to enable_native_hfp_hf
- don't call profile_done for HFP_HF unless it was initialised

v3:

- Update for PA 11.0

v2:

- fold in review feedback
- add global disable option for not registering HFP

v3:

- change parameter to enable_profile_hfp
- update device_supports_profile to be aware of hfp/hsp exclusivity
- change parameter to enable_profile_hfp_hf

bluetooth: separate HSP and HFP (to me merged with this patch)

Hi.

First, just to say that your patches are going great. Finally I can use
the microphone of my HFP only headset (a version of a Bluedio T2+).

So far, I've only encontered one problem: the auto_switch option of
module_bluetooth_policy stops working. Dug through the code and I think
you missed a few spots were you have to hangle the new headset_handsfree
profile in module_bluetooth_policy.c

Applying the following after applying your v5 patches fixed the issue
for me, now when I start making a VOIP call the profile switches to
headset_handsfree and the mic works automatically, and when the call
finishes it reverts back to a2dp.

Thanks and best regards.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/491>
2021-02-23 06:54:39 +00:00
James Bottomley
709909a1fc bluetooth: use consistent profile names
The PA_BLUETOOTH_PROFILE names should mirror the PA_BLUETOOTH_UUID
names using profile_function instead of randomly made up names.  Fix
this with the transformation:

PA_BLUETOOTH_PROFILE_HEADSET_HEAD_UNIT -> PA_BLUETOOTH_PROFILE_HSP_HS
PA_BLUETOOTH_PROFILE_HEADSET_AUDIO_GATEWAY -> PA_BLUETOOTH_PROFILE_HFP_AG

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>

---

v4: update for PA 11.0

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/491>
2021-02-23 06:54:39 +00:00
Henri Chain
bca4c22832 systemd: move to session slice
As per https://systemd.io/DESKTOP_ENVIRONMENTS/
(the default is app.slice which is not appropriate for pulseaudio)

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/506>
2021-02-18 20:42:25 +00:00
Georg Chini
6b2844a61d source-output: Fix source-output volume after move of virtual source stream
When the source-output of a virtual source with volume sharing disabled is moved,
the source output volume is reset to 100%. This patch fixes the problem by
applying the virtual source volume to the source-output after the move.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/509>
2021-02-17 21:42:14 +01:00
Igor V. Kovalenko
b1f599dcd9 bluetooth: remove unwanted change from bluez fallback code
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/504>
2021-02-15 15:42:22 +00:00
pseyfert
d74c47340a fix handling of symbolic port names in zsh completion
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/500>
2021-02-15 15:06:35 +00:00
Igor V. Kovalenko
de8b7c0d8f build-sys: meson: support elogind alternative for module-systemd-login
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/502>
2021-02-12 20:34:11 +03:00
Igor V. Kovalenko
156e16f941 build-sys: meson: add tcp-wrappers
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/498>
2021-02-12 17:14:24 +00:00
Igor V. Kovalenko
f7f9c70b0f build-sys: drop gconf support
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/499>
2021-02-12 17:05:07 +00:00
Paul Seyfert
faa1a7e042 zsh-completion Add completion of sample names
This closes #201.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/501>
2021-02-10 19:37:07 +01:00
Marijn Suijten
c05c6f9eee bluetooth/gst: Unify encoder and decoder pipeline setup
The encoding and decoding pipeline are essentially identical: both push
data in via an appsrc, route it through a codec-specific (opaque)
element, and finally pull data out of an appsink. The code already makes
it impossible to have an encoding and decoding pipeline simultaneously
set up in `gst_info`, and converting `bool for_encoding` to a tri-state
(encode, decode, or both) would be messy; particularly when encoding and
decoding could possibly differ in format.

This change removes a swath of code and removes the possibility of
misusing `enc_` or `dec_` in the wrong place (ie. after copying a bit of
code and forgetting to rename one or two). When bidirectional codecs
come online a second codec instance (`gst_info`) can simply be created
and controlled independently.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/487>
2021-02-01 17:23:46 +00:00
Marijn Suijten
92af2c90f9 bluetooth/aptx: Call the non-HD encode_buffer function
For consistency with its decode_buffer counterpart.

For the time being the base function only performs an extra check and
logs an error when no data has been written into the GStreamer encoding
pipeline.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/487>
2021-02-01 17:23:46 +00:00
Marijn Suijten
6b5857c1ac bluetooth/aptx: Simplify lifetime of caps
Fixes: 73c80ffba ("bluetooth/aptx: Deduplicate caps setup for encoding and decoding")
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/487>
2021-02-01 17:23:46 +00:00
Igor V. Kovalenko
bf99b4bdfc bluetooth: support increasing bitrate for SBC XQ
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/476>
2021-02-01 17:10:52 +00:00
Igor V. Kovalenko
89082cbfaa bluetooth: a2dp dual channel SBC XQ codec configurations
Desired SBC bitpool value is calculated from target bitrate limit.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/476>
2021-02-01 17:10:52 +00:00
Marijn Suijten
ff2f16294f bluetooth: Remove unused ts_elapsed variable
Fixes: 969951121 ("bluetooth: allow increasing output bitrate")
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/477>
2021-02-01 16:10:12 +00:00
Marijn Suijten
f9bf21e012 tests: Update ladspa-dbus to Python 3
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/477>
2021-02-01 16:10:12 +00:00
Marijn Suijten
537bf3cf8e treewide: Use DBus defines instead of direct string literals
While cleaning up the BlueZ counterpart of strings defined in
preprocessor macros it is only consistent to take care of all DBUS_
macros as a whole.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/477>
2021-02-01 16:10:11 +00:00
Marijn Suijten
670f585530 bluetooth: Consistently use BlueZ defines for strings
These errors and interface names shoudld all reuse predefined constants.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/477>
2021-02-01 16:10:11 +00:00
Marijn Suijten
99ac831fef bluetooth: Unify BlueZ macro defines shared between util and native
Define all BLUEZ_ macros once in the shared header, instead of twice in
both backend-native.c and bluez5-util.h.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/477>
2021-02-01 16:10:11 +00:00
Marijn Suijten
87f08a7b56 bluetooth: improve indentation around dbus_message_iter_open_container
Consistently use newlines and the same indentation style for all calls
to dbus_message_iter_open_container in Bluetooth code.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/477>
2021-02-01 16:10:11 +00:00
Georg Chini
89bae1b3b7 null-source: Change max_rewind when the latency changes
The null-source did not change max_rewind when changing the latency. This
patch fixes the issue.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/493>
2021-02-01 16:03:46 +00:00
Georg Chini
12cf6da242 sink: Unlink monitor source before unlinking sink
Unlinking the monitor source after unlinking the sink leads to a crash when the monitor
source is master of a virtual source. Changing the unlink order fixes the problem.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/493>
2021-02-01 16:03:46 +00:00
Jaroslav Kysela
597a1eb1ba alsa: fix the plug: PCM device name creation
The plug: ALSA PCM device name can pass any device name
even with argument, but the syntax is:

plug:SLAVE='<pcm_device_name>'

BugLink: https://github.com/alsa-project/alsa-ucm-conf/pull/75#issuecomment-768555182
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/492>
2021-01-28 08:50:09 +01:00
Igor V. Kovalenko
c6309a9c18 bluetooth: pass output_rate_refresh_interval_ms module parameter
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/488>
2021-01-26 10:01:47 +03:00
Sanchayan Maity
c686215268 bluetooth: ldac: Use format as FLOAT32LE
LDAC encoder already supports S16, S24, S32 and F32LE. Using FLOAT32LE
for the sample format would avoid the additional call for conversion to
pa_sconv_s32le_from_float32ne. perf tool shows this as being the function
called frequently after encode. So, just avoid this by using sample format
as F32LE.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/486>
2021-01-22 20:10:54 +05:30
Marijn Suijten
9431e96ae4 bluetooth/gst: Move common enc/dec initialization back to generic init
Now that codec-specific code only touches its own bin and not any
elements (appsink/src) outside of it, make things official by
initializng them later in gst_codec_init where they are actually needed.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/484>
2021-01-22 11:04:19 +01:00
Marijn Suijten
46a97d76eb bluetooth/aptx: Use capsfilter instead of appsink/appsrc "caps" prop
Make the codec-specific initializer more generic by not touching any
elements outside of its own GstBin.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/484>
2021-01-22 10:41:20 +01:00
Marijn Suijten
73c80ffba0 bluetooth/aptx: Deduplicate caps setup for encoding and decoding
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/484>
2021-01-22 10:41:20 +01:00
Marijn Suijten
da1600eb61 bluetooth/gst: Determine PA input/output caps in generic code
Make the code ever so slightly more generic by not using appsrc and
appsink in codec-specific logic when assigning caps specific to the raw
(PCM) format provided by or returned to PA.

Note that caps have to be set (= event) after starting, can't send
events in flushing state.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/484>
2021-01-22 10:41:19 +01:00
Marijn Suijten
db73004a3a bluetooth/gst: Add assertions around element_add_pad and bin_add
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/484>
2021-01-22 09:47:09 +01:00
Tanu Kaskinen
ca3fd62c71 i18n: Update .pot and .po files
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/485>
2021-01-22 09:12:32 +02:00
Jan Kuparinen
b2c664e9bc Translated using Weblate (Finnish)
Currently translated at 95.1% (472 of 496 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/fi/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/485>
2021-01-22 09:09:47 +02:00
Jan Kuparinen
951c259319 Translated using Weblate (Finnish)
Currently translated at 94.9% (471 of 496 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/fi/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/485>
2021-01-22 09:09:47 +02:00
Igor V. Kovalenko
7e9e9e271a bluetooth: allow increasing SBC output bitrate
SBC codec decrements bitpool value by fixed amount each time it is asked to
reduce output bitrate. This results in reduced audio quality with SBC codec.

Implement increase_encoder_bitrate for SBC codec by adding 1 to bitpool value
each time encoder bitrate needs to be increased to restore SBC audio quality.
While at it, remove bitpool decrement limit to use connection agreed value
instead as we will be able to restore quality later.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/474>
2021-01-21 15:16:19 +00:00
Igor V. Kovalenko
9699511215 bluetooth: allow increasing output bitrate
Bluetooth thread may ask encoder to reduce bitrate if writing is not keeping up
with inputs or writing to bluetooth socket takes too much time.

Assuming conditions leading to reduced bitrate are intermittent, allow periodic
attempts to increase encoder bitrate, by default at most twice per second.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/481>
2021-01-21 15:10:15 +00:00
Marijn Suijten
ac33a01f30 bluetooth: Add missing can_be_supported check to is_codec_available
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/479>
2021-01-21 15:03:39 +01:00
Marijn Suijten
519052e77e bluetooth: Check support for encoding and decoding separately
As suggested in [1]:

This way it is possible for a codec to have both the encoding and
decoding part optional, instead of getting both or nothing (where PA
theoretically supports both).

In addition this cleans up code that was previously checking the
existence of a function pointer, or nothing at all (switch_codec).

[1]: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/440#note_768146

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/479>
2021-01-21 15:03:37 +01:00
Sanchayan Maity
8816b6b05b bluetooth: Fix unregistering of the message handler
In cases, where codec initialisation may fail, we still try
unregistering the message handler. Do not try unregistering
the handler if it was not registered in the first place.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/483>
2021-01-21 18:41:25 +05:30
Arun Raghavan
3a4038f3ff gitignore: Add install/ for local prefixed installs
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/475>
2021-01-19 10:57:17 -05:00
Marijn Suijten
ac8f0c2070 bluetooth/bluez5-util: Do not reply to ClearConfiguration
Similar to the situation/comment in `endpoint_release` BlueZ does not
request any reply to `ClearConfiguration()` either; sending one results
in the same "0 matched rules" warning from dbus-daemon:

    dbus-daemon[1309]: [system] Rejected send message, 0 matched rules; type="method_return", sender=":1.71" (uid=1000 pid=87548 comm="../build/src/daemon/pulseaudio -vvvv -n -F ../buil") interface="(unset)" member="(unset)" error name="(unset)" requested_reply="0" destination=":1.3" (uid=0 pid=1308 comm="/usr/lib/bluetooth/bluetoothd -d ")

Solve this by only creating a return message when an (othwise empty)
reply is solicited for, just like in `endpoint_release`.

Unfortunately we also have to make sure to not send any error back if no
reply is requested, but fortunately an argument parsing error here is
extremely unlikely.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/472>
2021-01-19 15:47:26 +00:00
Sanchayan Maity
cdbb73f9ad bluetooth: Move codec specific bits to their own respective files
We move the codec specific bits to their own respective files and now
make the codec specific initialisation use a GstBin, which the generic
GStreamer module now uses in the pipeline.

It is job of the codec specific function to add elements in the GstBin
and link the added elements in the bin. It should also set up the ghost
pads as a GstBin has no pads of it's own and without which the bin
cannot be linked to the appsrc/appsink.

Also, we now only initialise either the encoding or the decoding
pipeline and not both. The codec init API already gets passed the
for_encoding flag. We pass and use the same to codec specific init
functions.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/440>
2021-01-19 13:43:42 +05:30
Sanchayan Maity
ed44fa1856 bluetooth: Register an endpoint according to encode or decode support
As we now support codecs other than SBC, we might have codec which does
not have an encode or a decode capability. Specifically, in the case of
LDAC there isn't a known decoder implementation available. For such a
case, we should not register the corresponding endpoint.

In case of LDAC, as decoding cannot be supported, we should not register
a sink endpoint or vice versa in the other scenario.

To do this, we check if encode_buffer or decode_buffer entry for a codec
has been set in pa_a2dp_codec and accordingly prevent or allow it's
registration.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/440>
2021-01-19 13:43:42 +05:30
Igor V. Kovalenko
366bd5615c bluetooth: Make GStreamer threads realtime
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/440>
2021-01-19 13:43:42 +05:30
Sanchayan Maity
8289bdb76d bluetooth: Prevent registration of an unavailable codec at runtime
When it comes to codecs provided via GStreamer, we register all codecs
if GStreamer option is enabled for bluez5 via meson. However, the
GStreamer plugin required for the codec might not be present on the
system. This results in the codec being available for registration with
the bluez stack or selection by the user, but, trying to use the said
codec then fails.

To prevent the above, we now use the can_be_supported codec API to check
if the codec is usable and if not, we do not register the said codec and
also prevent users from switching to it.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/440>
2021-01-19 13:43:42 +05:30
Sanchayan Maity
d61493640e bluetooth: Introduce a can_be_supported API for A2DP codecs
This API internally checks if a requested codec can be supported on the
system. This is especially required for codecs supported via GStreamer
where the availability of a plugin decides if the said codec can be
supported.

This will be used to prevent registration of a codec which the remote
endpoint device might be able to support, but, PulseAudio can't as the
codec is not available on the system due to the absence of a plugin.
We can also prevent listing or switching to an unavailable codec.

Note that the codec negotiation happens with the bluez stack even before
a device is connected. Because of this, we need to make sure that gst_init
is called before checking for the availability of a plugin. Since
module-bluez5-device gets loaded only after a connection to the device
has been established, doing the gst_init in that or one of the bluetooth
modules is not feasible.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/440>
2021-01-19 13:43:42 +05:30
Sanchayan Maity
6044169763 bluetooth: Add support for getting current active codec
For example, using the following on the command line will return the
current codec for a bluetooth device

pacmd send-message /card/bluez_card.4C_BC_98_80_01_9B/bluez get-codec

where 4C_BC_98_80_01_9B is the bluetooth device.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/440>
2021-01-19 13:43:42 +05:30
Sanchayan Maity
4ce996b74a bluetooth: Add currently active codec name to card/sink/source proplist
This exposes the currently active codec on the source or sink via the
proplist and can be seen in output of pacmd list-sinks/list-sources.
Also set it on the card. In case of a bi-directional codec, the codec
for the sink and source could be different. For example, for aptX-LL,
the codec name on card, sink and source would be aptx-ll, aptx and sbc
respectively.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/440>
2021-01-19 13:43:42 +05:30
Sanchayan Maity
2fea838e50 bluetooth: Add support for getting list of negotiated codecs
For example, using the following on the command line will return the
list of possible codecs for a bluetooth device

pacmd send-message /card/bluez_card.4C_BC_98_80_01_9B/bluez list-codecs

where 4C_BC_98_80_01_9B is the bluetooth device.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/440>
2021-01-19 13:43:42 +05:30
Sanchayan Maity
3377964889 bluetooth: Add aptX support via GStreamer
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/440>
2021-01-19 13:43:42 +05:30
Sanchayan Maity
ef4762a416 bluetooth: Add LDAC support via GStreamer
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/440>
2021-01-19 13:43:42 +05:30
Sanchayan Maity
a407e9aafa bluetooth: Add a generic GStreamer codec module
This adds a generic gstreamer codec module based on which other
bluetooth codecs viz. aptX, aptX-HD, LDAC and AAC can be supported.

The GStreamer codec plugins used here themselves depend on the native
codec implementation.

aptX/aptX-HD -> libopenaptx
LDAC         -> libldac
AAC          -> Fraunhofer FDK AAC

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/440>
2021-01-19 13:43:42 +05:30
Sanchayan Maity
3447335da9 bluetooth: Support A2DP codec switching via messaging API
This uses the messaging API to initiate a codec switch.

While a particular codec might be applicable only for a particular
profile, for eg. aptX can only be applicable for A2DP sink or source
and not for let's say HSP, the codec switching logic has not been
tied to the logic for switching profiles.

Codec can be switched by running the following on the command line.

pacmd send-message /card/bluez_card.XX_XX_XX_XX_XX_XX/bluez switch-codec{"ldac_hq"}
pacmd send-message /card/bluez_card.XX_XX_XX_XX_XX_XX/bluez switch-codec {"ldac_mq"}
pacmd send-message /card/bluez_card.XX_XX_XX_XX_XX_XX/bluez switch-codec {"ldac_sq"}
pacmd send-message /card/bluez_card.XX_XX_XX_XX_XX_XX/bluez switch-codec {"aptx_hd"}
pacmd send-message /card/bluez_card.XX_XX_XX_XX_XX_XX/bluez switch-codec {"aptx"}
pacmd send-message /card/bluez_card.XX_XX_XX_XX_XX_XX/bluez switch-codec {"sbc"}

Codec name passed above is matched against pa_a2dp_codec->name. Note that
the match is case sensitive. XX_XX_XX_XX_XX_XX needs to be substituted with
the actual bluetooth device id.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/440>
2021-01-19 13:43:42 +05:30
Sanchayan Maity
5284b450e7 bluez5-util: Add support for using RegisterApplication D-Bus API
A2DP codec switching needs new version of bluez as older version does not
provide needed org.freedesktop.DBus.ObjectManager and RegisterApplication
DBus APIs. As a preparation for the next step of adding codecs and then
codec switching, add support for using the new API.

Getting list of supported codecs by remote device is supported only by new
version of bluez daemon. If the RegisterApplication API fails, we
fallback to the older RegisterEndpoint API and only register the SBC
codec.

For more information, see
https://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager
https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/media-api.txt

This changeset has been taken from Pali Rohár's A2DP codec patch
series but separated out to only include the D-Bus specific changes.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/440>
2021-01-19 13:43:42 +05:30
Sanchayan Maity
fca6a2fd68 bluetooth: a2dp-codec-util: Use lower index for higher priority
Instead of letting a codec with higher index have higher priority,
just use a lower index for high priority. This allows the for loop
iterating over the codecs to be written in a straightforward manner
and not have to iterate from the end. FWIW Pipewire does the same.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/440>
2021-01-19 13:43:42 +05:30
Igor V. Kovalenko
f7c84b3217 map-file: regenerate
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/461>
2021-01-18 17:57:41 +00:00
Igor V. Kovalenko
353c013780 buildsys: meson: implement update-map-file target
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/461>
2021-01-18 17:57:41 +00:00
Igor V. Kovalenko
4f0f215a13 buildsys: autotools: move map-file to src/pulse
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/461>
2021-01-18 17:57:41 +00:00
Hui Wang
6d41b93cdb switch-on-port-available: checking the off profile when switching profile
If the current active profile is off, it has no sinks and sources, and
if users plug a headset to the audio port, the profile including this
audio port becomes available and should be selected as active profile.

But with the current design, the profile_good_for_output() will return
false because the sources in off profile and target profile doesn't
match.

For example:
(Before users plug headset)
Profiles:
         HiFi (Speaker): Default (sinks: 1, sources: 1, priority: 8100, available: no)
         HiFi (Headphones): Default (sinks: 1, sources: 1, priority: 8200, available: no)
         off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
Active Profile: off

(After users plug headset)
Profiles:
         HiFi (Speaker): Default (sinks: 1, sources: 1, priority: 8100, available: yes)
         HiFi (Headphones): Default (sinks: 1, sources: 1, priority: 8200, available: yes)
         off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
Active Profile: off

Signed-off-by: Hui Wang <hui.wang@canonical.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/354>
2021-01-18 17:51:49 +00:00
Greg V
33c89b6b76 build-sys: meson: only warn about lack of udev on Linux
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/277>
2021-01-18 16:33:53 +00:00
Greg V
379fd67c1c atomic-test: unbreak on FreeBSD (cpuset_t)
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/277>
2021-01-18 16:33:53 +00:00
Greg V
72792db74c module-devd-detect: new module for soundcard hotplug on FreeBSD
Used in addition to module-detect, since devd only provides hotplug events.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/277>
2021-01-18 16:33:53 +00:00
Greg V
0f70a6f519 oss: parse device names correctly on FreeBSD
This fixes devices being named just "/dev/dspN" instead of actual
soundcard names.

Also synchronizes some things like the unsigned type with the
detect module.

Loosely based on patch by lightside <lightside@gmx.com>.

ref: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=245156

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/277>
2021-01-18 16:33:53 +00:00
Greg V
ef8fa7c997 oss: support hot-unplug on FreeBSD
Patch by Hans Petter Selasky <hselasky@FreeBSD.org>

ref: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194727#c27

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/277>
2021-01-18 16:33:53 +00:00
Greg V
a9d1afbefd oss: support 24-bit sample formats
This works perfectly fine and is required for bitperfect mode on
some soundcards, according to Romain Tartière <romain@FreeBSD.org>

ref: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198567#c6

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/277>
2021-01-18 16:33:53 +00:00
Greg V
de2093fcc7 oss: do not fall back to write() mode on FreeBSD
This has been patched out in FreeBSD Ports for ages.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/277>
2021-01-18 16:33:53 +00:00
Greg V
eccffaba26 detect: fix/improve FreeBSD support
Apply patch from FreeBSD Ports.
Thanks to: Koop Mast <kwm@FreeBSD.org>, lightside <lightside@gmx.com>

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/277>
2021-01-18 16:33:53 +00:00
Greg V
f57ceec7a2 util: implement pa_get_binary_name on FreeBSD without procfs requirement
procfs is not mounted by default, sysctl offers a bulletproof way
of requesting this information.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/277>
2021-01-18 16:33:53 +00:00
Greg V
e6560becf1 pulsecore: remove ancient __FreeBSD_version < 600000 code
None of this is relevant in the modern age

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/277>
2021-01-18 16:33:53 +00:00
Greg V
2a06309edd iochannel: support credentials passing on FreeBSD
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/277>
2021-01-18 16:33:53 +00:00
Greg V
e7465e1a9b build-sys: meson: support memfd without SYS_memfd_create (FreeBSD 13)
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/277>
2021-01-18 16:33:53 +00:00
Greg V
51fecacd46 build-sys: meson: add execinfo dependency for FreeBSD
For 'backtrace' and related symbols

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/277>
2021-01-18 16:33:53 +00:00
Greg V
207c4cabde raop: add missing netinet include on FreeBSD
For 'struct sockaddr_in'

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/277>
2021-01-18 16:33:53 +00:00
Greg V
e94c81aef6 padsp: fix build on FreeBSD (use same ioctl signature as glibc)
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/277>
2021-01-18 16:33:53 +00:00
Greg V
3e6ba5b000 build-sys: meson: add missing pthread dependency on alsa tests
For symbol 'pthread_setschedparam'

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/277>
2021-01-18 16:33:53 +00:00
Greg V
6cc1f1d91c build-sys: meson: check for shm_open even if it's in libc (FreeBSD), not librt
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/277>
2021-01-18 16:33:53 +00:00
Greg V
4ff664a3eb build-sys: meson: when libc iconv is used, tell libiconv header to pretend to be libc's iconv
The libiconv header on FreeBSD would be preferred by include path, but
we don't want to link to libiconv, so tell its header to act like
the system header.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/277>
2021-01-18 16:33:52 +00:00
Greg V
42a9254891 build-sys: meson: set HAVE_DLADDR even if it's in libc (FreeBSD), not libdl
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/277>
2021-01-18 16:33:52 +00:00
Tanu Kaskinen
ac7f2d96c7 alsa-mixer: Accept negative max_dB when using decibel fixes
Sometimes decibel fixes are used as a trick to set a maximum hardware
volume, and in these cases max_dB may be negative yet still valid.
Here's an example:
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/292#note_671300

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/447>
2021-01-18 17:40:28 +02:00
Benjamin Valentin
10ac01a206 alsa-mixer: disable has_dB if max_dB is negative
Volume scaling in dB mode is broken if max dB is negative.

I have a Nobsound USB amplifier (1908:2220) that reports a dB range
of -127.07 dB to -128 dB in Alsa.
While this is likely a driver/device bug, in my naive imagination
userspace wouldn't bother too much with the absolute values and just set

	out_dB(percent) = min_dB + (max_dB - min_dB) * percent

However, this is not what PulseAudio is doing, instead max_dB is used
as base_volume with which the desired software volume is multiplied
while min_dB does not seem to be taken into account.

The result is that with this device only a tiny portion of the volume
slider is usable.
Setting it to 97% already reaches min_dB which effectively turns any
(software) audio knob to an on/off switch.

To work around this, simply set the has_dB flag to false if max_dB is
negative.
This falls back to using raw Alsa values (ranging from 0 - 255), now
the settings in pavucontrol perfectly mirror those in alsamixer.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/447>
2021-01-18 17:36:12 +02:00
Carlos Garnacho
4868fcf5f3 daemon: Rely on systemd unit file for X11 plugin initialization
For GNOME X11 sessions, avoid relying on xdg autostart desktop files
to initialize the X11 plugins. This is now handled via a systemd unit
file.

The xdg autostart is still installed, but has been made to instruct
GNOME to skip it with X-GNOME-HiddenUnderSystemd. This is still the
primary way to initialize X11 plugins for other DEs.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/467>
2021-01-18 15:20:19 +00:00
Carlos Garnacho
a155cf8ca5 daemon: Install start-pulseadio-x11 as a Xwayland-session.d script
The scripts in this directory are loaded (in GNOME sessions thus far)
at the time of starting Xwayland for X11 clients (may happen on session
start, or on demand whenever X11 clients are started).

This will ensure the relevant X11 modules are loaded as long as there's
a Xwayland instance, thus X11 clients that might make use of them.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/467>
2021-01-18 15:20:19 +00:00
Carlos Garnacho
877889da60 daemon: Add "stop" argument to start-pulseaudio-x11 script
As contradicting as it sounds, seems better than changing the script
name. This "stop" argument makes it unload all X11 related modules,
as opposed to the default behavior.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/467>
2021-01-18 15:20:19 +00:00
Igor V. Kovalenko
4f821adb55 alsa-mixer: add support for SteelSeries Arctis 9
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/462>
2021-01-18 15:07:50 +00:00
Piotr Drąg
e5988f35ca i18n: Remove src/pulsecore/dllmain.c from POTFILES.in
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/469>
2021-01-17 12:47:01 +00:00
Hui Wang
ab6a714cd1 alsa-card: add dynamic priority bonus base for alsa profiles
After applying the commit 0d50e787 ("alsa-card: improve the profile
availability logic"), we met an new issue. when system selects the
initial profile, the profile off is selected instead of a profile with
a valid output device on it. That is the issue we met:

Profiles:
  HiFi: Default (sinks: 2, sources: 2, priority: 8000, available: no)
  off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
Active Profile: off
Ports:
  [Out] Headphones: Headphones (priority: 300, latency offset: 0 usec, not available)
   Part of profile(s): HiFi
  [Out] Speaker: Speaker (priority: 100, latency offset: 0 usec)
   Part of profile(s): HiFi
...

I know the commit 0d50e787 really fixed something, but we still need
to fix the new issue, to do so, this patch introduces a priority bonus
for alsa profiles and separate the alsa profiles to 3 groups:
group a (will be granted priority bonus dynamically):
a profile has only output ports and at least one port is not unavailable
a profile has only input ports and at least one port is not unavailable
a profile has both input and output ports, and at least one output and
one input ports are not unavailable

group b (will be marked unavailable)
a profile has only output ports and all ports are unavailable
a profile has only input ports and all ports are unavailable
a profile has both output and input ports, and all ports are unavailable

group c
the rest profiles, their priority and availability is not changed.

With this change, the profile HiFi will become avaialbe:yes, and will
not be granted priority bonus if no input port is plugged.

The priority bonus provides a higher priority base to profiles, this
guarantees this patch doesn't break the fix of 0d50e787.

https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/927

Signed-off-by: Hui Wang <hui.wang@canonical.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/355>
2021-01-17 12:28:51 +00:00
Tanu Kaskinen
9c5864c8d5 Update NEWS
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/471>
2021-01-16 20:18:58 +02:00
Arun Raghavan
c8655ac1fd Update NEWS
Add notes for 14.1.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/471>
2021-01-16 20:18:50 +02:00
Tanu Kaskinen
38eb74f66d switch-on-port-available: Pass correct port_pointers to switch_to_port()
The pp variable contains information for the port that became
unavailable, but switch_to_port() needs the information for the port
that we're switching to.

Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1096
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/468>
2021-01-15 18:19:49 +02:00
Patrick Gaskin
613b3ebc2c win32: Fix privlibdir for running on Windows
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/458>
2021-01-13 03:42:24 +00:00
Patrick Gaskin
dd87e9f229 win32: Fix format specifiers for DWORD values
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/458>
2021-01-13 03:42:24 +00:00
Patrick Gaskin
7ac0d90615 win32: Use __MINGW_PRINTF_FORMAT instead of __printf__ for MinGW builds
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/458>
2021-01-13 03:42:24 +00:00
Patrick Gaskin
fc002e4dc6 win32: Fix duplicate definitions in arpa-inet.h, arpa-inet.c, and poll.h
When _WIN32_WINNT >= 0x6000 (Vista), ws2tcpip.h provides inet_ntop and
inet_pton, and winsock2.h provides the equivalent of poll.h.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/458>
2021-01-13 03:42:24 +00:00
Patrick Gaskin
0edcf725bc win32: Fix WSAStartup issues
WSAStartup was not being called for pacat and pactl built with meson,
causing them to fail in pa_mainloop_new with "cannot create wakeup
pipe". This issue also affects other applications linking to libpulse
other than the pulseaudio daemon, which calls WSAStartup itself.

When built with autotools, WSAStartup would have been called in
DllMain, which is recommended against by the documentation [1].

To fix these issues, the WSAStartup/WSACleanup calls can be moved
into pa_mainloop_new/pa_mainloop_free.

[1] https://docs.microsoft.com/en-us/windows/win32/api/winsock/nf-winsock-wsastartup

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/456>
2021-01-13 03:16:06 +00:00
Patrick Gaskin
fa0d30eee1 client: Make auto_connect_localhost respect HAVE_IPv6 and OS_IS_WIN32
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/455>
2021-01-13 03:10:02 +00:00
Patrick Gaskin
eb1297f124 waveout: Fix compile warnings
* Include pulse/util.h for pa_thread_make_realtime.
* Explicitly cast HWAVEOUT to UINT_PTR for waveOutGetDevCaps.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/457>
2021-01-13 03:03:58 +00:00
Arun Raghavan
7fc021f5d0 Update NEWS
Missed this in the 14.0 release.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/465>
2021-01-12 21:36:25 -05:00
Tanu Kaskinen
cded972022 i18n: Update pulseaudio.pot
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/463>
2021-01-11 21:25:08 +02:00
Tobias Weise
7797a603e6 Translated using Weblate (German)
Currently translated at 100.0% (526 of 526 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/de/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/463>
2021-01-11 21:19:27 +02:00
Jan Kuparinen
0a3f4d36d6 Translated using Weblate (Finnish)
Currently translated at 94.9% (471 of 496 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/fi/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/463>
2021-01-11 21:19:27 +02:00
Julien Humbert
f1589c08e5 Translated using Weblate (French)
Currently translated at 100.0% (517 of 517 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/fr/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/463>
2021-01-11 21:19:27 +02:00
Fabian Affolter
5d42d861e3 Translated using Weblate (German)
Currently translated at 100.0% (526 of 526 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/de/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/463>
2021-01-11 21:19:27 +02:00
Patrick Gaskin
b1bdd27a6c cli: Fix crash when using .include with an empty directory
This would previously fail the size > 0 assertion in pa_xmalloc.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/454>
2021-01-08 00:03:52 +00:00
Igor V. Kovalenko
c2ae56a73c database: clean up remaining references to CANONICAL_HOST
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/425>
2021-01-07 23:27:16 +00:00
Igor V. Kovalenko
7115023c51 database: pick old database file from any arch
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/425>
2021-01-07 23:27:16 +00:00
Igor V. Kovalenko
4ca8997aa0 database: drop arch from newly created database file name
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/425>
2021-01-07 23:27:16 +00:00
Igor V. Kovalenko
ae9d0cf307 database: use existing database matching same architecture prefix
State database binary file format may depend on system architecture,
for instance gdbm binary format depends on architecture word size,
making x86 and x64 gdbm files incompatible.

If this is the case, it is handled by adding system architecture name to
database file name using automatically configured CANONICAL_HOST string.
Meson build define CANONICAL_HOST to be system architecture name, while
autotools build extends this with vendor and and operating system components.

Switch autotools build to use host_cpu for CANONICAL_HOST to match Meson
configuration. For backwards compatibility always use existing database file
matching CANONICAL_HOST prefix if it exists.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/425>
2021-01-07 23:27:16 +00:00
Igor V. Kovalenko
0ac6b16787 database: extract common method to handle machine id and architecture
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/425>
2021-01-07 23:27:16 +00:00
Georg Chini
0efae0488c loopback: Fix sink latency calculation if source is alsa source with fixed latency
When an alsa source with fixed latency is used, the actual latency of the source
will only be one fragment size. This is not taken into account when the required
sink latency is calculated.

This patch fixes the issue.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/451>
2021-01-04 20:16:52 +00:00
Igor V. Kovalenko
f18f55bb5e daemon: fix default daemon.conf when running from build tree
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/446>
2021-01-04 16:11:04 +00:00
Igor V. Kovalenko
6bfd9c809e x11: gracefully handle ICE connection error
Implementation is largely inspired by GNOME/mutter ICE session handling.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/441>
2021-01-04 15:59:22 +00:00
Igor V. Kovalenko
b6396dbe9c x11: gracefully handle X11 connection error
Perform X11 connection recovery via XSetIOErrorExitHandler mechanism.

Implementation is largely inspired by this change to GNOME/mutter
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1447

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/441>
2021-01-04 15:59:22 +00:00
Arun Raghavan
28f646fd87 doc: Add some contributor guidelines
Document some things that should be helpful to at least new
contributors. Since we don't have a way to show this when people are
creating MRs, also copy over the next to a merge request template so
that creates a dropdown that folks might look at when creating an MR.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/444>
2021-01-04 15:30:38 +00:00
Igor V. Kovalenko
b76d835e59 ladspa-sink: do not call pa_sink_suspend if PA_SINK_IS_LINKED is false
While module-ladspa-sink is still being loaded and before pa_sink_put() is
called there may be an attempt to reconfigure master sink when avoid-resampling
is true. This breaks attempting to suspend ladspa-sink which is still in INIT
state.

Fix this by skipping pa_sink_suspend if PA_SINK_IS_LINKED is false.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/445>
2021-01-04 12:19:07 +00:00
Georg Chini
81ebd8ba3f message-params: Fix array reading functions
The array read functions need the state pointer as an additional argument because the
array may be in the middle of a parameter list and the state pointer must be advanced
to the element after the array.

Additionally fixes some compiler warnings.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/450>
2021-01-01 20:43:07 +00:00
Tanu Kaskinen
21a531041a alsa-mixer: Add support for the Headphone,1 element
This is seen at least on HP EliteDesk 800 DM and HP EliteDesk 800 SFF.

This is used by the analog-output-headphones-2 path, but all other paths
on the same sink need to handle the element too. The existing
configuration is inconsistent between files regarding whether headphone
outputs should be muted or not when not using them. I chose to be
consistent within files, which means that Headphone,1 handling is
inconsistent between files in the same way that the existing Headphone
and Headphone2 handling is. (My opinion is that unused paths should be
always muted, but I didn't want to do that policy change in this patch.)

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/272>
2020-12-30 15:49:09 +00:00
Tanu Kaskinen
0c14f89b84 alsa-mixer: Move HP EliteDesk 800 SFF/DM second headphone output to path analog-output-headphones-2
The two headphone outputs should be handled in separate paths so that
volume control can be implemented properly for both outputs.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/272>
2020-12-30 15:49:09 +00:00
Tanu Kaskinen
d51870d4f0 alsa-mixer: Use unambiguous descriptions with dual headphone outputs
Previously both paths had description "Headphones", which I assume can
cause confusion with users who see two ports with identical names. I
don't have this kind of hardware myself nor have I heard complaints from
users, this is just something I noticed while reading the configuration
files.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/272>
2020-12-30 15:49:09 +00:00
Kai-Heng Feng
2a0fa78d18 alsa-mixer: Support dual Front Headphone Jack
There are dual Front Headphone Jacks with different indices or with
different names, they can be found on HP EliteDesk 800 SFF and HP
EliteDesk 800 DM, respectively.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/272>
2020-12-30 15:49:09 +00:00
Kai-Heng Feng
aad2fca0c9 alsa-mixer: Handle the index for ALSA mixer jack identifiers
Some systems have two jacks with same name but different index, we need
to take index into consideration to use both jacks.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/272>
2020-12-30 15:49:09 +00:00
Igor V. Kovalenko
3ecea410d7 context: add property to forcefully disable shared memory channels
If application wants last bits of virtual memory, allow it to forcefully disable
shared memory communication channels via PA_PROP_CONTEXT_FORCE_DISABLE_SHM=yes

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/448>
2020-12-30 08:35:03 +00:00
Igor V. Kovalenko
4874f8a607 bluetooth: align max renderable block size to frame size
When bluez5 device I/O thread detects it is too slow sending data, allow it to
skip up to max rendered block size bytes which must be aligned to frame size.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/449>
2020-12-30 01:18:41 +03:00
morrishoresh
dd7593b836 bluetooth: correct possible segmentation fault
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/443>
2020-12-25 10:36:02 -05:00
Hui Wang
8f6029077a switch-on-port-available: Switch to headset or mic on unknown avail
On some Dell AIO machines, there is no internal mic, only a multi
function audio jack, so the only input devices are headphone-mic and
headset-mic, and they share the Jack with headphone.

When there is no headset plugged in that Jack, the headphone-mic
and headset-mic are off. And since there is no available port under
the analog input source, this source is unlinked (if there is
internal mic, the source will not be unlinked). so the only pa-source
left in the PA is analog-stereo-monitor.

After the headset is plugged, we need to let switch_to_port() handle
headset-mic and headphone-mic conditionally, this will guarantee the
source will be created if it is unlinked before plugging, and then the
input profile could be selected correctly.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/390>
2020-12-22 13:50:01 +00:00
Jaroslav Kysela
b530aa4681 alsa: mixer - add support up 8 mixer channels
We have at least one USB hardware which supports the 8
channels in one mixer element:

  https://github.com/alsa-project/alsa-ucm-conf/pull/25

POSITION_MASK_CHANNELS define was added for the future extensions.

The override_map variable was changed from bool to mask (unsigned int).
The channel map override settings is handled for channels up to eight now.

Also added missing override-map.3 .. override-map.8 to the configuration
parser array.

The driver channel position was added to the override mask arguments
(syntax is driver:pulseaudio like left:all-left). If ommited, the ALSA's
channel positions are guessed by index.

Link: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/292

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/389>
2020-12-21 17:41:37 +00:00
Jaroslav Kysela
e67af95830 alsa: mixer - use safe dB range values when the override mask is unset
Use safe values for the min_dB and max_dB fields when the position mask
is unset to avoid breakage for the upper levels.

If the range is incorrect, the volume range shown in pavucontrol shows
strange values.

(Thanks to Wim Taymans for the idea.)

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/389>
2020-12-21 17:41:37 +00:00
David
ee1391860f Capitalize jack in module-jack-sink.c
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/439>
2020-12-20 11:35:30 +00:00
David
e4e507802c Capitalize jack in module-jack-source.c
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/439>
2020-12-20 11:32:02 +00:00
Edward Lee
b892e327a9 win32: Fix meson build system for Windows.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/360>
2020-12-16 11:05:28 -05:00
Edward Lee
7bc559fe26 win32: Change linkage of lt_preloaded_symbols to match definition in libtool in daemon/main.c.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/360>
2020-12-16 11:05:28 -05:00
Edward Lee
3c51930b61 win32: Add support for Unix sockets in autoconf build.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/360>
2020-12-16 11:05:28 -05:00
Edward Lee
4b3cc2df8d win32: (Temporarily) Add sockaddr_un definition from <afunix.h>
This is a temporary addition, until <afunix.h> ships with the
MinGW toolchain.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/360>
2020-12-16 11:05:28 -05:00
Edward Lee
4e5786ffdd win32: Check WSAGetLastError() in pa_is_unix_socket_stale.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/360>
2020-12-16 11:05:28 -05:00
Edward Lee
68cb06b5fd win32: Fix (interim) esound paths in module-protocol-stub.c
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/360>
2020-12-16 11:05:28 -05:00
Edward Lee
9c774c6295 win32: Handle (WSA)EWOULDBLOCK as EAGAIN.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/360>
2020-12-16 11:05:28 -05:00
Sebastian Krzyszkowiak
4552fe15b3 filter-apply: Look for filter parameters also in device properties
Some filters take parameters that effectively describe the hardware
they're being applied to (like echo-cancel allowing to specify the
mic array parameters for better noise filtering). This allows system
integrators to set default parameters for such modules per-device,
which will get used when the stream doesn't specify their own.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/400>
2020-12-14 21:01:16 +00:00
Tanu Kaskinen
c0779b28b8 sink: Increase JACK device priority
The JACK sink and source priority was 0, but I believe the common case
is that when a JACK sink or source is loaded, the user wants to make it
the default device.

Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/983
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/369>
2020-12-14 20:55:10 +00:00
Igor V. Kovalenko
d285b00a16 build-sys: meson: change oss-output boolean to Meson feature
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/437>
2020-12-14 19:48:06 +00:00
Tanu Kaskinen
e3f2c25fac alsa-mixer: Pick at most one fallback mapping
The old behaviour was such that if none of the normal mappings worked,
we would probe ALL fallbacks. I don't think that makes sense, and it
caused concrete issues: let's say we have a regular stereo mic device,
but there's no "front" PCM defined for it. In this situation we would
probe the stereo-fallback mapping (which uses "hw" instead of "front"),
and it would work, but then we'd also probe the "multichannel-input"
mapping, which would also work, so we end up with two mappings that
don't have any difference in behaviour.

I think it's better to simply pick the first working fallback and ignore
the rest.

Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/901
(issue is marked as confidential due to unreleased hardware)

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/304>
2020-12-14 19:31:28 +00:00
SimonP
9b0ae8327d alsa-mixer: Respect XDG base directory spec when loading path configs
Try $XDG_DATA_HOME, then $XDG_DATA_DIRS, and finally fall back to old
behaviour (prefix-defined directory).

core-util: Ignore non-absolute XDG base dirs

These are invalid per the spec.

Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/862
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/293>
2020-12-14 19:25:12 +00:00
Samuel Thibault
cb91d7a12e alsa-sink: increase watermark when there is nothing to rewind
If we do not manage to rewind at all because there is nothing to rewind
any more, it means the latency is too small, and we let audio escape our
control. We should thus increase the watermark to fix this.

Fixes #871

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/287>
2020-12-14 19:18:25 +00:00
Igor V. Kovalenko
d15b31d751 module-alsa-card: handle udev PULSE_MODARGS
Allow adding module arguments using udev PULSE_MODARGS environment variable and
fail module loading if there is a problem with PULSE_MODARGS

This helps setting e.g. 'tsched=0' for specific devices without a need to create
full load module entry in default.pa.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/436>
2020-12-14 15:12:31 +03:00
Hui Wang
19e34d8d5b alsa-mixer: disable the Auto-Mute once the system has speaker
With the Auto-Mute enabled, if the headphone jack is plugged, the
alsa hda driver will mute the speaker and set pinctl of the speaker
to Hi-Z state, after this happens, even the pulseaudio unmute the
speaker, the speaker still couldn't output sound because the pinctl
is in Hi-Z state.

We found this issue on a Dell machine which has multi-function audio
jack, after the headphone is plugged in, the speaker's availability is
still unknown, users could select speaker from gnome-sound-setting,
but even the speaker is selected to be the active device, it couldn't
output sound.

The Auto-Mute is not useful if the pulseaudio is running since pa
could mute/unmute devices according to active port change, the ucm
for sof+hda already disabled the Auto-Mute, let us disable it for
hda audio if the machine has the internal speaker.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/433>
2020-12-10 17:01:19 +00:00
Mattias Jernberg
836ba89c4a alsa-mixer: Enable volume control of SteelSeries Arctis stereo output
Since there is now support for specifying the index of an Element, add the
same config as is used for the output-mono variant, as they behave the same:
One volume control with no support for adjustments to the left and right
channels.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/274>
2020-12-10 16:54:59 +00:00
Tanu Kaskinen
6b04e2a89e sink: Reduce chat sink priority
Some gaming sound cards have custom profiles with analog-game and
analog-chat mappings that exist simultaneously. The game sink should
have higher priority than the chat sink, but currently there's no way to
affect the sink priorities from the profile-set configuration (the
mapping priority is not propagated to the sink priority).

I first thought about adding the mapping priority to the sink priority,
but that could mess up the prioritization system in
pa_device_init_priority(). I ended up checking for the intended roles
property to reduce the chat sink priority. I also reduced the iec958
priority so that the chat and iec958 sinks don't end up with the same
priority.

Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/818
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/266>
2020-12-10 16:43:17 +00:00
Tanu Kaskinen
3afb7f8c08 pstream: Log "Cannot send block reference..." only once per pstream
Despite the ratelimiting, this error gets logged too much.

I fixed a typo (Fallig -> Falling) while at it.

Related: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/824
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/265>
2020-12-10 16:31:13 +00:00
Patrick McLean
7ec6ee4725 alsa-mixer: add support for Sennheiser GSX 1000 gaming DAC
This same profile should also work for the GSX 1200, but I don't know the USB id
for that.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/257>
2020-12-09 16:51:16 +00:00
Pierre Ossman
a8cb4edf75 tunnel-sink-new: log buffer events
Aids in tracking down exactly where in the chain underruns are
happening.

Signed-off-by: Pierre Ossman <ossman@cendio.se>
2020-12-09 11:54:37 +00:00
Tanu Kaskinen
dc79f304dd build-sys: Add an option for enabling/disabling Valgrind
In OpenEmbedded the PulseAudio recipe currently disables Valgrind
support by passing "ac_cv_header_valgrind_memcheck_h=no" to the
configure script (this was added to make it deterministic whether
Valgrdind support gets enabled or not). I'm converting the PulseAudio
recipe to use Meson, and I needed an option to disable Valgrind.
2020-12-09 11:07:09 +00:00
Tanu Kaskinen
e43ca00d52 module: Check version before loading a module
Since there's no stable API for modules, all modules need to be compiled
together with the server. This version check tries to ensure that if
a version mismatch happens, there will be an informative error message
rather than a random crash.
2020-12-09 10:34:49 +00:00
Frédéric Danis
05f3e8bf9a core, modules: Remove useless EINTR tests
Since commit ad447d1468 (in 2009) pa_read and pa_write take care of
handling EINTR error.
So, pa_read, pa_write, pa_iochannel_read and pa_iochannel_write can not
exit with errno set to EINTR, and testing it is useless.
2020-12-09 10:28:15 +00:00
Ben Buchwald
8342c12339 jackdbus-detect: Passthrough more arguments to sink and source
module-jackdbus-detect now accepts sink_name, sink_properties,
sink_client_name, sink_channel_map, source_name, source_properties,
source_client_name, and source_channel_map arguments that will be passed
through to module-jack-source and module-jack-sink (without the sink and
source prefixes, except where needed).
2020-12-09 08:43:24 +00:00
Jaechul Lee
a17d00c3d2 null-source: Fix max_latency_msec argument is not changed
This module uses 2 seconds for default max latency. If max_latency_msec
is set, max_latency value will be changed.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/431>
2020-12-09 03:17:28 +00:00
Tanu Kaskinen
6bf178d794 i18n: Update pulseaudio.pot
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/432>
2020-12-08 13:52:39 +02:00
Dusan Kazik
bbac2e6e2b Translated using Weblate (Slovak)
Currently translated at 76.0% (400 of 526 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/sk/
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/432>
2020-12-08 13:50:59 +02:00
Sanchayan Maity
ea69288b76 module-match: Allow loading module more than once
As long as modules use different keys, multiple loading of this module
should be safe. Even in case of same keys, either the pa_proplist_update
should correctly update the property list based on the mode or for the
volume writable case, the last rule should win.

Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/942
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/332>
2020-12-07 21:38:05 +05:30
Laurențiu Nicola
71aa4720a4 alsa-mixer: Add OnePlus Bullets udev rule 2020-12-07 14:06:01 +02:00
Jason Nader
afc1a0e45b man: clarify pactl command arguments 2020-12-07 11:47:56 +00:00
Jaechul Lee
bd8ef73b91 null-source: Add max_latency_msec argument
It takes much time when starting to capture because max latency is set
to 2 seconds as a initial value. null-source latency need to be set a
lower value than initial value to improve latency.
2020-12-07 13:37:53 +02:00
Igor V. Kovalenko
c1ac76014e message-params: consume array enclosing {} by array read methods
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/51>
2020-12-03 14:41:39 +00:00
Igor V. Kovalenko
818a87deb2 message-params: add read length param reference to array read methods
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/51>
2020-12-03 14:41:39 +00:00
Tanu Kaskinen
fe162e0bbd core-util-test: Test pa_atou64() and pa_atoi64()
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/51>
2020-12-03 14:41:39 +00:00
Tanu Kaskinen
ef5a2f1554 core-util-test: Drop "modargs" from test function names
These tests aren't directly related to modargs. I suppose these were
first written for the modargs.h API and renaming was forgotten.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/51>
2020-12-03 14:41:39 +00:00
Tanu Kaskinen
b76964e480 core-util-test: Test parsing integer strings with leading zeros
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/51>
2020-12-03 14:41:39 +00:00
Tanu Kaskinen
6bc00720f3 core-util: Never parse integers as octal
I believe nobody needs to pass octal numbers to PulseAudio, and if we
encounter integer strings starting with zeros, the intention is to use
them in base 10. Hexadecimal numbers are more common, and they can't be
interpreted in base 10 anyway, so they are still supported.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/51>
2020-12-03 14:41:39 +00:00
Tanu Kaskinen
d50145a916 core-util: Reduce repetition in number parsing functions
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/51>
2020-12-03 14:41:39 +00:00
Tanu Kaskinen
5d022a07a6 introspect: Add version check to pa_context_send_message_to_object()
If an application calls the function when the server doesn't support the
feature, the result should be just an error from the function. Without
the check the whole connection gets terminated due to protocol error.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/51>
2020-12-03 14:41:39 +00:00
Tanu Kaskinen
6722b2d8c4 core-util: Make range checks easier to read
It wasn't immediately obvious to me what these checks are supposed to
do. Explicitly checking against the min/max values should make the code
easier to understand.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/51>
2020-12-03 14:41:39 +00:00
Georg Chini
ff64defc13 message-params: Add read functions for arrays
The following new functions have been added:

pa_message_params_read_double_array() - read an array of double from list
pa_message_params_read_int64_array() - read an array of int64 from list
pa_message_params_read_uint64_array() - read an array of uint64 from list
pa_message_params_read_string_array() - read an array of strings from list

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/51>
2020-12-03 14:41:39 +00:00
Georg Chini
8140932afd message-params: Add read/write functions for various simple data types
The following functions have been added:

pa_message_params_write_double() - writes a double to a pa_message_params structure
pa_message_params_write_int64() - writes an integer to a pa_message_params structure
pa_message_params_write_uint64() - writes an unsigned to a pa_message_params structure
pa_message_params_write_bool() - writes a boolean to a pa_message_params structure

pa_message_params_read_double() - read a double from a parameter list
pa_message_params_read_int64() - read an integer from a parameter list
pa_message_params_read_uint64() - read an unsigned from a parameter list
pa_message_params_read_bool() - read a boolean from a parameter list

The patch also improves the doxygen documentation im message-params.h

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/51>
2020-12-03 14:41:39 +00:00
Georg Chini
ca66388608 core-util: Add pa_atoi64() and pa_atou64() functions
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/51>
2020-12-03 14:41:39 +00:00
Georg Chini
590fd1ca69 message-params: Allow parameter strings to contain escaped curly braces
The patch adds the possibility to escape curly braces within parameter strings
and introduces several new functions that can be used for writing parameters.

For writing, the structure pa_message_params, which is a wrapper for pa_strbuf
has been created. Following new write functions are available:

pa_message_params_new() - creates a new pa_message_params structure
pa_message_params_free() - frees a pa_message_params structure
pa_message_param_to_string_free() - converts a pa_message_param to string and
frees the structure
pa_message_params_begin_list() - starts a list
pa_message_params_end_list() - ends a list
pa_message_params_write_string() - writes a string to a pa_message_params structure
pa_message_params_write_raw() - writes a raw string to a pa_message_params structure

For string parameters that contain curly braces or backslashes, those characters
will be escaped when using pa_message_params_write_string(), while write_raw() will
put the string into the buffer without any changes.

For reading, pa_message_params_read_string() reverts the changes that
pa_message_params_write_string() might have introduced.

The patch also adds more restrictions on the object path name. Now only
alphanumeric characters and one of "_", ".", "-" and "/" are allowed.
The path name may not end with a / or contain a double slash. If the user
specifies a trailing / when sending a message, it will be silently removed.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/51>
2020-12-03 14:41:39 +00:00
Georg Chini
4a28b164d1 pactl: Implement list message-handlers
For better readability, "pactl list message-handlers" is introduced which
prints a formatted output of "pactl send-message /core list-handlers".

The patch also adds the functions pa_message_params_read_raw() and
pa_message_params_read_string() for easy parsing of the message response
string. Because the functions need to modify the parameter string,
the message handler and the pa_context_string_callback function now
receive a char* instead of a const char* as parameter argument.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/51>
2020-12-03 14:41:39 +00:00
Georg Chini
5c0ab52145 core: add message handler
This patch adds a small message handler to the core which enables
clients to list available handlers via the list-handlers message.
Command: pacmd send-message /core list-handlers
pactl can be used with the same parameters.

The patch also introduces a convention for the return string.
It consists of a list of elements where curly braces are used
to separate elements. Each element can itself contain further
elements. For example consider a message that returns multiple
elements which each contain an integer and an array of float.
A response string would look like that:
{{Integer} {{1st float} {2nd float} ...}}{...}

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/51>
2020-12-03 14:41:39 +00:00
Georg Chini
68f2f1395d pactl, pacmd, cli-command: Add send-message command
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/51>
2020-12-03 14:41:39 +00:00
Georg Chini
4cdc0053c0 protocol-native: add message sending capability
This patch adds the PA_COMMAND_SEND_OBJECT_MESSAGE command to protocol-native
so that clients can use the messaging feature introduced in the previous patch.

Sending messages can in effect replace the extension system for modules. The
approach is more flexible than the extension interface because a generic string
format is used to exchange information. Furthermore the messaging system can be
used for any object, not only for modules, and is easier to implement than
extensions.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/51>
2020-12-03 14:41:39 +00:00
Igor V. Kovalenko
cb3d12377c build-sys: meson: use target_machine.cpu_family() for CANONICAL_HOST
target_machine provides information about the machine on which the compiled
binary's output will run.

cpu_family() returns CPU family name (such as x86_64, not more specific amd64)

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/426>
2020-11-30 13:40:04 +03:00
Igor V. Kovalenko
ecd597995a build-sys: meson: add oss-output option for OSS output support
Restore an option to disable OSS output available with autotools.
2020-11-28 00:34:49 +03:00
Jaechul Lee
1e7adb4fdb null-sink: Change block size to 50 msec when norewinds is set
playing sound through null sink takes almost 2 seconds at first time
playback when norewinds is set. Because block_usec is set 2 seconds at
initializing time. The value will be changed 50 msec after calling
update_request_latency callback.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/406>
2020-11-27 17:15:02 +00:00
Igor V. Kovalenko
0fc54f9e7a pa-info: look for alsa-info.sh in /usr/sbin as well
At least Gentoo and OpenSUSE install alsa-info.sh in /usr/sbin, look there too.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/422>
2020-11-26 17:28:46 +03:00
Laurent Bigonville
b8c656b664 tests: Fix incompatible pointer type on Debian kfreebsd
Debian kfreebsd uses the GNU libc that uses cpu_set_t instead of cpuset_t

Also do not include unnecessary headers on this platform

Fixes: #851
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/356>
2020-11-25 14:54:49 +00:00
Christopher Snowhill
00bd8e1ef8 virtual-surround-sink: Use FFTW3 instead of naive approach
This replaces the original virtual surround sink with a total
rewrite, aiming to implement any number of hrir use cases,
including asymmetrical impulses as two separate left and right
output files. It uses FFTW3 FFT convolution, using the overlap-
save method, with full rewind support. It operates in steps
equal to the resampled length of the hrir, and overlaps input
blocks in increments equal to the size of the FFT block. If
using paired hrirs, it requires matched sample spec and sample
rates and channel maps. For best results, the input files should
have speaker maps, rather than expecting the sample loader to
auto detect the mapping.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/240>
2020-11-24 03:56:02 +00:00
Arun Raghavan
5f3717f39c mutex-posix: Fix error assignment for unlock() check
This comment was missed in 757eb26448.
2020-11-23 22:45:42 +00:00
Tanu Kaskinen
a73ec2a3f4 alsa-mixer: Expand comments in the HP Thunderbolt Dock configuration 2020-11-23 17:35:03 -05:00
Kai-Heng Feng
05c373d939 alsa-mixer: Add support for HP Thunderbolt Dock
The HP Thunderbolt Dock [1] has two separate USB cards, a headset jack
and an optional module which is a speakerphone.

This patch adds new description for them, and mark the intended-roles as
phone for the speakerphone module.

[1] https://store.hp.com/us/en/pdp/hp-thunderbolt-dock-120w-g2-with-audio
2020-11-23 17:35:01 -05:00
Nazar Mokrynskyi
69ba5a2b58 alsa-mixer: add mono input support for Behringer UMC22 2020-11-23 22:27:36 +00:00
Sanchayan Maity
45abd0b43c Add default.pa.d folder support
The .include meta command already supports specifying a directory and
when including a directory, all files with the extension '.pa' in that
directory will be parsed in alphabetical order.

This feature can be used to add support for default.pa.d directory, so
that packages for other applications or users can just drop in a file
for configuration without changing the default.pa which is shipped.

We use the PA_DEFAULT_CONFIG_DIR for this, however, since meson quotes
this build variable, introduce an unquoted version for this purpose and
use it with .include.

Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/909

Signed-off-by: Sanchayan Maity <sanchayan@asymptotic.io>
2020-11-23 22:07:36 +00:00
Tanu Kaskinen
a28f2e7293 alsa-mixer: Add support for the Center/LFE element
We already supported the CLFE element, which should be semantically
equivalent, so I just copied all the CLFE element definitions.

The Center/LFE element is seen on Creative X-Fi with 20K1 chipset cards.

Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/978
2020-11-23 21:44:00 +00:00
Tanu Kaskinen
d5d0803591 main: set LC_NUMERIC to C
The webrtc backend of module-echo-cancel uses sscanf() to parse floating
point numbers from module arguments, which didn't work when the locale
used a comma for the decimal point. Setting the LC_NUMERIC locale
variable to C makes the pulseaudio process use a period as the decimal
point regardless of the user's locale configuration.

Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/89
2020-11-23 21:37:57 +00:00
Tanu Kaskinen
757eb26448 mutex-posix: Log pthread_mutex_unlock() error
This call has been seen failing on FreeBSD, and it's difficult to debug
without seeing which error the function returned.

Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/988
2020-11-23 21:25:23 +00:00
Tanu Kaskinen
093dd2f181 raop-sink: Don't set device.intended_roles=music
If there are RAOP devices in the network, it doesn't necessarily mean
that the user wants to play music to them.

Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/993
2020-11-23 19:11:31 +00:00
Arun Raghavan
9055f5baf3 stream-restore,device-restore: Avoid unaligned access
Newer GCC warns us that the channel_map and volume in legacy entries are
accessed via pointers, and these might be unaligned as the legacy entry
is a packed structure. For this reason, we read out those values into
local variables before accessing them as pointers.

The warnings are:

[146/433] Compiling C object src/modules/module-device-restore.so.p/module-device-restore.c.o
../src/modules/module-device-restore.c: In function ‘legacy_entry_read’:
../src/modules/module-device-restore.c:554:51: warning: taking address of packed member of ‘struct legacy_entry’ may result in an unaligned pointer value [-Waddress-of-packed-member]
  554 |     if (le->volume_valid && !pa_channel_map_valid(&le->channel_map)) {
      |                                                   ^~~~~~~~~~~~~~~~
../src/modules/module-device-restore.c:559:48: warning: taking address of packed member of ‘struct legacy_entry’ may result in an unaligned pointer value [-Waddress-of-packed-member]
  559 |     if (le->volume_valid && (!pa_cvolume_valid(&le->volume) || !pa_cvolume_compatible_with_channel_map(&le->volume, &le->channel_map))) {
      |                                                ^~~~~~~~~~~
../src/modules/module-device-restore.c:559:104: warning: taking address of packed member of ‘struct legacy_entry’ may result in an unaligned pointer value [-Waddress-of-packed-member]
  559 |     if (le->volume_valid && (!pa_cvolume_valid(&le->volume) || !pa_cvolume_compatible_with_channel_map(&le->volume, &le->channel_map))) {
      |                                                                                                        ^~~~~~~~~~~
../src/modules/module-device-restore.c:559:117: warning: taking address of packed member of ‘struct legacy_entry’ may result in an unaligned pointer value [-Waddress-of-packed-member]
  559 |     if (le->volume_valid && (!pa_cvolume_valid(&le->volume) || !pa_cvolume_compatible_with_channel_map(&le->volume, &le->channel_map))) {
      |                                                                                                                     ^~~~~~~~~~~~~~~~
[211/433] Compiling C object src/modules/module-stream-restore.so.p/module-stream-restore.c.o
../src/modules/module-stream-restore.c: In function ‘legacy_entry_read’:
../src/modules/module-stream-restore.c:1076:51: warning: taking address of packed member of ‘struct legacy_entry’ may result in an unaligned pointer value [-Waddress-of-packed-member]
 1076 |     if (le->volume_valid && !pa_channel_map_valid(&le->channel_map)) {
      |                                                   ^~~~~~~~~~~~~~~~
../src/modules/module-stream-restore.c:1081:48: warning: taking address of packed member of ‘struct legacy_entry’ may result in an unaligned pointer value [-Waddress-of-packed-member]
 1081 |     if (le->volume_valid && (!pa_cvolume_valid(&le->volume) || !pa_cvolume_compatible_with_channel_map(&le->volume, &le->channel_map))) {
      |                                                ^~~~~~~~~~~
../src/modules/module-stream-restore.c:1081:104: warning: taking address of packed member of ‘struct legacy_entry’ may result in an unaligned pointer value [-Waddress-of-packed-member]
 1081 |     if (le->volume_valid && (!pa_cvolume_valid(&le->volume) || !pa_cvolume_compatible_with_channel_map(&le->volume, &le->channel_map))) {
      |                                                                                                        ^~~~~~~~~~~
../src/modules/module-stream-restore.c:1081:117: warning: taking address of packed member of ‘struct legacy_entry’ may result in an unaligned pointer value [-Waddress-of-packed-member]
 1081 |     if (le->volume_valid && (!pa_cvolume_valid(&le->volume) || !pa_cvolume_compatible_with_channel_map(&le->volume, &le->channel_map))) {
      |
2020-11-23 19:02:33 +00:00
Arun Raghavan
c442227c6b glib-mainloop: Drop deprecated g_get_current_time() usage
This uses the year 2038-safe g_get_real_time() as recommended instead.
Bumps GLib dependency to 2.28 as a result.
2020-11-23 19:02:33 +00:00
Arun Raghavan
b546beef21 proplist-util: Drop deprecated G_CONST_RETURN macro
The preference in glib is now to just use the const qualifier directly.
2020-11-23 19:02:33 +00:00
378 changed files with 117094 additions and 65687 deletions

2
.gitignore vendored
View file

@ -26,6 +26,7 @@ cscope.in.out
cscope.po.out
pulse-daemon.log
depcomp
install/
install-sh
libltdl
libtool
@ -36,3 +37,4 @@ stamp-*
.dirstamp
*.orig
*.rej
subprojects/*/

View file

@ -2,13 +2,22 @@
# container and push it to the project's container registry on fd.o GitLab.
# This step is only run when the tag for the container changes, else it is
# effectively a no-op. All of this infrastructure is inherited from the
# wayland/ci-templates repository which is the recommended way to set up CI
# freedesktop/ci-templates repository which is the recommended way to set up CI
# infrastructure on fd.o GitLab.
#
# Once the container stage is done, we move on to the 'build' stage where we
# run an autotools and meson build in parallel. Currently, tests are also run
# as part of the build stage as there doesn't seem to be significant value to
# splitting the stages at the moment.
# run meson build. Currently, tests are also run as part of the build stage as
# there doesn't seem to be significant value to splitting the stages at the
# moment.
# Create merge request pipelines for open merge requests, branch pipelines
# otherwise. This allows MRs for new users to run CI.
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
when: never
- if: $CI_COMMIT_BRANCH
stages:
- container
@ -19,22 +28,21 @@ variables:
# CI runs, for example when adding new packages to FDO_DISTRIBUTION_PACKAGES.
# The tag is an arbitrary string that identifies the exact container
# contents.
FDO_DISTRIBUTION_TAG: '2020-03-07-01'
FDO_DISTRIBUTION_VERSION: '18.04'
FDO_DISTRIBUTION_TAG: '2023-08-13-00'
FDO_DISTRIBUTION_VERSION: '20.04'
FDO_UPSTREAM_REPO: 'pulseaudio/pulseaudio'
UBUNTU_IMAGE: "$CI_REGISTRY_IMAGE/ubuntu/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG"
include:
# We pull templates from master to avoid the overhead of periodically
# scanning for changes upstream. This does means builds might occasionally
# break due to upstream changing things, so if you see unexpected build
# failures, this might be one cause.
- project: 'wayland/ci-templates'
- project: 'freedesktop/ci-templates'
ref: 'master'
file: '/templates/ubuntu.yml'
build-container:
extends: .fdo.container-ifnot-exists@ubuntu
extends: .fdo.container-build@ubuntu
stage: container
variables:
GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image
@ -43,13 +51,12 @@ build-container:
# Otherwise the changes won't have effect since an old container image will
# be used.
FDO_DISTRIBUTION_PACKAGES: >-
autoconf
automake
autopoint
bash-completion
check
curl
dbus-x11
doxygen
g++
gcc
gettext
@ -74,7 +81,6 @@ build-container:
libssl-dev
libsystemd-dev
libtdb-dev
libtool
libudev-dev
libwebrtc-audio-processing-dev
libwrap0-dev
@ -83,47 +89,33 @@ build-container:
libxml-parser-perl
libxml2-utils
libxtst-dev
make
m4
ninja-build
pkg-config
python3-setuptools
systemd
wget
build-autotools:
stage: build
image: $UBUNTU_IMAGE
script:
- export MAKEFLAGS="-j$(nproc)"
- NOCONFIGURE=1 ./bootstrap.sh
- mkdir build
- cd build
- ../configure --localstatedir=/var
- make
- make check
- make check-daemon
- ulimit -c 0 # don't dump core files on tests that are supposed to assert
- make distcheck
artifacts:
paths:
- build/
build-meson:
extends: .fdo.distribution-image@ubuntu
stage: build
image: $UBUNTU_IMAGE
script:
# Install meson
- wget -q https://github.com/mesonbuild/meson/releases/download/0.50.0/meson-0.50.0.tar.gz
- tar -xf meson-0.50.0.tar.gz
- cd meson-0.50.0
# Install meson (higher than our min version to support our wrap file)
- wget -q https://github.com/mesonbuild/meson/releases/download/0.63.2/meson-0.63.2.tar.gz
- tar -xf meson-0.63.2.tar.gz
- cd meson-0.63.2
- python3 setup.py install
- cd ..
# needed to generate a version
- git fetch https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git --tags
# Do the actual build
- meson build
- meson build -Dwebrtc-aec=enabled
- cd build
- ninja
- ulimit -c 0 # don't dump core files on tests that are supposed to assert
- ninja test
- ninja test-daemon
- ninja dist
artifacts:
paths:
- build/

View file

@ -0,0 +1,67 @@
# Contribution Guidelines
## A note for contributors
Thank you for your contribution!
Please make sure you tick the box labelled `Allow commits from members who can
merge to the target branch`. This allows us to make minor edits ourselves, and
then automatically rebase and merge your changes.
PulseAudio is currently maintained by three volunteer developers in their free
time (probably amounting to less than one full time developer), which is not
really enough, given the project size and scope. For this reason bug reports
and patch submissions are sometimes handled very slowly.
For non-trivial patches, we meet biweekly on IRC to discuss and prioritise
outstanding MRs. If you haven't heard from us a few days after you create the
MR, please take a look at [the patch status
page](https://www.freedesktop.org/wiki/Software/PulseAudio/PatchStatus/).
If you don't see your MR in that list either, please don't hesitate to drop a
comment pinging us, and we'll try to at least respond and make sure your
request is tracked on that list.
## Coding Style
Please take a look at the [coding style
documentation](https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/Developer/CodingStyle/)
on our wiki.
## Commit messagse
We follow the standard git commit message format of a summary on the first line
(<=50 characterss for preference, <=72 characters otherwise), followed by a new
line, followed by a detailed commit message. An additional line at the end may
link to an issue being fixed by this MR.
The first line is usually a short description of "what" your commit does, and
the rest of the message describes the "why", along with any additional
information that readers might need to understand the rationale for the change.
If in doubt, more verbose is better than less.
If you need to describe the "how" of the commit, that is usually best
documented along with the code itself.
Commit messages are prefixed with the subsystem being affected. Your best bet
to figure out what is appropriate is to look at previous commit messages. An
example:
```
sink: Reduce chat sink priority
Some gaming sound cards have custom profiles with analog-game and
analog-chat mappings that exist simultaneously. The game sink should
have higher priority than the chat sink, but currently there's no way to
affect the sink priorities from the profile-set configuration (the
mapping priority is not propagated to the sink priority).
I first thought about adding the mapping priority to the sink priority,
but that could mess up the prioritization system in
pa_device_init_priority(). I ended up checking for the intended roles
property to reduce the chat sink priority. I also reduced the iec958
priority so that the chat and iec958 sinks don't end up with the same
priority.
Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/818
```

67
CONTRIBUTING.md Normal file
View file

@ -0,0 +1,67 @@
# Contribution Guidelines
## A note for contributors
Thank you for your contribution!
Please make sure you tick the box labelled `Allow commits from members who can
merge to the target branch`. This allows us to make minor edits ourselves, and
then automatically rebase and merge your changes.
PulseAudio is currently maintained by three volunteer developers in their free
time (probably amounting to less than one full time developer), which is not
really enough, given the project size and scope. For this reason bug reports
and patch submissions are sometimes handled very slowly.
For non-trivial patches, we meet biweekly on IRC to discuss and prioritise
outstanding MRs. If you haven't heard from us a few days after you create the
MR, please take a look at [the patch status
page](https://www.freedesktop.org/wiki/Software/PulseAudio/PatchStatus/).
If you don't see your MR in that list either, please don't hesitate to drop a
comment pinging us, and we'll try to at least respond and make sure your
request is tracked on that list.
## Coding Style
Please take a look at the [coding style
documentation](https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/Developer/CodingStyle/)
on our wiki.
## Commit messages
We follow the standard git commit message format of a summary on the first line
(<=50 characters for preference, <=72 characters otherwise), followed by a new
line, followed by a detailed commit message. An additional line at the end may
link to an issue being fixed by this MR.
The first line is usually a short description of "what" your commit does, and
the rest of the message describes the "why", along with any additional
information that readers might need to understand the rationale for the change.
If in doubt, more verbose is better than less.
If you need to describe the "how" of the commit, that is usually best
documented along with the code itself.
Commit messages are prefixed with the subsystem being affected. Your best bet
to figure out what is appropriate is to look at previous commit messages. An
example:
```
sink: Reduce chat sink priority
Some gaming sound cards have custom profiles with analog-game and
analog-chat mappings that exist simultaneously. The game sink should
have higher priority than the chat sink, but currently there's no way to
affect the sink priorities from the profile-set configuration (the
mapping priority is not propagated to the sink priority).
I first thought about adding the mapping priority to the sink priority,
but that could mess up the prioritization system in
pa_device_init_priority(). I ended up checking for the intended roles
property to reduce the chat sink priority. I also reduced the iec958
priority so that the chat and iec958 sinks don't end up with the same
priority.
Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/818
```

View file

@ -1,149 +0,0 @@
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST = \
bootstrap.sh \
coverity/model.c \
.gitlab-ci.yml \
.gitlab/issue_templates/Bug.md \
git-version-gen \
LICENSE \
pulseaudio.supp \
GPL \
LGPL \
doxygen/Makefile.am \
doxygen/Makefile.in \
doxygen/doxygen.conf.in \
PROTOCOL \
README \
CODE_OF_CONDUCT.md \
scripts/benchmark_memory_usage.sh \
scripts/plot_memory_usage.gp \
scripts/benchmarks/README \
todo \
.gitignore \
doxygen/.gitignore \
m4/.gitignore \
man/.gitignore \
po/.gitignore \
scripts/benchmarks/.gitignore \
src/.gitignore \
src/daemon/.gitignore \
src/pulse/.gitignore \
meson.build \
meson_options.txt \
doxygen/meson.build \
man/meson.build \
po/meson.build \
shell-completion/bash/meson.build \
shell-completion/zsh/meson.build \
src/daemon/meson.build \
src/meson.build \
src/modules/alsa/meson.build \
src/modules/alsa/mixer/meson.build \
src/modules/bluetooth/meson.build \
src/modules/echo-cancel/meson.build \
src/modules/gsettings/meson.build \
src/modules/gsettings/meson_post_install.py \
src/modules/meson.build \
src/modules/oss/meson.build \
src/modules/raop/meson.build \
src/modules/rtp/meson.build \
src/pulsecore/meson.build \
src/pulse/meson.build \
src/tests/meson.build \
src/tests/test-daemon.meson.sh \
src/utils/meson.build \
vala/meson.build
SUBDIRS = src doxygen man po
MAINTAINERCLEANFILES =
noinst_DATA =
vapidir = $(datadir)/vala/vapi
dist_vapi_DATA = \
vala/libpulse.deps vala/libpulse.vapi \
vala/libpulse-mainloop-glib.deps vala/libpulse-mainloop-glib.vapi \
vala/libpulse-simple.deps vala/libpulse-simple.vapi
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libpulse.pc libpulse-simple.pc
if HAVE_GLIB20
pkgconfig_DATA += \
libpulse-mainloop-glib.pc
endif
cmakedir = $(libdir)/cmake/PulseAudio
cmake_DATA = PulseAudioConfig.cmake PulseAudioConfigVersion.cmake
bashcompletiondir=@bashcompletiondir@
dist_bashcompletion_DATA = shell-completion/bash/pulseaudio
install-bashcompletion-aliases:
cd $(DESTDIR)$(bashcompletiondir) && $(LN_S) -f pulseaudio pactl
cd $(DESTDIR)$(bashcompletiondir) && $(LN_S) -f pulseaudio pacmd
cd $(DESTDIR)$(bashcompletiondir) && $(LN_S) -f pulseaudio pasuspender
cd $(DESTDIR)$(bashcompletiondir) && $(LN_S) -f pulseaudio padsp
cd $(DESTDIR)$(bashcompletiondir) && $(LN_S) -f pulseaudio pacat
cd $(DESTDIR)$(bashcompletiondir) && $(LN_S) -f pulseaudio paplay
cd $(DESTDIR)$(bashcompletiondir) && $(LN_S) -f pulseaudio parec
cd $(DESTDIR)$(bashcompletiondir) && $(LN_S) -f pulseaudio parecord
install-data-hook: install-bashcompletion-aliases
zshcompletiondir=@zshcompletiondir@
dist_zshcompletion_DATA = shell-completion/zsh/_pulseaudio
homepage: all dist doxygen
test -d $$HOME/homepage/private
mkdir -p $$HOME/homepage/private/projects/pulseaudio $$HOME/homepage/private/projects/pulseaudio/doxygen
cp pulseaudio-@PACKAGE_VERSION@.tar.gz $$HOME/homepage/private/projects/pulseaudio
cp pulseaudio-@PACKAGE_VERSION@.tar.gz $$HOME/git.fedora/pulseaudio
cp -a doxygen/html/* $$HOME/homepage/private/projects/pulseaudio/doxygen
doxygen:
$(MAKE) -C doxygen doxygen
eolspace:
find \( -name '*.c' -o -name '*.h' -o -name 'Makefile.am' \) -exec perl -i -pe 's/\s+\n$$/\1\n/;' \{\} \;
untabify:
find \( -name '*.c' -o -name '*.h' \) -exec perl -i -pe 's/\t/ /g;' \{\} \;
fedora-snapshot: dist
cp $(distdir).tar.gz $$HOME/git.fedora/pulseaudio/$(distdir).tar.gz
dist-hook:
echo $(VERSION) > $(distdir)/.tarball-version
echo $(VERSION) > $(distdir)/.version
check-daemon:
$(MAKE) -C src check-daemon
check-daemon-long:
$(MAKE) -C src check-daemon-long
.PHONY: homepage distcleancheck doxygen
# see git-version-gen
BUILT_SOURCES = $(top_srcdir)/.version
$(top_srcdir)/.version:
echo $(VERSION) > $@-t && mv $@-t $@
DISTCHECK_CONFIGURE_FLAGS = --with-udev-rules-dir="$$dc_install_base/lib/udev/rules.d" --with-systemduserunitdir="$$dc_install_base/lib/systemd/user" --with-bash-completion-dir="$$dc_install_base/share/bash-completion/completions"

451
NEWS
View file

@ -1,3 +1,454 @@
PulseAudio 17.0
Changes at a glance:
* Notes for end users
* Updates to ALSA UCM-based setups
* Battery level indication to Bluetooth devices
* Support for the Bluetooth FastStream codec
* webrtc-audio-processing dependency updated
* Trigger role groups added to module-role-cork
* XDG base directory spec for profile-set loading
* Notes for application developers
* PA_RATE_MAX increased
* Notes for packagers
* webrtc-audio-processing dependency updated
Contributors
Alistair Leslie-Hughes
Alper Nebi Yasak
Arun Raghavan
Asier Sarasua Garmendia
Ataberk Özen
Balázs Meskó
Biswapriyo Nath
Dylan Van Assche
Eero Nurkkala
Ettore Atalan
Fabrice Fontaine
Fran Diéguez
Georg Chini
Gioele Barabucci
Gogo Gogsi
Hector Martin
Hugo Carvalho
Hui Wang
Igor V. Kovalenko
Jaechul Lee
Jan Kuparinen
Jan Palus
Jaroslav Kysela
Jiri Grönroos
Joachim Philipp
Jordi Mas
Marijn Suijten
Mart Raudsepp
Nicolas Cavallari
Peter Meerwald-Stadler
Philip Goto
Rosen Penev
Rudi Heitbaum
Sabri Ünal
Sean Greenslade
Seong-ho Cho
Shunsuke Shimizu
SimonP
Takashi Sakamoto
Tanu Kaskinen
Temuri Doghonadze
Toni Estevez
Weijia Wang
Wim Taymans
Yureka
acheronfail
flyingOwl
grimst
hashitaku
mooo
peijiankang
redfast00
wael
김인수
PulseAudio 16.1
A bug fix release.
* Fix parsing of percentage volumes with decimal points in pactl
* Fix crash with the "pacmd play-file" command when reads from the disk aren't frame-aligned
* Fix module-rtp-recv sometimes thinking it's receiving an Opus stream when it's not
* Fix frequent crashing in module-combine-sink, regression in 16.0
* Fix crashing on 32-bit architectures when using the GStreamer codecs for LDAC and AptX
Contributors
Georg Chini
Igor V. Kovalenko
Jaechul Lee
Jan Palus
Sean Greenslade
PulseAudio 16.0
Changes at a glance:
* Notes for end users
* Opus support in RTP modules
* Improved hardware support
* EPOS/Sennheiser GSP 670 USB/wireless headset
* SteelSeries GameDAC
* Behringer UMC22 generalized to Texas Instruments PCM2902 to support more products
* NI Komplete Audio 6 MK2 profiles
* Tunnel latency is now configurable
* Bluetooth device battery level reporting added
* Tunnel and combine-sunk latency fixes
* patcl can show information in JSON format
* Channel remixing can be disabled for module-combine-sink
* A lot of fixes to ALSA, bluetooth, and other components.
* Notes for application developers
* Stream latency reports now include resampler delay
* Module installation location changed, remember to upgrade paprefs to the latest version!
* Notes for packagers
* Opus support in the RTP modules requires enabling GStreamer
* Bluetooth battery level reporting via BlueZ requires enabling experimentals features in BlueZ
* New time smoother implementation
* Change Meson option 'daemon-only' to 'client'
* glib and fftw are now common dependencies, not only for the client.
* Enable GStreamer-based RTP by default when available
Detailed change log:
https://www.freedesktop.org/wiki/Software/PulseAudio/Notes/16.0/
Contributors
Alexey Rubtsov
Anders Jonsson
Andika Triwidada
Arun Raghavan
Biswapriyo Nath
BtbN
Chengyi Zhao
Chupligin Sergey
Craig Howard
Daniel Dantur
Daniel Hernandez
Diederik de Haas
Dylan Van Assche
Emilio Herrera
Ettore Atalan
Fran Diéguez
Georg Chini
Gogo Gogsi
Göran Uddeborg
Hela Basa
Hui Wang
Igor V. Kovalenko
Jan Kuparinen
Jaroslav Kysela
Josef Haider
João Paulo Rechi Vita
Juho Hämäläinen
Karl Ove Hufthammer
Laurent Bigonville
Luna Jernberg
Lv Genggeng
Marijn Suijten
Mart Raudsepp
Mathy Vanvoorden
Olivier Gayot
Ovari
Oğuz Ersen
Piotr Drąg
Rafael Fontenelle
Rico Tzschichholz
Sanchayan Maity
Sebastian Reichel
Sergey A
Sibo Dong
Sungjoon Moon
Takashi Sakamoto
Takuro Onoue
Tanu Kaskinen
Temuri Doghonadze
Will Thompson
Yuri Chornoivan
acheronfail
baek inchan
guest271314
liaohanqin
simmon
simple
tensorknower69
김인수
PulseAudio 15.0
Changes at a glance:
* Notes for end users
* Support for LDAC and AptX bluetooth codecs, plus "SBC XQ" (SBC with higher-quality parameters)
* Support for HFP bluetooth profiles
* Support for Bluetooth A2DP AVRCP Absolute Volume
* ALSA path configuration files can now be placed in user home directory
* module-virtual-surround-sink rewritten
* More options for module-jackdbus-detect
* Improved hardware support
* SteelSeries Arctis 9
* HP Thunderbolt Dock 120W G2
* Behringer U-Phoria UMC22
* OnePlus Type-C Bullets
* Sennheiser GSX 1000/1200 PRO
* New udev variable: PULSE_MODARGS
* max_latency_msec argument added to module-null-source
* module-filter-apply can take filter parameters from device properties
* module-match can now be loaded multiple times
* Improvements to FreeBSD support
* Windows support added to Meson
* Additional commands for pactl
* Card profiles can be set to sticky
* Notes for application developers
* New API for sending messages from clients to PulseAudio objects
* New mechanism for applications to disable shared memory on their connection to PulseAudio
* Notes for packagers
* Autotools build system have been dropped
* The startup script can now read additional configuration from the /etc/pulse/default.pa.d/ directory
* Option to build client library and utilities only
* Avoid loading X11 modules on Wayland (GNOME-only for now)
* OSS support is now configurable in Meson
* Valgrind support is now configurable in Meson
Detailed change log:
https://www.freedesktop.org/wiki/Software/PulseAudio/Notes/15.0/
Contributors
Alexey Rubtsov
Alper Nebi Yasak
Anders Jonsson
Arun Raghavan
Ben Buchwald
Benjamin Valentin
Carlos Garnacho
Carmen Bianca Bakker
Christopher Arndt
Christopher Snowhill
David
Dusan Kazik
Edward Lee
Emilio Herrera
Evan Miller
Fabian Affolter
Faidon Liambotis
Felipe Sateler
Frédéric Danis
Georg Chini
Greg V
Göran Uddeborg
Hela Basa
Henri Chain
Hui Wang
Igor V. Kovalenko
Ilja van Sprundel
Jaechul Lee
James Bottomley
Jan Alexander Steffens (heftig)
Jan Kuparinen
Jaroslav Kysela
Jason Nader
Johannes Wolf
Julien Humbert
Kai-Heng Feng
Karl Ove Hufthammer
Klaas van Schelven
Laurent Bigonville
Laurențiu Nicola
Lyndon Brown
Marijn Suijten
Martin Wilck
Mattias Jernberg
Milo Casagrande
Nazar Mokrynskyi
Oğuz Ersen
Patrick Gaskin
Patrick McLean
Paul Seyfert
Pierre Ossman
Piotr Drąg
Pjotr Vertaalt
Ricky Tigg
Robin Lahtinen
Samuel Thibault
Sanchayan Maity
Scott Worley
Sebastian Krzyszkowiak
SimonP
Takashi Sakamoto
Tanu Kaskinen
Tobias Weise
Toni Estevez
Yaron Shahrabani
Yuri Chornoivan
morrishoresh
pseyfert
scootergrisen
simmon
PulseAudio 14.2
A bug fix release.
* Fix port switching when unplugging headphones
Contributors
Tanu Kaskinen
PulseAudio 14.1
A bug fix release.
* Support upto 8 mixer channels on ALSA devices
* Handle ALSA jacks with the same name but different index values
* Switch to plugged-in headset when mic availability is unknown
* Fix a potential segfault in the Bluetooth oFono HFP backend
* Fix a problem with module-ladspa-sink when avoid-resampling=true
* Fix database names containing canonical host for meson builds
Contributors
Arun Raghavan
Hui Wang
Igor V. Kovalenko
Jaroslav Kysela
Kai-Heng Feng
Patrick Gaskin
Tanu Kaskinen
morrishoresh
PulseAudio 14.0
Changes at a glance:
* Notes for end users
* Significant routing changes to default sinks/sources
* Changing the default sink moves streams from the old default sink to the new
* Moving a stream to the default sink removes the "manually routed" status of the stream
* If a sink changes status to available, streams that prefer that sink move there automatically
* The same changes have been applied to the source stream routing
* Workaround for GNOME Sound Settings' stream routing behaviour
* module-rescue-streams is deprecated, functionality moved to the core
* New rescue-streams option in daemon.conf
* Automatic switching to HDMI is now disabled by default
* Better support for some USB gaming headsets
* Flat volumes are now disabled by default
* The RAOP sink can be configured to automatically reconnect on connection failures
* Separate sink_channels and source_channels for module-jackdbus-detect
* Improved support for ALSA UCM
* Support for ALSA mixer controls with non-zero index
* It's now possible to set intended roles for devices in the ALSA profile configuration
* Ports now have a type associated with them
* Mappings have a new "description-key" option in the ALSA profile configuration
* New xauthority argument for X11 modules
* module-null-sink's compressed format support can now be configured at run-time
* The enable-lfe-remixing option in daemon.conf was split into remixing-produce-lfe and remixing-consume-lfe
* New channel_map argument for module-raop-sink
* Notes for application developers
* pa_mainloop_prepare interprets the timeout argument as microseconds again
* New availability_group and type fields in the port info structs
* New macros: PA_LIKELY(), PA_UNLIKELY(), PA_CLAMP() and PA_CLAMP_UNLIKELY()
* Notes for packagers
* New GStreamer-based RTP implementation
* qpaeq switched from Python 2 to Python 3
* Compile-time option to forget pre-14.0 stream routing
* The install path of the ALSA configuration files is now configurable
* GNU gettext minimum version requirement bumped from 0.19.3 to 0.19.8
* Heads-up: dropping autotools build system
* Heads-up: dropping EsounD support is considered, tell us if you still need it
* Heads-up: dropping GConf support
Detailed change log:
https://www.freedesktop.org/wiki/Software/PulseAudio/Notes/14.0/
Contributors
Alexander E. Patrakov
Arun Raghavan
Balázs Meskó
Baurzhan Muftakhidinov
Ben Buchwald
Daniil Kovalev
Dave Chiluk
David Heidelberg
Dusan Kazik
Eero Nurkkala
Emanuil Novachev
Emilio Herrera
Felipe Sateler
Felix Yan
Geert Warrink
Georg Chini
Göran Uddeborg
Hugo Osvaldo Barrera
Hui Wang
Igor V. Kovalenko
Jan Alexander Steffens
Jarno Suni
Jaroslav Kysela
Jaska Uimonen
Jean-Baptiste Holcroft
Josh
Juliano de Souza Camargo
Kai-Heng Feng
Karl Ove Hufthammer
Khem Raj
Krzysztof Stasiowski
Laurent Bigonville
Libin Yang
Marc Ranolfi
Michael Pivonka
Milo Casagrande
Milo Ivir
Nick Moriarty
Oğuz Ersen
Pali Rohár
Peter Levine
Peter Meerwald
Philip Withnall
Piotr Drąg
RODRIGUEZ Christophe
Rafael Fontenelle
Ralph Seichter
Rasmus Thomsen
Rickie Schroeder
Rosen Penev
Ryszard Knop
Sanchayan Maity
Sebastian Dröge
Sebastien
StefanBruens
Taahir Ahmed
Tanu Kaskinen
Timo Gurr
Tom Yan
Tomasz Kontusz
Vasilis Tsiligiannis
Wim Taymans
Yi-Jyun Pan
Yuri Chornoivan
itsthem
muzena
roshal
zhaochengyi
PulseAudio 13.0
Changes at a glance:

View file

@ -435,6 +435,23 @@ sink, source and card ports):
string availability_group
uint32 type
## v35, implemented by >= 15.0
Added new command for communication with objects.
PA_COMMAND_SEND_OBJECT_MESSAGE:
sends a message to an object identified by an object path
parameters:
string object_path - unique path identifying the object
string message - message name
string message_parameters - additional parameters if required (may be
NULL, which should be treated the same as an
empty string)
The command returns a string, which may be empty or NULL (NULL should be
treated the same as an empty string).
#### If you just changed the protocol, read this
## module-tunnel depends on the sink/source/sink-input/source-input protocol
## internals, so if you changed these, you might have broken module-tunnel.

13
README
View file

@ -19,7 +19,7 @@ TRAC/BUGZILLA TICKET CHANGES MAILING LIST:
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-bugs
IRC:
#pulseaudio on irc.freenode.org
https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Community/#ircandmatrix
FRESHMEAT:
http://freshmeat.net/projects/pulseaudio/
@ -31,13 +31,10 @@ AUTHORS:
Several
HACKING:
In order to run pulseaudio from the build dir __OPTIMIZE__ should be
disabled (look at src/pulsecore/core-util.h::pa_run_from_build_tree()),
this can be done by passing "CFLAGS=-O0" to the configure script:
./autogen.sh
CFLAGS="-ggdb3 -O0" LDFLAGS="-ggdb3" ./configure
make
./src/pulseaudio -n -F src/default.pa -p $(pwd)/src/
In order to run pulseaudio from the build dir:
meson build
meson compile -C build
build/src/daemon/pulseaudio -n -F build/src/daemon/default.pa -p $(pwd)/build/src/modules/
SPELLING:
PulseAudio

View file

@ -1,22 +0,0 @@
#!/bin/sh
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
# Only there to make jhbuild happy
NOCONFIGURE=1 ./bootstrap.sh
exec ./configure "$@"

View file

@ -1,48 +0,0 @@
#!/usr/bin/env bash
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then
cp -p .git/hooks/pre-commit.sample .git/hooks/pre-commit && \
chmod +x .git/hooks/pre-commit && \
echo "Activated pre-commit hook."
fi
if [ -f .tarball-version ]; then
echo "Marking tarball version as modified."
echo -n `cat .tarball-version | sed 's/-rebootstrapped$//'`-rebootstrapped >.tarball-version
fi
# We check for this here, because if pkg-config is not found in the
# system, it's likely that the pkg.m4 macro file is also not present,
# which will make PKG_PROG_PKG_CONFIG be undefined and the generated
# configure file faulty.
if ! pkg-config --version &>/dev/null; then
echo "pkg-config is required to bootstrap this program"
exit 1
fi
# Other necessary programs
if ! autopoint --version &>/dev/null ; then
echo "autopoint is required to bootstrap this program"
exit 1
fi
autoreconf --force --install --verbose
if test "x$NOCONFIGURE" = "x"; then
CFLAGS="$CFLAGS -g -O0" ./configure --enable-force-preopen "$@" && \
make clean
fi

File diff suppressed because it is too large Load diff

49
doc/messaging_api.txt Normal file
View file

@ -0,0 +1,49 @@
Message API reference
The message API allows any object within pulseaudio to register a message
handler. A message handler is a function that can be called by clients using
PA_COMMAND_SEND_OBJECT_MESSAGE. A message consists at least of an object path
and a message command, both specified as strings. Additional parameters can
be specified using a single string in JSON format, but are not mandatory.
The message handler returns an error number as defined in def.h and also returns
a string in the "response" variable. Non-empty response will be in JSON format.
The reference further down lists available messages, their parameters
and return values.
Reference:
Object path: /core
Message: list-handlers
Parameters: None
Return value: JSON array of handler description objects
[{"name":"Handler name","description":"Description"} ...]
Object path: /card/bluez_card.XX_XX_XX_XX_XX_XX/bluez
Message: list-codecs
Parameters: None
Return value: JSON array of codec description objects
[{"name":"codec1","description":"Codec 1"} ...]
Object path: /card/bluez_card.XX_XX_XX_XX_XX_XX/bluez
Message: get-codec
Parameters: None
Return value: "codec name"
Object path: /card/bluez_card.XX_XX_XX_XX_XX_XX/bluez
Message: switch-codec
Parameters: "codec name"
Return value: none
Description: Set if card profile selection should be sticky instead of being automated
Object path: /card/<card_name>
Message: set-profile-sticky
Parameters: JSON "true" or "false"
Return value: none
Description: Get if card profile selection should be sticky instead of being automated
Object path: /card/<card_name>
Message: get-profile-sticky
Parameters: None
Return value: JSON "true" or "false"

View file

@ -1,22 +0,0 @@
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
doxygen: doxygen.conf
doxygen $<
clean-local:
-rm -rf html
.PHONY: all doxygen

View file

@ -758,8 +758,8 @@ EXCLUDE_SYMBOLS =
# directories that contain example code fragments that are included (see
# the \include command).
EXAMPLE_PATH = @srcdir@/../src/utils \
@srcdir@/../src/tests
EXAMPLE_PATH = @top_srcdir@/src/utils \
@top_srcdir@/src/tests
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp

37
m4/.gitignore vendored
View file

@ -1,37 +0,0 @@
codeset.m4
extern-inline.m4
fcntl-o.m4
gettext.m4
glibc2.m4
glibc21.m4
iconv.m4
intdiv0.m4
intl.m4
intldir.m4
intlmacosx.m4
intmax.m4
inttypes-pri.m4
inttypes_h.m4
lcmessage.m4
lib-ld.m4
lib-link.m4
lib-prefix.m4
libtool.m4
lock.m4
longlong.m4
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
nls.m4
po.m4
printf-posix.m4
progtest.m4
size_max.m4
stdint_h.m4
threadlib.m4
uintmax_t.m4
visibility.m4
wchar_t.m4
wint_t.m4
xsize.m4

View file

@ -1,19 +0,0 @@
AC_DEFUN([ACX_LIBWRAP], [
LIBWRAP_LIBS=
saved_LIBS="$LIBS"
LIBS="$LIBS -lwrap"
AC_MSG_CHECKING([for tcpwrap library and headers])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[#include <tcpd.h>
#include <syslog.h>
int allow_severity = LOG_INFO;
int deny_severity = LOG_WARNING;],
[struct request_info *req;
return hosts_access (req);])],
[AC_DEFINE(HAVE_LIBWRAP, [], [Have tcpwrap?])
LIBWRAP_LIBS="-lwrap"
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])
LIBS="$saved_LIBS"
])

View file

@ -1,74 +0,0 @@
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
#
# DESCRIPTION
#
# Check whether the given FLAG works with the current language's compiler
# or gives an error. (Warnings, however, are ignored)
#
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
# success/failure.
#
# If EXTRA-FLAGS is defined, it is added to the current language's default
# flags (e.g. CFLAGS) when the check is done. The check is thus made with
# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
# force the compiler to issue an error when a bad flag is given.
#
# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
#
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
#
# LICENSE
#
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. You
# need not follow the terms of the GNU General Public License when using
# or distributing such scripts, even though portions of the text of the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
#serial 4
AC_DEFUN([AX_CHECK_COMPILE_FLAG],
[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
_AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
[AS_VAR_SET(CACHEVAR,[yes])],
[AS_VAR_SET(CACHEVAR,[no])])
_AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
AS_VAR_IF(CACHEVAR,yes,
[m4_default([$2], :)],
[m4_default([$3], :)])
AS_VAR_POPDEF([CACHEVAR])dnl
])dnl AX_CHECK_COMPILE_FLAGS

View file

@ -1,92 +0,0 @@
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_check_define.html
# ===========================================================================
#
# SYNOPSIS
#
# AC_CHECK_DEFINE([symbol], [ACTION-IF-FOUND], [ACTION-IF-NOT])
# AX_CHECK_DEFINE([includes],[symbol], [ACTION-IF-FOUND], [ACTION-IF-NOT])
#
# DESCRIPTION
#
# Complements AC_CHECK_FUNC but it does not check for a function but for a
# define to exist. Consider a usage like:
#
# AC_CHECK_DEFINE(__STRICT_ANSI__, CFLAGS="$CFLAGS -D_XOPEN_SOURCE=500")
#
# LICENSE
#
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. You
# need not follow the terms of the GNU General Public License when using
# or distributing such scripts, even though portions of the text of the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
#serial 8
AU_ALIAS([AC_CHECK_DEFINED], [AC_CHECK_DEFINE])
AC_DEFUN([AC_CHECK_DEFINE],[
AS_VAR_PUSHDEF([ac_var],[ac_cv_defined_$1])dnl
AC_CACHE_CHECK([for $1 defined], ac_var,
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
#ifdef $1
int ok;
#else
choke me
#endif
]])],[AS_VAR_SET(ac_var, yes)],[AS_VAR_SET(ac_var, no)]))
AS_IF([test AS_VAR_GET(ac_var) != "no"], [$2], [$3])dnl
AS_VAR_POPDEF([ac_var])dnl
])
AU_ALIAS([AX_CHECK_DEFINED], [AX_CHECK_DEFINE])
AC_DEFUN([AX_CHECK_DEFINE],[
AS_VAR_PUSHDEF([ac_var],[ac_cv_defined_$2_$1])dnl
AC_CACHE_CHECK([for $2 defined in $1], ac_var,
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <$1>]], [[
#ifdef $2
int ok;
#else
choke me
#endif
]])],[AS_VAR_SET(ac_var, yes)],[AS_VAR_SET(ac_var, no)]))
AS_IF([test AS_VAR_GET(ac_var) != "no"], [$3], [$4])dnl
AS_VAR_POPDEF([ac_var])dnl
])
AC_DEFUN([AX_CHECK_FUNC],
[AS_VAR_PUSHDEF([ac_var], [ac_cv_func_$2])dnl
AC_CACHE_CHECK([for $2], ac_var,
dnl AC_LANG_FUNC_LINK_TRY
[AC_LINK_IFELSE([AC_LANG_PROGRAM([$1
#undef $2
char $2 ();],[
char (*f) () = $2;
return f != $2; ])],
[AS_VAR_SET(ac_var, yes)],
[AS_VAR_SET(ac_var, no)])])
AS_IF([test AS_VAR_GET(ac_var) = yes], [$3], [$4])dnl
AS_VAR_POPDEF([ac_var])dnl
])# AC_CHECK_FUNC

View file

@ -1,147 +0,0 @@
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_check_flag.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_CHECK_PREPROC_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS])
# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS])
# AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS])
# AX_APPEND_FLAG(FLAG, [FLAGS-VARIABLE])
# AX_APPEND_COMPILE_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS])
# AX_APPEND_LINK_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS])
#
# DESCRIPTION
#
# Check whether the given FLAG works with the current language's
# preprocessor/compiler/linker, or whether they give an error. (Warnings,
# however, are ignored.)
#
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
# success/failure.
#
# If EXTRA-FLAGS is defined, it is added to the current language's default
# flags (e.g. CFLAGS) when the check is done. The check us thus made
# with the following flags: "CFLAGS EXTRA-FLAGS FLAG". EXTRA-FLAGS can
# for example be used to force the compiler to issue an error when a bad
# flag is given.
#
# AX_APPEND_FLAG appends the FLAG to the FLAG-VARIABLE shell variable or
# the current language's flags if not specified. FLAG is not added to
# FLAG-VARIABLE if it is already in the shell variable.
#
# AX_APPEND_COMPILE_FLAGS checks for each FLAG1, FLAG2, etc. using
# AX_CHECK_COMPILE_FLAG and if the check is successful the flag is added
# to the appropriate FLAGS variable with AX_APPEND_FLAG. The
# FLAGS-VARIABLE and EXTRA-FLAGS arguments are the same as in the other
# macros. AX_APPEND_LINK_FLAGS does the same for linker flags.
#
# NOTE: Based on AX_CHECK_COMPILER_FLAGS and AX_CFLAGS_GCC_OPTION.
#
# LICENSE
#
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu>
# Copyright (c) 2009 Matteo Frigo
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. You
# need not follow the terms of the GNU General Public License when using
# or distributing such scripts, even though portions of the text of the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
#serial 2
AC_DEFUN([AX_CHECK_PREPROC_FLAG],
[AC_PREREQ(2.59) dnl for _AC_LANG_PREFIX
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]cppflags_$4_$1])dnl
AC_CACHE_CHECK([whether _AC_LANG preprocessor accepts $1], CACHEVAR, [
ax_check_save_flags=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $4 $1"
AC_PREPROC_IFELSE([AC_LANG_PROGRAM()],
[AS_VAR_SET([CACHEVAR],[yes])],
[AS_VAR_SET([CACHEVAR],[no])])
CPPFLAGS=$ax_check_save_flags])
AS_VAR_IF([CACHEVAR], "yes",
[m4_default([$2], :)],
[m4_default([$3], :)])
AS_VAR_POPDEF([CACHEVAR])dnl
])dnl AX_CHECK_PREPROC_FLAGS
AC_DEFUN([AX_CHECK_COMPILE_FLAG],
[AC_PREREQ(2.59) dnl for _AC_LANG_PREFIX
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
_AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
[AS_VAR_SET([CACHEVAR],[yes])],
[AS_VAR_SET([CACHEVAR],[no])])
_AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
AS_VAR_IF([CACHEVAR], "yes",
[m4_default([$2], :)],
[m4_default([$3], :)])
AS_VAR_POPDEF([CACHEVAR])dnl
])dnl AX_CHECK_COMPILE_FLAGS
AC_DEFUN([AX_CHECK_LINK_FLAG],
[AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl
AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [
ax_check_save_flags=$LDFLAGS
LDFLAGS="$LDFLAGS $4 $1"
AC_LINK_IFELSE([AC_LANG_PROGRAM()],
[AS_VAR_SET([CACHEVAR],[yes])],
[AS_VAR_SET([CACHEVAR],[no])])
LDFLAGS=$ax_check_save_flags])
AS_VAR_IF([CACHEVAR], "yes",
[m4_default([$2], :)],
[m4_default([$3], :)])
AS_VAR_POPDEF([CACHEVAR])dnl
])dnl AX_CHECK_LINK_FLAGS
AC_DEFUN([AX_APPEND_FLAG],
[AC_PREREQ(2.59) dnl for _AC_LANG_PREFIX
AC_REQUIRE([AC_PROG_GREP])
AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[]FLAGS)])dnl
AS_VAR_SET_IF([FLAGS],
[AS_IF([AS_ECHO(" $[]FLAGS ") | $GREP " $1 " 2>&1 >/dev/null],
[AC_RUN_LOG([: FLAGS already contains $1])],
[AC_RUN_LOG([: FLAGS="$FLAGS $1"])
AS_VAR_APPEND([FLAGS], [" $1"])])],
[AS_VAR_SET([FLAGS],[$1])])
AS_VAR_POPDEF([FLAGS])dnl
])dnl AX_APPEND_FLAG
AC_DEFUN([AX_APPEND_COMPILE_FLAGS],
[for flag in $1; do
AX_CHECK_COMPILE_FLAG([$flag], [AX_APPEND_FLAG([$flag], [$2])], [], [$3])
done
])dnl AX_APPEND_COMPILE_FLAGS
AC_DEFUN([AX_APPEND_LINK_FLAGS],
[for flag in $1; do
AX_CHECK_LINK_FLAG([$flag], [AX_APPEND_FLAG([$flag], [m4_default([$2], [LDFLAGS])])], [], [$3])
done
])dnl AX_APPEND_LINK_FLAGS

View file

@ -1,558 +0,0 @@
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_CXX_COMPILE_STDCXX(VERSION, [ext|noext], [mandatory|optional])
#
# DESCRIPTION
#
# Check for baseline language coverage in the compiler for the specified
# version of the C++ standard. If necessary, add switches to CXXFLAGS to
# enable support. VERSION may be '11' (for the C++11 standard) or '14'
# (for the C++14 standard).
#
# The second argument, if specified, indicates whether you insist on an
# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g.
# -std=c++11). If neither is specified, you get whatever works, with
# preference for an extended mode.
#
# The third argument, if specified 'mandatory' or if left unspecified,
# indicates that baseline support for the specified C++ standard is
# required and that the macro should error out if no mode with that
# support is found. If specified 'optional', then configuration proceeds
# regardless, after defining HAVE_CXX${VERSION} if and only if a
# supporting mode is found.
#
# LICENSE
#
# Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
# Copyright (c) 2012 Zack Weinberg <zackw@panix.com>
# Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu>
# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov@google.com>
# Copyright (c) 2015 Paul Norman <penorman@mac.com>
# Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 1
dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro
dnl (serial version number 13).
AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
m4_if([$1], [11], [],
[$1], [14], [],
[$1], [17], [m4_fatal([support for C++17 not yet implemented in AX_CXX_COMPILE_STDCXX])],
[m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl
m4_if([$2], [], [],
[$2], [ext], [],
[$2], [noext], [],
[m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX])])dnl
m4_if([$3], [], [ax_cxx_compile_cxx$1_required=true],
[$3], [mandatory], [ax_cxx_compile_cxx$1_required=true],
[$3], [optional], [ax_cxx_compile_cxx$1_required=false],
[m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])])
AC_LANG_PUSH([C++])dnl
ac_success=no
AC_CACHE_CHECK(whether $CXX supports C++$1 features by default,
ax_cv_cxx_compile_cxx$1,
[AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
[ax_cv_cxx_compile_cxx$1=yes],
[ax_cv_cxx_compile_cxx$1=no])])
if test x$ax_cv_cxx_compile_cxx$1 = xyes; then
ac_success=yes
fi
m4_if([$2], [noext], [], [dnl
if test x$ac_success = xno; then
for switch in -std=gnu++$1 -std=gnu++0x; do
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
$cachevar,
[ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $switch"
AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
[eval $cachevar=yes],
[eval $cachevar=no])
CXXFLAGS="$ac_save_CXXFLAGS"])
if eval test x\$$cachevar = xyes; then
CXXFLAGS="$CXXFLAGS $switch"
ac_success=yes
break
fi
done
fi])
m4_if([$2], [ext], [], [dnl
if test x$ac_success = xno; then
dnl HP's aCC needs +std=c++11 according to:
dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf
dnl Cray's crayCC needs "-h std=c++11"
for switch in -std=c++$1 -std=c++0x +std=c++$1 "-h std=c++$1"; do
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
$cachevar,
[ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $switch"
AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
[eval $cachevar=yes],
[eval $cachevar=no])
CXXFLAGS="$ac_save_CXXFLAGS"])
if eval test x\$$cachevar = xyes; then
CXXFLAGS="$CXXFLAGS $switch"
ac_success=yes
break
fi
done
fi])
AC_LANG_POP([C++])
if test x$ax_cxx_compile_cxx$1_required = xtrue; then
if test x$ac_success = xno; then
AC_MSG_ERROR([*** A compiler with support for C++$1 language features is required.])
fi
else
if test x$ac_success = xno; then
HAVE_CXX$1=0
AC_MSG_NOTICE([No compiler with C++$1 support was found])
else
HAVE_CXX$1=1
AC_DEFINE(HAVE_CXX$1,1,
[define if the compiler supports basic C++$1 syntax])
fi
AC_SUBST(HAVE_CXX$1)
fi
])
dnl Test body for checking C++11 support
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_11],
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
)
dnl Test body for checking C++14 support
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14],
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
_AX_CXX_COMPILE_STDCXX_testbody_new_in_14
)
dnl Tests for new features in C++11
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[
// If the compiler admits that it is not ready for C++11, why torture it?
// Hopefully, this will speed up the test.
#ifndef __cplusplus
#error "This is not a C++ compiler"
#elif __cplusplus < 201103L
#error "This is not a C++11 compiler"
#else
namespace cxx11
{
namespace test_static_assert
{
template <typename T>
struct check
{
static_assert(sizeof(int) <= sizeof(T), "not big enough");
};
}
namespace test_final_override
{
struct Base
{
virtual void f() {}
};
struct Derived : public Base
{
virtual void f() override {}
};
}
namespace test_double_right_angle_brackets
{
template < typename T >
struct check {};
typedef check<void> single_type;
typedef check<check<void>> double_type;
typedef check<check<check<void>>> triple_type;
typedef check<check<check<check<void>>>> quadruple_type;
}
namespace test_decltype
{
int
f()
{
int a = 1;
decltype(a) b = 2;
return a + b;
}
}
namespace test_type_deduction
{
template < typename T1, typename T2 >
struct is_same
{
static const bool value = false;
};
template < typename T >
struct is_same<T, T>
{
static const bool value = true;
};
template < typename T1, typename T2 >
auto
add(T1 a1, T2 a2) -> decltype(a1 + a2)
{
return a1 + a2;
}
int
test(const int c, volatile int v)
{
static_assert(is_same<int, decltype(0)>::value == true, "");
static_assert(is_same<int, decltype(c)>::value == false, "");
static_assert(is_same<int, decltype(v)>::value == false, "");
auto ac = c;
auto av = v;
auto sumi = ac + av + 'x';
auto sumf = ac + av + 1.0;
static_assert(is_same<int, decltype(ac)>::value == true, "");
static_assert(is_same<int, decltype(av)>::value == true, "");
static_assert(is_same<int, decltype(sumi)>::value == true, "");
static_assert(is_same<int, decltype(sumf)>::value == false, "");
static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
return (sumf > 0.0) ? sumi : add(c, v);
}
}
namespace test_noexcept
{
int f() { return 0; }
int g() noexcept { return 0; }
static_assert(noexcept(f()) == false, "");
static_assert(noexcept(g()) == true, "");
}
namespace test_constexpr
{
template < typename CharT >
unsigned long constexpr
strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
{
return *s ? strlen_c_r(s + 1, acc + 1) : acc;
}
template < typename CharT >
unsigned long constexpr
strlen_c(const CharT *const s) noexcept
{
return strlen_c_r(s, 0UL);
}
static_assert(strlen_c("") == 0UL, "");
static_assert(strlen_c("1") == 1UL, "");
static_assert(strlen_c("example") == 7UL, "");
static_assert(strlen_c("another\0example") == 7UL, "");
}
namespace test_rvalue_references
{
template < int N >
struct answer
{
static constexpr int value = N;
};
answer<1> f(int&) { return answer<1>(); }
answer<2> f(const int&) { return answer<2>(); }
answer<3> f(int&&) { return answer<3>(); }
void
test()
{
int i = 0;
const int c = 0;
static_assert(decltype(f(i))::value == 1, "");
static_assert(decltype(f(c))::value == 2, "");
static_assert(decltype(f(0))::value == 3, "");
}
}
namespace test_uniform_initialization
{
struct test
{
static const int zero {};
static const int one {1};
};
static_assert(test::zero == 0, "");
static_assert(test::one == 1, "");
}
namespace test_lambdas
{
void
test1()
{
auto lambda1 = [](){};
auto lambda2 = lambda1;
lambda1();
lambda2();
}
int
test2()
{
auto a = [](int i, int j){ return i + j; }(1, 2);
auto b = []() -> int { return '0'; }();
auto c = [=](){ return a + b; }();
auto d = [&](){ return c; }();
auto e = [a, &b](int x) mutable {
const auto identity = [](int y){ return y; };
for (auto i = 0; i < a; ++i)
a += b--;
return x + identity(a + b);
}(0);
return a + b + c + d + e;
}
int
test3()
{
const auto nullary = [](){ return 0; };
const auto unary = [](int x){ return x; };
using nullary_t = decltype(nullary);
using unary_t = decltype(unary);
const auto higher1st = [](nullary_t f){ return f(); };
const auto higher2nd = [unary](nullary_t f1){
return [unary, f1](unary_t f2){ return f2(unary(f1())); };
};
return higher1st(nullary) + higher2nd(nullary)(unary);
}
}
namespace test_variadic_templates
{
template <int...>
struct sum;
template <int N0, int... N1toN>
struct sum<N0, N1toN...>
{
static constexpr auto value = N0 + sum<N1toN...>::value;
};
template <>
struct sum<>
{
static constexpr auto value = 0;
};
static_assert(sum<>::value == 0, "");
static_assert(sum<1>::value == 1, "");
static_assert(sum<23>::value == 23, "");
static_assert(sum<1, 2>::value == 3, "");
static_assert(sum<5, 5, 11>::value == 21, "");
static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
}
// http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
// Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
// because of this.
namespace test_template_alias_sfinae
{
struct foo {};
template<typename T>
using member = typename T::member_type;
template<typename T>
void func(...) {}
template<typename T>
void func(member<T>*) {}
void test();
void test() { func<foo>(0); }
}
} // namespace cxx11
#endif // __cplusplus >= 201103L
]])
dnl Tests for new features in C++14
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[
// If the compiler admits that it is not ready for C++14, why torture it?
// Hopefully, this will speed up the test.
#ifndef __cplusplus
#error "This is not a C++ compiler"
#elif __cplusplus < 201402L
#error "This is not a C++14 compiler"
#else
namespace cxx14
{
namespace test_polymorphic_lambdas
{
int
test()
{
const auto lambda = [](auto&&... args){
const auto istiny = [](auto x){
return (sizeof(x) == 1UL) ? 1 : 0;
};
const int aretiny[] = { istiny(args)... };
return aretiny[0];
};
return lambda(1, 1L, 1.0f, '1');
}
}
namespace test_binary_literals
{
constexpr auto ivii = 0b0000000000101010;
static_assert(ivii == 42, "wrong value");
}
namespace test_generalized_constexpr
{
template < typename CharT >
constexpr unsigned long
strlen_c(const CharT *const s) noexcept
{
auto length = 0UL;
for (auto p = s; *p; ++p)
++length;
return length;
}
static_assert(strlen_c("") == 0UL, "");
static_assert(strlen_c("x") == 1UL, "");
static_assert(strlen_c("test") == 4UL, "");
static_assert(strlen_c("another\0test") == 7UL, "");
}
namespace test_lambda_init_capture
{
int
test()
{
auto x = 0;
const auto lambda1 = [a = x](int b){ return a + b; };
const auto lambda2 = [a = lambda1(x)](){ return a; };
return lambda2();
}
}
namespace test_digit_seperators
{
constexpr auto ten_million = 100'000'000;
static_assert(ten_million == 100000000, "");
}
namespace test_return_type_deduction
{
auto f(int& x) { return x; }
decltype(auto) g(int& x) { return x; }
template < typename T1, typename T2 >
struct is_same
{
static constexpr auto value = false;
};
template < typename T >
struct is_same<T, T>
{
static constexpr auto value = true;
};
int
test()
{
auto x = 0;
static_assert(is_same<int, decltype(f(x))>::value, "");
static_assert(is_same<int&, decltype(g(x))>::value, "");
return x;
}
}
} // namespace cxx14
#endif // __cplusplus >= 201402L
]])

View file

@ -1,39 +0,0 @@
# ============================================================================
# http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html
# ============================================================================
#
# SYNOPSIS
#
# AX_CXX_COMPILE_STDCXX_11([ext|noext], [mandatory|optional])
#
# DESCRIPTION
#
# Check for baseline language coverage in the compiler for the C++11
# standard; if necessary, add switches to CXXFLAGS to enable support.
#
# This macro is a convenience alias for calling the AX_CXX_COMPILE_STDCXX
# macro with the version set to C++11. The two optional arguments are
# forwarded literally as the second and third argument respectively.
# Please see the documentation for the AX_CXX_COMPILE_STDCXX macro for
# more information. If you want to use this macro, you also need to
# download the ax_cxx_compile_stdcxx.m4 file.
#
# LICENSE
#
# Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
# Copyright (c) 2012 Zack Weinberg <zackw@panix.com>
# Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu>
# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov@google.com>
# Copyright (c) 2015 Paul Norman <penorman@mac.com>
# Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 14
include([ax_cxx_compile_stdcxx.m4])
AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [AX_CXX_COMPILE_STDCXX([11], [$1], [$2])])

View file

@ -1,49 +0,0 @@
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_define_dir.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION])
#
# DESCRIPTION
#
# This macro sets VARNAME to the expansion of the DIR variable, taking
# care of fixing up ${prefix} and such.
#
# VARNAME is then offered as both an output variable and a C preprocessor
# symbol.
#
# Example:
#
# AX_DEFINE_DIR([DATADIR], [datadir], [Where data are placed to.])
#
# LICENSE
#
# Copyright (c) 2008 Stepan Kasal <kasal@ucw.cz>
# Copyright (c) 2008 Andreas Schwab <schwab@suse.de>
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
# Copyright (c) 2008 Alexandre Oliva
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 6
AU_ALIAS([AC_DEFINE_DIR], [AX_DEFINE_DIR])
AC_DEFUN([AX_DEFINE_DIR], [
prefix_NONE=
exec_prefix_NONE=
test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
dnl In Autoconf 2.60, ${datadir} refers to ${datarootdir}, which in turn
dnl refers to ${prefix}. Thus we have to use `eval' twice.
eval ax_define_dir="\"[$]$2\""
eval ax_define_dir="\"$ax_define_dir\""
AC_SUBST($1, "$ax_define_dir")
AC_DEFINE_UNQUOTED($1, "$ax_define_dir", [$3])
test "$prefix_NONE" && prefix=NONE
test "$exec_prefix_NONE" && exec_prefix=NONE
])

View file

@ -1,317 +0,0 @@
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_pthread.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
#
# DESCRIPTION
#
# This macro figures out how to build C programs using POSIX threads. It
# sets the PTHREAD_LIBS output variable to the threads library and linker
# flags, and the PTHREAD_CFLAGS output variable to any special C compiler
# flags that are needed. (The user can also force certain compiler
# flags/libs to be tested by setting these environment variables.)
#
# Also sets PTHREAD_CC to any special C compiler that is needed for
# multi-threaded programs (defaults to the value of CC otherwise). (This
# is necessary on AIX to use the special cc_r compiler alias.)
#
# NOTE: You are assumed to not only compile your program with these flags,
# but also link it with them as well. e.g. you should link with
# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
#
# If you are only building threads programs, you may wish to use these
# variables in your default LIBS, CFLAGS, and CC:
#
# LIBS="$PTHREAD_LIBS $LIBS"
# CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
# CC="$PTHREAD_CC"
#
# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
# has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name
# (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
#
# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
# PTHREAD_PRIO_INHERIT symbol is defined when compiling with
# PTHREAD_CFLAGS.
#
# ACTION-IF-FOUND is a list of shell commands to run if a threads library
# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
# is not found. If ACTION-IF-FOUND is not specified, the default action
# will define HAVE_PTHREAD.
#
# Please let the authors know if this macro fails on any platform, or if
# you have any other suggestions or comments. This macro was based on work
# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
# Alejandro Forero Cuervo to the autoconf macro repository. We are also
# grateful for the helpful feedback of numerous users.
#
# Updated for Autoconf 2.68 by Daniel Richard G.
#
# LICENSE
#
# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
# Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG>
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. You
# need not follow the terms of the GNU General Public License when using
# or distributing such scripts, even though portions of the text of the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
#serial 20
AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
AC_DEFUN([AX_PTHREAD], [
AC_REQUIRE([AC_CANONICAL_HOST])
AC_LANG_PUSH([C])
ax_pthread_ok=no
# We used to check for pthread.h first, but this fails if pthread.h
# requires special compiler flags (e.g. on True64 or Sequent).
# It gets checked for in the link test anyway.
# First of all, check if the user has set any of the PTHREAD_LIBS,
# etcetera environment variables, and if threads linking works using
# them:
if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
save_LIBS="$LIBS"
LIBS="$PTHREAD_LIBS $LIBS"
AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
AC_TRY_LINK_FUNC(pthread_join, ax_pthread_ok=yes)
AC_MSG_RESULT($ax_pthread_ok)
if test x"$ax_pthread_ok" = xno; then
PTHREAD_LIBS=""
PTHREAD_CFLAGS=""
fi
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
fi
# We must check for the threads library under a number of different
# names; the ordering is very important because some systems
# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
# libraries is broken (non-POSIX).
# Create a list of thread flags to try. Items starting with a "-" are
# C compiler flags, and other items are library names, except for "none"
# which indicates that we try without any flags at all, and "pthread-config"
# which is a program returning the flags for the Pth emulation library.
ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
# The ordering *is* (sometimes) important. Some notes on the
# individual items follow:
# pthreads: AIX (must check this before -lpthread)
# none: in case threads are in libc; should be tried before -Kthread and
# other compiler flags to prevent continual compiler warnings
# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
# -pthreads: Solaris/gcc
# -mthreads: Mingw32/gcc, Lynx/gcc
# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
# doesn't hurt to check since this sometimes defines pthreads too;
# also defines -D_REENTRANT)
# ... -mt is also the pthreads flag for HP/aCC
# pthread: Linux, etcetera
# --thread-safe: KAI C++
# pthread-config: use pthread-config program (for GNU Pth library)
case ${host_os} in
solaris*)
# On Solaris (at least, for some versions), libc contains stubbed
# (non-functional) versions of the pthreads routines, so link-based
# tests will erroneously succeed. (We need to link with -pthreads/-mt/
# -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
# a function called by this macro, so we could check for that, but
# who knows whether they'll stub that too in a future libc.) So,
# we'll just look for -pthreads and -lpthread first:
ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
;;
darwin*)
ax_pthread_flags="-pthread $ax_pthread_flags"
;;
esac
if test x"$ax_pthread_ok" = xno; then
for flag in $ax_pthread_flags; do
case $flag in
none)
AC_MSG_CHECKING([whether pthreads work without any flags])
;;
-*)
AC_MSG_CHECKING([whether pthreads work with $flag])
PTHREAD_CFLAGS="$flag"
;;
pthread-config)
AC_CHECK_PROG(ax_pthread_config, pthread-config, yes, no)
if test x"$ax_pthread_config" = xno; then continue; fi
PTHREAD_CFLAGS="`pthread-config --cflags`"
PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
;;
*)
AC_MSG_CHECKING([for the pthreads library -l$flag])
PTHREAD_LIBS="-l$flag"
;;
esac
save_LIBS="$LIBS"
save_CFLAGS="$CFLAGS"
LIBS="$PTHREAD_LIBS $LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
# Check for various functions. We must include pthread.h,
# since some functions may be macros. (On the Sequent, we
# need a special flag -Kthread to make this header compile.)
# We check for pthread_join because it is in -lpthread on IRIX
# while pthread_create is in libc. We check for pthread_attr_init
# due to DEC craziness with -lpthreads. We check for
# pthread_cleanup_push because it is one of the few pthread
# functions on Solaris that doesn't have a non-functional libc stub.
# We try pthread_create on general principles.
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>
static void routine(void *a) { a = 0; }
static void *start_routine(void *a) { return a; }],
[pthread_t th; pthread_attr_t attr;
pthread_create(&th, 0, start_routine, 0);
pthread_join(th, 0);
pthread_attr_init(&attr);
pthread_cleanup_push(routine, 0);
pthread_cleanup_pop(0) /* ; */])],
[ax_pthread_ok=yes],
[])
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
AC_MSG_RESULT($ax_pthread_ok)
if test "x$ax_pthread_ok" = xyes; then
break;
fi
PTHREAD_LIBS=""
PTHREAD_CFLAGS=""
done
fi
# Various other checks:
if test "x$ax_pthread_ok" = xyes; then
save_LIBS="$LIBS"
LIBS="$PTHREAD_LIBS $LIBS"
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
# Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
AC_MSG_CHECKING([for joinable pthread attribute])
attr_name=unknown
for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>],
[int attr = $attr; return attr /* ; */])],
[attr_name=$attr; break],
[])
done
AC_MSG_RESULT($attr_name)
if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name,
[Define to necessary symbol if this constant
uses a non-standard name on your system.])
fi
AC_MSG_CHECKING([if more special flags are required for pthreads])
flag=no
case ${host_os} in
aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
osf* | hpux*) flag="-D_REENTRANT";;
solaris*)
if test "$GCC" = "yes"; then
flag="-D_REENTRANT"
else
flag="-mt -D_REENTRANT"
fi
;;
esac
AC_MSG_RESULT(${flag})
if test "x$flag" != xno; then
PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
fi
AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT],
ax_cv_PTHREAD_PRIO_INHERIT, [
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[#include <pthread.h>]], [[int i = PTHREAD_PRIO_INHERIT;]])],
[ax_cv_PTHREAD_PRIO_INHERIT=yes],
[ax_cv_PTHREAD_PRIO_INHERIT=no])
])
AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"],
AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], 1, [Have PTHREAD_PRIO_INHERIT.]))
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
# More AIX lossage: compile with *_r variant
if test "x$GCC" != xyes; then
case $host_os in
aix*)
AS_CASE(["x/$CC"],
[x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6],
[#handle absolute path differently from PATH based program lookup
AS_CASE(["x$CC"],
[x/*],
[AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])],
[AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])])
;;
esac
fi
fi
test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
AC_SUBST(PTHREAD_LIBS)
AC_SUBST(PTHREAD_CFLAGS)
AC_SUBST(PTHREAD_CC)
# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
if test x"$ax_pthread_ok" = xyes; then
ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
:
else
ax_pthread_ok=no
$2
fi
AC_LANG_POP
])dnl AX_PTHREAD

View file

@ -1,76 +0,0 @@
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_tls.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_TLS([action-if-found], [action-if-not-found])
#
# DESCRIPTION
#
# Provides a test for the compiler support of thread local storage (TLS)
# extensions. Defines TLS if it is found. Currently knows about GCC/ICC
# and MSVC. I think SunPro uses the same as GCC, and Borland apparently
# supports either.
#
# LICENSE
#
# Copyright (c) 2008 Alan Woodland <ajw05@aber.ac.uk>
# Copyright (c) 2010 Diego Elio Petteno` <flameeyes@gmail.com>
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. You
# need not follow the terms of the GNU General Public License when using
# or distributing such scripts, even though portions of the text of the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
#serial 10
AC_DEFUN([AX_TLS], [
AC_MSG_CHECKING(for thread local storage (TLS) class)
AC_CACHE_VAL(ac_cv_tls, [
ax_tls_keywords="__thread __declspec(thread) none"
for ax_tls_keyword in $ax_tls_keywords; do
AS_CASE([$ax_tls_keyword],
[none], [ac_cv_tls=none ; break],
[AC_TRY_COMPILE(
[#include <stdlib.h>
static void
foo(void) {
static ] $ax_tls_keyword [ int bar;
exit(1);
}],
[],
[ac_cv_tls=$ax_tls_keyword ; break],
ac_cv_tls=none
)])
done
])
AC_MSG_RESULT($ac_cv_tls)
AS_IF([test "$ac_cv_tls" != "none"],
AC_DEFINE_UNQUOTED([TLS], $ac_cv_tls, [If the compiler supports a TLS storage class define it to that here])
m4_ifnblank([$1], [$1]),
m4_ifnblank([$2], [$2])
)
])

View file

@ -1,69 +0,0 @@
dnl pkg-config-based checks for Orc
dnl specific:
dnl ORC_CHECK([REQUIRED_VERSION])
AC_DEFUN([ORC_CHECK],
[
ORC_REQ=ifelse([$1], , "0.4.6", [$1])
AC_ARG_ENABLE(orc,
AC_HELP_STRING([--enable-orc],[use Orc if installed]),
[case "${enableval}" in
auto) enable_orc=auto ;;
yes) enable_orc=yes ;;
no) enable_orc=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-orc) ;;
esac
],
[enable_orc=auto]) dnl Default value
if test "x$enable_orc" != "xno" ; then
PKG_CHECK_MODULES(ORC, orc-0.4 >= $ORC_REQ, [
AC_DEFINE(HAVE_ORC, 1, [Use Orc])
HAVE_ORC=yes
if test "x$ORCC" = "x" ; then
AC_MSG_CHECKING(for usable orcc)
ORCC=`$PKG_CONFIG --variable=orcc orc-0.4`
dnl check whether the orcc found by pkg-config can be run from the build environment
dnl if this is not the case (e.g. when cross-compiling) fall back to orcc from PATH
AS_IF([$ORCC --version 1> /dev/null 2> /dev/null], [], [ORCC=`which orcc`])
AC_MSG_RESULT($ORCC)
fi
AC_SUBST(ORCC)
ORCC_FLAGS="--compat $ORC_REQ"
AC_SUBST(ORCC_FLAGS)
AS_IF([test "x$ORCC" = "x"], [HAVE_ORCC=no], [HAVE_ORCC=yes])
], [
if test "x$enable_orc" = "xyes" ; then
AC_MSG_ERROR([--enable-orc specified, but Orc >= $ORC_REQ not found])
fi
AC_DEFINE(DISABLE_ORC, 1, [Disable Orc])
HAVE_ORC=no
HAVE_ORCC=no
])
else
AC_DEFINE(DISABLE_ORC, 1, [Disable Orc])
HAVE_ORC=no
HAVE_ORCC=no
fi
AM_CONDITIONAL(HAVE_ORC, [test "x$HAVE_ORC" = "xyes"])
AM_CONDITIONAL(HAVE_ORCC, [test "x$HAVE_ORCC" = "xyes"])
]))
AC_DEFUN([ORC_OUTPUT],
[
if test "$HAVE_ORC" = yes ; then
printf "configure: *** Orc acceleration enabled.\n"
else
if test "x$enable_orc" = "xno" ; then
printf "configure: *** Orc acceleration disabled by --disable-orc. Slower code paths\n"
printf " will be used.\n"
else
printf "configure: *** Orc acceleration disabled. Requires Orc >= $ORC_REQ, which was\n"
printf " not found. Slower code paths will be used.\n"
fi
fi
printf "\n"
])

View file

@ -1,102 +0,0 @@
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
DISTCLEANFILES = \
$(noinst_DATA)
noinst_DATA = \
pulseaudio.1.xml \
pax11publish.1.xml \
pacat.1.xml \
pacmd.1.xml \
pactl.1.xml \
pasuspender.1.xml \
padsp.1.xml \
pulse-daemon.conf.5.xml \
pulse-client.conf.5.xml \
default.pa.5.xml \
pulse-cli-syntax.5.xml \
start-pulseaudio-x11.1.xml
if HAVE_ESOUND
noinst_DATA += esdcompat.1.xml
endif
xmllint: $(noinst_DATA)
for f in $(noinst_DATA) ; do \
xmllint --noout --valid "$$f" || exit 1 ; \
done
if BUILD_MANPAGES
dist_man_MANS = \
pulseaudio.1 \
pax11publish.1 \
pacat.1 \
pacmd.1 \
pactl.1 \
pasuspender.1 \
padsp.1 \
pulse-daemon.conf.5 \
pulse-client.conf.5 \
default.pa.5 \
pulse-cli-syntax.5 \
start-pulseaudio-x11.1
if HAVE_ESOUND
dist_man_MANS += esdcompat.1
endif
CLEANFILES = \
$(dist_man_MANS)
%: %.xml Makefile
$(AM_V_GEN) perl $(srcdir)/xmltoman $< > $@ || rm -f $@
if OS_IS_WIN32
SYMLINK_PROGRAM=cd $(DESTDIR)$(man1dir) && cp
else
SYMLINK_PROGRAM=ln -sf
endif
install-data-hook:
$(SYMLINK_PROGRAM) pacat.1 $(DESTDIR)$(man1dir)/paplay.1
$(SYMLINK_PROGRAM) pacat.1 $(DESTDIR)$(man1dir)/parec.1
$(SYMLINK_PROGRAM) pacat.1 $(DESTDIR)$(man1dir)/parecord.1
$(SYMLINK_PROGRAM) pacat.1 $(DESTDIR)$(man1dir)/pamon.1
uninstall-hook:
rm -f $(DESTDIR)$(man1dir)/paplay.1
rm -f $(DESTDIR)$(man1dir)/parec.1
rm -f $(DESTDIR)$(man1dir)/parecord.1
rm -f $(DESTDIR)$(man1dir)/pamon.1
endif
EXTRA_DIST = \
pulseaudio.1.xml.in \
esdcompat.1.xml.in \
pax11publish.1.xml.in \
pacat.1.xml.in \
pacmd.1.xml.in \
pactl.1.xml.in \
pasuspender.1.xml.in \
padsp.1.xml.in \
pulse-daemon.conf.5.xml.in \
pulse-client.conf.5.xml.in \
default.pa.5.xml.in \
pulse-cli-syntax.5.xml.in \
start-pulseaudio-x11.1.xml.in \
xmltoman \
xmltoman.css \
xmltoman.xsl \
xmltoman.dtd

View file

@ -1,19 +1,38 @@
# man page name, section, [aliases]
manpages = [
['default.pa', '5'],
['pacat', '1', ['paplay', 'parec', 'parecord', 'pamon']],
['pacmd', '1'],
['pactl', '1'],
['padsp', '1'],
['pasuspender', '1'],
['pax11publish', '1'],
['pulse-cli-syntax', '5'],
['pulse-client.conf', '5'],
['pulse-daemon.conf', '5'],
['pulseaudio', '1'],
['start-pulseaudio-x11', '1'],
]
manpages = []
if get_option('daemon')
manpages += [
['default.pa', '5'],
['pacmd', '1'],
['pasuspender', '1'],
['pulse-cli-syntax', '5'],
['pulse-daemon.conf', '5'],
['pulseaudio', '1'],
['start-pulseaudio-x11', '1'],
]
endif
if get_option('client')
manpages += [
['pacat', '1', ['paplay', 'parec', 'parecord', 'pamon']],
['pactl', '1'],
['pulse-client.conf', '5'],
]
if cdata.has('HAVE_OSS_WRAPPER')
manpages += [
['padsp', '1'],
]
endif
if x11_dep.found()
manpages += [
['pax11publish', '1'],
]
endif
endif
# FIXME: Add esdcompat if HAVE_ESOUND
#manpages += ['esdcompat', '1'],

View file

@ -79,7 +79,7 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
<option>
<p><opt>-d | --device</opt><arg>=SINKORSOURCE</arg></p>
<optdesc><p>Specify the symbolic name of the sink/source to play/record this stream on/from.</p></optdesc>
<optdesc><p>Specify the symbolic name of the sink/source to play/record this stream on/from. The special names @DEFAULT_SINK@, @DEFAULT_SOURCE@ and @DEFAULT_MONITOR@ can be used to specify the default sink, source and monitor respectively.</p></optdesc>
</option>
<option>
@ -202,7 +202,7 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
<option>
<p><opt>--process-time-msec</opt><arg>=MSEC</arg></p>
<optdesc><p>Explicitly configure the process time, with a time
specified in miliseconds. If left out the server will pick the
specified in milliseconds. If left out the server will pick the
process time. Use either this option or <opt>--process-time</opt>,
but not both.</p></optdesc>
</option>

View file

@ -53,6 +53,12 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
<optdesc><p>Choose the server to connect to.</p></optdesc>
</option>
<option>
<p><opt>-f | --format</opt><arg>=FORMAT</arg></p>
<optdesc><p>Choose output format, available options are "text" or "json".</p></optdesc>
</option>
<option>
<p><opt>-n | --client-name</opt><arg>=NAME</arg></p>
@ -63,7 +69,7 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
<section name="Commands">
<p>
When supplied as arguments to the commands below, the special names \@DEFAULT_SINK@, \@DEFAULT_SOURCE@ and \@DEFAULT_MONITOR@
When supplied as arguments to the commands below, the special names \@DEFAULT_SINK@, \@DEFAULT_SOURCE@ and \@DEFAULT_MONITOR@
can be used to specify the default sink, source and monitor respectively.
</p>
@ -80,8 +86,8 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
<option>
<p><opt>list</opt> [<arg>short</arg>] [<arg>TYPE</arg>]</p>
<optdesc><p>Dump all currently loaded modules, available sinks, sources, streams, etc. <arg>TYPE</arg> must be one of:
modules, sinks, sources, sink-inputs, source-outputs, clients, samples, cards. If not specified, all info is listed. If
short is given, output is in a tabular format, for easy parsing by scripts.</p></optdesc>
modules, sinks, sources, sink-inputs, source-outputs, clients, samples, cards, message-handlers. If not specified, all info is listed
with the exception of the message-handlers. If short is given, output is in a tabular format, for easy parsing by scripts.</p></optdesc>
</option>
<option>
@ -135,7 +141,7 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
<option>
<p><opt>suspend-sink</opt> <arg>SINK</arg> <arg>true|false</arg></p>
<optdesc><p>Suspend or resume the specified sink (which may be
specified either by its name or index), depending whether true
specified either by its symbolic name or numerical index), depending whether true
(suspend) or false (resume) is passed as last argument. Suspending
a sink will pause all playback. Depending on the module implementing
the sink this might have the effect that the underlying device is
@ -147,7 +153,7 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
<option>
<p><opt>suspend-source</opt> <arg>SOURCE</arg> <arg>true|false</arg></p>
<optdesc><p>Suspend or resume the specified source (which may be
specified either by its name or index), depending whether true
specified either by its symbolic name or numerical index), depending whether true
(suspend) or false (resume) is passed as last argument. Suspending
a source will pause all capturing. Depending on the module implementing
the source this might have the effect that the underlying device is
@ -161,9 +167,16 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
<optdesc><p>Set the specified card (identified by its symbolic name or numerical index) to the specified profile (identified by its symbolic name).</p></optdesc>
</option>
<option>
<p><opt>get-default-sink</opt></p>
<optdesc><p>Returns the symbolic name of the default sink.</p></optdesc>
</option>
<option>
<p><opt>set-default-sink</opt> <arg>SINK</arg></p>
<optdesc><p>Make the specified sink (identified by its symbolic name) the default sink.</p></optdesc>
<optdesc><p>Make the specified sink (identified by its symbolic name or numerical index) the default sink.
Use the special name \@NONE@ to unset the user defined default sink. This will make pulseaudio return to the default
sink selection based on sink priority.</p></optdesc>
</option>
<option>
@ -171,9 +184,16 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
<optdesc><p>Set the specified sink (identified by its symbolic name or numerical index) to the specified port (identified by its symbolic name).</p></optdesc>
</option>
<option>
<p><opt>get-default-source</opt></p>
<optdesc><p>Returns the symbolic name of the default source.</p></optdesc>
</option>
<option>
<p><opt>set-default-source</opt> <arg>SOURCE</arg></p>
<optdesc><p>Make the specified source (identified by its symbolic name) the default source.</p></optdesc>
<optdesc><p>Make the specified source (identified by its symbolic name or numerical index) the default source.
Use the special name \@NONE@ to unset the user defined default source. This will make pulseaudio return to the default
source selection based on source priority.</p></optdesc>
</option>
<option>
@ -187,6 +207,11 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
<arg>OFFSET</arg> is a number which represents the latency offset in microseconds</p></optdesc>
</option>
<option>
<p><opt>get-sink-volume</opt> <arg>SINK</arg></p>
<optdesc><p>Get the volume of the specified sink (identified by its symbolic name or numerical index) displayed in the same format as the `info` command.</p></optdesc>
</option>
<option>
<p><opt>set-sink-volume</opt> <arg>SINK</arg> <arg>VOLUME [VOLUME ...]</arg></p>
<optdesc><p>Set the volume of the specified sink (identified by its symbolic name or numerical index).
@ -196,6 +221,12 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
volume values are given their number has to match the sink's number of channels.</p></optdesc>
</option>
<option>
<p><opt>get-source-volume</opt> <arg>SOURCE</arg></p>
```
<optdesc><p>Get the volume of the specified source (identified by its symbolic name or numerical index) displayed in the same format as the `info` command.</p></optdesc>
</option>
<option>
<p><opt>set-source-volume</opt> <arg>SOURCE</arg> <arg>VOLUME [VOLUME ...]</arg></p>
<optdesc><p>Set the volume of the specified source (identified by its symbolic name or numerical index).
@ -221,11 +252,21 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
volume values are given their number has to match the source output's number of channels.</p></optdesc>
</option>
<option>
<p><opt>get-sink-mute</opt> <arg>SINK</arg></p>
<optdesc><p>Get the mute status of the specified sink (identified by its symbolic name or numerical index).</p></optdesc>
</option>
<option>
<p><opt>set-sink-mute</opt> <arg>SINK</arg> <arg>1|0|toggle</arg></p>
<optdesc><p>Set the mute status of the specified sink (identified by its symbolic name or numerical index).</p></optdesc>
</option>
<option>
<p><opt>get-source-mute</opt> <arg>SOURCE</arg></p>
<optdesc><p>Get the mute status of the specified source (identified by its symbolic name or numerical index).</p></optdesc>
</option>
<option>
<p><opt>set-source-mute</opt> <arg>SOURCE</arg> <arg>1|0|toggle</arg></p>
<optdesc><p>Set the mute status of the specified source (identified by its symbolic name or numerical index).</p></optdesc>
@ -253,6 +294,13 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
for possible encodings. </p></optdesc>
</option>
<option>
<p><opt>send-message</opt> <arg>RECIPIENT</arg> <arg>MESSAGE</arg> <arg>MESSAGE_PARAMETERS</arg></p>
<optdesc><p>Send a message to the specified recipient object. If applicable an additional string containing
message parameters can be specified. A string is returned as a response to the message. For available messages
see https://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/doc/messaging_api.txt.</p></optdesc>
</option>
<option>
<p><opt>subscribe</opt></p>
<optdesc><p>Subscribe to events, pactl does not exit by itself, but keeps waiting for new events.</p></optdesc>

View file

@ -143,8 +143,10 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
<p><opt>set-default-sink|set-default-source</opt> <arg>index|name</arg></p>
<optdesc><p>Make a sink (resp. source) the default. You may specify the
sink (resp. source) by its index in the sink (resp. source) list or by its
name.</p><p>Note that defaults may be overridden by various policy modules
or by specific stream configurations.</p></optdesc>
name. Use the special name \@NONE@ to unset the user defined default sink or
source. In this case, pulseaudio will return to the default sink or source
selection based on priority.</p><p>Note that defaults may be overridden by
various policy modules or by specific stream configurations.</p></optdesc>
</option>
<option>
@ -306,6 +308,13 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
<optdesc><p>Debug: Show shared properties.</p></optdesc>
</option>
<option>
<p><opt>send-message</opt> <arg>recipient</arg> <arg>message</arg> <arg>message_parameters</arg></p>
<optdesc><p>Send a message to the specified recipient object. If applicable an additional string containing
message parameters can be specified. A string is returned as a response to the message. For available messages
see https://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/doc/messaging_api.txt.</p></optdesc>
</option>
<option>
<p><opt>exit</opt></p>
<optdesc><p>Terminate the daemon. If you want to terminate a CLI

View file

@ -71,7 +71,7 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
</option>
<option>
<p><opt>default-server=</opt> The default sever to connect
<p><opt>default-server=</opt> The default server to connect
to. The environment variable <opt>$PULSE_SERVER</opt> takes
precedence.</p>
</option>

File diff suppressed because it is too large Load diff

View file

@ -1,3 +1,12 @@
option('daemon',
type : 'boolean', value : true,
description : 'Enable building and installation of pulseaudio daemon and supporting configuration files')
option('client',
type : 'boolean', value : true,
description : 'Build and install pulseaudio client libraries and utilities')
option('doxygen',
type : 'boolean', value : true,
description : 'Enable building and installation of documentation generated with doxygen')
option('gcov',
type : 'boolean', value : false,
description : 'Enable optional gcov coverage analysis')
@ -79,17 +88,26 @@ option('avahi',
type : 'feature', value : 'auto',
description : 'Optional Avahi support')
option('bluez5',
type : 'boolean', value : 'true',
type : 'feature', value : 'auto',
description : 'Optional BlueZ 5 support')
option('bluez5-gstreamer',
type : 'feature', value: 'auto',
description : 'Optional BlueZ 5 GStreamer support')
option('bluez5-native-headset',
type : 'boolean',
description : 'Optional native headset backend support (BlueZ 5)')
option('bluez5-ofono-headset',
type : 'boolean',
description : 'Optional oFono headset backend support (BlueZ 5)')
option('consolekit',
type : 'feature', value : 'auto',
description : 'Optional ConsoleKit support')
option('dbus',
type : 'feature', value : 'auto',
description : 'Optional D-Bus support')
option('elogind',
type : 'feature', value : 'auto',
description : 'Optional elogind support')
option('fftw',
type : 'feature', value : 'auto',
description : 'Optional FFTW support')
@ -100,7 +118,7 @@ option('gsettings',
type : 'feature', value : 'auto',
description : 'Optional GSettings support')
option('gstreamer',
type : 'feature', value : 'disabled',
type : 'feature', value : 'auto',
description : 'Optional GStreamer dependency for media-related functionality')
option('gtk',
type : 'feature', value : 'auto',
@ -123,6 +141,9 @@ option('openssl',
option('orc',
type : 'feature', value : 'auto',
description : 'Optimized Inner Loop Runtime Compiler')
option('oss-output',
type : 'feature', value : 'auto',
description : 'Optional OSS output support')
option('samplerate',
type : 'feature', value : 'disabled',
description : 'Optional libsamplerate support (DEPRECATED)')
@ -135,12 +156,21 @@ option('speex',
option('systemd',
type : 'feature', value : 'auto',
description : 'Optional systemd support')
option('tcpwrap',
type : 'feature', value : 'auto',
description : 'Optional TCP wrappers support')
option('udev',
type : 'feature', value : 'auto',
description : 'Optional udev support')
option('valgrind',
type : 'feature', value : 'auto',
description : 'Optional Valgrind support')
option('x11',
type : 'feature', value : 'auto',
description : 'Optional X11 support')
option('enable-smoother-2',
type : 'boolean', value : true,
description : 'Use alternative time smoother implementation')
# Echo cancellation

48
orc.mak
View file

@ -1,48 +0,0 @@
#
# This is a Makefile.am fragment to build Orc code. It is based
# on the orc.mak file distributed in the GStreamer common
# repository.
#
# Include this file like this:
#
# include $(top_srcdir)/orc.mak
#
# For each Orc source file, append its name (without the extension)
# to ORC_SOURCE:
#
# ORC_SOURCE += gstadderorc
#
# This will create gstadder-orc-gen.c and gstadder-orc-gen.h, which
# you need to add to your nodist_module_SOURCES.
#
# Note that this file appends to BUILT_SOURCES and CLEANFILES, so
# define them before including this file.
#
EXTRA_DIST += $(addsuffix .orc,$(ORC_SOURCE))
if HAVE_ORC
ORC_BUILT_SOURCE = $(addsuffix -orc-gen.c,$(ORC_SOURCE))
ORC_BUILT_HEADER = $(addsuffix -orc-gen.h,$(ORC_SOURCE))
BUILT_SOURCES += $(ORC_BUILT_SOURCE) $(ORC_BUILT_HEADER)
CLEANFILES += $(BUILT_SOURCES)
orcc_v_gen = $(orcc_v_gen_$(V))
orcc_v_gen_ = $(orcc_v_gen_$(AM_DEFAULT_VERBOSITY))
orcc_v_gen_0 = @echo " ORCC $@";
cp_v_gen = $(cp_v_gen_$(V))
cp_v_gen_ = $(cp_v_gen_$(AM_DEFAULT_VERBOSITY))
cp_v_gen_0 = @echo " CP $@";
%-orc-gen.c: %.orc
@mkdir -p $(@D)
$(orcc_v_gen)$(ORCC) --implementation -o $@ $<
%-orc-gen.h: %.orc
@mkdir -p $(@D)
$(orcc_v_gen)$(ORCC) --header -o $@ $<
endif

View file

@ -46,3 +46,10 @@ tr
uk
zh_CN
zh_TW
eo
si
ka
eu
ar
sl
ro

View file

@ -7,6 +7,7 @@ src/daemon/ltdl-bind-now.c
src/daemon/main.c
src/daemon/pulseaudio.desktop.in
src/daemon/systemd/user/pulseaudio.service.in
src/daemon/systemd/user/pulseaudio-x11.service.in
src/modules/alsa/alsa-mixer.c
src/modules/alsa/alsa-sink.c
src/modules/alsa/alsa-source.c
@ -16,8 +17,6 @@ src/modules/alsa/module-alsa-sink.c
src/modules/alsa/module-alsa-source.c
src/modules/bluetooth/module-bluez5-device.c
src/modules/echo-cancel/module-echo-cancel.c
src/modules/gconf/gconf-helper.c
src/modules/gconf/module-gconf.c
src/modules/jack/module-jack-sink.c
src/modules/jack/module-jack-source.c
src/modules/macosx/module-coreaudio-device.c
@ -96,7 +95,6 @@ src/pulsecore/core-subscribe.c
src/pulsecore/core-util.c
src/pulsecore/core-util.h
src/pulsecore/dbus-util.c
src/pulsecore/dllmain.c
src/pulsecore/dynarray.c
src/pulsecore/fdsem.c
src/pulsecore/ffmpeg/resample2.c
@ -172,6 +170,7 @@ src/pulsecore/thread-mq.c
src/pulsecore/thread-posix.c
src/pulsecore/thread-win32.c
src/pulsecore/time-smoother.c
src/pulsecore/time-smoother_2.c
src/pulsecore/tokenizer.c
src/pulsecore/x11prop.c
src/pulsecore/x11wrap.c

956
po/af.po

File diff suppressed because it is too large Load diff

2903
po/ar.po Normal file

File diff suppressed because it is too large Load diff

3805
po/as.po

File diff suppressed because it is too large Load diff

2050
po/be.po

File diff suppressed because it is too large Load diff

1886
po/bg.po

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

4707
po/ca.po

File diff suppressed because it is too large Load diff

1146
po/cs.po

File diff suppressed because it is too large Load diff

987
po/da.po

File diff suppressed because it is too large Load diff

1679
po/de.po

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

2472
po/el.po

File diff suppressed because it is too large Load diff

2967
po/eo.po Normal file

File diff suppressed because it is too large Load diff

3165
po/es.po

File diff suppressed because it is too large Load diff

2902
po/eu.po Normal file

File diff suppressed because it is too large Load diff

4085
po/fi.po

File diff suppressed because it is too large Load diff

2605
po/fr.po

File diff suppressed because it is too large Load diff

1459
po/gl.po

File diff suppressed because it is too large Load diff

3816
po/gu.po

File diff suppressed because it is too large Load diff

3222
po/he.po

File diff suppressed because it is too large Load diff

4599
po/hi.po

File diff suppressed because it is too large Load diff

1472
po/hr.po

File diff suppressed because it is too large Load diff

1794
po/hu.po

File diff suppressed because it is too large Load diff

1737
po/id.po

File diff suppressed because it is too large Load diff

920
po/it.po

File diff suppressed because it is too large Load diff

2573
po/ja.po

File diff suppressed because it is too large Load diff

3046
po/ka.po Normal file

File diff suppressed because it is too large Load diff

828
po/kk.po

File diff suppressed because it is too large Load diff

3828
po/kn.po

File diff suppressed because it is too large Load diff

4355
po/ko.po

File diff suppressed because it is too large Load diff

924
po/lt.po

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,3 @@
i18n = import('i18n')
i18n.gettext(
meson.project_name(),
preset: 'glib',
@ -7,5 +6,3 @@ i18n.gettext(
args: ['--msgid-bugs-address=https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/new',
'--width=90'],
)
po_dir = meson.current_source_dir()

3796
po/ml.po

File diff suppressed because it is too large Load diff

3799
po/mr.po

File diff suppressed because it is too large Load diff

4387
po/nl.po

File diff suppressed because it is too large Load diff

2612
po/nn.po

File diff suppressed because it is too large Load diff

1730
po/oc.po

File diff suppressed because it is too large Load diff

3813
po/or.po

File diff suppressed because it is too large Load diff

3793
po/pa.po

File diff suppressed because it is too large Load diff

928
po/pl.po

File diff suppressed because it is too large Load diff

3991
po/pt.po

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

3412
po/ro.po Normal file

File diff suppressed because it is too large Load diff

1579
po/ru.po

File diff suppressed because it is too large Load diff

2963
po/si.po Normal file

File diff suppressed because it is too large Load diff

1729
po/sk.po

File diff suppressed because it is too large Load diff

3376
po/sl.po Normal file

File diff suppressed because it is too large Load diff

3851
po/sr.po

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

1113
po/sv.po

File diff suppressed because it is too large Load diff

3820
po/ta.po

File diff suppressed because it is too large Load diff

3786
po/te.po

File diff suppressed because it is too large Load diff

2107
po/tr.po

File diff suppressed because it is too large Load diff

949
po/uk.po

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

30
scripts/generate-map-file.sh Executable file
View file

@ -0,0 +1,30 @@
#!/bin/bash
# Generator for linker version script.
# We use the same linker version script for all public .so files
#
# generate-map-file.sh where-is/map-file public_interface_1.h public_interface_2.h ... public_interface_N.h
#
CTAGS_IDENTIFIER_LIST="PA_GCC_MALLOC,PA_GCC_ALLOC_SIZE2,PA_GCC_ALLOC_SIZE,PA_GCC_PURE,PA_GCC_CONST,PA_GCC_DEPRECATED,PA_GCC_PRINTF_ATTR"
print_map_file() {
echo "PULSE_0 {"
echo "global:"
ctags -I ${CTAGS_IDENTIFIER_LIST} -f - --c-kinds=p "$@" | awk '/^pa_/ { print $1 ";" }' | sort
echo "local:"
echo "*;"
echo "};"
}
print_def_file() {
echo "EXPORTS"
ctags -I ${CTAGS_IDENTIFIER_LIST} -f - --c-kinds=p "$@" | awk '/^pa_/ && !/(^pa_glib_|^pa_simple_)/ { print $1 }' | sort
}
MAP_FILE=$1
DEF_FILE=$2
shift 2
cd "${MESON_SOURCE_ROOT}/${MESON_SUBDIR}" && print_map_file "$@" > ${MAP_FILE}
cd "${MESON_SOURCE_ROOT}/${MESON_SUBDIR}" && print_def_file "$@" > ${DEF_FILE}

View file

@ -0,0 +1,8 @@
#!/bin/bash
if [ "x${1}" == "x" ]; then
echo "Package version must be specified to generate tarball version"
exit 1
fi
echo "${1}" > "$MESON_DIST_ROOT/.tarball-version"

View file

@ -1,20 +1,35 @@
if bashcompletiondir != 'no'
aliases = [
'pacat',
'pacmd',
'pactl',
'padsp',
'paplay',
'parec',
'parecord',
'pasuspender',
]
aliases = []
install_data('pulseaudio', install_dir : bashcompletiondir)
if get_option('daemon')
aliases += [
'pulseaudio',
'pacmd',
'pasuspender',
]
# Create target directory for symlinks
if meson.version().version_compare('>= 0.60.0')
install_emptydir(bashcompletiondir)
else
meson.add_install_script('sh', '-c', 'mkdir -p $DESTDIR@0@'.format(bashcompletiondir))
endif
endif
if get_option('client')
aliases += [
'pacat',
'padsp',
'paplay',
'parec',
'parecord',
]
install_data('pactl', install_dir : bashcompletiondir)
endif
foreach alias : aliases
dst = join_paths(bashcompletiondir, alias)
cmd = 'ln -fs @0@ $DESTDIR@1@'.format('pulseaudio', dst)
cmd = 'ln -fs @0@ $DESTDIR@1@'.format('pactl', dst)
meson.add_install_script('sh', '-c', cmd)
endforeach
endif

View file

@ -109,19 +109,20 @@ in_array() {
}
_pactl() {
local cur prev words cword preprev command
local cur prev words cword preprev word command
local comps
local flags='-h --help --version -s --server= --client-name='
local list_types='short sinks sources sink-inputs source-outputs cards
modules samples clients'
modules samples clients message-handlers'
local commands=(stat info list exit upload-sample play-sample remove-sample
load-module unload-module move-sink-input move-source-output
suspend-sink suspend-source set-card-profile set-default-sink
set-sink-port set-default-source set-source-port set-sink-volume
suspend-sink suspend-source set-card-profile get-default-sink
set-default-sink set-sink-port get-default-source set-default-source
set-source-port get-sink-volume set-sink-volume get-source-volume
set-source-volume set-sink-input-volume set-source-output-volume
set-sink-mute set-source-mute set-sink-input-mute
set-source-output-mute set-sink-formats set-port-latency-offset
subscribe help)
get-sink-mute set-sink-mute get-source-mute set-source-mute
set-sink-input-mute set-source-output-mute set-sink-formats
set-port-latency-offset subscribe send-message help)
_init_completion -n = || return
preprev=${words[$cword-2]}
@ -186,6 +187,8 @@ _pactl() {
remove-sample) ;; # TODO
get-default*) ;;
load-module)
comps=$(__all_modules)
COMPREPLY=($(compgen -W '${comps[*]}' -- "$cur"))
@ -255,7 +258,7 @@ _pactl() {
complete -F _pactl pactl
_pacmd() {
local cur prev words cword preprev command
local cur prev words cword preprev word command
local comps
local flags='-h --help --version'
local commands=(exit help list-modules list-cards list-sinks list-sources list-clients
@ -271,7 +274,7 @@ _pacmd() {
move-sink-input move-source-output suspend-sink suspend-source
suspend set-card-profile set-sink-port set-source-port
set-port-latency-offset set-log-target set-log-level set-log-meta
set-log-time set-log-backtrace)
set-log-time set-log-backtrace send-message)
_init_completion -n = || return
preprev=${words[$cword-2]}
@ -500,7 +503,7 @@ _pulseaudio()
--start -k --kill --check --system= -D --daemonize= --fail= --high-priority=
--realtime= --disallow-module-loading= --disallow-exit= --exit-idle-time=
--scache-idle-time= --log-level= -v --log-target= --log-meta= --log-time=
--log-backtrace= -p --dl-search-path= --resample-method= --use-pit-file=
--log-backtrace= -p --dl-search-path= --resample-method= --use-pid-file=
--no-cpu-limit= --disable-shm= --enable-memfd= -L --load= -F --file= -C -n'
_init_completion -n = || return

View file

@ -18,10 +18,12 @@ _devices() {
if [[ $service == pactl || $service == pacmd ]]; then
case $words[$((CURRENT - 1))] in
set-sink-input-*) cmd=('sink-inputs');;
get-sink-*) cmd=('sinks');;
set-sink-*) cmd=('sinks');;
set-default-sink) cmd=('sinks');;
set-default-source) cmd=('sources');;
set-source-output-*) cmd=('source-outputs');;
get-source-*) cmd=('sources');;
set-source-*) cmd=('sources');;
suspend-sink) cmd=('sinks');;
suspend-source) cmd=('sources');;
@ -34,6 +36,7 @@ _devices() {
case $words[$((CURRENT - 2))] in
move-sink-input) cmd=('sinks');;
move-source-output) cmd=('sources');;
play-sample) cmd=('sinks');;
esac
elif [[ $service == (pacat|paplay|parec|parecord) ]]; then
@ -147,7 +150,7 @@ _ports() {
if [[ $line != [[:blank:]] &&
$line != (*Part?of*|*Properties:*|*device.icon_name*) ]]; then
_port_name=${line%%: *}
_port_name=${_port_name//[[:blank:]]/}
_port_name=${_port_name##[[:blank:]]#}
_port_description=${line#*: }
_port_list+=($_port_name:$_port_description)
fi
@ -158,6 +161,13 @@ _ports() {
_describe 'port list' _port_list
}
_sample_names() {
local -a _sample_names
sample_names=(${${${(f)"$(_call_program samples_tag "pactl $remote list samples short 2> /dev/null")"}##[[:digit:]]#[[:blank:]]#}%%[[:blank:]]*})
_wanted pactl-samples expl 'sample list' compadd $sample_names
}
_cards(){
local -a _card_list
local _card _cad_name
@ -249,20 +259,27 @@ _pactl_completion() {
'suspend-sink: suspend or resume a sink'
'suspend-source: suspend or resume a source'
'set-card-profile: set a card profile'
'get-default-sink: get the default sink'
'set-default-sink: set the default sink'
'get-default-source: get the default source'
'set-default-source: set the default source'
'set-sink-port: set the sink port of a sink'
'set-source-port: set the source port of a source'
'set-port-latency-offset: set a latency offset on a port'
'get-sink-volume: get the volume of a sink'
'set-sink-volume: set the volume of a sink'
'get-source-volume: get the volume of a source'
'set-source-volume: set the volume of a source'
'set-sink-input-volume: set the volume of a stream'
'set-source-output-volume: set the volume of a recording stream'
'get-sink-mute: get the mute status of a sink'
'set-sink-mute: mute a sink'
'get-source-mute: get the mute status of a source'
'set-source-mute: mute a source'
'set-sink-input-mute: mute a stream'
'set-source-output-mute: mute a recording stream'
'set-sink-formats: set supported formats of a sink'
'send-message: send a message to a pulseaudio object'
'subscribe: subscribe to events'
)
@ -284,6 +301,7 @@ _pactl_completion() {
'clients: list connected clients'
'samples: list samples'
'cards: list available cards'
'message-handlers: list available message-handlers'
)
if ((CURRENT == 2)); then
@ -304,10 +322,10 @@ _pactl_completion() {
_play_sample_parameter() {
if ((CURRENT == 2)); then
# We're completing the first parameter after "play-sample".
# TODO: Implement sample name completion.
_sample_names
elif ((CURRENT == 3)); then
# We're completing the second parameter after "play-sample".
# TODO: Implement sink name completion.
_devices
fi
}
@ -470,7 +488,7 @@ _pactl_completion() {
list) _list_parameter;;
upload-sample) if ((CURRENT == 2)); then _files; fi;;
play-sample) _play_sample_parameter;;
remove-sample) ;; # TODO: Implement sample name completion.
remove-sample) if ((CURRENT == 2)); then _sample_names; fi;;
load-module) _load_module_parameter;;
unload-module) if ((CURRENT == 2)); then _loaded_modules; fi;;
move-sink-input) _move_sink_input_parameter;;
@ -482,11 +500,15 @@ _pactl_completion() {
set-default-source) if ((CURRENT == 2)); then _devices; fi;;
set-sink-port) _set_sink_port_parameter;;
set-source-port) _set_source_port_parameter;;
get-sink-volume) if ((CURRENT == 2)); then _devices; fi;;
set-sink-volume) if ((CURRENT == 2)); then _devices; fi;;
get-source-volume) if ((CURRENT == 2)); then _devices; fi;;
set-source-volume) if ((CURRENT == 2)); then _devices; fi;;
set-sink-input-volume) if ((CURRENT == 2)); then _devices; fi;;
set-source-output-volume) if ((CURRENT == 2)); then _devices; fi;;
get-sink-mute) if ((CURRENT == 2)); then _devices; fi;;
set-sink-mute) _set_sink_mute_parameter;;
get-source-mute) if ((CURRENT == 2)); then _devices; fi;;
set-source-mute) _set_source_mute_parameter;;
set-sink-input-mute) _set_sink_input_mute_parameter;;
set-source-output-mute) _set_source_output_mute_parameter;;
@ -561,6 +583,7 @@ _pacmd_completion() {
'dump: show daemon configuration'
'dump-volumes: show the state of all volumes'
'shared: show shared properties'
'send-message: send a message to a pulseaudio object'
'exit: ask the PulseAudio daemon to exit'
)
_describe 'pacmd commands' _pacmd_commands

View file

@ -1,3 +1,5 @@
if zshcompletiondir != 'no'
install_data('_pulseaudio', install_dir : zshcompletiondir)
if get_option('client')
if zshcompletiondir != 'no'
install_data('_pulseaudio', install_dir : zshcompletiondir)
endif
endif

3
src/.gitignore vendored
View file

@ -14,7 +14,6 @@ daemon.conf
default.pa
echo-cancel-test
esdcompat
gconf-helper
gsettings-helper
org.freedesktop.pulseaudio.gschema.valid
pacat
@ -26,6 +25,7 @@ pasuspender
pax11publish
pulseaudio
pulseaudio.service
pulseaudio-x11.service
start-pulseaudio-x11
*-orc-gen.[ch]
# tests
@ -71,6 +71,7 @@ proplist-test
queue-test
remix-test
resampler-test
resampler-rewind-test
rtpoll-test
rtstutter
sig2str-test

Some files were not shown because too many files have changed in this diff Show more