Commit graph

9360 commits

Author SHA1 Message Date
Wim Taymans
49f1c2038f 0.3.57 2022-09-02 10:23:23 +02:00
Jordi Mas
a3351b8997 Update Catalan translation 2022-09-01 21:17:07 +02:00
Wim Taymans
9c34a923db pulse-server: simplify latency handling
We don't need to use the minreq field. The fragsize is only updated when
adjust_latency is used.
2022-09-01 16:46:18 +02:00
Wim Taymans
ad214dde2e pulse-server: tweak the fragsize/minreq handling
Only send 2/3 of the fragsize
2022-09-01 16:23:56 +02:00
Wim Taymans
e10305851d pulse-server: send chunks with half the fragsize
PulseAudio configures half of the fragsize as the source latency. It
also sends chunks as soon as they become available.

This means that we also need to configure the source with half of
the fragsize latency and send in chunks of fragsize/2. Keep this in
the unused (for record) minreq field.
2022-09-01 15:46:17 +02:00
Wim Taymans
9123710971 spa: clean up some port io checks
We should not generate a warning.
2022-09-01 15:39:34 +02:00
Wim Taymans
2fa1b4384b spa: don't warn for NULL io
The io is set to NULL when the port becomes unnegotiated.
2022-09-01 15:31:14 +02:00
Wim Taymans
f48f158566 filter-chain: fix includes 2022-09-01 14:08:38 +02:00
Wim Taymans
4593ac4113 alsa: pass bool argument properly 2022-09-01 10:18:55 +02:00
Wim Taymans
3215b58bae alsa: save volumes
Instruct the session manager to save the volumes when set with the
ALSA ctrl API.
2022-09-01 09:43:10 +02:00
Wim Taymans
c8ef655b3e jack: group all jack nodes in the same application group
Make sure all jack nodes from the same pid are in the same group.

It is normally not a problem for different JACK clients to live in
different groups and be scheduled by different drivers with different
quantum and rate.

Some applications (like Carla), however, make multiple clients and
expect all of them to use the same quantum and rate. Enforce this by
adding all jack clients to the application jack group.
2022-08-31 16:08:05 +02:00
Wim Taymans
0126663238 context: remove unused function 2022-08-31 13:52:19 +02:00
Wim Taymans
2054dcf36f alsa: Improve format negotiation
When the device is not running but has a format, close/open the
device to get all the available formats again. Do the same when
setting a format.

Otherwise, the configuration space of the device is restricted to the
current negotiated format and we can't query the other possibilities
or change it.

Fixes #2625
2022-08-31 10:03:39 +02:00
Wim Taymans
b33ffcf683 test: print channel map as reported by alsa as well
See #1707
2022-08-30 16:45:35 +02:00
Wim Taymans
c20790c64b pulse-tunnel: destroy the module on errors
When the pulse context or stream is in error, destroy the module.
2022-08-30 16:09:04 +02:00
Wim Taymans
9248ce3c19 pulse-tunnel: fix rate adjustement argument
The sign of the error was wrong, making the rate controller adjust in
the wrong direction and make things worse.

See #2548
2022-08-30 16:01:14 +02:00
Wim Taymans
24f6225c5d audioconvert: don't emit changed events for rate changes
Rate changes can happen very often when a stream is doing rate control,
so don't emit the changes every time.
2022-08-30 16:00:00 +02:00
Wim Taymans
5ae1c03d77 module-rt: small fixes
could_use_rtkit -> can_use_rtkit.
Only warn when setting nice and there is no rtkit fallback.
Always call set_rtlimit, it does not have an rtkit implementation, if just
has some properties with limits.
Only try to set nice again with rtkit when we required rtkit for some
functions.
2022-08-30 15:15:56 +02:00
Yuxuan Shui
2e9ba289d3 module-rt: retry with RtKit if set_nice or set_rlimit fails
Previously module-rt only checks if the user have the permission to use
realtime scheduling, and will unconditioally disable RtKit if they do,
even when they don't have the permission to set nice or rlimit.
2022-08-30 14:50:48 +02:00
Thomas Weißschuh
2394413ec3 hook: don't remove from unitialized list
A lot of code calls spa_hook_remove() from error paths where the hook
and therefore the list may not have been initialized.
This leads to null-derefences.
2022-08-30 11:52:42 +00:00
Thomas Weißschuh
b23b0e6125 list: add spa_list_is_initialized()
This function can be used to test if a list has been initialized.
2022-08-30 11:52:42 +00:00
NorwayFun
f4ad9fc90c Update LINGUAS 2022-08-30 11:00:02 +00:00
Piotr Drąg
ced134b9fa Update Polish translation 2022-08-30 10:59:39 +00:00
Wim Taymans
e04e3ef40e audioconvert: fix rate match for sources
Only update the resampler rate when we ask for more data, when we have
more input data, use the previously configured rate to calculate how
many samples we will consume.

