Commit graph

12126 commits

Author SHA1 Message Date
Wim Taymans
bbb83b97c5 v4l2: probe EXPBUF and disable alloc_buffer flag
After we set the format, probe if we can do EXPBUF and enable/disable
the ALLOC_BUFFERS flag on the port.

This should gracefully handle the case where EXPBUF is not available.

Fixes #3821
2024-01-29 16:38:52 +01:00
Wim Taymans
24f510b9b3 v4l2: clear support for alloc_buffers on failure
When we try to alloc buffers but EXPBUF is not supported, make sure to
clear the alloc_buffers flag so that the caller can try again with
allocated buffers instead.

See #3821
2024-01-29 16:10:36 +01:00
Dmitry Sharshakov
06d4570ced pipewire-aes67: temporarily disable sess.latency.msec
After c37f9f9cf0 and before further improvements it won't properly work with AES67 receivers
2024-01-29 08:54:25 +00:00
Pauli Virtanen
089db6f14a doc: disable deprecated list 2024-01-29 08:50:32 +00:00
Pauli Virtanen
978dbff32f doc: fix some doxygen warnings 2024-01-29 08:50:32 +00:00
Pauli Virtanen
8e3c0f02b2 doc: bluez5: document some internals in media-codec 2024-01-29 08:50:32 +00:00
Pauli Virtanen
b1d88f5ed4 doc: put new pulse modules to right place 2024-01-29 08:50:32 +00:00
Pauli Virtanen
cdb6c5a316 doc: filter some constructs that confuse doxygen 2024-01-29 08:50:32 +00:00
shoffmeister
c25c7f7bd8 doc: Fix typo 'statis' -> 'static' 2024-01-29 08:47:37 +00:00
columbarius
3f80bc2e70 vulkan: Support MemPtr as import for compute 2024-01-29 08:44:25 +00:00
columbarius
7ffd8ff4de vulkan: Add function to upload data to a staging buffer 2024-01-29 08:44:25 +00:00
columbarius
36aa413cd7 vulkan: Add functions to create staging buffers 2024-01-29 08:44:25 +00:00
columbarius
d0e51dd066 examples: Add video-dsp-src example
This client creates the same output as video-src in the dsp format.
2024-01-29 08:44:25 +00:00
Wim Taymans
ad6e2ce480 param: clarify the internal latency 2024-01-29 09:41:11 +01:00
Pauli Virtanen
97db4a68a7 doc: explain clock/latency more
Update SPA_IO_Clock/Position documentation.

Explain some IOs are currently unused in PW.

Explain meaning of latency.
2024-01-29 08:36:15 +00:00
Pauli Virtanen
21392d327f bluez5: lowball fallback delay values
Reduce fallback delay values used when BT device doesn't provide the
information itself.

It may be better to have audio late than early, so use values that are
probably close to or below the delays of majority of headsets.
2024-01-28 18:00:04 +02:00
Pauli Virtanen
2ed0cddc57 bluez5: sco-sink: more accurate latency values
Use audio packet size for the latency, support for latencyOffsetNsec.
2024-01-28 18:00:04 +02:00
Pauli Virtanen
c0eb634156 bluez5: media-sink: more accurate latency
Don't include the quantum in latency: the latency relative to graph
cycle start doesn't depend on the quantum.  Instead, the audio packet
size determines it.
2024-01-28 18:00:04 +02:00
Pauli Virtanen
95b13391eb bluez5: media-sink: fix wrong clock
Should use position for graph clock rate.
2024-01-27 18:04:57 +02:00
Pauli Virtanen
84c5ba09dc bluez5: support api.bluez5.internal flag also for sco
Enable the /Internal media class hack also for SCO.

Session manager can use this to adjust SCO sink/source media.class when
it is going to emit front-end nodes hiding the hardware ones.
2024-01-26 11:58:30 +00:00
Pauli Virtanen
05402284c1 bluez5: backend-native: fix all rfcomm lookups to check profile
The rfcomm list may contain various AG & HF ones, so the profile must be
checked everywhere they are looked up.

