Compare commits

...

505 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
244 changed files with 47496 additions and 21979 deletions

1
.gitignore vendored
View file

@ -37,3 +37,4 @@ stamp-*
.dirstamp
*.orig
*.rej
subprojects/*/

View file

@ -2,7 +2,7 @@
# 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
@ -10,6 +10,15 @@
# 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
- build
@ -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: '2021-03-01-02'
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
@ -48,6 +56,7 @@ build-container:
check
curl
dbus-x11
doxygen
g++
gcc
gettext
@ -88,17 +97,19 @@ build-container:
wget
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

View file

@ -28,10 +28,10 @@ Please take a look at the [coding style
documentation](https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/Developer/CodingStyle/)
on our wiki.
## Commit messagse
## Commit messages
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
(<=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.

300
NEWS
View file

@ -1,3 +1,303 @@
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.

View file

@ -14,22 +14,24 @@ if get_option('daemon')
]
endif
manpages += [
['pacat', '1', ['paplay', 'parec', 'parecord', 'pamon']],
['pactl', '1'],
['pulse-client.conf', '5'],
]
if cdata.has('HAVE_OSS_WRAPPER')
if get_option('client')
manpages += [
['padsp', '1'],
['pacat', '1', ['paplay', 'parec', 'parecord', 'pamon']],
['pactl', '1'],
['pulse-client.conf', '5'],
]
endif
if x11_dep.found()
manpages += [
['pax11publish', '1'],
]
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

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>

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>
@ -168,7 +174,9 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
<option>
<p><opt>set-default-sink</opt> <arg>SINK</arg></p>
<optdesc><p>Make the specified sink (identified by its symbolic name or numerical index) 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>
@ -183,7 +191,9 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
<option>
<p><opt>set-default-source</opt> <arg>SOURCE</arg></p>
<optdesc><p>Make the specified source (identified by its symbolic name or numerical index) 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>

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>

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>

View file

@ -1,10 +1,12 @@
project('pulseaudio', 'c', 'cpp',
version : run_command(find_program('git-version-gen'), join_paths(meson.current_source_dir(), '.tarball-version')).stdout().strip(),
project('pulseaudio', 'c',
version : run_command(find_program('git-version-gen'), join_paths(meson.current_source_dir(), '.tarball-version'), check : false).stdout().strip(),
meson_version : '>= 0.50.0',
default_options : [ 'c_std=gnu11', 'cpp_std=c++11' ]
default_options : [ 'c_std=gnu11', 'cpp_std=c++17' ]
)
meson.add_dist_script('scripts/save-tarball-version.sh', meson.project_version())
if not meson.is_subproject()
meson.add_dist_script('scripts/save-tarball-version.sh', meson.project_version())
endif
pa_version_str = meson.project_version()
# For tarballs, the first split will do nothing, but for builds in git, we
@ -25,7 +27,7 @@ pa_protocol_version = 35
# The stable ABI for client applications, for the version info x:y:z
# always will hold x=z
libpulse_version_info = [24, 0, 24]
libpulse_version_info = [24, 3, 24]
# A simplified, synchronous, ABI-stable interface for client
# applications, for the version info x:y:z always will hold x=z
@ -53,6 +55,8 @@ libpulse_mainloop_glib_version = '@0@.@1@.@2@'.format(
libpulse_mainloop_glib_version_info[1],
)
i18n = import('i18n')
# Paths
prefix = get_option('prefix')
@ -68,6 +72,7 @@ localedir = join_paths(prefix, get_option('localedir'))
localstatedir = join_paths(prefix, get_option('localstatedir'))
sysconfdir = join_paths(prefix, get_option('sysconfdir'))
privlibdir = join_paths(libdir, 'pulseaudio')
po_dir = join_paths(meson.current_source_dir(), 'po')
if host_machine.system() == 'windows'
# Windows only supports loading libraries from the same dir as the executable
@ -85,7 +90,12 @@ pulsesysconfdir = join_paths(sysconfdir, 'pulse')
modlibexecdir = get_option('modlibexecdir')
if modlibexecdir == ''
modlibexecdir = join_paths(libdir, 'pulse-' + pa_version_major_minor, 'modules')
modlibexecdir = join_paths(libdir, 'pulseaudio', 'modules')
endif
if host_machine.system() == 'windows'
# Windows only supports loading libraries from the same dir as the executable
modlibexecdir = bindir
endif
padsplibdir = get_option('padsplibdir')
@ -140,7 +150,11 @@ cdata.set_quoted('PA_MACHINE_ID', join_paths(sysconfdir, 'machine-id'))
cdata.set_quoted('PA_MACHINE_ID_FALLBACK', join_paths(localstatedir, 'lib', 'dbus', 'machine-id'))
cdata.set_quoted('PA_SRCDIR', join_paths(meson.current_source_dir(), 'src'))
cdata.set_quoted('PA_BUILDDIR', meson.current_build_dir())
cdata.set_quoted('PA_SOEXT', '.so')
if host_machine.system() == 'windows'
cdata.set_quoted('PA_SOEXT', '.dll')
else
cdata.set_quoted('PA_SOEXT', '.so')
endif
cdata.set_quoted('PA_DEFAULT_CONFIG_DIR', pulsesysconfdir)
cdata.set('PA_DEFAULT_CONFIG_DIR_UNQUOTED', pulsesysconfdir)
cdata.set_quoted('PA_BINARY', join_paths(bindir, 'pulseaudio'))
@ -152,8 +166,7 @@ cdata.set_quoted('PA_SYSTEM_USER', get_option('system_user'))
cdata.set_quoted('PA_SYSTEM_GROUP', get_option('system_group'))
cdata.set_quoted('PA_ACCESS_GROUP', get_option('access_group'))
cdata.set_quoted('PA_CFLAGS', 'Not yet supported on meson')
cdata.set_quoted('PA_ALSA_PATHS_DIR', join_paths(alsadatadir, 'paths'))
cdata.set_quoted('PA_ALSA_PROFILE_SETS_DIR', join_paths(alsadatadir, 'profile-sets'))
cdata.set_quoted('PA_ALSA_DATA_DIR', alsadatadir)
cdata.set_quoted('DESKTOPFILEDIR', join_paths(datadir, 'applications'))
cdata.set_quoted('PULSE_LOCALEDIR', localedir)
cdata.set_quoted('GETTEXT_PACKAGE', 'pulseaudio')
@ -177,6 +190,7 @@ endif
# rather than ending up in the config.h file?
if host_machine.system() == 'darwin'
cdata.set('OS_IS_DARWIN', 1)
cdata.set('HAVE_COREAUDIO', 1)
cdata.set('_DARWIN_C_SOURCE', '200112L') # Needed to get NSIG on Mac OS
elif host_machine.system() == 'windows'
cdata.set('OS_IS_WIN32', 1)
@ -216,7 +230,6 @@ endif
check_headers = [
'arpa/inet.h',
'byteswap.h',
'cpuid.h',
'dlfcn.h',
'execinfo.h',
'grp.h',
@ -276,6 +289,19 @@ if cc.has_header_symbol('pthread.h', 'PTHREAD_PRIO_INHERIT')
cdata.set('HAVE_PTHREAD_PRIO_INHERIT', 1)
endif
# Headers which are usable
check_usable_headers = [
'cpuid.h',
]
foreach h : check_usable_headers
if cc.check_header(h)
define = 'HAVE_' + h.underscorify().to_upper()
cdata.set(define, 1)
endif
endforeach
# Functions
check_functions = [
@ -404,7 +430,7 @@ cdata.set('MESON_BUILD', 1)
# so we request the nodelete flag to be enabled.
# On other systems, we don't really know how to do that, but it's welcome if somebody can tell.
# Windows doesn't support this flag.
if host_machine.system() != 'windows'
if host_machine.system() != 'windows' and host_machine.system() != 'darwin'
nodelete_link_args = ['-Wl,-z,nodelete']
else
nodelete_link_args = []
@ -413,6 +439,7 @@ endif
# Code coverage
if get_option('gcov')
add_languages('cpp')
add_project_arguments('--coverage', language: ['c', 'cpp'])
add_project_link_arguments('--coverage', language: ['c', 'cpp'])
endif
@ -478,22 +505,24 @@ endif
need_libatomic_ops = false
atomictest = '''void func() {
atomictest = '''int main() {
volatile int atomic = 2;
__sync_bool_compare_and_swap (&atomic, 2, 3);
return 0;
}
'''
if cc.compiles(atomictest)
if cc.links(atomictest)
cdata.set('HAVE_ATOMIC_BUILTINS', 1)
newatomictest = '''void func() {
newatomictest = '''int main() {
int c = 0;
__atomic_store_n(&c, 4, __ATOMIC_SEQ_CST);
return 0;
}
'''
if(cc.compiles(newatomictest))
if(cc.links(newatomictest))
cdata.set('HAVE_ATOMIC_BUILTINS_MEMORY_MODEL', 1)
endif
@ -565,219 +594,245 @@ if host_machine.cpu_family() == 'arm'
endif
# NEON checks are automatically done by the unstable-simd module
if get_option('daemon')
# FIXME: make sure it's >= 2.2
ltdl_dep = cc.find_library('ltdl', required : true)
endif
# FIXME: can meson support libtool -dlopen/-dlpreopen things?
# and do we still want to support this at all?
cdata.set('DISABLE_LIBTOOL_PRELOAD', 1)
if get_option('database') == 'tdb'
database_dep = dependency('tdb')
elif get_option('database') == 'gdbm'
database_dep = cc.find_library('gdbm', required : true)
else
database_dep = dependency('', required: false)
endif
# Dependencies common to client, daemon and modules
if get_option('ipv6')
cdata.set('HAVE_IPV6', 1)
endif
if get_option('legacy-database-entry-format')
cdata.set('ENABLE_LEGACY_DATABASE_ENTRY_FORMAT', 1)
endif
if get_option('stream-restore-clear-old-devices')
cdata.set('STREAM_RESTORE_CLEAR_OLD_DEVICES', 1)
endif
if get_option('running-from-build-tree')
cdata.set('HAVE_RUNNING_FROM_BUILD_TREE', 1)
endif
alsa_dep = dependency('alsa', version : '>= 1.0.24', required : get_option('alsa'))
if alsa_dep.found()
cdata.set('HAVE_ALSA', 1)
cdata.set('HAVE_ALSA_UCM', 1)
endif
asyncns_dep = dependency('libasyncns', version : '>= 0.1', required : get_option('asyncns'))
if asyncns_dep.found()
cdata.set('HAVE_LIBASYNCNS', 1)
endif
dbus_dep = dependency('dbus-1', version : '>= 1.4.12', required : get_option('dbus'))
if dbus_dep.found()
cdata.set('HAVE_DBUS', 1)
endif
gio_dep = dependency('gio-2.0', version : '>= 2.26.0', required : get_option('gsettings'))
if gio_dep.found()
cdata.set('HAVE_GSETTINGS', 1)
endif
glib_dep = dependency('glib-2.0', version : '>= 2.28.0', required: get_option('glib'))
if glib_dep.found()
cdata.set('HAVE_GLIB', 1)
endif
gtk_dep = dependency('gtk+-3.0', required : get_option('gtk'))
if gtk_dep.found()
cdata.set('HAVE_GTK', 1)
endif
have_orcc = false
orcc_args = []
orc_dep = dependency('orc-0.4', version : '>= 0.4.11', required : get_option('orc'))
orcc = find_program('orcc', required : get_option('orc'))
if orc_dep.found() and orcc.found()
have_orcc = true
orcc_args = [orcc]
#orcc_args = [orcc, '--include', 'glib.h']
cdata.set('HAVE_ORC', 1)
else
cdata.set('DISABLE_ORC', 1)
endif
samplerate_dep = dependency('samplerate', version : '>= 0.1.0', required : get_option('samplerate'))
if samplerate_dep.found()
cdata.set('HAVE_LIBSAMPLERATE', 1)
cdata.set('HAVE_GLIB20', 1) # to match the AM_CONDITIONAL for CMake file generation
endif
sndfile_dep = dependency('sndfile', version : '>= 1.0.20')
soxr_dep = dependency('soxr', version : '>= 0.1.1', required : get_option('soxr'))
if soxr_dep.found()
cdata.set('HAVE_SOXR', 1)
endif
libsystemd_dep = dependency('libsystemd', required : get_option('systemd'))
if libsystemd_dep.found()
cdata.set('HAVE_SYSTEMD_DAEMON', 1)
cdata.set('HAVE_SYSTEMD_LOGIN', 1)
cdata.set('HAVE_SYSTEMD_JOURNAL', 1)
endif
systemd_dep = dependency('systemd', required : get_option('systemd'))
if systemd_dep.found() and systemduserunitdir == ''
systemduserunitdir = systemd_dep.get_pkgconfig_variable('systemduserunitdir')
endif
libelogind_dep = dependency('libelogind', required : get_option('elogind'))
if libelogind_dep.found()
cdata.set('HAVE_SYSTEMD_LOGIN', 1)
endif
tcpwrap_dep = cc.find_library('wrap', required: get_option('tcpwrap'))
if cc.has_header('tcpd.h') and cc.has_function('hosts_access', dependencies : tcpwrap_dep)
cdata.set('HAVE_LIBWRAP', 1)
endif
x11_dep = dependency('x11-xcb', required : get_option('x11'))
if x11_dep.found()
xcb_dep = dependency('xcb', required : true, version : '>= 1.6')
ice_dep = dependency('ice', required : true)
sm_dep = dependency('sm', required : true)
xtst_dep = dependency('xtst', required : true)
cdata.set('HAVE_X11', 1)
if cc.has_function('XSetIOErrorExitHandler', dependencies: x11_dep)
cdata.set('HAVE_XSETIOERROREXITHANDLER', 1)
endif
endif
# Module dependencies
# OSS support
if cc.has_header('sys/soundcard.h', required: get_option('oss-output'))
# OSS output via daemon module-detect
cdata.set('HAVE_OSS_OUTPUT', 1)
# OSS wrapper
cdata.set('HAVE_OSS_WRAPPER', 1)
cdata.set('PULSEDSP_LOCATION', pulsedsp_location)
endif
if get_option('hal-compat')
cdata.set('HAVE_HAL_COMPAT', 1)
endif
avahi_dep = dependency('avahi-client', version : '>= 0.6.0', required : get_option('avahi'), disabler : true)
if avahi_dep.found()
cdata.set('HAVE_AVAHI', 1)
endif
sbc_dep = dependency('sbc', version : '>= 1.0', required : false)
if get_option('bluez5')
assert(dbus_dep.found(), 'BlueZ requires D-Bus support')
assert(sbc_dep.found(), 'BlueZ requires SBC support')
cdata.set('HAVE_SBC', 1)
cdata.set('HAVE_BLUEZ', 1)
cdata.set('HAVE_BLUEZ_5', 1)
if get_option('bluez5-native-headset')
cdata.set('HAVE_BLUEZ_5_NATIVE_HEADSET', 1)
endif
if get_option('bluez5-ofono-headset')
cdata.set('HAVE_BLUEZ_5_OFONO_HEADSET', 1)
endif
endif
fftw_dep = dependency('fftw3f', required : get_option('fftw'))
if fftw_dep.found()
cdata.set('HAVE_FFTW', 1)
endif
jack_dep = dependency('jack', version : '>= 0.117.0', required : get_option('jack'))
if jack_dep.found()
cdata.set('HAVE_JACK', 1)
# Client library dependencies
if get_option('client')
asyncns_dep = dependency('libasyncns', version : '>= 0.1', required : get_option('asyncns'))
if asyncns_dep.found()
cdata.set('HAVE_LIBASYNCNS', 1)
endif
gtk_dep = dependency('gtk+-3.0', required : get_option('gtk'))
if gtk_dep.found()
cdata.set('HAVE_GTK', 1)
endif
endif
lirc_dep = dependency('lirc', required : get_option('lirc'))
if lirc_dep.found()
cdata.set('HAVE_LIRC', 1)
endif
# Daemon and module dependencies
openssl_dep = dependency('openssl', version : '>= 0.9', required : get_option('openssl'))
if openssl_dep.found()
cdata.set('HAVE_OPENSSL', 1)
endif
if get_option('daemon')
# FIXME: make sure it's >= 2.2
ltdl_dep = cc.find_library('ltdl', required : true)
speex_dep = dependency('speexdsp', version : '>= 1.2', required : get_option('speex'))
if speex_dep.found()
cdata.set('HAVE_SPEEX', 1)
endif
# FIXME: can meson support libtool -dlopen/-dlpreopen things?
# and do we still want to support this at all?
cdata.set('DISABLE_LIBTOOL_PRELOAD', 1)
udev_dep = dependency('libudev', version : '>= 143', required : get_option('udev'))
if udev_dep.found()
cdata.set('HAVE_UDEV', 1)
endif
if get_option('database') == 'tdb'
database_dep = dependency('tdb')
elif get_option('database') == 'gdbm'
database_dep = cc.find_library('gdbm', required : true)
else
database_dep = dependency('', required: false)
endif
webrtc_dep = dependency('webrtc-audio-processing', version : '>= 0.2', required : get_option('webrtc-aec'))
if webrtc_dep.found()
cdata.set('HAVE_WEBRTC', 1)
endif
if get_option('legacy-database-entry-format')
cdata.set('ENABLE_LEGACY_DATABASE_ENTRY_FORMAT', 1)
endif
gst_dep = dependency('gstreamer-1.0', version : '>= 1.14', required : get_option('gstreamer'))
gstapp_dep = dependency('gstreamer-app-1.0', required : get_option('gstreamer'))
gstrtp_dep = dependency('gstreamer-rtp-1.0', required : get_option('gstreamer'))
if get_option('stream-restore-clear-old-devices')
cdata.set('STREAM_RESTORE_CLEAR_OLD_DEVICES', 1)
endif
have_gstreamer = false
if gst_dep.found() and gstapp_dep.found() and gstrtp_dep.found()
have_gstreamer = true
endif
if get_option('running-from-build-tree')
cdata.set('HAVE_RUNNING_FROM_BUILD_TREE', 1)
endif
bluez5_gst_dep = dependency('gstreamer-1.0', version : '>= 1.14', required : get_option('bluez5-gstreamer'))
bluez5_gstapp_dep = dependency('gstreamer-app-1.0', required : get_option('bluez5-gstreamer'))
have_bluez5_gstreamer = false
if bluez5_gst_dep.found() and bluez5_gstapp_dep.found()
have_bluez5_gstreamer = true
cdata.set('HAVE_GSTLDAC', 1)
cdata.set('HAVE_GSTAPTX', 1)
if get_option('enable-smoother-2')
cdata.set('USE_SMOOTHER_2', 1)
endif
alsa_dep = dependency('alsa', version : '>= 1.0.24', required : get_option('alsa'))
if alsa_dep.found()
cdata.set('HAVE_ALSA', 1)
cdata.set('HAVE_ALSA_UCM', 1)
endif
gio_dep = dependency('gio-2.0', version : '>= 2.26.0', required : false)
if get_option('gsettings').enabled()
assert(gio_dep.found(), 'GSettings support needs glib I/O library (GIO)')
cdata.set('HAVE_GSETTINGS', 1)
else
cdata.set('HAVE_GSETTINGS', 0)
endif
have_orcc = false
orcc_args = []
orc_dep = dependency('orc-0.4', version : '>= 0.4.11', required : get_option('orc'))
orcc = find_program('orcc', required : get_option('orc'))
if orc_dep.found() and orcc.found()
have_orcc = true
orcc_args = [orcc]
#orcc_args = [orcc, '--include', 'glib.h']
cdata.set('HAVE_ORC', 1)
else
cdata.set('DISABLE_ORC', 1)
endif
samplerate_dep = dependency('samplerate', version : '>= 0.1.0', required : get_option('samplerate'))
if samplerate_dep.found()
cdata.set('HAVE_LIBSAMPLERATE', 1)
endif
speex_dep = dependency('speexdsp', version : '>= 1.2', required : get_option('speex'))
if speex_dep.found()
cdata.set('HAVE_SPEEX', 1)
endif
soxr_dep = dependency('soxr', version : '>= 0.1.1', required : get_option('soxr'))
if soxr_dep.found()
cdata.set('HAVE_SOXR', 1)
endif
webrtc_dep = dependency('webrtc-audio-processing-1', version : '>= 1.0', required : get_option('webrtc-aec'))
if webrtc_dep.found()
cdata.set('HAVE_WEBRTC', 1)
endif
systemd_dep = dependency('systemd', required : get_option('systemd'))
if systemd_dep.found() and systemduserunitdir == ''
systemduserunitdir = systemd_dep.get_pkgconfig_variable('systemduserunitdir')
endif
libelogind_dep = dependency('libelogind', required : get_option('elogind'))
if libelogind_dep.found()
cdata.set('HAVE_SYSTEMD_LOGIN', 1)
endif
if get_option('consolekit').enabled()
assert(dbus_dep.found(), 'ConsoleKit requires D-Bus support')
endif
tcpwrap_dep = cc.find_library('wrap', required: get_option('tcpwrap'))
if cc.has_header('tcpd.h') and cc.has_function('hosts_access', dependencies : tcpwrap_dep)
cdata.set('HAVE_LIBWRAP', 1)
endif
if x11_dep.found()
xcb_dep = dependency('xcb', required : true, version : '>= 1.6')
ice_dep = dependency('ice', required : true)
sm_dep = dependency('sm', required : true)
xtst_dep = dependency('xtst', required : true)
cdata.set('HAVE_X11', 1)
if cc.has_function('XSetIOErrorExitHandler', dependencies: x11_dep)
cdata.set('HAVE_XSETIOERROREXITHANDLER', 1)
endif
endif
avahi_dep = dependency('avahi-client', version : '>= 0.6.0', required : get_option('avahi'), disabler : true)
if avahi_dep.found()
cdata.set('HAVE_AVAHI', 1)
else
cdata.set('HAVE_AVAHI', 0)
endif
sbc_dep = dependency('sbc', version : '>= 1.0', required : false)
bluez_dep = dependency('bluez', required : get_option('bluez5'))
if bluez_dep.found()
assert(dbus_dep.found(), 'BlueZ requires D-Bus support')
assert(sbc_dep.found(), 'BlueZ requires SBC support')
cdata.set('HAVE_SBC', 1)
cdata.set('HAVE_BLUEZ', 1)
cdata.set('HAVE_BLUEZ_5', 1)
if get_option('bluez5-native-headset')
cdata.set('HAVE_BLUEZ_5_NATIVE_HEADSET', 1)
endif
if get_option('bluez5-ofono-headset')
cdata.set('HAVE_BLUEZ_5_OFONO_HEADSET', 1)
endif
endif
jack_dep = dependency('jack', version : '>= 0.117.0', required : get_option('jack'))
if jack_dep.found()
cdata.set('HAVE_JACK', 1)
endif
lirc_dep = dependency('lirc', required : get_option('lirc'))
if lirc_dep.found()
cdata.set('HAVE_LIRC', 1)
endif
openssl_dep = dependency('openssl', version : '>= 0.9', required : get_option('openssl'))
if openssl_dep.found()
cdata.set('HAVE_OPENSSL', 1)
endif
udev_dep = dependency('libudev', version : '>= 143', required : get_option('udev'))
if udev_dep.found()
cdata.set('HAVE_UDEV', 1)
endif
if get_option('hal-compat')
cdata.set('HAVE_HAL_COMPAT', 1)
endif
gst_dep = dependency('gstreamer-1.0', version : '>= 1.14', required : get_option('gstreamer'))
gstapp_dep = dependency('gstreamer-app-1.0', required : get_option('gstreamer'))
gstrtp_dep = dependency('gstreamer-rtp-1.0', required : get_option('gstreamer'))
have_gstreamer = false
if gst_dep.found() and gstapp_dep.found() and gstrtp_dep.found()
assert(gio_dep.found(), 'GStreamer-based RTP needs glib I/O library (GIO)')
have_gstreamer = true
endif
bluez5_gst_dep = dependency('gstreamer-1.0', version : '>= 1.14', required : get_option('bluez5-gstreamer'))
bluez5_gstapp_dep = dependency('gstreamer-app-1.0', required : get_option('bluez5-gstreamer'))
have_bluez5_gstreamer = false
if bluez5_gst_dep.found() and bluez5_gstapp_dep.found()
have_bluez5_gstreamer = true
cdata.set('HAVE_GSTLDAC', 1)
cdata.set('HAVE_GSTAPTX', 1)
endif
endif
# These are required for the CMake file generation
cdata.set('PA_LIBDIR', libdir)
cdata.set('PA_INCDIR', includedir)
if glib_dep.found()
cdata.set('HAVE_GLIB20', 1) # to match the AM_CONDITIONAL for CMake file generation
endif
# Test dependencies
@ -788,81 +843,89 @@ check_dep = dependency('check', version : '>= 0.9.10', required : get_option('te
if get_option('doxygen')
subdir('doxygen')
endif
subdir('po')
if get_option('client')
subdir('po')
endif
if get_option('man')
subdir('man')
endif
subdir('shell-completion/bash')
subdir('shell-completion/zsh')
subdir('src')
subdir('vala')
if get_option('client')
subdir('vala')
endif
# Now generate config.h from everything above
configure_file(output : 'config.h', configuration : cdata)
# pkg-config files
if get_option('client')
pc_cdata = configuration_data()
# pkg-config files
pc_cdata.set('prefix', prefix)
pc_cdata.set('exec_prefix', prefix)
pc_cdata.set('libdir', libdir)
pc_cdata.set('includedir', includedir)
pc_cdata.set('modlibexecdir', modlibexecdir)
pc_cdata.set('PACKAGE_VERSION', pa_version_str)
pc_cdata.set('PA_MAJORMINOR', pa_version_major_minor)
# FIXME: the line below is wrong. Currently the meson thread dep lacks documentation,
# and doesn't allow introspection, ie. none of get_pkgconfig_variable() or
# get_configtool_variable() work with it, so we have no way to get this flag right,
# unless we do all the work ourselves. See current work in glib, also meson #553.
pc_cdata.set('PTHREAD_LIBS', '-pthread')
pc_cdata = configuration_data()
pc_files = [
'libpulse.pc',
'libpulse-simple.pc',
]
pc_cdata.set('prefix', prefix)
pc_cdata.set('exec_prefix', prefix)
pc_cdata.set('libdir', libdir)
pc_cdata.set('includedir', includedir)
pc_cdata.set('modlibexecdir', modlibexecdir)
pc_cdata.set('PACKAGE_VERSION', pa_version_str)
pc_cdata.set('PA_MAJORMINOR', pa_version_major_minor)
# FIXME: the line below is wrong. Currently the meson thread dep lacks documentation,
# and doesn't allow introspection, ie. none of get_pkgconfig_variable() or
# get_configtool_variable() work with it, so we have no way to get this flag right,
# unless we do all the work ourselves. See current work in glib, also meson #553.
pc_cdata.set('PTHREAD_LIBS', '-pthread')
if glib_dep.found()
pc_files += 'libpulse-mainloop-glib.pc'
endif
pc_files = [
'libpulse.pc',
'libpulse-simple.pc',
]
if glib_dep.found()
pc_files += 'libpulse-mainloop-glib.pc'
endif
foreach file : pc_files
configure_file(
input : file + '.in',
output : file,
configuration : pc_cdata,
install_dir : pkgconfigdir)
endforeach
# CMake files
m4 = find_program('m4', required: true)
cmakedir = join_paths(libdir, 'cmake', 'PulseAudio')
cmake_template_file = configure_file(
input : 'PulseAudioConfig.cmake.in',
output : 'PulseAudioConfig.cmake.tmp',
configuration: cdata,
)
custom_target('PulseAudioConfig.cmake',
input : cmake_template_file,
output : 'PulseAudioConfig.cmake',
capture : true,
command : [m4, '@INPUT@'],
build_by_default : true,
install : true,
install_dir : cmakedir,
)
foreach file : pc_files
configure_file(
input : file + '.in',
output : file,
configuration : pc_cdata,
install_dir : pkgconfigdir)
endforeach
input : 'PulseAudioConfigVersion.cmake.in',
output : 'PulseAudioConfigVersion.cmake',
configuration: cdata,
install : true,
install_dir : cmakedir,
)
# CMake files
m4 = find_program('m4', required: true)
cmakedir = join_paths(libdir, 'cmake', 'PulseAudio')
cmake_template_file = configure_file(
input : 'PulseAudioConfig.cmake.in',
output : 'PulseAudioConfig.cmake.tmp',
configuration: cdata,
)
custom_target('PulseAudioConfig.cmake',
input : cmake_template_file,
output : 'PulseAudioConfig.cmake',
capture : true,
command : [m4, '@INPUT@'],
build_by_default : true,
install : true,
install_dir : cmakedir,
)
configure_file(
input : 'PulseAudioConfigVersion.cmake.in',
output : 'PulseAudioConfigVersion.cmake',
configuration: cdata,
install : true,
install_dir : cmakedir,
)
endif # client
############################################################
@ -893,49 +956,67 @@ summary = [
# 'LIBS: @0@'.format(${LIBS}),
'',
'Enable pulseaudio daemon: @0@'.format(get_option('daemon')),
'Enable pulseaudio client: @0@'.format(get_option('client')),
'',
'Enable memfd shared memory: @0@'.format(cdata.has('HAVE_MEMFD')),
'Enable X11: @0@'.format(x11_dep.found()),
' Safe X11 I/O errors: @0@'.format(cdata.has('HAVE_XSETIOERROREXITHANDLER')),
'Enable OSS Output: @0@'.format(cdata.has('HAVE_OSS_OUTPUT')),
'Enable OSS Wrapper: @0@'.format(cdata.has('HAVE_OSS_WRAPPER')),
# 'Enable EsounD: @0@'.format(${ENABLE_ESOUND}),
'Enable Alsa: @0@'.format(alsa_dep.found()),
# 'Enable CoreAudio: @0@'.format(${ENABLE_COREAUDIO}),
# 'Enable Solaris: @0@'.format(${ENABLE_SOLARIS}),
# 'Enable WaveOut: @0@'.format(${ENABLE_WAVEOUT}),
'Enable GLib 2: @0@'.format(glib_dep.found()),
'Enable GSettings: @0@'.format(gio_dep.found()),
'Enable Gtk+ 3: @0@'.format(gtk_dep.found()),
'Enable Avahi: @0@'.format(avahi_dep.found()),
'Enable Jack: @0@'.format(jack_dep.found()),
'Enable Async DNS: @0@'.format(asyncns_dep.found()),
'Enable LIRC: @0@'.format(lirc_dep.found()),
'Enable D-Bus: @0@'.format(dbus_dep.found()),
' Enable BlueZ 5: @0@'.format(get_option('bluez5')),
' Enable native headsets: @0@'.format(get_option('bluez5-native-headset')),
' Enable ofono headsets: @0@'.format(get_option('bluez5-ofono-headset')),
' Enable GStreamer based codecs: @0@'.format(have_bluez5_gstreamer),
'Enable udev: @0@'.format(udev_dep.found()),
' Enable HAL->udev compat: @0@'.format(get_option('hal-compat')),
'Enable systemd: @0@'.format(libsystemd_dep.found()),
'Enable elogind: @0@'.format(libelogind_dep.found()),
'Enable TCP Wrappers: @0@'.format(tcpwrap_dep.found()),
'Enable libsamplerate: @0@'.format(samplerate_dep.found()),
'Enable IPv6: @0@'.format(get_option('ipv6')),
'Enable OpenSSL (for Airtunes): @0@'.format(openssl_dep.found()),
'Enable GLib 2: @0@'.format(glib_dep.found()),
'Enable systemd integration: @0@'.format(libsystemd_dep.found()),
'Enable FFTW: @0@'.format(fftw_dep.found()),
'Enable ORC: @0@'.format(have_orcc),
'Enable GStreamer: @0@'.format(have_gstreamer),
'Enable Adrian echo canceller: @0@'.format(get_option('adrian-aec')),
'Enable Speex (resampler, AEC): @0@'.format(speex_dep.found()),
'Enable SoXR (resampler): @0@'.format(soxr_dep.found()),
'Enable WebRTC echo canceller: @0@'.format(webrtc_dep.found()),
'Enable IPv6: @0@'.format(get_option('ipv6')),
'Enable Gcov coverage: @0@'.format(get_option('gcov')),
'Enable Valgrind: @0@'.format(cdata.has('HAVE_VALGRIND_MEMCHECK_H')),
'Enable man pages: @0@'.format(get_option('man')),
'Enable unit tests: @0@'.format(get_option('tests')),
]
if get_option('client')
summary += [
'',
'--- Pulseaudio client features ---',
'',
'Enable Gtk+ 3: @0@'.format(gtk_dep.found()),
'Enable Async DNS: @0@'.format(asyncns_dep.found()),
'Enable OSS Wrapper: @0@'.format(cdata.has('HAVE_OSS_WRAPPER')),
]
endif
if get_option('daemon')
summary += [
'',
'--- Pulseaudio daemon features ---',
'',
'Safe X11 I/O errors: @0@'.format(cdata.has('HAVE_XSETIOERROREXITHANDLER')),
'Enable Avahi: @0@'.format(avahi_dep.found()),
'Enable OSS Output: @0@'.format(cdata.has('HAVE_OSS_OUTPUT')),
# 'Enable EsounD: @0@'.format(${ENABLE_ESOUND}),
'Enable Alsa: @0@'.format(alsa_dep.found()),
'Enable Jack: @0@'.format(jack_dep.found()),
'Enable LIRC: @0@'.format(lirc_dep.found()),
# 'Enable CoreAudio: @0@'.format(${ENABLE_COREAUDIO}),
# 'Enable Solaris: @0@'.format(${ENABLE_SOLARIS}),
# 'Enable WaveOut: @0@'.format(${ENABLE_WAVEOUT}),
'Enable GSettings: @0@'.format(gio_dep.found()),
'Enable BlueZ 5: @0@'.format(cdata.has('HAVE_BLUEZ_5')),
' Enable native headsets: @0@'.format(cdata.has('HAVE_BLUEZ_5_NATIVE_HEADSET')),
' Enable ofono headsets: @0@'.format(cdata.has('HAVE_BLUEZ_5_OFONO_HEADSET')),
' Enable GStreamer based codecs: @0@'.format(have_bluez5_gstreamer),
'Enable GStreamer: @0@'.format(have_gstreamer),
'Enable libsamplerate: @0@'.format(samplerate_dep.found()),
'Enable ORC: @0@'.format(have_orcc),
'Enable Adrian echo canceller: @0@'.format(get_option('adrian-aec')),
'Enable Speex (resampler, AEC): @0@'.format(speex_dep.found()),
'Enable SoXR (resampler): @0@'.format(soxr_dep.found()),
'Enable WebRTC echo canceller: @0@'.format(webrtc_dep.found()),
'',
'Enable udev: @0@'.format(udev_dep.found()),
' Enable HAL->udev compat: @0@'.format(get_option('hal-compat')),
'Enable systemd units: @0@'.format(systemd_dep.found()),
'Enable elogind: @0@'.format(libelogind_dep.found()),
'Enable ConsoleKit: @0@'.format(not get_option('consolekit').disabled() and dbus_dep.found()),
'Enable TCP Wrappers: @0@'.format(tcpwrap_dep.found()),
'Enable OpenSSL (for Airtunes): @0@'.format(openssl_dep.found()),
'Database: @0@'.format(get_option('database')),
'Legacy Database Entry Support: @0@'.format(get_option('legacy-database-entry-format')),
'module-stream-restore:',
@ -948,47 +1029,48 @@ summary = [
# 'Force preopen: @0@'.format(${FORCE_PREOPEN}),
# 'Preopened modules: @0@'.format(${PREOPEN_MODS}),
]
endif
message('\n '.join(summary))
# Sanity checks
if not speex_dep.found() and not webrtc_dep.found() and not get_option('adrian-aec')
if get_option('daemon') and not speex_dep.found() and not webrtc_dep.found() and not get_option('adrian-aec')
error('At least one echo canceller implementation must be available!')
endif
if samplerate_dep.found()
if get_option('daemon') and samplerate_dep.found()
warning('Support for libsamplerate is DEPRECATED')
endif
if host_machine.system() != 'windows'
if not dbus_dep.found()
message = [
'You do not have D-Bus support enabled. It is strongly recommended',
'that you enable D-Bus support if your platform supports it.',
'Many parts of PulseAudio use D-Bus, from ConsoleKit interaction',
'to the Device Reservation Protocol to speak to JACK, Bluetooth',
'support and even a native control protocol for communicating and',
'controlling the PulseAudio daemon itself.',
]
warning('\n' + '\n'.join(message))
endif
if host_machine.system() == 'linux' and not udev_dep.found()
message = [
'You do not have udev support enabled. It is strongly recommended',
'that you enable udev support if your platform supports it as it is',
'the primary method used to detect hardware audio devices (on Linux)',
'and is thus a critical part of PulseAudio on that platform.',
]
warning('\n' + '\n'.join(message))
endif
if not speex_dep.found()
message = [
'You do not have speex support enabled. It is strongly recommended',
'that you enable speex support if your platform supports it as it is',
'the primary method used for audio resampling and is thus a critical',
'part of PulseAudio on that platform.',
]
warning('\n' + '\n'.join(message))
endif
if host_machine.system() != 'windows' and not dbus_dep.found()
message = [
'You do not have D-Bus support enabled. It is strongly recommended',
'that you enable D-Bus support if your platform supports it.',
'Many parts of PulseAudio use D-Bus, from ConsoleKit interaction',
'to the Device Reservation Protocol to speak to JACK, Bluetooth',
'support and even a native control protocol for communicating and',
'controlling the PulseAudio daemon itself.',
]
warning('\n' + '\n'.join(message))
endif
if get_option('daemon') and host_machine.system() == 'linux' and not udev_dep.found()
message = [
'You do not have udev support enabled. It is strongly recommended',
'that you enable udev support if your platform supports it as it is',
'the primary method used to detect hardware audio devices (on Linux)',
'and is thus a critical part of PulseAudio on that platform.',
]
warning('\n' + '\n'.join(message))
endif
if get_option('daemon') and host_machine.system() != 'windows' and not speex_dep.found()
message = [
'You do not have speex support enabled. It is strongly recommended',
'that you enable speex support if your platform supports it as it is',
'the primary method used for audio resampling and is thus a critical',
'part of PulseAudio on that platform.',
]
warning('\n' + '\n'.join(message))
endif

View file

@ -1,6 +1,9 @@
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')
@ -85,7 +88,7 @@ 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',
@ -96,6 +99,9 @@ option('bluez5-native-headset',
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')
@ -112,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',
@ -162,6 +168,9 @@ option('valgrind',
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

View file

@ -48,3 +48,8 @@ zh_CN
zh_TW
eo
si
ka
eu
ar
sl
ro

View file

@ -170,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

612
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

619
po/as.po

File diff suppressed because it is too large Load diff

836
po/be.po

File diff suppressed because it is too large Load diff

613
po/bg.po

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

653
po/ca.po

File diff suppressed because it is too large Load diff

671
po/cs.po

File diff suppressed because it is too large Load diff

641
po/da.po

File diff suppressed because it is too large Load diff

737
po/de.po

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

1078
po/el.po

File diff suppressed because it is too large Load diff

612
po/eo.po

File diff suppressed because it is too large Load diff

1674
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

740
po/fi.po

File diff suppressed because it is too large Load diff

673
po/fr.po

File diff suppressed because it is too large Load diff

771
po/gl.po

File diff suppressed because it is too large Load diff

619
po/gu.po

File diff suppressed because it is too large Load diff

616
po/he.po

File diff suppressed because it is too large Load diff

2395
po/hi.po

File diff suppressed because it is too large Load diff

788
po/hr.po

File diff suppressed because it is too large Load diff

934
po/hu.po

File diff suppressed because it is too large Load diff

917
po/id.po

File diff suppressed because it is too large Load diff

638
po/it.po

File diff suppressed because it is too large Load diff

631
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

614
po/kk.po

File diff suppressed because it is too large Load diff

619
po/kn.po

File diff suppressed because it is too large Load diff

1061
po/ko.po

File diff suppressed because it is too large Load diff

707
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()

619
po/ml.po

File diff suppressed because it is too large Load diff

619
po/mr.po

File diff suppressed because it is too large Load diff

665
po/nl.po

File diff suppressed because it is too large Load diff

628
po/nn.po

File diff suppressed because it is too large Load diff

620
po/oc.po

File diff suppressed because it is too large Load diff

619
po/or.po

File diff suppressed because it is too large Load diff

619
po/pa.po

File diff suppressed because it is too large Load diff

627
po/pl.po

File diff suppressed because it is too large Load diff

1103
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

1315
po/ru.po

File diff suppressed because it is too large Load diff

622
po/si.po

File diff suppressed because it is too large Load diff

619
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

619
po/sr.po

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

648
po/sv.po

File diff suppressed because it is too large Load diff

619
po/ta.po

File diff suppressed because it is too large Load diff

619
po/te.po

File diff suppressed because it is too large Load diff

792
po/tr.po

File diff suppressed because it is too large Load diff

626
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

View file

@ -17,7 +17,14 @@ print_map_file() {
echo "};"
}
TARGET_FILE=$1
shift
print_def_file() {
echo "EXPORTS"
ctags -I ${CTAGS_IDENTIFIER_LIST} -f - --c-kinds=p "$@" | awk '/^pa_/ && !/(^pa_glib_|^pa_simple_)/ { print $1 }' | sort
}
cd "${MESON_SOURCE_ROOT}/${MESON_SUBDIR}" && print_map_file "$@" > ${TARGET_FILE}
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

@ -3,25 +3,33 @@ if bashcompletiondir != 'no'
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
aliases += [
'pacat',
'pactl',
'padsp',
'paplay',
'parec',
'parecord',
]
install_data('pulseaudio', install_dir : bashcompletiondir)
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 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 send-message 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
@ -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');;
@ -257,16 +259,22 @@ _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'
@ -492,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;;

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

1
src/.gitignore vendored
View file

@ -71,6 +71,7 @@ proplist-test
queue-test
remix-test
resampler-test
resampler-rewind-test
rtpoll-test
rtstutter
sig2str-test

View file

@ -262,7 +262,7 @@ int pa_cmdline_parse(pa_daemon_conf *conf, int argc, char *const argv [], int *d
if (optarg) {
if (pa_daemon_conf_set_log_level(conf, optarg) < 0) {
pa_log(_("--log-level expects log level argument (either numeric in range 0..4 or one of debug, info, notice, warn, error)."));
pa_log(_("--log-level expects log level argument (either numeric in range 0..4 or one of error, warn, notice, info, debug)."));
goto fail;
}
} else {

View file

@ -171,5 +171,6 @@ load-module module-filter-apply
### Allow including a default.pa.d directory, which if present, can be used
### for additional configuration snippets.
### Note that those snippet files must have a .pa file extension, not .conf
.nofail
.include @PA_DEFAULT_CONFIG_DIR_UNQUOTED@/default.pa.d

View file

@ -30,8 +30,8 @@ executable('pulseaudio',
install_rpath : privlibdir,
include_directories : [configinc, topinc],
link_args : ['-ffast-math'],
link_with : [libpulsecore, libpulsecommon, libpulse],
dependencies : [ltdl_dep, cap_dep, dbus_dep, libsystemd_dep, dl_dep, libintl_dep, platform_dep, platform_socket_dep],
link_with : [libpulsecore],
dependencies : [ltdl_dep, cap_dep, dbus_dep, libsystemd_dep, dl_dep, libintl_dep, platform_dep, platform_socket_dep, libpulsecommon_dep, libpulse_dep],
c_args : pa_c_args,
)
@ -141,7 +141,7 @@ custom_target('system.pa',
if dbus_dep.found()
install_data('pulseaudio-system.conf',
install_dir : join_paths(sysconfdir, 'dbus-1', 'system.d')
install_dir : join_paths(datadir, 'dbus-1', 'system.d')
)
endif

View file

@ -69,5 +69,6 @@ load-module module-position-event-sounds
### Allow including a system.pa.d directory, which if present, can be used
### for additional configuration snippets.
### Note that those snippet files must have a .pa file extension, not .conf
.nofail
.include @PA_DEFAULT_CONFIG_DIR_UNQUOTED@/system.pa.d

View file

@ -57,12 +57,12 @@ libpulsecommon_sources = [
'pulsecore/shm.c',
'pulsecore/bitset.c',
'pulsecore/socket-client.c',
'pulsecore/socket-server.c',
'pulsecore/socket-util.c',
'pulsecore/strbuf.c',
'pulsecore/strlist.c',
'pulsecore/tagstruct.c',
'pulsecore/time-smoother.c',
'pulsecore/time-smoother_2.c',
'pulsecore/tokenizer.c',
'pulsecore/usergroup.c',
'pulsecore/sndfile-util.c',
@ -136,13 +136,13 @@ libpulsecommon_headers = [
'pulsecore/shm.h',
'pulsecore/bitset.h',
'pulsecore/socket-client.h',
'pulsecore/socket-server.h',
'pulsecore/socket-util.h',
'pulsecore/strbuf.h',
'pulsecore/strlist.h',
'pulsecore/tagstruct.h',
'pulsecore/thread.h',
'pulsecore/time-smoother.h',
'pulsecore/time-smoother_2.h',
'pulsecore/tokenizer.h',
'pulsecore/usergroup.h',
'pulsecore/sndfile-util.h',
@ -182,31 +182,43 @@ if host_machine.system() == 'windows'
else
libpulsecommon_sources += [
'pulsecore/mutex-posix.c',
'pulsecore/semaphore-posix.c',
'pulsecore/thread-posix.c'
'pulsecore/poll-posix.c',
'pulsecore/thread-posix.c',
]
if host_machine.system() == 'darwin'
libpulsecommon_sources += ['pulsecore/semaphore-osx.c']
else
libpulsecommon_sources += ['pulsecore/semaphore-posix.c']
endif
endif
# FIXME: Do SIMD things
libpulsecommon = shared_library('pulsecommon-' + pa_version_major_minor,
libpulsecommon_sources,
libpulsecommon_headers,
include_directories : [configinc, topinc],
c_args : [pa_c_args],
link_args : [nodelete_link_args],
install : true,
install_dir : privlibdir,
dependencies : [
libm_dep, thread_dep, dl_dep, shm_dep, iconv_dep, sndfile_dep, dbus_dep,
x11_dep, libsystemd_dep, glib_dep.partial_dependency(compile_args: true),
gtk_dep.partial_dependency(compile_args: true), asyncns_dep, libintl_dep,
platform_dep, tcpwrap_dep, platform_socket_dep, execinfo_dep,
],
implicit_include_directories : false)
if not get_option('client')
libpulsecommon_dep = cc.find_library('pulsecommon-' + pa_version_major_minor, dirs : privlibdir, required : true)
libpulse_dep = dependency('libpulse', required : true)
libpulse_simple_dep = dependency('libpulse-simple', required : true)
else
libpulsecommon = shared_library('pulsecommon-' + pa_version_major_minor,
libpulsecommon_sources,
libpulsecommon_headers,
include_directories : [configinc, topinc],
c_args : [pa_c_args],
link_args : [nodelete_link_args],
install : true,
install_dir : privlibdir,
dependencies : [
libm_dep, thread_dep, dl_dep, shm_dep, iconv_dep, sndfile_dep, dbus_dep,
x11_dep, libsystemd_dep, glib_dep.partial_dependency(compile_args: true),
gtk_dep.partial_dependency(compile_args: true), asyncns_dep, libintl_dep,
platform_dep, platform_socket_dep, execinfo_dep, libatomic_ops_dep,
],
implicit_include_directories : false)
libpulsecommon_dep = declare_dependency(link_with: libpulsecommon)
libpulsecommon_dep = declare_dependency(link_with: libpulsecommon)
subdir('pulse')
endif
subdir('pulse')
if get_option('daemon')
subdir('pulsecore')
subdir('daemon')

View file

@ -107,13 +107,15 @@ ATTRS{idVendor}=="17cc", ATTRS{idProduct}=="1011", ENV{PULSE_PROFILE_SET}="nativ
ATTRS{idVendor}=="17cc", ATTRS{idProduct}=="1001", ENV{PULSE_PROFILE_SET}="native-instruments-komplete-audio6.conf"
# This entry is for the Komplete Audio 6 MK2, which has a different ID, but is functionally identical to the Komplete Audio 6.
ATTRS{idVendor}=="17cc", ATTRS{idProduct}=="1870", ENV{PULSE_PROFILE_SET}="native-instruments-komplete-audio6.conf"
ATTRS{idVendor}=="17cc", ATTRS{idProduct}=="1021", ENV{PULSE_PROFILE_SET}="native-instruments-traktor-audio10.conf"
ATTRS{idVendor}=="0763", ATTRS{idProduct}=="2012", ENV{PULSE_PROFILE_SET}="maudio-fasttrack-pro.conf"
ATTRS{idVendor}=="045e", ATTRS{idProduct}=="02bb", ENV{PULSE_PROFILE_SET}="kinect-audio.conf"
ATTRS{idVendor}=="041e", ATTRS{idProduct}=="322c", ENV{PULSE_PROFILE_SET}="sb-omni-surround-5.1.conf"
ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="4014", ENV{PULSE_PROFILE_SET}="dell-dock-tb16-usb-audio.conf"
ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="402e", ENV{PULSE_PROFILE_SET}="dell-dock-tb16-usb-audio.conf"
ATTRS{idVendor}=="08bb", ATTRS{idProduct}=="2902", ENV{PULSE_PROFILE_SET}="behringer-umc22.conf"
ATTRS{idVendor}=="08bb", ATTRS{idProduct}=="2902", ENV{PULSE_PROFILE_SET}="texas-instruments-pcm2902.conf"
ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="0269", ENV{PULSE_PROFILE_SET}="hp-tbt-dock-120w-g2.conf"
ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="0567", ENV{PULSE_PROFILE_SET}="hp-tbt-dock-audio-module.conf"
@ -123,6 +125,8 @@ ATTRS{idVendor}=="1038", ATTRS{idProduct}=="1260", ENV{PULSE_PROFILE_SET}="usb-g
ATTRS{idVendor}=="1038", ATTRS{idProduct}=="12ad", ENV{PULSE_PROFILE_SET}="usb-gaming-headset.conf"
ATTRS{idVendor}=="1038", ATTRS{idProduct}=="1294", ENV{PULSE_PROFILE_SET}="usb-gaming-headset.conf"
ATTRS{idVendor}=="1038", ATTRS{idProduct}=="1730", ENV{PULSE_PROFILE_SET}="usb-gaming-headset.conf"
# ID 1038:1282 is for SteelSeries GameDAC
ATTRS{idVendor}=="1038", ATTRS{idProduct}=="1282", ENV{PULSE_PROFILE_SET}="usb-gaming-headset.conf"
# ID 1038:12c4 is for Arctis 9
ATTRS{idVendor}=="1038", ATTRS{idProduct}=="12c4", ENV{PULSE_PROFILE_SET}="usb-gaming-headset.conf"
# Lucidsound LS31
@ -164,6 +168,16 @@ ATTRS{idVendor}=="1395", ATTRS{idProduct}=="00a0", ENV{PULSE_PROFILE_SET}="sennh
ATTRS{idVendor}=="1395", ATTRS{idProduct}=="005f", ENV{PULSE_PROFILE_SET}="sennheiser-gsx.conf"
ATTRS{idVendor}=="1395", ATTRS{idProduct}=="00a1", ENV{PULSE_PROFILE_SET}="sennheiser-gsx.conf"
# Sennheiser GSA 70 wireless USB dongle for GSP 670
ATTRS{idVendor}=="1395", ATTRS{idProduct}=="0089", ENV{PULSE_PROFILE_SET}="usb-gaming-headset.conf"
# EPOS GSA 70 wireless USB dongle for GSP 670 (Sennheiser GSA 70 with updated firmware)
ATTRS{idVendor}=="1395", ATTRS{idProduct}=="0300", ENV{PULSE_PROFILE_SET}="usb-gaming-headset.conf"
# Sennheiser GSP 670 USB headset
ATTRS{idVendor}=="1395", ATTRS{idProduct}=="008a", ENV{PULSE_PROFILE_SET}="usb-gaming-headset.conf"
# Asus Xonar SE
ATTRS{idVendor}=="0b05", ATTRS{idProduct}=="189d", ENV{PULSE_PROFILE_SET}="asus-xonar-se.conf"
GOTO="pulseaudio_end"
LABEL="pulseaudio_check_pci"

View file

@ -2838,7 +2838,7 @@ static int path_verify(pa_alsa_path *p) {
if (p->device_port_type == PA_DEVICE_PORT_TYPE_UNKNOWN)
p->device_port_type = map->type;
if (!p->description)
p->description = pa_xstrdup(map->description);
p->description = pa_xstrdup(_(map->description));
}
if (!p->description) {
@ -2851,41 +2851,44 @@ static int path_verify(pa_alsa_path *p) {
return 0;
}
static char *get_path_config_path(const char *paths_dir, const char *fname) {
char *path_config_path;
static char *get_data_path(const char *data_dir, const char *data_type, const char *fname) {
char *result;
char *dir;
char *data_home;
pa_dynarray *data_dirs;
if (paths_dir) {
path_config_path = pa_maybe_prefix_path(fname, paths_dir);
if (access(path_config_path, R_OK) == 0)
return path_config_path;
if (data_dir) {
result = pa_maybe_prefix_path(fname, data_dir);
if (access(result, R_OK) == 0)
return result;
else
pa_xfree(path_config_path);
pa_xfree(result);
}
#ifdef HAVE_RUNNING_FROM_BUILD_TREE
if (pa_run_from_build_tree()) {
path_config_path = pa_maybe_prefix_path(fname, PA_SRCDIR "/modules/alsa/mixer/paths/");
if (access(path_config_path, R_OK) == 0)
return path_config_path;
dir = pa_sprintf_malloc(PA_SRCDIR "/modules/alsa/mixer/%s/", data_type);
result = pa_maybe_prefix_path(fname, dir);
pa_xfree(dir);
if (access(result, R_OK) == 0)
return result;
else
pa_xfree(path_config_path);
pa_xfree(result);
}
#endif
if (pa_get_data_home_dir(&data_home) == 0) {
dir = pa_sprintf_malloc("%s" PA_PATH_SEP "alsa-mixer" PA_PATH_SEP "paths", data_home);
dir = pa_sprintf_malloc("%s" PA_PATH_SEP "alsa-mixer" PA_PATH_SEP "%s", data_home, data_type);
pa_xfree(data_home);
path_config_path = pa_maybe_prefix_path(fname, dir);
result = pa_maybe_prefix_path(fname, dir);
pa_xfree(dir);
if (access(path_config_path, R_OK) == 0)
return path_config_path;
if (access(result, R_OK) == 0)
return result;
else
pa_xfree(path_config_path);
pa_xfree(result);
}
if (pa_get_data_dirs(&data_dirs) == 0) {
@ -2893,24 +2896,27 @@ static char *get_path_config_path(const char *paths_dir, const char *fname) {
const char *n;
PA_DYNARRAY_FOREACH(n, data_dirs, idx) {
dir = pa_sprintf_malloc("%s" PA_PATH_SEP "alsa-mixer" PA_PATH_SEP "paths", n);
path_config_path = pa_maybe_prefix_path(fname, dir);
dir = pa_sprintf_malloc("%s" PA_PATH_SEP "alsa-mixer" PA_PATH_SEP "%s", n, data_type);
result = pa_maybe_prefix_path(fname, dir);
pa_xfree(dir);
if (access(path_config_path, R_OK) == 0) {
if (access(result, R_OK) == 0) {
pa_dynarray_free(data_dirs);
return path_config_path;
return result;
}
else {
pa_xfree(path_config_path);
pa_xfree(result);
}
}
pa_dynarray_free(data_dirs);
}
path_config_path = pa_maybe_prefix_path(fname, PA_ALSA_PATHS_DIR);
return path_config_path;
dir = pa_sprintf_malloc(PA_ALSA_DATA_DIR PA_PATH_SEP "%s", data_type);
result = pa_maybe_prefix_path(fname, dir);
pa_xfree(dir);
return result;
}
pa_alsa_path* pa_alsa_path_new(const char *paths_dir, const char *fname, pa_alsa_direction_t direction) {
@ -2977,7 +2983,7 @@ pa_alsa_path* pa_alsa_path_new(const char *paths_dir, const char *fname, pa_alsa
items[2].data = &p->description;
items[3].data = &mute_during_activation;
fn = get_path_config_path(paths_dir, fname);
fn = get_data_path(paths_dir, "paths", fname);
pa_log_info("Loading path config: %s", fn);
@ -4971,11 +4977,9 @@ pa_alsa_profile_set* pa_alsa_profile_set_new(const char *fname, const pa_channel
if (!fname)
fname = "default.conf";
fn = pa_maybe_prefix_path(fname,
#ifdef HAVE_RUNNING_FROM_BUILD_TREE
pa_run_from_build_tree() ? PA_SRCDIR "/modules/alsa/mixer/profile-sets/" :
#endif
PA_ALSA_PROFILE_SETS_DIR);
fn = get_data_path(NULL, "profile-sets", fname);
pa_log_info("Loading profile set: %s", fn);
r = pa_config_parse(fn, NULL, items, NULL, false, ps);
pa_xfree(fn);
@ -5074,7 +5078,7 @@ static snd_pcm_t* mapping_open_pcm(pa_alsa_mapping *m,
handle = pa_alsa_open_by_template(
m->device_strings, dev_id, NULL, &try_ss,
&try_map, mode, &try_period_size,
&try_buffer_size, 0, NULL, NULL, exact_channels);
&try_buffer_size, 0, NULL, NULL, NULL, NULL, exact_channels);
if (handle && !exact_channels && m->channel_map.channels != try_map.channels) {
char buf[PA_CHANNEL_MAP_SNPRINT_MAX];
pa_log_debug("Channel map for mapping '%s' permanently changed to '%s'", m->name,

View file

@ -103,8 +103,8 @@ struct pa_alsa_setting {
/* An entry for one ALSA mixer */
struct pa_alsa_mixer {
struct pa_alsa_mixer *alias;
snd_mixer_t *mixer_handle;
int card_index;
pa_alsa_fdlist *fdl;
bool used_for_probe_only:1;
};
@ -318,7 +318,7 @@ struct pa_alsa_mapping {
pa_sink *sink;
pa_source *source;
/* ucm device context*/
/* ucm device context */
pa_alsa_ucm_mapping_context ucm_context;
};
@ -342,6 +342,9 @@ struct pa_alsa_profile {
pa_idxset *input_mappings;
pa_idxset *output_mappings;
/* ucm device context */
pa_alsa_ucm_profile_context ucm_context;
};
struct pa_alsa_decibel_fix {

View file

@ -52,7 +52,12 @@
#include <pulsecore/thread.h>
#include <pulsecore/thread-mq.h>
#include <pulsecore/rtpoll.h>
#ifdef USE_SMOOTHER_2
#include <pulsecore/time-smoother_2.h>
#else
#include <pulsecore/time-smoother.h>
#endif
#include <modules/reserve-wrap.h>
@ -78,11 +83,15 @@
#define TSCHED_MIN_SLEEP_USEC (10*PA_USEC_PER_MSEC) /* 10ms -- Sleep at least 10ms on each iteration */
#define TSCHED_MIN_WAKEUP_USEC (4*PA_USEC_PER_MSEC) /* 4ms -- Wakeup at least this long before the buffer runs empty*/
#ifdef USE_SMOOTHER_2
#define SMOOTHER_WINDOW_USEC (15*PA_USEC_PER_SEC) /* 15s -- smoother windows size */
#else
#define SMOOTHER_WINDOW_USEC (10*PA_USEC_PER_SEC) /* 10s -- smoother windows size */
#define SMOOTHER_ADJUST_USEC (1*PA_USEC_PER_SEC) /* 1s -- smoother adjust time */
#define SMOOTHER_MIN_INTERVAL (2*PA_USEC_PER_MSEC) /* 2ms -- min smoother update interval */
#define SMOOTHER_MAX_INTERVAL (200*PA_USEC_PER_MSEC) /* 200ms -- max smoother update interval */
#endif
#define VOLUME_ACCURACY (PA_VOLUME_NORM/100) /* don't require volume adjustments to be perfectly correct. don't necessarily extend granularity in software unless the differences get greater than this level */
@ -156,11 +165,18 @@ struct userdata {
pa_rtpoll_item *alsa_rtpoll_item;
#ifdef USE_SMOOTHER_2
pa_smoother_2 *smoother;
#else
pa_smoother *smoother;
#endif
uint64_t write_count;
uint64_t since_start;
#ifndef USE_SMOOTHER_2
pa_usec_t smoother_interval;
pa_usec_t last_smoother_update;
#endif
pa_idxset *formats;
@ -480,9 +496,13 @@ static void hw_sleep_time(struct userdata *u, pa_usec_t *sleep_usec, pa_usec_t*p
/* Reset smoother and counters */
static void reset_vars(struct userdata *u) {
#ifdef USE_SMOOTHER_2
pa_smoother_2_reset(u->smoother, pa_rtclock_now());
#else
pa_smoother_reset(u->smoother, pa_rtclock_now(), true);
u->smoother_interval = SMOOTHER_MIN_INTERVAL;
u->last_smoother_update = 0;
#endif
u->first = true;
u->since_start = 0;
@ -955,7 +975,10 @@ static void update_smoother(struct userdata *u) {
snd_pcm_sframes_t delay = 0;
int64_t position;
int err;
pa_usec_t now1 = 0, now2;
pa_usec_t now1 = 0;
#ifndef USE_SMOOTHER_2
pa_usec_t now2;
#endif
snd_pcm_status_t *status;
snd_htimestamp_t htstamp = { 0, 0 };
@ -978,13 +1001,16 @@ static void update_smoother(struct userdata *u) {
if (now1 <= 0)
now1 = pa_rtclock_now();
position = (int64_t) u->write_count - ((int64_t) delay * (int64_t) u->frame_size);
#ifdef USE_SMOOTHER_2
pa_smoother_2_put(u->smoother, now1, position);
#else
/* check if the time since the last update is bigger than the interval */
if (u->last_smoother_update > 0)
if (u->last_smoother_update + u->smoother_interval > now1)
return;
position = (int64_t) u->write_count - ((int64_t) delay * (int64_t) u->frame_size);
if (PA_UNLIKELY(position < 0))
position = 0;
@ -995,18 +1021,26 @@ static void update_smoother(struct userdata *u) {
u->last_smoother_update = now1;
/* exponentially increase the update interval up to the MAX limit */
u->smoother_interval = PA_MIN (u->smoother_interval * 2, SMOOTHER_MAX_INTERVAL);
#endif
}
static int64_t sink_get_latency(struct userdata *u) {
int64_t delay;
pa_usec_t now1, now2;
pa_usec_t now1;
#ifndef USE_SMOOTHER_2
pa_usec_t now2;
#endif
pa_assert(u);
now1 = pa_rtclock_now();
#ifdef USE_SMOOTHER_2
delay = pa_smoother_2_get_delay(u->smoother, now1, u->write_count);
#else
now2 = pa_smoother_get(u->smoother, now1);
delay = (int64_t) pa_bytes_to_usec(u->write_count, &u->sink->sample_spec) - (int64_t) now2;
#endif
if (u->memchunk.memblock)
delay += pa_bytes_to_usec(u->memchunk.length, &u->sink->sample_spec);
@ -1036,7 +1070,11 @@ static void suspend(struct userdata *u) {
if (!u->pcm_handle)
return;
#ifdef USE_SMOOTHER_2
pa_smoother_2_pause(u->smoother, pa_rtclock_now());
#else
pa_smoother_pause(u->smoother, pa_rtclock_now());
#endif
/* Close PCM device */
close_pcm(u);
@ -1494,6 +1532,7 @@ static void sink_set_volume_cb(pa_sink *s) {
pa_cvolume r;
char volume_buf[PA_CVOLUME_SNPRINT_VERBOSE_MAX];
bool deferred_volume = !!(s->flags & PA_SINK_DEFERRED_VOLUME);
bool write_to_hw = !deferred_volume;
pa_assert(u);
pa_assert(u->mixer_path);
@ -1502,7 +1541,14 @@ static void sink_set_volume_cb(pa_sink *s) {
/* Shift up by the base volume */
pa_sw_cvolume_divide_scalar(&r, &s->real_volume, s->base_volume);
if (pa_alsa_path_set_volume(u->mixer_path, u->mixer_handle, &s->channel_map, &r, deferred_volume, !deferred_volume) < 0)
/* If the set_volume() is called because of ucm active_port changing, the
* volume should be written to hw immediately, otherwise this volume will be
* overridden by calling get_volume_cb() which is called by
* _disdev/_enadev() -> io_mixer_callback() */
if (u->ucm_context && s->port_changing)
write_to_hw = true;
if (pa_alsa_path_set_volume(u->mixer_path, u->mixer_handle, &s->channel_map, &r, deferred_volume, write_to_hw) < 0)
return;
/* Shift down by the base volume, so that 0dB becomes maximum volume */
@ -1675,7 +1721,7 @@ static int sink_set_port_ucm_cb(pa_sink *s, pa_device_port *p) {
else
sync_mixer(u, p);
return pa_alsa_ucm_set_port(u->ucm_context, p, true);
return pa_alsa_ucm_set_port(u->ucm_context, p);
}
static int sink_set_port_cb(pa_sink *s, pa_device_port *p) {
@ -1776,12 +1822,22 @@ static void sink_reconfigure_cb(pa_sink *s, pa_sample_spec *spec, bool passthrou
int i;
bool format_supported = false;
bool rate_supported = false;
#ifdef USE_SMOOTHER_2
pa_sample_spec effective_spec;
#endif
pa_assert(u);
#ifdef USE_SMOOTHER_2
effective_spec.channels = s->sample_spec.channels;
#endif
for (i = 0; u->supported_formats[i] != PA_SAMPLE_MAX; i++) {
if (u->supported_formats[i] == spec->format) {
pa_sink_set_sample_format(u->sink, spec->format);
#ifdef USE_SMOOTHER_2
effective_spec.format = spec->format;
#endif
format_supported = true;
break;
}
@ -1791,11 +1847,17 @@ static void sink_reconfigure_cb(pa_sink *s, pa_sample_spec *spec, bool passthrou
pa_log_info("Sink does not support sample format of %s, set it to a verified value",
pa_sample_format_to_string(spec->format));
pa_sink_set_sample_format(u->sink, u->verified_sample_spec.format);
#ifdef USE_SMOOTHER_2
effective_spec.format = u->verified_sample_spec.format;
#endif
}
for (i = 0; u->supported_rates[i]; i++) {
if (u->supported_rates[i] == spec->rate) {
pa_sink_set_sample_rate(u->sink, spec->rate);
#ifdef USE_SMOOTHER_2
effective_spec.rate = spec->rate;
#endif
rate_supported = true;
break;
}
@ -1804,8 +1866,15 @@ static void sink_reconfigure_cb(pa_sink *s, pa_sample_spec *spec, bool passthrou
if (!rate_supported) {
pa_log_info("Sink does not support sample rate of %u, set it to a verified value", spec->rate);
pa_sink_set_sample_rate(u->sink, u->verified_sample_spec.rate);
#ifdef USE_SMOOTHER_2
effective_spec.rate = u->verified_sample_spec.rate;
#endif
}
#ifdef USE_SMOOTHER_2
pa_smoother_2_set_sample_spec(u->smoother, pa_rtclock_now(), &effective_spec);
#endif
/* Passthrough status change is handled during unsuspend */
}
@ -1939,7 +2008,11 @@ static void thread_func(void *userdata) {
pa_log_info("Starting playback.");
snd_pcm_start(u->pcm_handle);
#ifdef USE_SMOOTHER_2
pa_smoother_2_resume(u->smoother, pa_rtclock_now());
#else
pa_smoother_resume(u->smoother, pa_rtclock_now(), true);
#endif
u->first = false;
}
@ -1973,7 +2046,11 @@ static void thread_func(void *userdata) {
/* Convert from the sound card time domain to the
* system time domain */
#ifdef USE_SMOOTHER_2
cusec = pa_smoother_2_translate(u->smoother, sleep_usec);
#else
cusec = pa_smoother_translate(u->smoother, pa_rtclock_now(), sleep_usec);
#endif
#ifdef DEBUG_TIMING
pa_log_debug("Waking up in %0.2fms (system clock).", (double) cusec / PA_USEC_PER_MSEC);
@ -2113,8 +2190,7 @@ static void find_mixer(struct userdata *u, pa_alsa_mapping *mapping, const char
u->mixers = pa_hashmap_new_full(pa_idxset_string_hash_func, pa_idxset_string_compare_func,
NULL, (pa_free_cb_t) pa_alsa_mixer_free);
if (mapping)
mdev = pa_proplist_gets(mapping->proplist, "alsa.mixer_device");
mdev = mapping ? pa_proplist_gets(mapping->proplist, "alsa.mixer_device") : NULL;
if (mdev) {
u->mixer_handle = pa_alsa_open_mixer_by_name(u->mixers, mdev, true);
} else {
@ -2163,7 +2239,7 @@ static int setup_mixer(struct userdata *u, bool ignore_dB) {
* will be NULL, but the UCM device enable sequence will still need to be
* executed. */
if (u->sink->active_port && u->ucm_context) {
if (pa_alsa_ucm_set_port(u->ucm_context, u->sink->active_port, true) < 0)
if (pa_alsa_ucm_set_port(u->ucm_context, u->sink->active_port) < 0)
return -1;
}
@ -2274,7 +2350,11 @@ pa_sink *pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const char*driver, pa_ca
bool volume_is_set;
bool mute_is_set;
pa_alsa_profile_set *profile_set = NULL;
void *state;
void *state = NULL;
#ifdef USE_SMOOTHER_2
snd_pcm_info_t* pcm_info;
const char *id;
#endif
pa_assert(m);
pa_assert(ma);
@ -2387,6 +2467,7 @@ pa_sink *pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const char*driver, pa_ca
goto fail;
}
#ifndef USE_SMOOTHER_2
u->smoother = pa_smoother_new(
SMOOTHER_ADJUST_USEC,
SMOOTHER_WINDOW_USEC,
@ -2396,6 +2477,7 @@ pa_sink *pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const char*driver, pa_ca
pa_rtclock_now(),
true);
u->smoother_interval = SMOOTHER_MIN_INTERVAL;
#endif
/* use ucm */
if (mapping && mapping->ucm_context.ucm)
@ -2445,7 +2527,9 @@ pa_sink *pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const char*driver, pa_ca
&ss, &map,
SND_PCM_STREAM_PLAYBACK,
&period_frames, &buffer_frames, tsched_frames,
&b, &d, mapping)))
&b, &d,
&u->supported_formats, &u->supported_rates,
mapping)))
goto fail;
} else if ((dev_id = pa_modargs_get_value(ma, "device_id", NULL))) {
@ -2459,7 +2543,9 @@ pa_sink *pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const char*driver, pa_ca
&ss, &map,
SND_PCM_STREAM_PLAYBACK,
&period_frames, &buffer_frames, tsched_frames,
&b, &d, profile_set, &mapping)))
&b, &d,
&u->supported_formats, &u->supported_rates,
profile_set, &mapping)))
goto fail;
} else {
@ -2470,7 +2556,9 @@ pa_sink *pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const char*driver, pa_ca
&ss, &map,
SND_PCM_STREAM_PLAYBACK,
&period_frames, &buffer_frames, tsched_frames,
&b, &d, false)))
&b, &d,
&u->supported_formats, &u->supported_rates,
false)))
goto fail;
}
@ -2516,13 +2604,11 @@ pa_sink *pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const char*driver, pa_ca
u->verified_sample_spec = ss;
u->supported_formats = pa_alsa_get_supported_formats(u->pcm_handle, ss.format);
if (!u->supported_formats) {
pa_log_error("Failed to find any supported sample formats.");
goto fail;
}
u->supported_rates = pa_alsa_get_supported_rates(u->pcm_handle, ss.rate);
if (!u->supported_rates) {
pa_log_error("Failed to find any supported sample rates.");
goto fail;
@ -2606,6 +2692,25 @@ pa_sink *pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const char*driver, pa_ca
goto fail;
}
#ifdef USE_SMOOTHER_2
u->smoother = pa_smoother_2_new(SMOOTHER_WINDOW_USEC, pa_rtclock_now(), frame_size, u->sink->sample_spec.rate);
/* Check if this is an USB device, see alsa-util.c
* USB devices unfortunately need some special handling */
snd_pcm_info_alloca(&pcm_info);
if (snd_pcm_info(u->pcm_handle, pcm_info) == 0 &&
(id = snd_pcm_info_get_id(pcm_info))) {
if (pa_streq(id, "USB Audio")) {
uint32_t hack_threshold;
/* USB device, set hack parameter */
hack_threshold = 2000;
if (!u->use_tsched)
hack_threshold = 1000;
pa_smoother_2_usb_hack_enable(u->smoother, true, hack_threshold);
}
}
#endif
if (u->ucm_context) {
pa_device_port *port;
unsigned h_prio = 0;
@ -2809,7 +2914,11 @@ static void userdata_free(struct userdata *u) {
pa_hashmap_free(u->mixers);
if (u->smoother)
#ifdef USE_SMOOTHER_2
pa_smoother_2_free(u->smoother);
#else
pa_smoother_free(u->smoother);
#endif
if (u->formats)
pa_idxset_free(u->formats, (pa_free_cb_t) pa_format_info_free);

View file

@ -47,7 +47,12 @@
#include <pulsecore/thread.h>
#include <pulsecore/thread-mq.h>
#include <pulsecore/rtpoll.h>
#ifdef USE_SMOOTHER_2
#include <pulsecore/time-smoother_2.h>
#else
#include <pulsecore/time-smoother.h>
#endif
#include <modules/reserve-wrap.h>
@ -71,11 +76,15 @@
#define TSCHED_MIN_SLEEP_USEC (10*PA_USEC_PER_MSEC) /* 10ms */
#define TSCHED_MIN_WAKEUP_USEC (4*PA_USEC_PER_MSEC) /* 4ms */
#ifdef USE_SMOOTHER_2
#define SMOOTHER_WINDOW_USEC (15*PA_USEC_PER_SEC) /* 15s */
#else
#define SMOOTHER_WINDOW_USEC (10*PA_USEC_PER_SEC) /* 10s */
#define SMOOTHER_ADJUST_USEC (1*PA_USEC_PER_SEC) /* 1s */
#define SMOOTHER_MIN_INTERVAL (2*PA_USEC_PER_MSEC) /* 2ms */
#define SMOOTHER_MAX_INTERVAL (200*PA_USEC_PER_MSEC) /* 200ms */
#endif
#define VOLUME_ACCURACY (PA_VOLUME_NORM/100)
@ -140,10 +149,17 @@ struct userdata {
pa_rtpoll_item *alsa_rtpoll_item;
#ifdef USE_SMOOTHER_2
pa_smoother_2 *smoother;
#else
pa_smoother *smoother;
#endif
uint64_t read_count;
#ifndef USE_SMOOTHER_2
pa_usec_t smoother_interval;
pa_usec_t last_smoother_update;
#endif
pa_reserve_wrapper *reserve;
pa_hook_slot *reserve_slot;
@ -452,9 +468,13 @@ static void hw_sleep_time(struct userdata *u, pa_usec_t *sleep_usec, pa_usec_t*p
/* Reset smoother and counters */
static void reset_vars(struct userdata *u) {
#ifdef USE_SMOOTHER_2
pa_smoother_2_reset(u->smoother, pa_rtclock_now());
#else
pa_smoother_reset(u->smoother, pa_rtclock_now(), true);
u->smoother_interval = SMOOTHER_MIN_INTERVAL;
u->last_smoother_update = 0;
#endif
u->read_count = 0;
u->first = true;
@ -462,7 +482,12 @@ static void reset_vars(struct userdata *u) {
/* Called from IO context */
static void close_pcm(struct userdata *u) {
#ifdef USE_SMOOTHER_2
pa_smoother_2_pause(u->smoother, pa_rtclock_now());
#else
pa_smoother_pause(u->smoother, pa_rtclock_now());
#endif
/* Let's suspend */
snd_pcm_close(u->pcm_handle);
@ -877,7 +902,10 @@ static void update_smoother(struct userdata *u) {
snd_pcm_sframes_t delay = 0;
uint64_t position;
int err;
pa_usec_t now1 = 0, now2;
pa_usec_t now1 = 0;
#ifndef USE_SMOOTHER_2
pa_usec_t now2;
#endif
snd_pcm_status_t *status;
snd_htimestamp_t htstamp = { 0, 0 };
@ -900,12 +928,16 @@ static void update_smoother(struct userdata *u) {
if (now1 <= 0)
now1 = pa_rtclock_now();
position = u->read_count + ((uint64_t) delay * (uint64_t) u->frame_size);
#ifdef USE_SMOOTHER_2
pa_smoother_2_put(u->smoother, now1, position);
#else
/* check if the time since the last update is bigger than the interval */
if (u->last_smoother_update > 0)
if (u->last_smoother_update + u->smoother_interval > now1)
return;
position = u->read_count + ((uint64_t) delay * (uint64_t) u->frame_size);
now2 = pa_bytes_to_usec(position, &u->source->sample_spec);
pa_smoother_put(u->smoother, now1, now2);
@ -913,18 +945,27 @@ static void update_smoother(struct userdata *u) {
u->last_smoother_update = now1;
/* exponentially increase the update interval up to the MAX limit */
u->smoother_interval = PA_MIN (u->smoother_interval * 2, SMOOTHER_MAX_INTERVAL);
#endif
}
static int64_t source_get_latency(struct userdata *u) {
int64_t delay;
pa_usec_t now1, now2;
pa_usec_t now1;
#ifndef USE_SMOOTHER_2
pa_usec_t now2;
#endif
pa_assert(u);
now1 = pa_rtclock_now();
#ifdef USE_SMOOTHER_2
delay = - pa_smoother_2_get_delay(u->smoother, now1, u->read_count);
#else
now2 = pa_smoother_get(u->smoother, now1);
delay = (int64_t) now2 - (int64_t) pa_bytes_to_usec(u->read_count, &u->source->sample_spec);
#endif
return delay;
}
@ -1365,6 +1406,7 @@ static void source_set_volume_cb(pa_source *s) {
pa_cvolume r;
char volume_buf[PA_CVOLUME_SNPRINT_VERBOSE_MAX];
bool deferred_volume = !!(s->flags & PA_SOURCE_DEFERRED_VOLUME);
bool write_to_hw = !deferred_volume;
pa_assert(u);
pa_assert(u->mixer_path);
@ -1373,7 +1415,14 @@ static void source_set_volume_cb(pa_source *s) {
/* Shift up by the base volume */
pa_sw_cvolume_divide_scalar(&r, &s->real_volume, s->base_volume);
if (pa_alsa_path_set_volume(u->mixer_path, u->mixer_handle, &s->channel_map, &r, deferred_volume, !deferred_volume) < 0)
/* If the set_volume() is called because of ucm active_port changing, the
* volume should be written to hw immediately, otherwise this volume will be
* overridden by calling get_volume_cb() which is called by
* _disdev/_enadev() -> io_mixer_callback() */
if (u->ucm_context && s->port_changing)
write_to_hw = true;
if (pa_alsa_path_set_volume(u->mixer_path, u->mixer_handle, &s->channel_map, &r, deferred_volume, write_to_hw) < 0)
return;
/* Shift down by the base volume, so that 0dB becomes maximum volume */
@ -1546,7 +1595,7 @@ static int source_set_port_ucm_cb(pa_source *s, pa_device_port *p) {
else
sync_mixer(u, p);
return pa_alsa_ucm_set_port(u->ucm_context, p, false);
return pa_alsa_ucm_set_port(u->ucm_context, p);
}
static int source_set_port_cb(pa_source *s, pa_device_port *p) {
@ -1588,12 +1637,22 @@ static void source_reconfigure_cb(pa_source *s, pa_sample_spec *spec, bool passt
int i;
bool format_supported = false;
bool rate_supported = false;
#ifdef USE_SMOOTHER_2
pa_sample_spec effective_spec;
#endif
pa_assert(u);
#ifdef USE_SMOOTHER_2
effective_spec.channels = s->sample_spec.channels;
#endif
for (i = 0; u->supported_formats[i] != PA_SAMPLE_MAX; i++) {
if (u->supported_formats[i] == spec->format) {
pa_source_set_sample_format(u->source, spec->format);
#ifdef USE_SMOOTHER_2
effective_spec.format = spec->format;
#endif
format_supported = true;
break;
}
@ -1603,11 +1662,17 @@ static void source_reconfigure_cb(pa_source *s, pa_sample_spec *spec, bool passt
pa_log_info("Source does not support sample format of %s, set it to a verified value",
pa_sample_format_to_string(spec->format));
pa_source_set_sample_format(u->source, u->verified_sample_spec.format);
#ifdef USE_SMOOTHER_2
effective_spec.format = u->verified_sample_spec.format;
#endif
}
for (i = 0; u->supported_rates[i]; i++) {
if (u->supported_rates[i] == spec->rate) {
pa_source_set_sample_rate(u->source, spec->rate);
#ifdef USE_SMOOTHER_2
effective_spec.rate = spec->rate;
#endif
rate_supported = true;
break;
}
@ -1616,7 +1681,15 @@ static void source_reconfigure_cb(pa_source *s, pa_sample_spec *spec, bool passt
if (!rate_supported) {
pa_log_info("Source does not support sample rate of %u, set it to a verfied value", spec->rate);
pa_source_set_sample_rate(u->source, u->verified_sample_spec.rate);
#ifdef USE_SMOOTHER_2
effective_spec.rate = u->verified_sample_spec.rate;
#endif
}
#ifdef USE_SMOOTHER_2
pa_smoother_2_set_sample_spec(u->smoother, pa_rtclock_now(), &effective_spec);
#endif
}
static void thread_func(void *userdata) {
@ -1650,7 +1723,11 @@ static void thread_func(void *userdata) {
pa_log_info("Starting capture.");
snd_pcm_start(u->pcm_handle);
#ifdef USE_SMOOTHER_2
pa_smoother_2_resume(u->smoother, pa_rtclock_now());
#else
pa_smoother_resume(u->smoother, pa_rtclock_now(), true);
#endif
u->first = false;
}
@ -1678,7 +1755,11 @@ static void thread_func(void *userdata) {
/* Convert from the sound card time domain to the
* system time domain */
#ifdef USE_SMOOTHER_2
cusec = pa_smoother_2_translate(u->smoother, sleep_usec);
#else
cusec = pa_smoother_translate(u->smoother, pa_rtclock_now(), sleep_usec);
#endif
/* pa_log_debug("Waking up in %0.2fms (system clock).", (double) cusec / PA_USEC_PER_MSEC); */
@ -1813,8 +1894,7 @@ static void find_mixer(struct userdata *u, pa_alsa_mapping *mapping, const char
u->mixers = pa_hashmap_new_full(pa_idxset_string_hash_func, pa_idxset_string_compare_func,
NULL, (pa_free_cb_t) pa_alsa_mixer_free);
if (mapping)
mdev = pa_proplist_gets(mapping->proplist, "alsa.mixer_device");
mdev = mapping ? pa_proplist_gets(mapping->proplist, "alsa.mixer_device") : NULL;
if (mdev) {
u->mixer_handle = pa_alsa_open_mixer_by_name(u->mixers, mdev, false);
} else {
@ -1863,7 +1943,7 @@ static int setup_mixer(struct userdata *u, bool ignore_dB) {
* will be NULL, but the UCM device enable sequence will still need to be
* executed. */
if (u->source->active_port && u->ucm_context) {
if (pa_alsa_ucm_set_port(u->ucm_context, u->source->active_port, false) < 0)
if (pa_alsa_ucm_set_port(u->ucm_context, u->source->active_port) < 0)
return -1;
}
@ -2078,6 +2158,7 @@ pa_source *pa_alsa_source_new(pa_module *m, pa_modargs *ma, const char*driver, p
goto fail;
}
#ifndef USE_SMOOTHER_2
u->smoother = pa_smoother_new(
SMOOTHER_ADJUST_USEC,
SMOOTHER_WINDOW_USEC,
@ -2087,6 +2168,7 @@ pa_source *pa_alsa_source_new(pa_module *m, pa_modargs *ma, const char*driver, p
pa_rtclock_now(),
true);
u->smoother_interval = SMOOTHER_MIN_INTERVAL;
#endif
/* use ucm */
if (mapping && mapping->ucm_context.ucm)
@ -2136,7 +2218,7 @@ pa_source *pa_alsa_source_new(pa_module *m, pa_modargs *ma, const char*driver, p
&ss, &map,
SND_PCM_STREAM_CAPTURE,
&period_frames, &buffer_frames, tsched_frames,
&b, &d, mapping)))
&b, &d, &u->supported_formats, &u->supported_rates, mapping)))
goto fail;
} else if ((dev_id = pa_modargs_get_value(ma, "device_id", NULL))) {
@ -2150,7 +2232,7 @@ pa_source *pa_alsa_source_new(pa_module *m, pa_modargs *ma, const char*driver, p
&ss, &map,
SND_PCM_STREAM_CAPTURE,
&period_frames, &buffer_frames, tsched_frames,
&b, &d, profile_set, &mapping)))
&b, &d, &u->supported_formats, &u->supported_rates, profile_set, &mapping)))
goto fail;
} else {
@ -2161,7 +2243,7 @@ pa_source *pa_alsa_source_new(pa_module *m, pa_modargs *ma, const char*driver, p
&ss, &map,
SND_PCM_STREAM_CAPTURE,
&period_frames, &buffer_frames, tsched_frames,
&b, &d, false)))
&b, &d, &u->supported_formats, &u->supported_rates, false)))
goto fail;
}
@ -2197,13 +2279,11 @@ pa_source *pa_alsa_source_new(pa_module *m, pa_modargs *ma, const char*driver, p
u->verified_sample_spec = ss;
u->supported_formats = pa_alsa_get_supported_formats(u->pcm_handle, ss.format);
if (!u->supported_formats) {
pa_log_error("Failed to find any supported sample formats.");
goto fail;
}
u->supported_rates = pa_alsa_get_supported_rates(u->pcm_handle, ss.rate);
if (!u->supported_rates) {
pa_log_error("Failed to find any supported sample rates.");
goto fail;
@ -2286,6 +2366,10 @@ pa_source *pa_alsa_source_new(pa_module *m, pa_modargs *ma, const char*driver, p
goto fail;
}
#ifdef USE_SMOOTHER_2
u->smoother = pa_smoother_2_new(SMOOTHER_WINDOW_USEC, pa_rtclock_now(), frame_size, u->source->sample_spec.rate);
#endif
if (u->ucm_context) {
pa_device_port *port;
unsigned h_prio = 0;
@ -2447,7 +2531,11 @@ static void userdata_free(struct userdata *u) {
pa_hashmap_free(u->mixers);
if (u->smoother)
#ifdef USE_SMOOTHER_2
pa_smoother_2_free(u->smoother);
#else
pa_smoother_free(u->smoother);
#endif
if (u->supported_formats)
pa_xfree(u->supported_formats);

File diff suppressed because it is too large Load diff

View file

@ -140,12 +140,13 @@ typedef struct pa_alsa_ucm_modifier pa_alsa_ucm_modifier;
typedef struct pa_alsa_ucm_device pa_alsa_ucm_device;
typedef struct pa_alsa_ucm_config pa_alsa_ucm_config;
typedef struct pa_alsa_ucm_mapping_context pa_alsa_ucm_mapping_context;
typedef struct pa_alsa_ucm_profile_context pa_alsa_ucm_profile_context;
typedef struct pa_alsa_ucm_port_data pa_alsa_ucm_port_data;
typedef struct pa_alsa_ucm_volume pa_alsa_ucm_volume;
int pa_alsa_ucm_query_profiles(pa_alsa_ucm_config *ucm, int card_index);
pa_alsa_profile_set* pa_alsa_ucm_add_profile_set(pa_alsa_ucm_config *ucm, pa_channel_map *default_channel_map);
int pa_alsa_ucm_set_profile(pa_alsa_ucm_config *ucm, pa_card *card, const char *new_profile, const char *old_profile);
int pa_alsa_ucm_set_profile(pa_alsa_ucm_config *ucm, pa_card *card, pa_alsa_profile *new_profile, pa_alsa_profile *old_profile);
int pa_alsa_ucm_get_verb(snd_use_case_mgr_t *uc_mgr, const char *verb_name, const char *verb_desc, pa_alsa_ucm_verb **p_verb);
@ -157,14 +158,14 @@ void pa_alsa_ucm_add_ports(
pa_card *card,
snd_pcm_t *pcm_handle,
bool ignore_dB);
void pa_alsa_ucm_add_ports_combination(
void pa_alsa_ucm_add_port(
pa_hashmap *hash,
pa_alsa_ucm_mapping_context *context,
bool is_sink,
pa_hashmap *ports,
pa_card_profile *cp,
pa_core *core);
int pa_alsa_ucm_set_port(pa_alsa_ucm_mapping_context *context, pa_device_port *port, bool is_sink);
int pa_alsa_ucm_set_port(pa_alsa_ucm_mapping_context *context, pa_device_port *port);
void pa_alsa_ucm_free(pa_alsa_ucm_config *ucm);
void pa_alsa_ucm_mapping_context_free(pa_alsa_ucm_mapping_context *context);
@ -221,11 +222,8 @@ struct pa_alsa_ucm_modifier {
pa_proplist *proplist;
int n_confdev;
int n_suppdev;
const char **conflicting_devices;
const char **supported_devices;
pa_idxset *conflicting_devices;
pa_idxset *supported_devices;
pa_direction_t action_direction;
@ -253,6 +251,7 @@ struct pa_alsa_ucm_config {
pa_core *core;
snd_use_case_mgr_t *ucm_mgr;
pa_alsa_ucm_verb *active_verb;
char *alib_prefix;
pa_hashmap *mixers;
PA_LLIST_HEAD(pa_alsa_ucm_verb, verbs);
@ -263,21 +262,23 @@ struct pa_alsa_ucm_mapping_context {
pa_alsa_ucm_config *ucm;
pa_direction_t direction;
pa_idxset *ucm_devices;
pa_idxset *ucm_modifiers;
pa_alsa_ucm_device *ucm_device;
pa_alsa_ucm_modifier *ucm_modifier;
};
struct pa_alsa_ucm_profile_context {
pa_alsa_ucm_verb *verb;
};
struct pa_alsa_ucm_port_data {
pa_alsa_ucm_config *ucm;
pa_device_port *core_port;
/* A single port will be associated with multiple devices if it represents
* a combination of devices. */
pa_dynarray *devices; /* pa_alsa_ucm_device */
pa_alsa_ucm_device *device;
/* profile name -> pa_alsa_path for volume control */
/* verb name -> pa_alsa_path for volume control */
pa_hashmap *paths;
/* Current path, set when activating profile */
/* Current path, set when activating verb */
pa_alsa_path *path;
/* ELD info */

View file

@ -40,6 +40,7 @@
#include <pulsecore/thread.h>
#include <pulsecore/conf-parser.h>
#include <pulsecore/core-rtclock.h>
#include <pulsecore/strbuf.h>
#include "alsa-util.h"
#include "alsa-mixer.h"
@ -522,6 +523,8 @@ snd_pcm_t *pa_alsa_open_by_device_id_auto(
snd_pcm_uframes_t tsched_size,
bool *use_mmap,
bool *use_tsched,
pa_sample_format_t **query_supported_formats,
unsigned int **query_supported_rates,
pa_alsa_profile_set *ps,
pa_alsa_mapping **mapping) {
@ -560,6 +563,8 @@ snd_pcm_t *pa_alsa_open_by_device_id_auto(
tsched_size,
use_mmap,
use_tsched,
query_supported_formats,
query_supported_rates,
m);
if (pcm_handle) {
@ -587,6 +592,8 @@ snd_pcm_t *pa_alsa_open_by_device_id_auto(
tsched_size,
use_mmap,
use_tsched,
query_supported_formats,
query_supported_rates,
m);
if (pcm_handle) {
@ -611,6 +618,8 @@ snd_pcm_t *pa_alsa_open_by_device_id_auto(
tsched_size,
use_mmap,
use_tsched,
query_supported_formats,
query_supported_rates,
false);
pa_xfree(d);
@ -631,6 +640,8 @@ snd_pcm_t *pa_alsa_open_by_device_id_mapping(
snd_pcm_uframes_t tsched_size,
bool *use_mmap,
bool *use_tsched,
pa_sample_format_t **query_supported_formats,
unsigned int **query_supported_rates,
pa_alsa_mapping *m) {
snd_pcm_t *pcm_handle;
@ -660,6 +671,8 @@ snd_pcm_t *pa_alsa_open_by_device_id_mapping(
tsched_size,
use_mmap,
use_tsched,
query_supported_formats,
query_supported_rates,
pa_channel_map_valid(&m->channel_map) /* Query the channel count if we don't know what we want */);
if (!pcm_handle)
@ -683,6 +696,8 @@ snd_pcm_t *pa_alsa_open_by_device_string(
snd_pcm_uframes_t tsched_size,
bool *use_mmap,
bool *use_tsched,
pa_sample_format_t **query_supported_formats,
unsigned int **query_supported_rates,
bool require_exact_channel_number) {
int err;
@ -710,6 +725,12 @@ snd_pcm_t *pa_alsa_open_by_device_string(
pa_log_debug("Managed to open %s", d);
if (query_supported_formats)
*query_supported_formats = pa_alsa_get_supported_formats(pcm_handle, ss->format);
if (query_supported_rates)
*query_supported_rates = pa_alsa_get_supported_rates(pcm_handle, ss->rate);
if ((err = pa_alsa_set_hw_params(
pcm_handle,
ss,
@ -783,6 +804,8 @@ snd_pcm_t *pa_alsa_open_by_template(
snd_pcm_uframes_t tsched_size,
bool *use_mmap,
bool *use_tsched,
pa_sample_format_t **query_supported_formats,
unsigned int **query_supported_rates,
bool require_exact_channel_number) {
snd_pcm_t *pcm_handle;
@ -804,6 +827,8 @@ snd_pcm_t *pa_alsa_open_by_template(
tsched_size,
use_mmap,
use_tsched,
query_supported_formats,
query_supported_rates,
require_exact_channel_number);
pa_xfree(d);
@ -1406,13 +1431,31 @@ char *pa_alsa_get_reserve_name(const char *device) {
return pa_sprintf_malloc("Audio%i", i);
}
static void dump_supported_rates(unsigned int* values)
{
pa_strbuf *buf;
char *str;
int i;
buf = pa_strbuf_new();
for (i = 0; values[i]; i++) {
pa_strbuf_printf(buf, " %u", values[i]);
}
str = pa_strbuf_to_string_free(buf);
pa_log_debug("Supported rates:%s", str);
pa_xfree(str);
}
unsigned int *pa_alsa_get_supported_rates(snd_pcm_t *pcm, unsigned int fallback_rate) {
static unsigned int all_rates[] = { 8000, 11025, 12000,
16000, 22050, 24000,
32000, 44100, 48000,
64000, 88200, 96000,
128000, 176400, 192000,
384000 };
352800, 384000,
705600, 768000 };
bool supported[PA_ELEMENTSOF(all_rates)] = { false, };
snd_pcm_hw_params_t *hwparams;
unsigned int i, j, n, *rates = NULL;
@ -1454,39 +1497,40 @@ unsigned int *pa_alsa_get_supported_rates(snd_pcm_t *pcm, unsigned int fallback_
rates[1] = 0;
}
dump_supported_rates(rates);
return rates;
}
pa_sample_format_t *pa_alsa_get_supported_formats(snd_pcm_t *pcm, pa_sample_format_t fallback_format) {
static const snd_pcm_format_t format_trans_to_pa[] = {
[SND_PCM_FORMAT_U8] = PA_SAMPLE_U8,
[SND_PCM_FORMAT_A_LAW] = PA_SAMPLE_ALAW,
[SND_PCM_FORMAT_MU_LAW] = PA_SAMPLE_ULAW,
[SND_PCM_FORMAT_S16_LE] = PA_SAMPLE_S16LE,
[SND_PCM_FORMAT_S16_BE] = PA_SAMPLE_S16BE,
[SND_PCM_FORMAT_FLOAT_LE] = PA_SAMPLE_FLOAT32LE,
[SND_PCM_FORMAT_FLOAT_BE] = PA_SAMPLE_FLOAT32BE,
[SND_PCM_FORMAT_S32_LE] = PA_SAMPLE_S32LE,
[SND_PCM_FORMAT_S32_BE] = PA_SAMPLE_S32BE,
[SND_PCM_FORMAT_S24_3LE] = PA_SAMPLE_S24LE,
[SND_PCM_FORMAT_S24_3BE] = PA_SAMPLE_S24BE,
[SND_PCM_FORMAT_S24_LE] = PA_SAMPLE_S24_32LE,
[SND_PCM_FORMAT_S24_BE] = PA_SAMPLE_S24_32BE,
static const snd_pcm_format_t format_trans_to_pcm[] = {
[PA_SAMPLE_U8] = SND_PCM_FORMAT_U8,
[PA_SAMPLE_ALAW] = SND_PCM_FORMAT_A_LAW,
[PA_SAMPLE_ULAW] = SND_PCM_FORMAT_MU_LAW,
[PA_SAMPLE_S16LE] = SND_PCM_FORMAT_S16_LE,
[PA_SAMPLE_S16BE] = SND_PCM_FORMAT_S16_BE,
[PA_SAMPLE_FLOAT32LE] = SND_PCM_FORMAT_FLOAT_LE,
[PA_SAMPLE_FLOAT32BE] = SND_PCM_FORMAT_FLOAT_BE,
[PA_SAMPLE_S32LE] = SND_PCM_FORMAT_S32_LE,
[PA_SAMPLE_S32BE] = SND_PCM_FORMAT_S32_BE,
[PA_SAMPLE_S24LE] = SND_PCM_FORMAT_S24_3LE,
[PA_SAMPLE_S24BE] = SND_PCM_FORMAT_S24_3BE,
[PA_SAMPLE_S24_32LE] = SND_PCM_FORMAT_S24_LE,
[PA_SAMPLE_S24_32BE] = SND_PCM_FORMAT_S24_BE,
};
static const snd_pcm_format_t all_formats[] = {
SND_PCM_FORMAT_U8,
SND_PCM_FORMAT_A_LAW,
SND_PCM_FORMAT_MU_LAW,
SND_PCM_FORMAT_S16_LE,
SND_PCM_FORMAT_S16_BE,
SND_PCM_FORMAT_FLOAT_LE,
SND_PCM_FORMAT_FLOAT_BE,
SND_PCM_FORMAT_S32_LE,
SND_PCM_FORMAT_S32_BE,
SND_PCM_FORMAT_S24_3LE,
SND_PCM_FORMAT_S24_3BE,
SND_PCM_FORMAT_S24_LE,
SND_PCM_FORMAT_S24_BE,
static const pa_sample_format_t all_formats[] = {
PA_SAMPLE_U8,
PA_SAMPLE_ALAW,
PA_SAMPLE_ULAW,
PA_SAMPLE_S16LE,
PA_SAMPLE_S16BE,
PA_SAMPLE_FLOAT32LE,
PA_SAMPLE_FLOAT32BE,
PA_SAMPLE_S32LE,
PA_SAMPLE_S32BE,
PA_SAMPLE_S24LE,
PA_SAMPLE_S24BE,
PA_SAMPLE_S24_32LE,
PA_SAMPLE_S24_32BE,
};
bool supported[PA_ELEMENTSOF(all_formats)] = {
false,
@ -1504,7 +1548,7 @@ pa_sample_format_t *pa_alsa_get_supported_formats(snd_pcm_t *pcm, pa_sample_form
}
for (i = 0, n = 0; i < PA_ELEMENTSOF(all_formats); i++) {
if (snd_pcm_hw_params_test_format(pcm, hwparams, all_formats[i]) == 0) {
if (snd_pcm_hw_params_test_format(pcm, hwparams, format_trans_to_pcm[all_formats[i]]) == 0) {
supported[i] = true;
n++;
}
@ -1515,7 +1559,7 @@ pa_sample_format_t *pa_alsa_get_supported_formats(snd_pcm_t *pcm, pa_sample_form
for (i = 0, j = 0; i < PA_ELEMENTSOF(all_formats); i++) {
if (supported[i])
formats[j++] = format_trans_to_pa[all_formats[i]];
formats[j++] = all_formats[i];
}
formats[j] = PA_SAMPLE_MAX;
@ -1523,7 +1567,7 @@ pa_sample_format_t *pa_alsa_get_supported_formats(snd_pcm_t *pcm, pa_sample_form
formats = pa_xnew(pa_sample_format_t, 2);
formats[0] = fallback_format;
if ((ret = snd_pcm_hw_params_set_format(pcm, hwparams, format_trans_to_pa[formats[0]])) < 0) {
if ((ret = snd_pcm_hw_params_set_format(pcm, hwparams, format_trans_to_pcm[formats[0]])) < 0) {
pa_log_debug("snd_pcm_hw_params_set_format() failed: %s", pa_alsa_strerror(ret));
pa_xfree(formats);
return NULL;
@ -1614,14 +1658,16 @@ static snd_mixer_elem_t *pa_alsa_mixer_find(snd_mixer_t *mixer,
snd_ctl_elem_iface_t iface,
const char *name,
unsigned int index,
unsigned int device) {
unsigned int device,
unsigned int subdevice) {
snd_mixer_elem_t *elem;
for (elem = snd_mixer_first_elem(mixer); elem; elem = snd_mixer_elem_next(elem)) {
snd_hctl_elem_t *helem;
snd_hctl_elem_t **_helem, *helem;
if (snd_mixer_elem_get_type(elem) != SND_MIXER_ELEM_PULSEAUDIO)
continue;
helem = snd_mixer_elem_get_private(elem);
_helem = snd_mixer_elem_get_private(elem);
helem = *_helem;
if (snd_hctl_elem_get_interface(helem) != iface)
continue;
if (!pa_streq(snd_hctl_elem_get_name(helem), name))
@ -1630,17 +1676,19 @@ static snd_mixer_elem_t *pa_alsa_mixer_find(snd_mixer_t *mixer,
continue;
if (snd_hctl_elem_get_device(helem) != device)
continue;
if (snd_hctl_elem_get_subdevice(helem) != subdevice)
continue;
return elem;
}
return NULL;
}
snd_mixer_elem_t *pa_alsa_mixer_find_card(snd_mixer_t *mixer, struct pa_alsa_mixer_id *alsa_id, unsigned int device) {
return pa_alsa_mixer_find(mixer, SND_CTL_ELEM_IFACE_CARD, alsa_id->name, alsa_id->index, device);
return pa_alsa_mixer_find(mixer, SND_CTL_ELEM_IFACE_CARD, alsa_id->name, alsa_id->index, device, 0);
}
snd_mixer_elem_t *pa_alsa_mixer_find_pcm(snd_mixer_t *mixer, const char *name, unsigned int device) {
return pa_alsa_mixer_find(mixer, SND_CTL_ELEM_IFACE_PCM, name, 0, device);
return pa_alsa_mixer_find(mixer, SND_CTL_ELEM_IFACE_PCM, name, 0, device, 0);
}
static int mixer_class_compare(const snd_mixer_elem_t *c1, const snd_mixer_elem_t *c2)
@ -1649,31 +1697,79 @@ static int mixer_class_compare(const snd_mixer_elem_t *c1, const snd_mixer_elem_
return c1 == c2 ? 0 : (c1 > c2 ? 1 : -1);
}
static void mixer_melem_free(snd_mixer_elem_t *elem)
{
snd_hctl_elem_t **_helem;
_helem = snd_mixer_elem_get_private(elem);
pa_xfree(_helem);
}
static int mixer_class_event(snd_mixer_class_t *class, unsigned int mask,
snd_hctl_elem_t *helem, snd_mixer_elem_t *melem)
{
int err;
const char *name = snd_hctl_elem_get_name(helem);
if (mask & SND_CTL_EVENT_MASK_ADD) {
snd_hctl_elem_t **_helem;
/* NOTE: The remove event is defined as '~0U`. */
if (mask == SND_CTL_EVENT_MASK_REMOVE) {
/* NOTE: Unless we remove the pointer to melem from the linked-list at
* private_data of helem, an assertion will be hit in alsa-lib since
* the list is not empty. */
_helem = snd_mixer_elem_get_private(melem);
*_helem = NULL;
snd_mixer_elem_detach(melem, helem);
} else if (mask & SND_CTL_EVENT_MASK_ADD) {
snd_ctl_elem_iface_t iface = snd_hctl_elem_get_interface(helem);
if (iface == SND_CTL_ELEM_IFACE_CARD || iface == SND_CTL_ELEM_IFACE_PCM) {
snd_mixer_t *mixer = snd_mixer_class_get_mixer(class);
snd_ctl_elem_iface_t iface = snd_hctl_elem_get_interface(helem);
const char *name = snd_hctl_elem_get_name(helem);
const int index = snd_hctl_elem_get_index(helem);
const int device = snd_hctl_elem_get_device(helem);
const int subdevice = snd_hctl_elem_get_subdevice(helem);
snd_mixer_elem_t *new_melem;
bool found = true;
/* Put the hctl pointer as our private data - it will be useful for callbacks */
if ((err = snd_mixer_elem_new(&new_melem, SND_MIXER_ELEM_PULSEAUDIO, 0, helem, NULL)) < 0) {
pa_log_warn("snd_mixer_elem_new failed: %s", pa_alsa_strerror(err));
return 0;
new_melem = pa_alsa_mixer_find(mixer, iface, name, index, device, subdevice);
if (!new_melem) {
_helem = pa_xmalloc(sizeof(snd_hctl_elem_t *));
*_helem = helem;
/* Put the hctl pointer as our private data - it will be useful for callbacks */
if ((err = snd_mixer_elem_new(&new_melem, SND_MIXER_ELEM_PULSEAUDIO, 0, _helem, mixer_melem_free)) < 0) {
pa_log_warn("snd_mixer_elem_new failed: %s", pa_alsa_strerror(err));
return 0;
}
found = false;
} else {
_helem = snd_mixer_elem_get_private(new_melem);
if (_helem) {
char *s1, *s2;
snd_ctl_elem_id_t *id1, *id2;
snd_ctl_elem_id_alloca(&id1);
snd_ctl_elem_id_alloca(&id2);
snd_hctl_elem_get_id(helem, id1);
snd_hctl_elem_get_id(*_helem, id2);
s1 = snd_ctl_ascii_elem_id_get(id1);
s2 = snd_ctl_ascii_elem_id_get(id2);
pa_log_warn("mixer_class_event - duplicate mixer controls: %s | %s", s1, s2);
free(s2);
free(s1);
return 0;
}
*_helem = helem;
}
if ((err = snd_mixer_elem_attach(new_melem, helem)) < 0) {
pa_log_warn("snd_mixer_elem_attach failed: %s", pa_alsa_strerror(err));
snd_mixer_elem_free(melem);
snd_mixer_elem_free(melem);
return 0;
}
if ((err = snd_mixer_elem_add(new_melem, class)) < 0) {
pa_log_warn("snd_mixer_elem_add failed: %s", pa_alsa_strerror(err));
return 0;
if (!found) {
if ((err = snd_mixer_elem_add(new_melem, class)) < 0) {
pa_log_warn("snd_mixer_elem_add failed: %s", pa_alsa_strerror(err));
return 0;
}
}
}
}
@ -1687,14 +1783,14 @@ static int mixer_class_event(snd_mixer_class_t *class, unsigned int mask,
return 0;
}
static int prepare_mixer(snd_mixer_t *mixer, const char *dev) {
static int prepare_mixer(snd_mixer_t *mixer, const char *dev, snd_hctl_t *hctl) {
int err;
snd_mixer_class_t *class;
pa_assert(mixer);
pa_assert(dev);
if ((err = snd_mixer_attach(mixer, dev)) < 0) {
if ((err = snd_mixer_attach_hctl(mixer, hctl)) < 0) {
pa_log_info("Unable to attach to mixer %s: %s", dev, pa_alsa_strerror(err));
return -1;
}
@ -1733,37 +1829,29 @@ snd_mixer_t *pa_alsa_open_mixer(pa_hashmap *mixers, int alsa_card_index, bool pr
return m;
}
pa_alsa_mixer *pa_alsa_create_mixer(pa_hashmap *mixers, const char *dev, snd_mixer_t *m, bool probe) {
pa_alsa_mixer *pm;
pm = pa_xnew0(pa_alsa_mixer, 1);
if (pm == NULL)
return NULL;
pm->used_for_probe_only = probe;
pm->mixer_handle = m;
pa_hashmap_put(mixers, pa_xstrdup(dev), pm);
return pm;
}
snd_mixer_t *pa_alsa_open_mixer_by_name(pa_hashmap *mixers, const char *dev, bool probe) {
int err;
snd_mixer_t *m;
snd_hctl_t *hctl;
pa_alsa_mixer *pm;
char *dev2;
void *state;
pa_assert(mixers);
pa_assert(dev);
pm = pa_hashmap_get(mixers, dev);
/* The quick card number/index lookup (hw:#)
* We already know the card number/index, thus use the mixer
* from the cache at first.
*/
if (!pm && pa_strneq(dev, "hw:", 3)) {
const char *s = dev + 3;
int card_index;
while (*s && *s >= '0' && *s <= '9') s++;
if (*s == '\0' && pa_atoi(dev + 3, &card_index) >= 0) {
PA_HASHMAP_FOREACH_KV(dev2, pm, mixers, state) {
if (pm->card_index == card_index) {
dev = dev2;
pm = pa_hashmap_get(mixers, dev);
break;
}
}
}
}
if (pm) {
if (!probe)
pm->used_for_probe_only = false;
@ -1775,27 +1863,55 @@ snd_mixer_t *pa_alsa_open_mixer_by_name(pa_hashmap *mixers, const char *dev, boo
return NULL;
}
if (prepare_mixer(m, dev) >= 0) {
pm = pa_xnew0(pa_alsa_mixer, 1);
if (pm) {
snd_hctl_t *hctl;
pm->card_index = -1;
/* determine the ALSA card number (index) and store it to card_index */
err = snd_mixer_get_hctl(m, dev, &hctl);
if (err >= 0) {
snd_ctl_card_info_t *info;
snd_ctl_card_info_alloca(&info);
err = snd_ctl_card_info(snd_hctl_ctl(hctl), info);
if (err >= 0)
pm->card_index = snd_ctl_card_info_get_card(info);
}
pm->used_for_probe_only = probe;
pm->mixer_handle = m;
pa_hashmap_put(mixers, pa_xstrdup(dev), pm);
return m;
}
err = snd_hctl_open(&hctl, dev, 0);
if (err < 0) {
pa_log("Error opening hctl device: %s", pa_alsa_strerror(err));
goto __close;
}
if (prepare_mixer(m, dev, hctl) >= 0) {
/* get the ALSA card number (index) and ID (alias) and create two identical mixers */
char *p, *dev2, *dev_idx, *dev_id;
snd_ctl_card_info_t *info;
snd_ctl_card_info_alloca(&info);
err = snd_ctl_card_info(snd_hctl_ctl(hctl), info);
if (err < 0)
goto __std;
dev2 = pa_xstrdup(dev);
if (dev2 == NULL)
goto __close;
p = strchr(dev2, ':');
/* sanity check - only hw: devices */
if (p == NULL || (p - dev2) < 2 || !pa_strneq(p - 2, "hw:", 3)) {
pa_xfree(dev2);
goto __std;
}
*p = '\0';
dev_idx = pa_sprintf_malloc("%s:%u", dev2, snd_ctl_card_info_get_card(info));
dev_id = pa_sprintf_malloc("%s:%s", dev2, snd_ctl_card_info_get_id(info));
pa_log_debug("ALSA alias mixers: %s = %s", dev_idx, dev_id);
if (dev_idx && dev_id && (strcmp(dev, dev_idx) == 0 || strcmp(dev, dev_id) == 0)) {
pm = pa_alsa_create_mixer(mixers, dev_idx, m, probe);
if (pm) {
pa_alsa_mixer *pm2;
pm2 = pa_alsa_create_mixer(mixers, dev_id, m, probe);
if (pm2) {
pm->alias = pm2;
pm2->alias = pm;
}
}
}
pa_xfree(dev_id);
pa_xfree(dev_idx);
pa_xfree(dev2);
__std:
if (pm == NULL)
pm = pa_alsa_create_mixer(mixers, dev, m, probe);
if (pm)
return m;
}
__close:
snd_mixer_close(m);
return NULL;
}
@ -1836,8 +1952,10 @@ void pa_alsa_mixer_free(pa_alsa_mixer *mixer)
{
if (mixer->fdl)
pa_alsa_fdlist_free(mixer->fdl);
if (mixer->mixer_handle)
if (mixer->mixer_handle && mixer->alias == NULL)
snd_mixer_close(mixer->mixer_handle);
if (mixer->alias)
mixer->alias->alias = NULL;
pa_xfree(mixer);
}

View file

@ -67,6 +67,8 @@ snd_pcm_t *pa_alsa_open_by_device_id_auto(
snd_pcm_uframes_t tsched_size,
bool *use_mmap, /* modified at return */
bool *use_tsched, /* modified at return */
pa_sample_format_t **query_supported_formats, /* modified at return */
unsigned int **query_supported_rates, /* modified at return */
pa_alsa_profile_set *ps,
pa_alsa_mapping **mapping); /* modified at return */
@ -82,6 +84,8 @@ snd_pcm_t *pa_alsa_open_by_device_id_mapping(
snd_pcm_uframes_t tsched_size,
bool *use_mmap, /* modified at return */
bool *use_tsched, /* modified at return */
pa_sample_format_t **query_supported_formats, /* modified at return */
unsigned int **query_supported_rates, /* modified at return */
pa_alsa_mapping *mapping);
/* Opens the explicit ALSA device */
@ -96,6 +100,8 @@ snd_pcm_t *pa_alsa_open_by_device_string(
snd_pcm_uframes_t tsched_size,
bool *use_mmap, /* modified at return */
bool *use_tsched, /* modified at return */
pa_sample_format_t **query_supported_formats, /* modified at return */
unsigned int **query_supported_rates, /* modified at return */
bool require_exact_channel_number);
/* Opens the explicit ALSA device with a fallback list */
@ -111,6 +117,8 @@ snd_pcm_t *pa_alsa_open_by_template(
snd_pcm_uframes_t tsched_size,
bool *use_mmap, /* modified at return */
bool *use_tsched, /* modified at return */
pa_sample_format_t **query_supported_formats, /* modified at return */
unsigned int **query_supported_rates, /* modified at return */
bool require_exact_channel_number);
void pa_alsa_dump(pa_log_level_t level, snd_pcm_t *pcm);

View file

@ -24,6 +24,9 @@ description-key = analog-input-microphone-rear
[Jack Rear Mic]
required-any = any
[Jack Rear Mic - Input]
required-any = any
[Jack Rear Mic Phantom]
required-any = any
state.plugged = unknown

View file

@ -0,0 +1,91 @@
# 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.1 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/>.
; ASUS Xonar SE card.
; This card has two devices for each rear and front panel jacks.
;
; See default.conf for an explanation on the directives used here.
[General]
auto-profiles = yes
[Mapping analog-stereo-headset]
device-strings = hw:%f,1
channel-map = left,right
paths-output = analog-output analog-output-headphones
paths-input = analog-input-mic analog-input-headphone-mic analog-input-headset-mic
priority = 15
[Mapping analog-stereo]
device-strings = hw:%f,0
channel-map = left,right
paths-output = analog-output analog-output-speaker
paths-input = analog-input analog-input-mic analog-input-linein
priority = 14
[Mapping analog-surround-21]
device-strings = surround21:%f
channel-map = front-left,front-right,lfe
paths-output = analog-output-speaker
priority = 13
direction = output
[Mapping analog-surround-40]
device-strings = surround40:%f
channel-map = front-left,front-right,rear-left,rear-right
paths-output = analog-output-speaker
priority = 12
direction = output
[Mapping analog-surround-41]
device-strings = surround41:%f
channel-map = front-left,front-right,rear-left,rear-right,lfe
paths-output = analog-output-speaker
priority = 13
direction = output
[Mapping analog-surround-50]
device-strings = surround50:%f
channel-map = front-left,front-right,rear-left,rear-right,front-center
paths-output = analog-output-speaker
priority = 12
direction = output
[Mapping analog-surround-51]
device-strings = surround51:%f
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
paths-output = analog-output-speaker
priority = 13
direction = output
[Mapping iec958-stereo]
device-strings = iec958:%f
channel-map = left,right
paths-output = iec958-stereo-output
priority = 5
[Mapping iec958-ac3-surround-40]
device-strings = a52:%f
channel-map = front-left,front-right,rear-left,rear-right
paths-output = iec958-stereo-output
priority = 2
direction = output
[Mapping iec958-ac3-surround-51]
device-strings = a52:%f
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
paths-output = iec958-stereo-output
priority = 3
direction = output

View file

@ -39,7 +39,7 @@ channel-map = aux0,aux1,left,right,aux2,aux3
direction = output
[Mapping stereo-out-ef]
description = Analog Stereo 5/6
description = Stereo 5/6 (S/PDIF)
device-strings = hw:%f,0,0
channel-map = aux0,aux1,aux2,aux3,left,right
direction = output
@ -51,7 +51,7 @@ channel-map = mono,aux0,aux1,aux2,aux3,aux4
direction = input
[Mapping analog-mono-in-b]
description = Anlog Mono Input 2
description = Analog Mono Input 2
device-strings = hw:%f,0,0
channel-map = aux0,mono,aux1,aux2,aux3,aux4
direction = input
@ -69,7 +69,7 @@ channel-map = aux0,aux1,left,right,aux2,aux3
direction = input
[Mapping stereo-in-ef]
description = Stereo Input 5/6
description = Stereo Input 5/6 (S/PDIF)
device-strings = hw:%f,0,0
channel-map = aux0,aux1,aux2,aux3,left,right
direction = input

View file

@ -13,22 +13,29 @@
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
; Behringer U-Phoria UMC22
; Texas Instruments PCM2902
;
; Default mapping only allows to use stereo input and sound card has two
; physical input channels.
; This is a generic chip used in multiple products, including at least
; Behringer U-Phoria UMC22, Behringer Xenyx 302USB, Intopic Jazz-UB700 and
; some unbranded "usb mini microphone".
;
; However in case of only using a single input channel (like condenser
; microphone) only one channel will have any sound, which is often
; inconvenient for casual use.
; Behringer UMC22 has stereo input (representing two physical mono inputs),
; others have mono input.
;
; This config includes mono input options which makes it much more
; friendly in single input configuration.
; Some devices have a mic input path, but at least Behringer Xenyx 302USB
; doesn't have any input mixer controls.
;
; Since the UMC22 card has only stereo input PCM device but is commonly used
; with mono mics, we define special mono mappings using "mono,aux1" and
; "aux1,mono" channel maps. If we had only had the standard stereo input
; mapping, the user would have to record stereo tracks with one channel silent,
; which would be inconvenient.
;
; This config also removes default digital input/output mappings that do
; not physically exist on this card.
; not physically exist on cards that we've seen so far.
;
; Added by Nazar Mokrynskyi <nazar@mokrynskyi.com>
; Originally added by Nazar Mokrynskyi <nazar@mokrynskyi.com> for Behringer
; UMC22.
[General]
auto-profiles = yes
@ -36,28 +43,28 @@ auto-profiles = yes
[Mapping analog-stereo-input]
device-strings = hw:%f
channel-map = left,right
paths-input = analog-input-mic
paths-input = analog-input-mic analog-input
direction = input
priority = 4
[Mapping analog-mono]
device-strings = hw:%f
channel-map = mono,mono
paths-input = analog-input-mic
channel-map = mono
paths-input = analog-input-mic analog-input
direction = input
priority = 3
[Mapping analog-mono-left]
device-strings = hw:%f
channel-map = mono,aux1
paths-input = analog-input-mic
paths-input = analog-input-mic analog-input
direction = input
priority = 2
[Mapping analog-mono-right]
device-strings = hw:%f
channel-map = aux1,mono
paths-input = analog-input-mic
paths-input = analog-input-mic analog-input
direction = input
priority = 1

View file

@ -162,7 +162,7 @@ static void add_profiles(struct userdata *u, pa_hashmap *h, pa_hashmap *ports) {
PA_IDXSET_FOREACH(m, ap->output_mappings, idx) {
if (u->use_ucm)
pa_alsa_ucm_add_ports_combination(NULL, &m->ucm_context, true, ports, cp, u->core);
pa_alsa_ucm_add_port(NULL, &m->ucm_context, true, ports, cp, u->core);
else
pa_alsa_path_set_add_ports(m->output_path_set, cp, ports, NULL, u->core);
if (m->channel_map.channels > cp->max_sink_channels)
@ -175,7 +175,7 @@ static void add_profiles(struct userdata *u, pa_hashmap *h, pa_hashmap *ports) {
PA_IDXSET_FOREACH(m, ap->input_mappings, idx) {
if (u->use_ucm)
pa_alsa_ucm_add_ports_combination(NULL, &m->ucm_context, false, ports, cp, u->core);
pa_alsa_ucm_add_port(NULL, &m->ucm_context, false, ports, cp, u->core);
else
pa_alsa_path_set_add_ports(m->input_path_set, cp, ports, NULL, u->core);
if (m->channel_map.channels > cp->max_source_channels)
@ -249,8 +249,7 @@ static int card_set_profile(pa_card *c, pa_card_profile *new_profile) {
/* if UCM is available for this card then update the verb */
if (u->use_ucm) {
if (pa_alsa_ucm_set_profile(&u->ucm, c, nd->profile ? nd->profile->name : NULL,
od->profile ? od->profile->name : NULL) < 0) {
if (pa_alsa_ucm_set_profile(&u->ucm, c, nd->profile, od->profile) < 0) {
ret = -1;
goto finish;
}
@ -302,7 +301,7 @@ static void init_profile(struct userdata *u) {
if (d->profile && u->use_ucm) {
/* Set initial verb */
if (pa_alsa_ucm_set_profile(ucm, u->card, d->profile->name, NULL) < 0) {
if (pa_alsa_ucm_set_profile(ucm, u->card, d->profile, NULL) < 0) {
pa_log("Failed to set ucm profile %s", d->profile->name);
return;
}
@ -371,7 +370,7 @@ struct temp_port_avail {
static int report_jack_state(snd_mixer_elem_t *melem, unsigned int mask) {
struct userdata *u = snd_mixer_elem_get_callback_private(melem);
snd_hctl_elem_t *elem = snd_mixer_elem_get_private(melem);
snd_hctl_elem_t **_elem = snd_mixer_elem_get_private(melem), *elem;
snd_ctl_elem_value_t *elem_value;
bool plugged_in;
void *state;
@ -381,6 +380,8 @@ static int report_jack_state(snd_mixer_elem_t *melem, unsigned int mask) {
pa_available_t active_available = PA_AVAILABLE_UNKNOWN;
pa_assert(u);
pa_assert(_elem);
elem = *_elem;
/* Changing the jack state may cause a port change, and a port change will
* make the sink or source change the mixer settings. If there are multiple
@ -563,13 +564,18 @@ static pa_device_port* find_port_with_eld_device(struct userdata *u, int device)
static int hdmi_eld_changed(snd_mixer_elem_t *melem, unsigned int mask) {
struct userdata *u = snd_mixer_elem_get_callback_private(melem);
snd_hctl_elem_t *elem = snd_mixer_elem_get_private(melem);
int device = snd_hctl_elem_get_device(elem);
snd_hctl_elem_t **_elem = snd_mixer_elem_get_private(melem), *elem;
int device;
const char *old_monitor_name;
pa_device_port *p;
pa_hdmi_eld eld;
bool changed = false;
pa_assert(u);
pa_assert(_elem);
elem = *_elem;
device = snd_hctl_elem_get_device(elem);
if (mask == SND_CTL_EVENT_MASK_REMOVE)
return 0;

View file

@ -42,9 +42,6 @@ typedef struct pa_a2dp_endpoint_conf {
/* A2DP codec id */
pa_a2dp_codec_id id;
/* True if codec is bi-directional and supports backchannel */
bool support_backchannel;
/* Returns true if the codec can be supported on the system */
bool (*can_be_supported)(bool for_encoding);

View file

@ -490,7 +490,7 @@ static size_t reduce_encoder_bitrate(void *codec_info, size_t write_link_mtu) {
static size_t encode_buffer(void *codec_info, uint32_t timestamp, const uint8_t *input_buffer, size_t input_size, uint8_t *output_buffer, size_t output_size, size_t *processed) {
size_t written;
written = gst_transcode_buffer(codec_info, input_buffer, input_size, output_buffer, output_size, processed);
written = gst_transcode_buffer(codec_info, timestamp, input_buffer, input_size, output_buffer, output_size, processed);
if (PA_UNLIKELY(*processed == 0 || *processed != input_size))
pa_log_error("aptX encoding error");
@ -526,7 +526,7 @@ static size_t encode_buffer_hd(void *codec_info, uint32_t timestamp, const uint8
static size_t decode_buffer(void *codec_info, const uint8_t *input_buffer, size_t input_size, uint8_t *output_buffer, size_t output_size, size_t *processed) {
size_t written;
written = gst_transcode_buffer(codec_info, input_buffer, input_size, output_buffer, output_size, processed);
written = gst_transcode_buffer(codec_info, -1, input_buffer, input_size, output_buffer, output_size, processed);
/* Due to aptX latency, aptx_decode starts filling output buffer after 90 input samples.
* If input buffer contains less than 90 samples, aptx_decode returns zero (=no output)
@ -556,7 +556,6 @@ static size_t decode_buffer_hd(void *codec_info, const uint8_t *input_buffer, si
const pa_a2dp_endpoint_conf pa_a2dp_endpoint_conf_aptx = {
.id = { A2DP_CODEC_VENDOR, APTX_VENDOR_ID, APTX_CODEC_ID },
.support_backchannel = false,
.can_be_supported = can_be_supported,
.can_accept_capabilities = can_accept_capabilities,
.choose_remote_endpoint = choose_remote_endpoint,
@ -580,7 +579,6 @@ const pa_a2dp_endpoint_conf pa_a2dp_endpoint_conf_aptx = {
const pa_a2dp_endpoint_conf pa_a2dp_endpoint_conf_aptx_hd = {
.id = { A2DP_CODEC_VENDOR, APTX_HD_VENDOR_ID, APTX_HD_CODEC_ID },
.support_backchannel = false,
.can_be_supported = can_be_supported,
.can_accept_capabilities = can_accept_capabilities_hd,
.choose_remote_endpoint = choose_remote_endpoint_hd,

View file

@ -22,12 +22,14 @@
#endif
#include <arpa/inet.h>
#include <stdint.h>
#include <pulsecore/log.h>
#include <pulsecore/macro.h>
#include <pulsecore/once.h>
#include <pulsecore/core-util.h>
#include <pulse/sample.h>
#include <pulse/timeval.h>
#include <pulse/util.h>
#include "a2dp-codecs.h"
@ -39,83 +41,19 @@ static void app_sink_eos(GstAppSink *appsink, gpointer userdata) {
pa_log_debug("Sink got EOS");
}
/* Called from the GStreamer streaming thread */
static GstFlowReturn app_sink_new_sample(GstAppSink *appsink, gpointer userdata) {
struct gst_info *info = (struct gst_info *) userdata;
GstSample *sample = NULL;
GstBuffer *buf;
sample = gst_app_sink_pull_sample(GST_APP_SINK(info->app_sink));
if (!sample)
return GST_FLOW_OK;
buf = gst_sample_get_buffer(sample);
gst_buffer_ref(buf);
gst_adapter_push(info->sink_adapter, buf);
gst_sample_unref(sample);
pa_fdsem_post(info->sample_ready_fdsem);
return GST_FLOW_OK;
}
static void gst_deinit_common(struct gst_info *info) {
if (!info)
return;
if (info->sample_ready_fdsem)
pa_fdsem_free(info->sample_ready_fdsem);
if (info->app_src)
gst_object_unref(info->app_src);
if (info->app_sink)
gst_object_unref(info->app_sink);
if (info->sink_adapter)
g_object_unref(info->sink_adapter);
if (info->pipeline)
gst_object_unref(info->pipeline);
}
static GstBusSyncReply sync_bus_handler (GstBus *bus, GstMessage *message, struct gst_info *info) {
GstStreamStatusType type;
GstElement *owner;
switch (GST_MESSAGE_TYPE (message)) {
case GST_MESSAGE_STREAM_STATUS:
gst_message_parse_stream_status (message, &type, &owner);
switch (type) {
case GST_STREAM_STATUS_TYPE_ENTER:
pa_log_debug("GStreamer pipeline thread starting up");
if (info->core->realtime_scheduling)
pa_thread_make_realtime(info->core->realtime_priority);
break;
case GST_STREAM_STATUS_TYPE_LEAVE:
pa_log_debug("GStreamer pipeline thread shutting down");
break;
default:
break;
}
break;
default:
break;
}
/* pass all messages on the async queue */
return GST_BUS_PASS;
if (info->bin)
gst_object_unref(info->bin);
}
bool gst_init_common(struct gst_info *info) {
GstElement *pipeline = NULL;
GstElement *appsrc = NULL, *appsink = NULL;
GstAdapter *adapter;
GstElement *bin = NULL;
GstElement *appsink = NULL;
GstAppSinkCallbacks callbacks = { 0, };
GstBus *bus;
appsrc = gst_element_factory_make("appsrc", "app_source");
if (!appsrc) {
pa_log_error("Could not create appsrc element");
goto fail;
}
g_object_set(appsrc, "is-live", FALSE, "format", GST_FORMAT_TIME, "stream-type", 0, "max-bytes", 0, NULL);
appsink = gst_element_factory_make("appsink", "app_sink");
if (!appsink) {
@ -125,75 +63,27 @@ bool gst_init_common(struct gst_info *info) {
g_object_set(appsink, "sync", FALSE, "async", FALSE, "enable-last-sample", FALSE, NULL);
callbacks.eos = app_sink_eos;
callbacks.new_sample = app_sink_new_sample;
gst_app_sink_set_callbacks(GST_APP_SINK(appsink), &callbacks, info, NULL);
adapter = gst_adapter_new();
pa_assert(adapter);
bin = gst_bin_new(NULL);
pa_assert(bin);
pipeline = gst_pipeline_new(NULL);
pa_assert(pipeline);
bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
gst_bus_set_sync_handler (bus, (GstBusSyncHandler) sync_bus_handler, info, NULL);
gst_object_unref (bus);
info->app_src = appsrc;
info->app_sink = appsink;
info->sink_adapter = adapter;
info->pipeline = pipeline;
info->sample_ready_fdsem = pa_fdsem_new();
info->bin = bin;
return true;
fail:
if (appsrc)
gst_object_unref(appsrc);
if (appsink)
gst_object_unref(appsink);
return false;
}
/*
* The idea of using buffer probes is as follows. We set a buffer probe on the
* encoder sink pad. In the buffer probe, we set an idle probe on the upstream
* source pad. In encode_buffer, we wait on the fdsem. The fdsem gets posted
* when either new_sample or idle probe gets called. We do this, to make the
* appsink behave synchronously.
*
* For buffer probes, see
* https://gstreamer.freedesktop.org/documentation/additional/design/probes.html?gi-language=c
*/
static GstPadProbeReturn gst_sink_buffer_idle_probe(GstPad *pad, GstPadProbeInfo *probe_info, gpointer userdata)
{
struct gst_info *info = (struct gst_info *)userdata;
pa_assert(probe_info->type & GST_PAD_PROBE_TYPE_IDLE);
pa_fdsem_post(info->sample_ready_fdsem);
return GST_PAD_PROBE_REMOVE;
}
static GstPadProbeReturn gst_sink_buffer_probe(GstPad *pad, GstPadProbeInfo *probe_info, gpointer userdata)
{
struct gst_info *info = (struct gst_info *)userdata;
GstPad *peer_pad;
pa_assert(probe_info->type & GST_PAD_PROBE_TYPE_BUFFER);
peer_pad = gst_pad_get_peer(pad);
gst_pad_add_probe(peer_pad, GST_PAD_PROBE_TYPE_IDLE, gst_sink_buffer_idle_probe, info, NULL);
gst_object_unref(peer_pad);
return GST_PAD_PROBE_OK;
}
static GstCaps *gst_create_caps_from_sample_spec(const pa_sample_spec *ss) {
gchar *sample_format;
GstCaps *caps;
int channel_mask;
uint64_t channel_mask;
switch (ss->format) {
case PA_SAMPLE_S16LE:
@ -240,6 +130,10 @@ static GstCaps *gst_create_caps_from_sample_spec(const pa_sample_spec *ss) {
bool gst_codec_init(struct gst_info *info, bool for_encoding, GstElement *transcoder) {
GstPad *pad;
GstCaps *caps;
GstEvent *event;
GstSegment segment;
GstEvent *stream_start;
guint group_id;
pa_assert(transcoder);
@ -248,30 +142,49 @@ bool gst_codec_init(struct gst_info *info, bool for_encoding, GstElement *transc
if (!gst_init_common(info))
goto common_fail;
caps = gst_create_caps_from_sample_spec(info->ss);
if (for_encoding)
g_object_set(info->app_src, "caps", caps, NULL);
else
g_object_set(info->app_sink, "caps", caps, NULL);
gst_caps_unref(caps);
gst_bin_add_many(GST_BIN(info->bin), transcoder, info->app_sink, NULL);
gst_bin_add_many(GST_BIN(info->pipeline), info->app_src, transcoder, info->app_sink, NULL);
if (!gst_element_link_many(info->app_src, transcoder, info->app_sink, NULL)) {
if (!gst_element_link_many(transcoder, info->app_sink, NULL)) {
pa_log_error("Failed to link codec elements into pipeline");
goto pipeline_fail;
}
if (gst_element_set_state(info->pipeline, GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE) {
pad = gst_element_get_static_pad(transcoder, "sink");
pa_assert_se(gst_element_add_pad(info->bin, gst_ghost_pad_new("sink", pad)));
/**
* Only the sink pad is needed to push buffers. Cache it since
* gst_element_get_static_pad is relatively expensive and verbose
* on higher log levels.
*/
info->pad_sink = pad;
if (gst_element_set_state(info->bin, GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE) {
pa_log_error("Could not start pipeline");
goto pipeline_fail;
}
/* See the comment on buffer probe functions */
pad = gst_element_get_static_pad(transcoder, "sink");
gst_pad_add_probe(pad, GST_PAD_PROBE_TYPE_BUFFER, gst_sink_buffer_probe, info, NULL);
gst_object_unref(pad);
/* First, send stream-start sticky event */
group_id = gst_util_group_id_next();
stream_start = gst_event_new_stream_start("gst-codec-pa");
gst_event_set_group_id(stream_start, group_id);
gst_pad_send_event(info->pad_sink, stream_start);
/* Retrieve the pad that handles the PCM format between PA and GStreamer */
if (for_encoding)
pad = gst_element_get_static_pad(transcoder, "sink");
else
pad = gst_element_get_static_pad(transcoder, "src");
/* Second, send caps sticky event */
caps = gst_create_caps_from_sample_spec(info->ss);
pa_assert_se(gst_pad_set_caps(pad, caps));
gst_caps_unref(caps);
gst_object_unref(GST_OBJECT(pad));
/* Third, send segment sticky event */
gst_segment_init(&segment, GST_FORMAT_TIME);
event = gst_event_new_segment(&segment);
gst_pad_send_event(info->pad_sink, event);
pa_log_info("GStreamer pipeline initialisation succeeded");
@ -295,40 +208,58 @@ common_fail:
return false;
}
size_t gst_transcode_buffer(void *codec_info, const uint8_t *input_buffer, size_t input_size, uint8_t *output_buffer, size_t output_size, size_t *processed) {
size_t gst_transcode_buffer(void *codec_info, uint32_t timestamp, const uint8_t *input_buffer, size_t input_size, uint8_t *output_buffer, size_t output_size, size_t *processed) {
struct gst_info *info = (struct gst_info *) codec_info;
gsize available, transcoded;
gsize transcoded;
GstBuffer *in_buf;
GstMapInfo map_info;
GstFlowReturn ret;
size_t written = 0;
GstSample *sample;
in_buf = gst_buffer_new_allocate(NULL, input_size, NULL);
pa_assert(info->pad_sink);
in_buf = gst_buffer_new_wrapped_full(GST_MEMORY_FLAG_READONLY,
(gpointer)input_buffer, input_size, 0, input_size, NULL, NULL);
pa_assert(in_buf);
/* Acquire an extra reference to validate refcount afterwards */
gst_mini_object_ref(GST_MINI_OBJECT_CAST(in_buf));
pa_assert(GST_MINI_OBJECT_REFCOUNT_VALUE(in_buf) == 2);
pa_assert_se(gst_buffer_map(in_buf, &map_info, GST_MAP_WRITE));
memcpy(map_info.data, input_buffer, input_size);
gst_buffer_unmap(in_buf, &map_info);
if (timestamp == -1)
GST_BUFFER_TIMESTAMP(in_buf) = GST_CLOCK_TIME_NONE;
else {
// Timestamp is monotonically increasing with samplerate/packets-per-second;
// convert it to a timestamp in nanoseconds:
GST_BUFFER_TIMESTAMP(in_buf) = timestamp * PA_USEC_PER_SEC / info->ss->rate;
}
ret = gst_pad_chain(info->pad_sink, in_buf);
/**
* Ensure we're the only one holding a reference to this buffer after gst_pad_chain,
* which internally holds a pointer reference to input_buffer. The caller provides
* no guarantee to the validity of this pointer after returning from this function.
*/
pa_assert(GST_MINI_OBJECT_REFCOUNT_VALUE(in_buf) == 1);
gst_mini_object_unref(GST_MINI_OBJECT_CAST(in_buf));
ret = gst_app_src_push_buffer(GST_APP_SRC(info->app_src), in_buf);
if (ret != GST_FLOW_OK) {
pa_log_error("failed to push buffer for transcoding %d", ret);
goto fail;
}
pa_fdsem_wait(info->sample_ready_fdsem);
available = gst_adapter_available(info->sink_adapter);
if (available) {
transcoded = PA_MIN(available, output_size);
gst_adapter_copy(info->sink_adapter, output_buffer, 0, transcoded);
gst_adapter_flush(info->sink_adapter, transcoded);
while ((sample = gst_app_sink_try_pull_sample(GST_APP_SINK(info->app_sink), 0))) {
in_buf = gst_sample_get_buffer(sample);
transcoded = gst_buffer_get_size(in_buf);
written += transcoded;
} else
pa_log_debug("No transcoded data available in adapter");
pa_assert(written <= output_size);
GstMapInfo map_info;
pa_assert_se(gst_buffer_map(in_buf, &map_info, GST_MAP_READ));
memcpy(output_buffer, map_info.data, transcoded);
gst_buffer_unmap(in_buf, &map_info);
gst_sample_unref(sample);
}
*processed = input_size;
@ -343,17 +274,13 @@ fail:
void gst_codec_deinit(void *codec_info) {
struct gst_info *info = (struct gst_info *) codec_info;
if (info->sample_ready_fdsem)
pa_fdsem_free(info->sample_ready_fdsem);
if (info->pipeline) {
gst_element_set_state(info->pipeline, GST_STATE_NULL);
gst_object_unref(info->pipeline);
if (info->bin) {
gst_element_set_state(info->bin, GST_STATE_NULL);
gst_object_unref(info->bin);
}
if (info->sink_adapter)
g_object_unref(info->sink_adapter);
if (info->pad_sink)
gst_object_unref(GST_OBJECT(info->pad_sink));
pa_xfree(info);
}

View file

@ -43,15 +43,15 @@ struct gst_info {
const a2dp_ldac_t *ldac_config;
} a2dp_codec_t;
GstElement *app_src, *app_sink;
GstElement *pipeline;
GstAdapter *sink_adapter;
pa_fdsem *sample_ready_fdsem;
/* The appsink element that accumulates encoded/decoded buffers */
GstElement *app_sink;
GstElement *bin;
/* The sink pad to push to-be-encoded/decoded buffers into */
GstPad *pad_sink;
uint16_t seq_num;
};
bool gst_codec_init(struct gst_info *info, bool for_encoding, GstElement *transcoder);
size_t gst_transcode_buffer(void *codec_info, const uint8_t *input_buffer, size_t input_size, uint8_t *output_buffer, size_t output_size, size_t *processed);
size_t gst_transcode_buffer(void *codec_info, uint32_t timestamp, const uint8_t *input_buffer, size_t input_size, uint8_t *output_buffer, size_t output_size, size_t *processed);
void gst_codec_deinit(void *codec_info);

View file

@ -46,13 +46,6 @@ static bool can_be_supported(bool for_encoding) {
}
gst_object_unref(element_factory);
element_factory = gst_element_factory_find("rtpldacpay");
if (element_factory == NULL) {
pa_log_info("LDAC RTP payloader element `rtpldacpay` not found");
return false;
}
gst_object_unref(element_factory);
return true;
}
@ -206,7 +199,6 @@ static uint8_t fill_preferred_configuration(const pa_sample_spec *default_sample
GstElement *gst_init_ldac(struct gst_info *info, pa_sample_spec *ss, bool for_encoding) {
GstElement *bin;
GstElement *rtpldacpay;
GstElement *enc;
GstPad *pad;
@ -270,28 +262,16 @@ GstElement *gst_init_ldac(struct gst_info *info, pa_sample_spec *ss, bool for_en
goto fail;
}
rtpldacpay = gst_element_factory_make("rtpldacpay", "rtp_ldac_pay");
if (!rtpldacpay) {
pa_log_error("Could not create RTP LDAC payloader element");
goto fail;
}
bin = gst_bin_new("ldac_enc_bin");
pa_assert(bin);
gst_bin_add_many(GST_BIN(bin), enc, rtpldacpay, NULL);
if (!gst_element_link(enc, rtpldacpay)) {
pa_log_error("Failed to link LDAC encoder to LDAC RTP payloader");
gst_object_unref(bin);
return NULL;
}
gst_bin_add_many(GST_BIN(bin), enc, NULL);
pad = gst_element_get_static_pad(enc, "sink");
pa_assert_se(gst_element_add_pad(bin, gst_ghost_pad_new("sink", pad)));
gst_object_unref(GST_OBJECT(pad));
pad = gst_element_get_static_pad(rtpldacpay, "src");
pad = gst_element_get_static_pad(enc, "src");
pa_assert_se(gst_element_add_pad(bin, gst_ghost_pad_new("src", pad)));
gst_object_unref(GST_OBJECT(pad));
@ -421,18 +401,38 @@ static size_t reduce_encoder_bitrate(void *codec_info, size_t write_link_mtu) {
}
static size_t encode_buffer(void *codec_info, uint32_t timestamp, const uint8_t *input_buffer, size_t input_size, uint8_t *output_buffer, size_t output_size, size_t *processed) {
struct gst_info *info = (struct gst_info *) codec_info;
struct rtp_header *header;
struct rtp_payload *payload;
size_t written;
written = gst_transcode_buffer(codec_info, input_buffer, input_size, output_buffer, output_size, processed);
if (PA_UNLIKELY(output_size < sizeof(*header) + sizeof(*payload))) {
*processed = 0;
return 0;
}
written = gst_transcode_buffer(codec_info, timestamp, input_buffer, input_size, output_buffer + sizeof(*header) + sizeof(*payload), output_size - sizeof(*header) - sizeof(*payload), processed);
if (PA_UNLIKELY(*processed != input_size))
pa_log_error("LDAC encoding error");
if (PA_LIKELY(written > 0)) {
header = (struct rtp_header *) output_buffer;
pa_zero(*header);
header->v = 2;
header->pt = 96;
header->sequence_number = htons(info->seq_num++);
header->timestamp = htonl(timestamp);
header->ssrc = htonl(1);
payload = (struct rtp_payload*) (output_buffer + sizeof(*header));
payload->frame_count = get_ldac_num_frames(codec_info, info->codec_type);
written += sizeof(*header) + sizeof(*payload);
}
return written;
}
const pa_a2dp_endpoint_conf pa_a2dp_endpoint_conf_ldac_eqmid_hq = {
.id = { A2DP_CODEC_VENDOR, LDAC_VENDOR_ID, LDAC_CODEC_ID },
.support_backchannel = false,
.can_be_supported = can_be_supported,
.can_accept_capabilities = can_accept_capabilities,
.choose_remote_endpoint = choose_remote_endpoint,
@ -455,7 +455,6 @@ const pa_a2dp_endpoint_conf pa_a2dp_endpoint_conf_ldac_eqmid_hq = {
const pa_a2dp_endpoint_conf pa_a2dp_endpoint_conf_ldac_eqmid_sq = {
.id = { A2DP_CODEC_VENDOR, LDAC_VENDOR_ID, LDAC_CODEC_ID },
.support_backchannel = false,
.can_be_supported = can_be_supported,
.can_accept_capabilities = can_accept_capabilities,
.choose_remote_endpoint = choose_remote_endpoint,
@ -478,7 +477,6 @@ const pa_a2dp_endpoint_conf pa_a2dp_endpoint_conf_ldac_eqmid_sq = {
const pa_a2dp_endpoint_conf pa_a2dp_endpoint_conf_ldac_eqmid_mq = {
.id = { A2DP_CODEC_VENDOR, LDAC_VENDOR_ID, LDAC_CODEC_ID },
.support_backchannel = false,
.can_be_supported = can_be_supported,
.can_accept_capabilities = can_accept_capabilities,
.choose_remote_endpoint = choose_remote_endpoint,

Some files were not shown because too many files have changed in this diff Show more