Commit graph

6041 commits

Author SHA1 Message Date
Wim Taymans
44d743ed95 spa: make all format parsing fields optional
Just like the optional build, make all field parsing optional. This
will leave the fields with their default values if they are not parsed
from the param.

We can then remove our custom functions and use the generic ones in
various places.
2022-11-03 13:13:07 +01:00
Wim Taymans
74447acedb Add some more format checks
The format parse functions don't really check if the parsed values
make any sense so we need to to this ourselves.
2022-11-03 13:10:32 +01:00
Wim Taymans
c30d743198 pw-top: initialize info struct with 0
So that we don't accidentally print uninitialized values.
2022-11-03 13:08:48 +01:00
Wim Taymans
e3a4797063 pw-top: support MJPG and H264 formats 2022-11-02 17:14:40 +01:00
Wim Taymans
3e4da8e8e4 filter-chain: emit en error when graph fails 2022-11-02 12:58:37 +01:00
Wim Taymans
f6e76f8356 filter-chain: add more default LADSPA search paths
Add /usr/lib/ladspa and LIBDIR to the default search path as well.
2022-11-02 12:57:16 +01:00
Wim Taymans
8ab70d02dc stream: guard against node destroy 2022-11-02 12:56:45 +01:00
Wim Taymans
ef8114ff0c filter-chain: improve some error messages 2022-11-02 12:42:31 +01:00
Wim Taymans
6bb73124aa filter-chain: improve some float handling
Avoid some double to float conversions.
Use fmin and fmax.
2022-11-02 12:41:20 +01:00
Wim Taymans
f801dc0886 pulse-server: keep read index in sync
Keep the ringbuffer and read_index variable in sync or else we might ask
for more data than maxlength and cause an overflow.

Fixes #2799
2022-11-02 11:43:30 +01:00
Wim Taymans
c5f7d3a728 param: improve pw_param
Add a sequence number to pw_param.
Add param_info to param_update to filter out the params of the latest
sequence number.

This can be used to track params from a certain sequence number. Update
node, port and device.
2022-10-30 14:57:04 +01:00
Ashok Sidipotu
f383956b7b module-pipe-tunnel: Update the description of the module. 2022-10-28 07:07:43 +00:00
Ashok Sidipotu
315b2d1ad5 module-pipe-tunnel: Initialize the target.node property
Initialize the PW_KEY_TARGET_OBJECT property on the stream node based on the
user config.
2022-10-28 07:07:43 +00:00
Wim Taymans
e6fd5888ee param: add a new user seq field in the param-info
Add a new seq field in the param-info struct. Users can use this
field to keep track of pending param updates.

Store the latest seq number of the param update in the seq field. Remove
all params that don't match the sequence number because they are too
old. This avoids duplicate old params in pw-dump output.

Rework the pulseaudio manager with this same method.
2022-10-27 20:10:33 +02:00
Wim Taymans
a989230cb5 introspect: update the info more carefully
Only change the fields we care about and leave the other ones
untouched in the created info.
2022-10-27 20:09:25 +02:00
Wim Taymans
d2aa240767 introspect: handle NULL result from info updates 2022-10-27 20:06:54 +02:00
Wim Taymans
552d4516b6 params: count params per id from 0
Only increment the index when we find the requirested param, this
makes the params go from index 0 to the last instead of starting at some
random index. The random index is not really a problem but it is also
no so nice.
2022-10-27 19:20:40 +02:00
Wim Taymans
f0328a1f8d protocol-native: improve logging
Add an end marker in the log for the message.
Log the output messages with the right log topic.
2022-10-27 18:04:14 +02:00
Wim Taymans
d247db8d26 pw-top: improve output
Show the node state in the S column
Use the node state to show or hide info, this will only show info for
active nodes.
Do redraw updates when something important changes
Update man page
2022-10-25 16:24:03 +02:00
Christoffer Gydenius
b35983eb7e module-echo-cancel: aec-plugin parameters
Make it possible for a aec-plugin to provide props/params
through module-echo-cancel and make it possible for a
aec-plugin to listen and react to these props/params getting updated.

Add method enum_props() that is used under setup_streams() to
get props from aec_plugin.
Add get_params() and set_params() for updating and getting
aec-plugin params under the input/output_param_changed calls
and getting params under setup_streams().
2022-10-24 16:58:00 +02:00
Wim Taymans
1d0adba0f6 impl-node: remove nodes from graph after Pause completes
While we process the Pause, the node might sill emit some events or do
processing, which would give an error because we already removed the
node from the graph.