Fix the rfcomm lookups everywhere to do it.

Fixes Pipewire<->Pipewire HFP connections, and sending HFP HF commands
to HSP or AG.
2024-01-26 11:57:30 +00:00
Pauli Virtanen
651cb7bd71 context: move registry generation checks to context methods
Add registry generation checks to pw_context methods that find globals,
(pw_context_find_global, pw_context_for_each_global), so that they are
made everywhere where a client acquires globals.

In addition to previously covered registry bind/destroy, this also
covers link creation (port/node ids) and metadata (subject ids).
2024-01-26 11:56:40 +00:00
Wim Taymans
a59a551202 module-netjack2: improve channel positions
If the manager gave us a different channel count than we had by
default or configured, assume everything is AUX channels.

Also handle the case where the manager is sending more than our
MAX_CHANNELS channels.
2024-01-25 17:59:39 +01:00
Wim Taymans
c37f9f9cf0 module-rtp: use sess.latency.msec also for sender
Use the sess.latency.msec also for the sender and use it to control the
NODE_LATENCY. Make it a float to be in line with the other time values.
Set is to a default of ptime, which was what it used to be.

This makes it possible to set the ptime to a smaller value than the
sess.latency.msec so that we send out multiple packets per quantum.
This will result in some bursty output for now but with a timer that can
be improved later.

Update the docs a little, mention the new rtp.ptime and rtp.frametime.
2024-01-25 15:49:41 +01:00
Wim Taymans
ec825086f1 module-rtp: use helpers to convert between samples and msec
And make sure we don't do any useless float to double conversions.
2024-01-25 15:30:04 +01:00
Wim Taymans
9458367a50 module-rtp: Fix framecount vs ptime check
We should use framecount instead of impl->psamples.
2024-01-25 15:12:25 +01:00
Wim Taymans
803c82abb9 alsa: use chmap by default when using UCM
Fixes #2648
2024-01-25 10:26:11 +01:00
Pauli Virtanen
65f594c6a1 bluez5: further HFP cleanups
Fix naming issues.
2024-01-25 08:43:45 +00:00
Pauli Virtanen
ebde25fe58 bluez5: clean up SCO code a bit
Minor cleanup in variable naming etc.
2024-01-25 08:43:45 +00:00
Pauli Virtanen
45ff965f33 bluez5: support LC3-SWB in SCO sink/source
Add support for LC3-SWB encoding/decoding.

Tested on Pixel Buds Pro.
2024-01-25 08:43:45 +00:00
Pauli Virtanen
fe412784a4 bluez5: support LC3-SWB in HFP RFCOMM & add codec id for it
HFP 1.9 adds LC3 as a possible codec in addition to CVSD & mSBC.
E.g. Pixel Buds Pro latest firmware supports it.

Add the RFCOMM side and codec selection for it.
2024-01-25 08:43:45 +00:00
Dmitry Sharshakov
237d282c05 pipewire-aes67: resync when offset is more than 1.5 ms
2 ms is typically considered to be late for most AES67 implementations
2024-01-24 20:55:03 +03:00
Dmitry Sharshakov
ca25066874 node-driver: allow fractional resync-ms 2024-01-24 20:52:08 +03:00
Wim Taymans
e7888d4ccc support: add resync.ms option to node.driver
Move some of the tracking code for the DLL to where it is used.

Add resync.ms (default 10) option at which we give up rate adjusting
and instead do a hard resync. This results in a jump in the position
of the graph clock.
2024-01-24 17:53:15 +01:00
Wim Taymans
ccd0599702 conf: add freewheel.wait option, defauls to 10 2024-01-24 17:52:32 +01:00
Mersad Jelacic
831ab5db85 thread: Change warning to info
Change warning to info in impl_acquire_rt() and impl_drop_rt().
2024-01-24 14:52:09 +01:00
Wim Taymans
f0304f45a9 jack: make sure jack clients are ALWAYS_PROCESS
We need this flag to be true otherwise, we will try to hide ports from
JACK clients that suspend (while still active).

