Commit graph

9318 commits

Author SHA1 Message Date
Barnabás Pőcze
358254f20a spa: meson.build: add missing new line 2022-08-17 07:34:20 +00:00
Pauli Virtanen
b9baeeb587 bluez5: opus: react faster to too long packet queue
React immediately to "bad" buffer level. Use smaller bitrate
increments/decrements.  Fix ABR timer increment for fragmented packets.
Handle actual bitrate being smaller than target during silence.
2022-08-13 15:58:08 +03:00
Pauli Virtanen
c1acb5168d bluez5: bump Opus max bitrates
Limit bitrates to 2-2.5x Opus recommended "good quality", instead of
1.5x, which is safer quality-wise for CVBR.
2022-08-13 15:12:35 +03:00
Barnabás Pőcze
1275fc99df pipewire-jack: do not dereference value from pw_data_loop_get_thread()
`pw_data_loop_get_thread()` returns a `pthread_t` cast to `struct spa_thread *`,
so simply casting it back to `pthread_t` is enough.
2022-08-11 16:50:05 +02:00
Barnabás Pőcze
3f3b70ad83 pipewire-jack: return a zero initialized pthread_t in case of error
When the `client` argument is NULL, return a zero initialized
`pthread_t` object from `jack_client_thread_id()`. Returning
`-EINVAL` can be problematic because even though `pthread_t` is
a typedef for `unsigned long` in glibc, it is still a pointer,
not a numeric identifier. And in musl, it is a typedef to a
pointer, which results in a warning:

  In file included from ../spa/include/spa/support/cpu.h:34,
                   from ../pipewire-jack/src/pipewire-jack.c:40:
  ../pipewire-jack/src/pipewire-jack.c: In function 'jack_client_thread_id':
  ../spa/include/spa/utils/defs.h:274:11: warning: returning 'int' from a function with return type 'jack_native_thread_t' {aka 'struct __pthread *'} makes pointer from integer without a cast [-Wint-conversion]
    274 |    return (val);     \
        |           ^
  ../pipewire-jack/src/pipewire-jack.c:3775:2: note: in expansion of macro 'spa_return_val_if_fail'
   3775 |  spa_return_val_if_fail(c != NULL, -EINVAL);
2022-08-11 16:45:25 +02:00
Gleb Popov
4a0395d23e Enable AVB on Linux only. 2022-08-11 17:23:16 +03:00
Gleb Popov
25b2f316f0 Bump FreeBSD CI to 13.1 2022-08-11 14:57:43 +03:00
Wim Taymans
27dcbfc1ee remote-node: don't set activation state and signal_time twice
This is already set by resume_node.
2022-08-11 12:35:51 +02:00
Wim Taymans
1bc1d96f88 node: rename signal to signal_func
To avoid confusion and it is more easily greppable
2022-08-11 12:34:51 +02:00
Wim Taymans
ca8b61e984 protocol-native: improve connection disconnect
The connection is created in new, therefore free it in destroy, not in
disconnect.
Connect sets the fd, so unset the fd in disconnect.
2022-08-11 12:07:59 +02:00
Wim Taymans
78c069ff87 potocol-native: improve error handling
Init the compat types map a little earlier so that it is initialized
when we try to clear it on error.
Add the client listener earlier so that we can use the events to clean
up the map, source and connection.
2022-08-11 12:06:28 +02:00
Wim Taymans
d7da581b9c jack: return error when disconnected
When we are disconnected from the server (EPIPE), don't try to wait for
the result of a sync operation but return the error.

Fixes #2606
2022-08-11 11:04:50 +02:00
Wim Taymans
3df0fb21a0 channelmix: only produce REAR/SIDE from FC in simple upmix
Only simple upmixing would replicate the FC channel into REAR/SIDE.
The PSD method would take the diff between FL/FR (which would
be 0 if only FC is available) and not generate output.
2022-08-11 09:37:43 +02:00
Wim Taymans
da9868594d channelmix: produce STEREO from FC
Make it possible to produce STEREO from FC.
2022-08-11 09:35:54 +02:00
Wim Taymans
b03b57c77a channelmix: also filter FC and LFE when no layout
Always apply filter based on dest layout, even when distributing,
averaging or copying a signal.
2022-08-11 09:33:34 +02:00
Wim Taymans
1e71c0e840 meson: also check for roc headers
Fixes #2513
2022-08-10 12:09:54 +02:00
Wim Taymans
f50aafed4d systemd: add filter-chain service
See #2553
2022-08-10 11:35:59 +02:00
Wim Taymans
50bdebe4e8 pw-cli: remove the dump command
It is mostly implemented as part of wpctl status, pw-dump, pw-link, pw-top and
others.
2022-08-10 10:36:56 +02:00
Wim Taymans
851bfba6ed pw-cli: add alias in comand help
Add alias to docs and mention alias in help.

Fixes #2552
2022-08-10 10:35:35 +02:00
Wim Taymans
fe5e164876 keys: improve docs a little
Fixes #2563
2022-08-10 10:13:32 +02:00
Wim Taymans
ab898f8ae6 jack: use context properties for rules
For a JACK client, the context and node is the same. It makes sense to
also run the rules on the context properties so that application
name etc. can be matched as well.

Fixes #2580
2022-08-10 09:52:20 +02:00
Wim Taymans
83e3aba980 jack: clean transport when closing the client
See #2569
2022-08-09 20:55:41 +02:00
Wim Taymans
0ad7cb3298 loop: flush items before stopping
Before leaving the loop, flush out any pending items in the invoke
queue.

See #2631
2022-08-09 20:38:06 +02:00
Wim Taymans
32cf5f312b data-loop: call pw_loop_invoke directly
The loop invoke method will already call the function directly when the
thread has been stopped and will also make sure that pending items are
flushed first.

See #2631
2022-08-09 20:16:33 +02:00
Barnabás Pőcze
9d5f565682 pipewire: extend memfd name with additional information
Knowing the flags, type, and size that were used in
the `pw_mempool_alloc()` call can be useful for
debugging purposes.
2022-08-09 11:24:00 +00:00
Wim Taymans
f971362f76 alsa: improve test
Add capture mode, add more info for class
2022-08-09 12:16:37 +02:00
Wim Taymans
80b59a4971 alsa: add test for dumping hw_params
See #2620
2022-08-09 11:51:20 +02:00
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