Instead, remove the node from the graph when the node state is updated
to the new state.
2022-10-24 15:24:47 +02:00
Wim Taymans
8fcfa154eb impl-link: don't activate links with inactive input
Also check the active state of the input node, not just if the node
was added to the graph because a node can become inactive and only
later be removed from the graph.
2022-10-24 15:18:03 +02:00
Wim Taymans
2c4e1b8537 node: check if active when ready event is emited
Add a check that the node is actually started when we get the ready
callback.
2022-10-24 12:33:56 +02:00
Jonas Holmberg
facf73b01c module-echo-cancel: Correct offset
Correct the offset of first delayed data to run the canceller on.
2022-10-21 16:25:57 +00:00
Wim Taymans
7a0058ffb6 pw-top: do refresh after sync
So that we also draw the screen quickly when there is no profiler
running.
2022-10-21 18:25:33 +02:00
Wim Taymans
6e88c30080 pw-top: do initial refresh after first data 2022-10-21 16:44:59 +02:00
Jonas Holmberg
8092a0a637 module-echo-cancel: Run canceller on first frames
Run canceller on the first frames when play delay is not a multiple of
the chunk size.
2022-10-21 14:53:26 +02:00
Jonas Holmberg
0e066e44fe module-echo-cancel: Don't use old delayed play data
Do not use old delayed data in play_buffer when a new stream is started.
Copy silence to output until play_buffer has been filled with new data
instead.
2022-10-21 11:42:41 +02:00
Wim Taymans
ec90b575d7 pw-top: also show IEC958 passthrough formats 2022-10-21 10:23:34 +02:00
Wim Taymans
1aef910dcc jack: make jack_bufsize adjust the global quantum
Bind to the settings metadata.
Add a property to control if a client will set a temporary or global
quantum whith jack_bufsize.
Make a match rule for jack_bufsize and force a global quantum change.

Fixes #1273
2022-10-20 16:34:47 +02:00
Wim Taymans
24b113e2d3 module-loopback: add target.delay.sec property
Add a target.delay.sec property to module-loopback that uses a
ringbuffer to further delay the signal to the requested value. This
also takes into account the graph delay to get an end-to-end delay.

Add a -d property to pw-loopback to control this.

Implement latency_msec on the pulse module with this new property so
that it behaves similar to pulseaudio.
2022-10-20 16:02:28 +02:00
Wim Taymans
35c9650e0e pulse-server: do chmod of the socket like pulseaudio
Pulseaudio sets the socket permissions to 0777 with chmod when the
socket was not from systemd. Do the same.

Fixes #1729
2022-10-20 11:49:52 +02:00
Wim Taymans
e5881e9afb module-pulse-tunnel: rate limit some messages 2022-10-20 09:24:54 +02:00
Wim Taymans
88785c42e5 modules: avoid partial writes to pulseaudio
Pulseaudio requires that we call pa_stream_write with a multiple
of frame_size bytes. Because our ringbuffer is a power of two, this
might cause problems at the edge of ringbuffer where a sample is
split between the end and beginning of the ringbuffer.

Avoid this by letting pulse allocate a buffer instead and memcpy
the requires samples into it.

Fixes multichannel output on module-pulse-tunnel.
2022-10-18 13:14:32 +02:00
Wim Taymans
e6356f7415 module: pass a channel map in pa_stream_new
Convert the PipeWire channelmap to pulseaudio and pass it in
pw_stream_new().
2022-10-17 18:58:15 +02:00
Wim Taymans
e2638b4b68 modules: use resample.prefill for echo cancel streams 2022-10-17 15:09:46 +02:00
Wim Taymans
3e9b4657cb modules: add since tag 2022-10-13 13:16:33 +02:00
Wim Taymans
25f40e4c2a thread: emit a warning when calling unimplemented functions
These are fallback functions that are not implemented. It is expected
that the thread-utils is used from the context, which is a complete
implementation provided by module-rt.
2022-10-13 11:57:04 +02:00
Wim Taymans
59e49d31eb raop: add error from reply
Return an error from the reply callback and log some generic message
in case there is an error value returned.
2022-10-12 17:51:35 +02:00
Tycho Haemers
e168af8804 Update src/modules/module-raop-sink.c 2022-10-12 13:41:07 +00:00
Tycho Haemers
09a62514e3 Update src/modules/module-raop-sink.c 2022-10-12 13:28:14 +00:00
Tycho Haemers
5fc69f3ec7 Update src/modules/module-raop-sink.c 2022-10-12 13:21:03 +00:00
Tycho Haemers
0c494c5469 Update src/modules/module-raop-sink.c 2022-10-12 10:23:39 +00:00
Tycho Haemers
2ef10cefa9 Replace module-raop-sink.c 2022-10-12 10:23:39 +00:00
Wim Taymans
aed56719f2 modules: add pulse.latency to module-zeroconf-discover
To set latency to remote streams.
Also add latency_msec argument to the pulseaudio module for this.

See #2755
2022-10-12 12:18:47 +02:00
Wim Taymans
6f235f344f modules: set tunnel minreq and prebuf more like pulseaudio
See #2755
2022-10-12 12:18:14 +02:00
Wim Taymans
15e4e6bcbc pulse-server: remove warning
When we get EPIPE from a client send, pass the error code without
logging a warning. The caller will log an appropriate message instead.

Fixes #2754
2022-10-12 10:17:49 +02:00
James Le Cuirot
384ec63ae4 raop: Fix raop.encryption typo in the documented configuration example 2022-10-12 07:38:14 +00:00
James Le Cuirot
f059f14c68 raop: Allow digest authentication and auth-setup to be used together
The current implementation assumes these are mutually exclusive, but
Yamaha MusicCast requires an auth-setup step following the digest
authentication.

`rtsp_auth_reply` could be dropped in favour of `rtsp_options_reply`,
but you may end up in a loop if the other end keeps responding with 401.
2022-10-12 07:38:14 +00:00
James Le Cuirot
4b0945bf01 raop: Use the real URI for digest authentication rather than *
Yamaha MusicCast (or at least the RX-A880) seems to be stricter about
the URI here, as it rejects `*`. Examples, such as those documented by
OpenAirplay, use the real URI.
2022-10-12 07:38:14 +00:00