Commit graph

9927 commits

Author SHA1 Message Date
Wim Taymans
8e9b136b10 jack: use node.passive to make passive links
Let the node.passive property make passive links. PIPEWIRE_LINK_PASSIVE
overrides the node property.

Add some nice tweaks for qsynth so that it suspends and fades out
nicely by default.
2022-11-21 16:02:30 +01:00
Wim Taymans
ead59e750f stream: get info from Position in Start
When we start, read the Position IO so that we collect the right quantum
etc before calling the process callback. This updates the requested
frames value in the buffer correctly with the current quantum instead of
using 0.

This fixes an issue in pw-cat with midi data. The first buffer has a
requested size of 0 and so the first events won't fit in it and are
discarded.

Fixes #2843
2022-11-21 15:22:33 +01:00
NorwayFun
b3ebba275a Update ka.po 2022-11-20 18:45:47 +00:00
Wim Taymans
0918899bf8 client-node: send the mix_info before Buffer IO
We don't always need to send buffers to a remote port, when the port
is an output port, all the mix ports use the same buffers. This means
that when we add another link to a port, we don't get the mix_info
anymore and then we don't know the peer_id and we don't complete the
link and we don't call the connection_callback.

Instead, send the mix_info right before sending the Buffer Io area. We
always do this for all mix io and after we have sent the buffers so this
is a better place.

Fixes #2841
2022-11-20 19:24:01 +01:00
Wim Taymans
a0adb52124 pulse-server: add a pulse.idle.timeout option
When a client is not sending any data when it should be and causes an
underrun, mark it as idle and record the timestamp.

When a client is idle for pulse.idle.timeout seconds, set the stream
as inactive. When more data is received, set it back to active.

Add a pulse.idle.timeout option to set a global server default or
a per-stream value. Set the server default to 5 seconds. A value of 0
can be used to disable this feature.

With this change, badly behaving clients that are not sending any data
will be paused so that the sinks can suspend to save battery power.

Fixes #2839
2022-11-20 16:20:05 +01:00
Wim Taymans
b1c0662a00 pipewire-pulse: improve parsing of defaults
When we fail to parse a fraction from the config, give a warning and
continue with the default settings.
Print the final parsed value as debug.
2022-11-20 16:19:24 +01:00
Wim Taymans
fc159be9c6 pulse-server: make method to pause/resume stream
Make a method to pause and resume a stream and keep track of the paused
state of the stream. Use this function instead of setting the stream
inactive/active so that we get nice logging for each state change.
2022-11-20 16:19:24 +01:00
Wim Taymans
4c3f56fca1 resample: cleanup the resampler core functions
Move the increment function to a macro.
Don't use extra local variables, we can just as well call the resample
functipon with them.
2022-11-20 16:19:24 +01:00
Wim Taymans
bb558b7d95 audioconvert: don't overwrite port
Make a new variable to iterate the other ports so that we can use the
original port to emit notifications.

Fixes Latency and other params set on DSP ports.
2022-11-18 13:21:14 +01:00
Wim Taymans
43d02410e6 audioconvert: don't handle params when just enumerating
When we are simply enumerating the params, just collect the info
but don't act on them, like clearing the format or recalculating
the latency.

This avoids some useless work when enumerating params.

Use the more complete configure_format function to clear the format
and buffers when the EnumFormat param changed.
2022-11-18 09:34:37 +01:00
Wim Taymans
82f7ed419c audioconvert: shortcut configure_format
When we don't have a format and can't to clear it, we can return
immediately.
2022-11-18 09:29:23 +01:00
Wim Taymans
bc66060b7d audioconvert: also clear buffer when new EnumFormat
Fixes #2832
2022-11-17 19:41:12 +01:00
Wim Taymans
90f5b4a4bf audioconvert: improve renegotiation
When the follower updates EnumFormat, it probably wants to renegotiate
to a new format, so clear the current format so that we do that when
starting the next time.

EnumFormat should also not only return the current format in case we
are negotiated but it should return all possible formats.

See #2832
2022-11-17 19:26:46 +01:00
Wim Taymans
72912c9589 pulse-tunnel: improve latency property docs
To make it clear it needs to a number only (without ms at the end)
2022-11-17 19:04:46 +01:00
Wim Taymans
3085e312b6 pulse-server: handle server started and stopped events
When a server is started, try to publish the pending services.
When a server is stopped, republish the services.

This makes it possible to load and unload the tcp protocol after loading
the zeroconf publish module and it will do the right thing.
2022-11-17 18:36:47 +01:00
Wim Taymans
a11612bdad pulse-server: add event to the implementation
Add events when a server is started and stopped
2022-11-17 18:31:23 +01:00
Wim Taymans
ab5fe8957b pulse-server: use running servers to publish zeroconf
Loop over the servers and use its family and port to publish the
zeroconf services.

This avoids exposing the services when we don't have any TCP servers
running to accept connections.

It also avoids exposing the services twice with both IP4 and IP6
addresses.

It also exposes the services with a port that is actually usable, in
case it's not the same as the default port.
2022-11-17 17:07:38 +01:00
Wim Taymans
80983b9fb6 examples: improve console output
Go back up right before we're going to draw so that we're always at
the bottom when we quit because of ctrl-C.
2022-11-17 15:56:39 +01:00
Wim Taymans
945529f029 modules: actually copy the network property to the stream
Fixes #2384
2022-11-17 15:56:39 +01:00
Ataberk Özen
701b5e6cef alsa-mixer: Asus Xonar SE supports digital 5.1 2022-11-17 15:41:29 +03:00
Wim Taymans
b46d8a8c92 alsa: force playback start when buffer is full
When we try to play data but the ringbuffer is full, we need to start
the device or else we will stay in this situation forever and stay
silent.

