Commit graph

12867 commits

Author SHA1 Message Date
Wim Taymans
fe3dc58c89 connection: fix fd leaks and confusion
When we receive a message with fds and we are at the end of the
buffer, we will call clear_buffer, which moves the next fds over the
fds of this message before we copy the fds into the message. This
results in the fd being leaked and the message using the fd of the next
message instead.

Avoid this by first copying the fds into the message and then move the
new ones over the old ones.

This fixes some wrong fds being used by clients.
2024-09-26 13:10:15 +02:00
sunyuechi
79d41e183e fmt-ops: add RVV optimizations for f32d_to_s32 2024-09-26 00:55:49 +08:00
Wim Taymans
c7c5b61dac jack: use the CPU max_alignment
Instead of aligning the buffers to 16 bytes, use the CPU max_align
value (32 on intel).

Move the mix function from a static global variable to a per client
member because this could change per client.
2024-09-25 15:16:25 +02:00
George Kiagiadakis
fbbe983a05 rtp-sap: make the receive socket listen only to the configured sap.ip
In line also with da8e207de9,
make sure that the rtp-sap receive socket listens only to the configured
sap.ip in unicast mode, instead of accepting all packets on the port.

This additionally fixes breakage that was inadvertently introduced in
f2f204d604. Because the
`struct sockaddr_storage *sa` argument in `make_recv_socket` points
to `impl->sap_addr`, changing the address to INADDR_ANY in the unicast
code path would also silently cause the sender socket to try to
connect to INADDR_ANY and fail.
2024-09-25 10:55:28 +00:00
George Kiagiadakis
88dff1c021 rtp-sap: announce the source IP as the "connection" address in unicast
The "connection" address ("c=") is meant to be the address that the
RTP receiver will use to filter for incoming packets. In multicast,
it must be the multicast address, which is also the "destination"
address in this context. In unicast, however, it must be the sender's
address, i.e. the "source" in this context. The RTP receiver will
then call connect() on this address, effectively filtering the incoming
packets to the ones coming from that particular source.
2024-09-25 10:55:28 +00:00
Arun Raghavan
daec898251 profiler: Add an option to reduce sampling interval
Allows us to get error counts and occasional samples, which can be handy
if we are CPU-bound. There is room to improve this by having
module-profiler create aggregates, which might be more useful that
periodic instaneous samples. However, this would need more logic to
store node data in between emissions, so we'll punt that to later.
2024-09-25 10:52:36 +00:00
sunyuechi
74832445ba fmt-ops: add RVV optimizations for s16_to_f32d 2024-09-25 10:50:05 +00:00
sunyuechi
588f2bcb69 RISCV: Improve scalar computation of f32d_to_s16 2024-09-25 10:50:05 +00:00
Wim Taymans
4513aceaad spa: avoid C23 empty initializers in the headers
Patch by Petar Popovic to avoid using empty initializers in headers.

Fixes #4317
2024-09-25 10:58:11 +02:00
Alper Nebi Yasak
d42bfa56b7 acp: sync the mixer after selecting the port
Otherwise we might sync the wrong port and end up muted.

Fixes #4084
2024-09-25 10:02:46 +02:00
Wim Taymans
ed0556e34c jack: Improve transport BBT handling
The bar can start from 0 in JACK.

Add bar_start_tick and ticks_per_beat to the io_segment_bar so that we
can losslesly store the complete jack BBT values.

See #4314
2024-09-24 18:43:33 +02:00
Wim Taymans
99c23d5b0e acp: add api.alsa.disable-mixer-path
Don't use the api.alsa.soft-mixer option to disable the path selection
but make a new api.alsa.disable-mixer-path.

Disabling the path selection might leave cards unusable after suspend,
so a separate option is a better idea.

See #4311
2024-09-24 13:14:17 +02:00
Wim Taymans
e9c5ca5978 video-src: simplify the tag param construction 2024-09-24 11:11:22 +02:00
Wim Taymans
2ab773ce14 stream: emit the Pause command early
Don't wait for the completion of the Pause command of the node but send
it to the stream immediately. Delaying it might make it come after the
set_param calls are done and confuse the stream.
2024-09-24 10:50:14 +02:00
Wim Taymans
7e436ad499 impl-link: also handle unprepared active links
An ACTIVE link going to < PAUSED is unprepared.
2024-09-24 10:46:21 +02:00
Wim Taymans
63b4728d80 docs: update pw-cli docs for do_link
Fixes #4272
2024-09-23 15:55:13 +02:00
Wim Taymans
b5f9409c12 pw-cli: implement unload_module
Fixes #4276
2024-09-23 15:46:33 +02:00
Wim Taymans
322829cb2e acp: disable path_select when using soft-mixer
When using the soft mixer we should not use path_select because that one
will also touch the mixer and try to mute some switches.

Fixes #4311
2024-09-23 15:34:08 +02:00
Wim Taymans
e095a1c4ac examples: improve the ringbuffer example a little
Write the remaining samples in the ringbuffer and fill up the rest with
silence.