Fixes resync errors with multiple sources. One source would do rate
matching, audioconvert would ask it to produce X samples, the source is
scheduled to produce the samples, the rate match is updated with the new
rate correction, audioconvert is scheduled again. It should now use the
X samples it asked to produce and apply the new rate correction for the
next iteration.
2022-08-30 12:43:14 +02:00
Pauli Virtanen
c0e8b397f6 bluez5: avoid (harmless) integer overflow
If no packets have been received and spa_bt_decode_buffer_process is
called, this->packet_size.max == INT32_MIN, which can give overflows.

Guard against this condition, although it should be harmless.
2022-08-24 16:59:21 +00:00
Fran Dieguez
461876c227 Update galician translations 2022-08-23 09:47:42 +02:00
Gleb Popov
c6ffeeeb34 On FreeBSD do not try to redefine O_PATH.
FreeBSD 13+ versions do have O_PATH flag, but FreeBSD 12, which is still supported
does not.
2022-08-21 22:43:31 +03:00
Gleb Popov
ad13681d33 Guard <sys/vfs.h> inclusion with an #ifdef. 2022-08-21 22:42:57 +03:00
Wim Taymans
f9e7fd7c67 avb: free resources on error 2022-08-20 21:41:59 +02:00
Tasos Sahanidis
0e847c97c8 jack: Increase JACK_CLIENT_NAME_SIZE
Some devices have really long names, especially when taking localisation
into account due to multibyte characters.
2022-08-20 19:35:39 +00:00
Tasos Sahanidis
7884ff82db jack: Include NULL in return value of jack_client_name_size()
This fixes an assertion failure in PortAudio's JACK backend when the
monitor client name is longer than than JACK_CLIENT_NAME_SIZE.
2022-08-20 19:35:39 +00:00
James Hilliard
1ea1d525c1 gst: copy buffer memory in dequeue_buffer using gst_memory_copy
When always-copy is enabled we should copy buffer memory instead of
sharing buffer memory and using gst_buffer_copy_deep.

This should ensure we recycle the parent buffer as soon as the memory
is copied.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
2022-08-20 09:30:44 -06:00
Thomas Weißschuh
a969feb3c0 avb: validate random data for xsubi 2022-08-19 07:35:02 +00:00
Thomas Weißschuh
f2e1827e18 utils: pw_getrandom: warn on unused return value
The return value tells us if we actually got any random data so it
should not be ignored.
2022-08-19 07:35:02 +00:00
Thomas Weißschuh
987069cc3c utils: pw_getrandom() use errno from read() call
The errno from read is more useful than the one from close() clobbering
it. So make sure to preserve the real reason for failure for the caller.
2022-08-19 07:35:02 +00:00
Thomas Weißschuh
6531bedcdb spa: add SPA_WARN_UNUSED_RESULT 2022-08-19 07:35:02 +00:00
Thomas Weißschuh
bbb3cdc185 pw-cat: clean up resource correctly on EIO
The core has already been connected and the loop is running so we also
have to clean those up.

Fixes #2651
2022-08-19 07:34:02 +00:00
Frédéric Danis
6b3390387d bluez5: Test transport pointer before using it
If this->transport is NULL the debug log will crash.
2022-08-18 12:57:04 +02:00
Wim Taymans
0532d194ad protocol-native: small cleanups
Style fixes.
Use new variable for fd to avoid casts.
Generate an error when  the fd is invalid.
2022-08-17 19:56:52 +02:00
Cameron Nemo
0883a0163b protocol-native: write socket address into fd
Support fork-free readiness notifications.

Without this, a service supervisor that does not implement socket
activation has no way of knowing whether or not pipewire is ready to
accept connections on the socket.

s6 is the most popular service manager that supports this mechanism.
See here: https://skarnet.org/software/s6/notifywhenup.html
2022-08-17 17:41:21 +00:00
Dmitry Sharshakov
3ceb3288ca convolver: fix crash on FFT unload
Co-authored-by: Barnabás Pőcze <pobrn@protonmail.com>
2022-08-17 11:22:05 +00:00
Barnabás Pőcze
68ff3ad841 treewide: meson.build: use host_machine instead of build_machine
At the moment, cross compilation may not work in certain cases because
checks are carried out against the build machine instead of the host machine.
Replace uses of `build_machine` with `host_machine` to fix that.

In native compilation, all three "machine objects" available in meson
are the same, so this change should have no effect in that case.

More: https://mesonbuild.com/Cross-compilation.html
2022-08-17 07:34:20 +00:00
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