Fixes #2830
2022-11-16 20:45:38 +01:00
Wim Taymans
50a24ac69e acp: do probing in 44100 Hz again
Some devices don't seem to work when probed in 48000 so bring it back
to 44100 until we figure out what is going on.

Fixes #2718
2022-11-15 16:30:26 +01:00
Wim Taymans
086ad336ad audioconvert: redo setup when format changes 2022-11-15 16:29:46 +01:00
Wim Taymans
bf3516ba04 audioadapter: perform setup again after a PortConfig
After the ports are reconfigured, we need to perform the setup again so
that buffers and processing can happen with the right settings.

This fixes an issue when autoswitching between A2DP and HFP with
bluetooth headsets when there is also a stereo capture device available.
The input stream of the browser is quickly reconfigured between stereo
and mono with only a Pause command in between, clearing the setup state
is enough to redo the setup when going back to Playing.

Fixes #2764
2022-11-15 15:40:47 +01:00
Wim Taymans
88dec1d378 impl-module: turn warning into info
Errors while loading a module does not have to be fatal, it depends on
the config flags. Turn an error into info and log an error only
when needed.
2022-11-15 09:41:48 +01:00
Gleb Popov
525e7aa734 FreeBSD build fixes. 2022-11-14 21:03:22 +03:00
Gleb Popov
018058ea35 Fix copy-paste typo in the warning message. 2022-11-14 20:58:14 +03:00
Gleb Popov
781b7b187a Add a type cast necessary to compile on FreeBSD. 2022-11-14 19:57:08 +03:00
Barnabás Pőcze
14e044a92c spa: bluez: backend-native: fix filtered number memory leak
The `number_filtered` variable was dynamically allocated but never freed.
2022-11-14 16:15:21 +00:00
Wim Taymans
93d2571b30 libcamera: fix device id assignment
Find a free id from the available ids instead of just taking the current
number of devices, which would give assign the same id to multiple
cameras when: added 0, added 1, removed 0, added 1.
2022-11-14 16:04:21 +01:00
Wim Taymans
a57590e334 libcamera: emit device removal event
We need to emit the device id with NULL info to emit a device remove
event.

Also indent some code properly.
2022-11-14 15:38:16 +01:00
Wim Taymans
4da154c3a9 libcamera: handle errors better
Make sure we disconnect the request complete handler when we failed
to start.
Stop the camera when we failed to queue our requests.
2022-11-14 13:24:07 +01:00
Wim Taymans
b913f1b1a7 add some more debug 2022-11-14 11:23:12 +01:00
Wim Taymans
bf8981ef61 libcamera: fix setting controls
Use the set_control function of v4l2 and libcamera also to set
properties from a sequence.
2022-11-14 11:22:53 +01:00
Wim Taymans
cfb226b0fb v4l2: improve debug
Add device path to debug lines.
2022-11-14 11:22:53 +01:00
Dmitry Sharshakov
e0c9f87d78 bluez5: backend-native: prevent string overflow
Fixes -Wfortify-source when building
2022-11-13 15:13:33 +03:00
Wim Taymans
41d8afa404 pipewire: increase max-rates to 32 2022-11-13 09:40:49 +01:00
Wim Taymans
ea4e5cf364 context: avoid useless graph recalculations
Only recalculate the state of the graph when we actually managed to
suspend a driver node.
2022-11-11 19:41:49 +01:00
Wim Taymans
04aa803d7e test: avoid compiler warnings when SSE is not enabled
Refactor the sample test and run the test against itself to make
sure we use all variables at least once.
2022-11-11 12:09:22 +01:00
Wim Taymans
518ccdf624 jack: add jack.filter-char to specify the filter character 2022-11-10 17:40:25 +01:00
Wim Taymans
b720da771e pulse-server: also advance read pointer in underrun
So that we ask for more data from the client.

Also retested with #2799 that caused this regression.

Fixes #2821
2022-11-10 16:13:33 +01:00
Wim Taymans
38382d002d 0.3.60 2022-11-10 10:07:28 +01:00
Wim Taymans
e3ece6db54 gst: hide the libcamera device provider 2022-11-10 09:38:46 +01:00
Wim Taymans
8d6ff6137d audioadapter: remove checks for format
This is meant to be a filter for the follower format and can thus
contain wildcards.
2022-11-09 16:29:04 +01:00
Wim Taymans
85ffe68ea3 Revert "adapter: removed unused follower_current_format"
This reverts commit 6c963ed933.

This code was meant to set a filter on the format for the follower
but is not implemented yet.

Problem is that the unit tests and wireplumber call this code and would
need to be patched.
2022-11-09 16:24:49 +01:00
Wim Taymans
6c963ed933 adapter: removed unused follower_current_format 2022-11-09 16:03:18 +01:00
Wim Taymans
b07e0c1445 audioconvert: debug in and out positions 2022-11-09 15:19:46 +01:00
Wim Taymans
bb002a3eef test: add test for 6p1 to 5p1 with remapped REAR
See #2809
2022-11-09 09:41:21 +01:00
Wim Taymans
39bfc0cb56 test: add more 5p1 to 6p1 tests
See #2809
2022-11-09 09:24:03 +01:00
Wim Taymans
25e3144887 audioconvert: skip upmix when moving channels
When we use SIDE for REAR, don't try to upmix REAR channels and vice
versa.
2022-11-09 09:24:03 +01:00