Add some more comments.
2024-09-23 11:28:16 +02:00
Wim Taymans
ca488a5dcc pulse-server: add quirk to block record and playback streams
Add aquirk to block any record or playback stream.
2024-09-23 10:56:40 +02:00
Wim Taymans
4b9db9492e json-pod: add error checking version of json to pod
Add an error checking version of the json to pod converter and use that
in pw-cli to report about json parsing errors.
2024-09-23 10:12:56 +02:00
sunyuechi
8a8843ba20 fmt-ops: add RVV optimizations for f32d_s16 2024-09-23 08:10:43 +00:00
sunyuechi
852de6c35c fmt-ops: add RVV optimizations for f32d_s16d 2024-09-23 08:10:43 +00:00
Gleb Popov
9348ad8115 Fix test-functional compilation by including necessary header 2024-09-23 08:09:45 +00:00
Gleb Popov
ac279fc774 Fix test-loop on FreeBSD by linking to epoll-shim 2024-09-23 08:09:45 +00:00
Gleb Popov
44d92c21e5 Use if_indextoname() instead of less portable ioctl(SIOCGIFNAME) 2024-09-23 08:09:45 +00:00
Gleb Popov
aafe815556 Move the ifr_ifindex FreeBSD definition into a header file to reduce code duplication 2024-09-23 08:09:45 +00:00
Gleb Popov
3f31935cac Include <pthread_np.h> on FreeBSD to access pthread_setaffinity 2024-09-23 08:09:45 +00:00
Gleb Popov
50dab6dda6 meson: Search for and link to stdthreads 2024-09-23 08:09:45 +00:00
Gleb Popov
67ddfc3053 Use the 'thrd_success' constant when checking for tss_create result 2024-09-23 08:09:45 +00:00
Wim Taymans
437be0af75 json-pod: return errors from spa_json_next()
Instead of silently ignoring the error and continuing.

See #4313
2024-09-23 09:36:31 +02:00
psykose
6fe0bd75be ci: add elogind to alpine CI
this should now be picked up, so add it to make sure elogind is checked in CI
2024-09-21 21:56:34 +00:00
psykose
2d071d658f spa: use a separate logind dependency separate from systemd
non-systemd systems also have logind, in the form of elogind, which works to
resolve the v4l2 video source race just as well. permit finding elogind, by
using a separate dep object.
2024-09-21 21:56:34 +00:00
Wim Taymans
bdd4d3a8fc examples: free the event source 2024-09-20 17:24:00 +02:00
Wim Taymans
e54cd0ef5c examples: add audio source with ringbuffer
Add an example of a stream that plays data from a ringbuffer that is
filled from some other thread.
2024-09-20 17:20:25 +02:00
Wim Taymans
44a1d93b7d stream: improve the docs 2024-09-20 15:52:26 +02:00
sunyuechi
62ec61a3bb benchmark-fmt-ops: Fix test arg for f32_s16 2024-09-20 16:02:22 +08:00
Wim Taymans
faf2a13a27 po: Update Slovenian (sl) translation
Fixes #4296
2024-09-20 09:18:18 +02:00
Wim Taymans
c07663b236 impl-node: only process RequestProcess after state change
Wait until we are in the RUNNING state before sending
RequestProcess.
2024-09-19 19:12:54 +02:00
Wim Taymans
cd68819feb stream: update state based on node
Follow the state of the node and update the stream state accordingly.

The most important part is that Start is async and so it's better to
wait for completion from the node before emiting the STREAMING state.
2024-09-19 19:12:31 +02:00
Wim Taymans
2301d3000b impl-link: improve debug, add the node async state 2024-09-19 19:01:43 +02:00
Wim Taymans
d36171f7df modules: don't assume network addresses are numeric
There is no reason to disallow hostnames.

Fixes #4292
2024-09-19 09:38:08 +02:00
Barnabás Pőcze
86004ba3f1 spa: support: use feature macro from config.h
Fixes 8166b9c580 ("spa/support: implement RISCV V CPU detection")
2024-09-18 22:29:11 +02:00
Barnabás Pőcze
ab2907c699 spa: alsa: avoid potential uninitialized variable use
In both funtions `ctl_hndl` could be passed to `snd_ctl_close()`
while being unitialized if `this->device_info.change_mask` is zero.
2024-09-18 19:54:13 +00:00
Barnabás Pőcze
27b76ae686 pulse-server: calculate event mask from facility and type
Make `client_queue_subscribe_event()` take the facility and type
separately, and calculate the mask itself, so that the caller
does not need to be concerned with that.
2024-09-18 19:35:08 +02:00
Wim Taymans
e3a7035e8f spa: make helper to init spa_audio_info_raw from dict
Make a function that can initialize raw audio info from a dict and fill
in the defaults. We can use this in many of the modules when the audio
format is parsed.
2024-09-18 15:48:27 +02:00
sunyuechi
d932e52d5b fmt-ops: add R-V V optimizations for f32_s16 2024-09-18 10:40:48 +00:00
sunyuechi
8166b9c580 spa/support: implement RISCV V CPU detection 2024-09-18 10:40:48 +00:00
Wim Taymans
e2991f6398 json: add helper function to parse channel positions
Use the helper instead of duplicating the same code.

Also add some helpers to parse a json array of uint32_t

Move some functions to convert between type name and id.
2024-09-18 09:54:34 +02:00
Wim Taymans
911a601b95 impl-node: only let the server send RequestProcess commands
When we emit the RequestProcess event from an exported node, don't
send the RequestProcess command to ourselves but let the server
decide where to send it to.
2024-09-17 09:25:58 +02:00