Commit graph

11949 commits

Author SHA1 Message Date
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
Dmitry Sharshakov
61db1f16e2 module-rtp-sap: sanity check PTP response 2024-01-22 16:41:06 +00:00
Barnabás Pőcze
1274ebe069 Apply 1 suggestion(s) to 1 file(s) 2024-01-22 16:41:06 +00:00
Dmitry Sharshakov
44f1462711 module-rtp-sap: fix strncpy bounds 2024-01-22 16:41:06 +00:00
Dmitry Sharshakov
9a0499b64d module-rtp-sap: fix fd leak 2024-01-22 16:41:06 +00:00
Dmitry Sharshakov
401df6e199 module-rtp-sap: review
Co-authored-by: Barnabás Pőcze <pobrn@protonmail.com>
2024-01-22 16:41:06 +00:00
Dmitry Sharshakov
7abb896aef module-rtp-sap: support PTP management protocol
Request current clock sync status to know the grandmaster identity for SAP announcements
2024-01-22 16:41:06 +00:00
Wim Taymans
2f46ee2793 bluez: fix compilation some more 2024-01-22 15:39:17 +01:00
Wim Taymans
b2c8bd9311 bluez5: fix compilation 2024-01-22 15:20:53 +01:00
Adam Marcus
560b26a5b5 bluez5: add ELD support check 2024-01-22 14:04:16 +00:00
Adam Marcus
99b180f838 bluez5: correct endpoint name 2024-01-22 14:04:16 +00:00
Adam Marcus
e04fbb9f2a bluez5: avoid adding new codec endpoint 2024-01-22 14:04:16 +00:00
Adam Marcus
abf9725be1 bluez5: refactor ELD check 2024-01-22 14:04:16 +00:00
Adam Marcus
79ee1eaff0 bluez5: add AAC-ELD codec 2024-01-22 14:04:16 +00:00
columbarius
c3327742cc vulkan: Add pixel-formats to query format properties
We need a database of pixel format properties to remove hardcoded magic
numbers. This commit creates a simple function to query the bytes per
pixel for common RGBA formats.

This should be promoted to or superseeded by a common spa namespaced
version.
2024-01-22 14:00:41 +00:00
columbarius
49b67742c6 vulkan: move format enumeration into utils functions
This splots the format enumeration into a helper for dsp and raw pod
creation and a common function for the compute filters.

Counting formats with modifiers will be usefull to announce dsp and
raw formats from the same node.

No functional changes.
2024-01-22 14:00:41 +00:00
columbarius
02779fe28b vulkan: create validation function for dmabuf properties
Validation of properties is moved from the import and allocation
functions into a separate function. This allows later separation of
modifier informations from the base struct.
2024-01-22 14:00:41 +00:00
columbarius
08216be3b1 vulkan: use extension VK_EXT_QUEUE_FAMILY_FOREIGN
This extension is required for the aquire and release barriers
to transfer the buffer ownership from and two an external queue.
This removes a warning from the validation layers.
2024-01-22 14:00:41 +00:00
columbarius
1cad9ebb0d vulkan: Move vulkan_stream into vulkan-compute-utils
vulkan_stream will store compute specific properties.

No functional changes.
2024-01-22 14:00:41 +00:00
columbarius
e5f89e09d1 vulkan: Move vulkan_fence_create to vulkan-utils
This function is independent from compute.

No functional changes.
2024-01-22 14:00:41 +00:00
columbarius
51b7d49cff vulkan: namespace functions in compute-utils to spa_vulkan_compute
Rename compute functions to allow for shared common functions for
non oppinionated vulkan helpers.

No functional changes.
2024-01-22 14:00:41 +00:00
columbarius
7d97e47e28 videoconvert: Enable loading external converter plugins
Load the converter from the video.adapt.converter property.
2024-01-22 13:59:16 +00:00
columbarius
d6c1b6470a videoconvert: apply changes from audioadapter
Update the videoadapter to the structure of the audioadapter.
2024-01-22 13:59:16 +00:00
Wim Taymans
846f994ac8 alsa: increase buffers when using small buffer
We can increase the MAX_LATENCY again if we increase the amount of
buffers when we are using a small buffer.

Normally we ask for 4 * quantum-limit as the buffer. This should be good
to use 1 buffer and quantum-limit as the quantum with enough headroom
to not run out of buffers.

If we are however using less buffer-frames we need to be careful and
allocate an extra buffer. Imagine using a buffer of 4096 frames, we can
support a quantum of up to 2048 frames if we use 2 buffers.

See #3744
2024-01-22 12:10:51 +01:00
Wim Taymans
c5b845bc90 alsa: improve max-latency property
Half of the buffersize is not enough to support as a max-quantum, we
need to divide by (4 * frame_scale) to allow some headroom and account
for the DSD scaling. We do the same calculation to suggest a buffer size
using the quantum-limit.

See #3744
2024-01-22 10:20:24 +01:00
Thomas Weißschuh
4034e8f3c5 spa: mark constant parameters as such
The info parameter is never modified, communicate this to users.
This align format-utils.h with latency-utils.h.
2024-01-20 19:12:03 +01:00
Wim Taymans
490558f3de v4l2: improve filter with missing format
When the filter has no format property, just enumerate all possible
framerates. Handle error case where the filter has the wrong type.

Makes gst-launch gstpipewiresrc ! video/x-raw ! fakesink work.

See #1793
2024-01-17 10:11:29 +01:00
Wim Taymans
14b265f646 v4l2: fix format enum with unsupported framerate
Actually count the number of frame fractions we add. If we added 0, we
don't have any supported framerate that intersects with the filter and we
try the next frame size.

See #1793
2024-01-17 09:55:47 +01:00