Commit graph

9291 commits

Author SHA1 Message Date
Wim Taymans
1cd4655883 jack: add some debug when process is skipped
See #2627
2022-08-08 19:29:09 +02:00
Wim Taymans
da86e6fbe1 impl-port: remove io when no port outputs
We set the node port io when we negotiate buffers on the port but never
unset it.
With this patch, the port io is cleared again when no mixers are on the
port. This can make the node a bit more efficient.
2022-08-08 18:08:09 +02:00
Wim Taymans
e784e82b9a conf: allow masking od conf.d/ files
Read the .conf.d/ override files in the same order as the .conf files.
If we already have a .conf override file with the same name, it was one
with a higher priority and we ignore it.

This makes it possible to place a 10-rates.conf file in ~/.config that
will override a 10-rates.conf file in /etc and /usr/share.

Fixes #2629
2022-08-08 16:05:46 +02:00
Wim Taymans
f8d26b96b4 conf: don't error on empty files
mmap of an empty file gives EINVAL. Avoid this and just don't update the
config.
2022-08-08 16:03:11 +02:00
Wim Taymans
04a3f51722 conf: free override 2022-08-06 16:47:18 +02:00
Julian Bouzas
b718dd5046 conf: support overriding context configuration in a different location
Allows placing override configuration files into a different directory. This is
Useful when pipewire clients such as wireplumber want their fully commented
configuration files under /etc/wireplumber, and fully uncommented configuration
files under /usr/share/wireplumber.

The point is solving the issue of users copying files from /usr/share/pipewire,
which contain various critical settings in addition to tweaking the config,
and then encountering problems at upgrade time when new critical settings are
added.
2022-08-05 13:19:15 -04:00
Julian Bouzas
a9cf72932a context: move loading of configuration into conf.c 2022-08-05 12:54:20 -04:00
Pauli Virtanen
8f0478a2ce bluez5: sco-source: deal with incomplete CVSD frames
Rarely BT adapter may send CVSD packets with incomplete frames.  Ignore
such packets, as it's not clear if they contain valid data at all.
2022-08-05 13:12:24 +00:00
Wim Taymans
54b499b1cf alsa: do the right log level checks
spa_log_level_enabled does not work when a custom log level has
been set. Use spa_log_level_topic_enabled instead.
2022-08-05 15:03:22 +02:00
Wim Taymans
73073eb33f alsa: redirect alsa output to log file
Make a custom snd_output object that redirects output to the log
file.
2022-08-05 14:01:37 +02:00
Wim Taymans
0dc5a08bfd alsa: debug hw_params 2022-08-05 13:00:44 +02:00
Wim Taymans
a9ced45d4b acp: add debug for open and close
Debug open and close calls.
Make pa_alsa_close to close the device.
2022-08-05 12:31:28 +02:00
Wim Taymans
34c1c1614e alsa: add some more debug
See #2614
2022-08-04 14:25:24 +02:00
Wim Taymans
1118c35956 acp: handle some more mixer NULL cases
These are in pulseaudio handled with asserts.

Fixes #2612
2022-08-04 09:06:28 +02:00
Anders Jonsson
df58a201f5 po: Update Swedish translation 2022-08-03 15:51:36 +00:00
Wim Taymans
6c5ec409bf audioconvert: Improve buffer params
Scale the default size of the buffer with the sample rate conversion
factor.
2022-08-03 17:21:48 +02:00
Wim Taymans
6144d037ce acp: handle NULL mixer_handle
It can be NULL for some UCM configs.

Fixes #2612
2022-08-03 12:34:13 +02:00
Wim Taymans
e22e522ab8 alsa-pcm: limit the target to the buffer size
Don't try to wait for more samples than can fit in the ringbuffer.

See #2603
2022-08-03 12:22:38 +02:00
Wim Taymans
a23d154952 audioconvert: always use DSP rate on DSP ports
Always use the DSP rate on DSP ports for format conversion, not the
previous used rate.

This avoids some resampler reconfiguration as it negotiates a non-passthrough
rate conversion and then switches to passthrough when the rate correction is
done to match the graph rate.

See #2614
2022-08-03 11:32:10 +02:00
Frédéric Danis
e7f17e1523 bluez5: use lower case for UUIDs
BlueZ uses lower case version for the UUIDs in its DBus interface.
This will simplify future UUID tests.
2022-08-03 06:15:54 +00:00
Frédéric Danis
76adcfaabe bluez5: Add AAC decoder 2022-08-02 11:12:25 +02:00
Pauli Virtanen
6d4d77802a pulse-server: give Manager permission for Flatpak apps with devices=all
Some Flatpak apps want to manage sound fully (change default outputs,
move streams from other applications).  Real Pulseaudio always grants
full permissions, but pipewire-pulse doesn't, which breaks some
applications, e.g. Zoom.

Work around this by granting the manager permission if the application
also has devices=all access.