See #3416
2024-01-24 12:47:32 +01:00
Wim Taymans
1ad0ea3e56 jack: improve running check
We already checked if a node is_jack when it appeared in the registry
with the client.api property, so don't check again with ALWAYS_PROCESS
when the node properties changed.

When we get a node info about our own state, we can use the active state
of the node to decide if we are running or not.

See #3794
2024-01-24 12:32:44 +01:00
Wim Taymans
306c90618f pulse-server: the device changed when EnumRoute changes
We use EnumRoute of the card to fill in the ports of the device so when
EnumRoute changes, the associated devices also needs a change event.
2024-01-24 11:22:52 +01:00
Daniel Struebig
281451db85 pipewire-jack: remove unused field graph_callback_pending
* The field `graph_callback_pending` in the struct `client` in pipewire
  jack seems to be unused and referenced nowhere else in the repository.
2024-01-24 09:34:37 +01:00
Wim Taymans
bffcb2e6f1 pulse-server: implement subscribe in device-restore
Add a client that subscribes to the list of subscribers and make the
client watch for EnumFormat changes.

When a subscribed client sees an EnumFormat change for a sink, emit EVENT
to the client.

This will send the EVENT to pavucontrol when the supported IEC958
formats change so that it can update the gui.
2024-01-23 18:08:32 +01:00
Wim Taymans
979eb0278f pulse-server: reset spa_param_info.user after events
After we emited all changed events, reset the user field. This way the
event handlers can check what params are changed.
2024-01-23 18:06:45 +01:00
Wim Taymans
ac91c0dc1c pulse-server: implement stream-restore EVENT
Add method to update the client routes. Add an event when the client
routes changed.

Listen for route_changed events on clients that do a subscribe on the
stream-restore extension. Emit an EVENT when the routes change.

This keeps the system notifications volumes in sync between
gnome-control center and pavucontrol and probably in other tools
as well.

Fixes #3805
2024-01-23 13:31:05 +01:00
Wim Taymans
d71fb40989 pulse-server: move extension to modules
Add extension support to modules. This is a list of extension commands
that can be performed on the module.

Remove the custom registry of extensions and make proper modules that
implement the extensions.

This is more in line with what pulseaudio does. The advantage is that the
modules actually show up in the module list and that we can use the
module user_data to implement the extension later.
2024-01-23 13:31:05 +01:00
Pauli Virtanen
89077d16ec bluez5: prefer 16khz input for LE Audio duplex configurations
Devices may advertise other values, but not certain they will work well
in duplex configuration.

E.g. my Samsung Galaxy Buds2 Pro emits buzzing sound with 48kHz duplex
input.
2024-01-23 08:40:46 +00:00
Pauli Virtanen
cde8f9261c bluez5: lc3: pick qos values from BAP spec tables
Don't believe QoS values recommended by the device, which may be
suboptimal.  Instead, pick the values from the BAP v1.0.1 Table 5.2.

Link: https://github.com/bluez/bluez/issues/713
2024-01-23 08:40:46 +00:00
Pauli Virtanen
08819e3d17 bluez5: indicate to LC3 plugin whether endpoint is sink/duplex
The codec can make use of information on whether the endpoint is sink,
and whether there will be both sink and source configured.
2024-01-23 08:40:46 +00:00
Pauli Virtanen
9474030582 bluez5: determine available BAP profiles from remote endpoints
The PAC profile UUIDs do not appear in the UUID list, but are still
useful to know before SelectProperties.

Set them ahead of time based on the visible remote endpoints.
2024-01-23 08:40:46 +00:00
Pauli Virtanen
8eb1f5aa35 bluez5: pick right codec when multiple ones share the endpoint
The "default" codec is the one with fill_caps != NULL, and should be
picked if we don't know which one we are using.

Fixes showing AAC-ELD as supported when it's not, which happened because
it's ordered before the default AAC in the codec list unlike the other
"shared endpoint" codecs.
2024-01-22 22:38:45 +02:00
Dmitry Sharshakov
bd5af4e573 module-rtp-sap: use autobind 2024-01-22 16:41:06 +00:00