To do things properly, this probably should use the Portal media roles,
but this would need further work elsewhere.
2022-08-01 19:36:00 +00:00
Pauli Virtanen
0e12242a1b modules: set pipewire.access.portal.app_id in access & pulse-server
When detecting a access=flatpak application, set also
pipewire.access.portal.app_id, if determined
2022-08-01 19:36:00 +00:00
Pauli Virtanen
3730e54484 modules: support getting app_id in pw_check_flatpak
Support getting the Flatpak application ID from the .flatpak-info file,
similarly as what xdg-desktop-portal does.
2022-08-01 19:36:00 +00:00
Pauli Virtanen
5e5339ce6c modules: refactor check_flatpak to a common place
Move check_flatpak used by module-access and module-protocol-pulse
to a common flatpak-utils.h
2022-08-01 19:36:00 +00:00
Isa Mert Gurbuz
f32017c874 bluez5: Disable hw-volume for Soundcore Motion B 2022-08-01 19:34:39 +00:00
NorwayFun
d8ae1a50dc Georgian translation 2022-08-01 19:32:57 +00:00
James Hilliard
4c43d39a64 impl-link: only free format in do_negotiate if copied
Fixes:
==716== Invalid free() / delete / delete[] / realloc()
==716==    at 0x4846DED: free (vg_replace_malloc.c:872)
==716==    by 0x48ABF37: do_negotiate (impl-link.c:425)
==716==    by 0x48ACBEF: check_states (impl-link.c:701)
==716==    by 0x48DB34B: process_work_queue (work-queue.c:87)
==716==    by 0x4F8B2B3: source_event_func (loop.c:591)
==716==    by 0x4F8D03F: loop_iterate (loop.c:430)
==716==    by 0x48B1A4B: pw_main_loop_run (main-loop.c:148)
==716==    by 0x10962F: main (pipewire.c:131)
==716==  Address 0x1ffeffd520 is on thread 1's stack
==716==  4112 bytes below stack pointer
==716==

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
2022-08-01 19:30:54 +00:00
Pauli Virtanen
3579857a64 bluez5: opus: tweak ABR
Count retry from last non-good interval.  Minimum retry interval 5sec.
2022-08-01 19:23:07 +00:00
Pauli Virtanen
5724d405d6 bluez5: opus: better default bitrates
Use smaller bitrate caps, as it's not necessary to use all bandwidth
available.
2022-08-01 19:23:07 +00:00
Hubert Figuière
f1dfa9797b Issue #2570 - Use the xdg-portal-destkop of rtkit
- If the xdg-desktop-portal is there, use it instead of rtkit
- This allow setting the rt priorities within Flatpak
2022-08-01 19:19:24 +00:00
Barnabás Pőcze
aab15433c8 spa: aec: rename first argument of methods in spa_audio_aec_methods
The first parameter is a pointer to the object implementing the aec
interface, the name `object` is better than `data`.
2022-07-23 08:58:18 +00:00
Barnabás Pőcze
44e7817702 spa: aec: mark aec method tables const 2022-07-23 08:58:18 +00:00
Barnabás Pőcze
51b5aafeaa pipewire: module-echo-cancel: remove line that does nothing 2022-07-23 08:58:18 +00:00
Barnabás Pőcze
c2d357b5af spa: aec: null: remove unnecessary cast 2022-07-23 08:58:18 +00:00
Barnabás Pőcze
e88df3a324 spa: aec: null: initialize variable when defined 2022-07-23 08:58:18 +00:00
Barnabás Pőcze
98c0092ee7 spa: aec: null: specify vtable version 2022-07-23 08:58:18 +00:00
Barnabás Pőcze
c9cc2fe6dc spa: aec: mark handle factory objects static 2022-07-23 08:58:18 +00:00
Barnabás Pőcze
a506ddd799 spa: aec: webrtc: use static_cast to cast from void * 2022-07-23 08:58:18 +00:00
Barnabás Pőcze
35c011b955 spa: aec: webrtc: simplify webrtc_get_spa_bool() 2022-07-23 08:58:18 +00:00
Huang-Huang Bao
c5bce24f01
bluez5: correct type of arguments to a dbus function
The 3rd "value" arguments to dbus_message_iter_append_basic() should be the address of a basic-typed value.

Fixes #2591
2022-07-23 16:35:01 +08:00
Frédéric Danis
343ae88bbf bluez5: Simplify DBus append_basic_* helpers
String key is used in all calls to append_basic_variant_dict_entry() and
append_basic_array_variant_dict_entry().
2022-07-22 19:10:26 +00:00
Frédéric Danis
e560468800 bluez5: Removed unused variables in meson.build 2022-07-22 18:46:35 +02:00
Wim Taymans
b1b8b0985a audioconvert: fix rounding on arm neon
Add the neon functions to the test
2022-07-21 17:24:55 +02:00
Barnabás Pőcze
1db52856ff doc: tutorial3: change "returns value" to "return value" 2022-07-21 07:20:11 +00:00
Barnabás Pőcze
cb3e625fa8 doc: tutorial3: remove a line break 2022-07-21 07:20:11 +00:00
Barnabás Pőcze
606e0dcdab doc: tutorial3: do not return anything from roundtrip()
The return value was constant 0 and it was not used by the caller.
2022-07-21 07:20:11 +00:00
Barnabás Pőcze
94d405be3b doc: tutorial3: mark vtable static 2022-07-21 07:20:11 +00:00
Barnabás Pőcze
473809190b doc: tutorial3: do not use nested functions
Nested functions are a GNU C extension, they are
not supported by clang, and by GCC in C++ mode.
2022-07-21 07:20:11 +00:00
Barnabás Pőcze
04e65a86a1 doc: tutorial3: remove done variable
Use `pw_main_loop_quit()` alone, which should be enough
to cause `pw_main_loop_run()` to return. `pw_main_loop_run()`
only returns prematurely when there is an error, but since
there is no error handling in this example, that scenario
is ignored.
2022-07-21 07:20:11 +00:00