Commit graph

1912 commits

Author SHA1 Message Date
Julian Bouzas
227dd97036 m-lua-scripting: always parse JSON to String if its type is not recognized
This allows parsing JSON strings without quotes.
2023-08-11 14:48:13 -04:00
Julian Bouzas
e24e52c6d3 spa-json: encode the string directly into the builder
Some special characters like '\v' are encoded using 6 characters, which
currently does not work because the VLA size asumes a maximum of 4 characters
per encoded special character. This patch refactors this logic to avoid using
VLAs at all and encodes the string directly into the builder.

See #471
2023-06-19 12:03:23 -04:00
Julian Bouzas
e91a9583d8 spa-json: Fix conditional jump on uninitialised value when adding empty strings to builder
Similar to wp_spa_json_builder_add_property(), we need to make sure the dst
array in wp_spa_json_builder_add_string() has room for the null character
because builder_add() expects it.

Fixes #471
2023-06-19 08:07:02 -04:00
Pauli Virtanen
baa0940d8b bluez: disable auto-connect by default
Disable bluez5.auto-connect.

It makes PW to try connect to all locally known BT audio devices on
start, which is in general not a good thing to do.

Some BT adapters are not capable of simultaneous audio streaming and
scanning for connections (e.g Raspberry Pi builtin BT, probably more),
so audio stutters until adapter/kernel give up trying to connect to
devices that cannot be reached.

Disabling it makes devices to not reconnect on user VT switch, but also
that we should only do for devices that were connected when logind
switched.
2023-06-19 07:27:31 +00:00
George Kiagiadakis
5d4db78427 suspend-node: check if the node still exists before suspending it
After a timeout, it's possible that something else may have
destroyed the node already. This can happen for example with virtual
sinks that were created from another process.

Fixes: #467
2023-06-14 23:26:30 +03:00
George Kiagiadakis
a7b8966c06 node: prevent crashing if the proxy isn't bound
Related to: #467
2023-06-14 23:00:56 +03:00
David Turner
f112d424ca Remove RestrictNamespaces from systemd service
libcamera uses namespaces to sandbox IPA (Image Processing Algorithm)
modules because they are sometimes proprietary binary blobs.  The
RestrictNamespaces option in Wireplumber's systemd service breaks this
sandboxing when libcamera is loaded via the libcamera SPA module, so
cameras requiring an IPA do not work.

This commit removes RestrictNamespaces so that the sandboxing works
again.  I've confirmed that after this change wireplumber works with
libcamera with an IPA module.

Resolves #466
2023-06-13 15:41:45 +01:00
George Kiagiadakis
6dc5ac089a wpctl: add status options to display device/node names and nicknames 2023-05-23 11:41:38 +03:00
matoro
b7d41ac5bd tests: common: crank up timeout for slower devices
Timeout of 3 seconds is too slow for test-si-standard-link on slower
devices, crank this up with plenty of extra margin.  Does not
practically affect running time on faster devices.
2023-04-20 17:53:35 -04:00
Ashok Sidipotu
7e3b175d93 bluetooth.conf: set the export-core to true
bluetooth monitor creates bluetooth devices as well as uses the object manager
so it needs access to both the regular core and the export core.
2023-04-14 17:27:07 +00:00
Pauli Virtanen
faf98ae76e bluez: emit combine-stream for BAP device sets
For Bluetooth LE Audio device sets (e.g. pair of earbuds), bluez5-device
emits "internal" nodes for each individual device, and a combine node
for the device set.

Make the bluetooth monitor to create the combine nodes using
module-combine-stream.

Do some shenanigans to route ObjectConfig events from bluez5-device to
the correct combine node: look for combine nodes associated with device
sets, and put them as managed objects of the Spa devices.
2023-04-08 23:18:58 +03:00
Aleksandr Melman
4df905eea2 Replace ru.po 2023-04-06 08:10:33 +00:00
Viktar Vauchkevich
7235097cbe po: Update Belarusian translation 2023-03-24 18:21:50 +00:00
Pauli Virtanen
cbed93221e bluez: update configuration settings
bluez5.headset-roles is now bluez5.roles.  Fix the description of the
msbc/hw-volume/sbc-xq settings to be less confusing.
2023-03-24 18:18:49 +00:00
George Kiagiadakis
0f23fac6b7 gitlab-ci: Update all images and use latest CI templates 2023-03-24 20:01:55 +02:00
George Kiagiadakis
6d0c7f7b7f 0.4.14 2023-03-09 16:37:42 +01:00
Piotr Drąg
aaefda86f4 Update Polish translation 2023-03-04 14:37:05 +01:00
Ashok Sidipotu
b78e441c79 libcamera.lua: add support for disabling nodes
Fixes #418
2023-02-22 14:13:17 +00:00
Robert Mader
979fd59329 policy-node: do not hold references in link-error handler
Using `si` and `si_target` in the error handler results in references to
the objects getting added, keeping them alive indefinitely. Look them up
using their ids instead.

Fixes b8201d2716

Closes https://gitlab.freedesktop.org/pipewire/wireplumber/-/issues/419
2023-02-20 15:05:25 +01:00
Yuri Chornoivan
e7c394d6c2 po: Update Ukrainian translation 2023-02-16 10:48:50 +00:00
Wim Taymans
eae8d2d0b5 alsa: boost pro- profiles priority
So that they are more likely to become the driver in the graph.
2023-02-16 10:44:48 +00:00
Robert Mader
b8201d2716 policy-node: handle WpSiStandardLink link-error signal
It gets emitted e.g. on format negotiation errors. Send `-EPIPE`
errors to the respective clients to let them close the connection.
2023-02-16 10:39:31 +00:00
Robert Mader
04bf9b013e m-si-link: propagate WpLink errors
Add a new signal that gets emitted if any WpLink changes to an error
state. This allows better error handling in cases where e.g. no format
could be negotiated.
2023-02-16 10:39:31 +00:00
Julian Bouzas
c8be8d91be m-lua-scripting: increase refcount of export_core before pushing into the Lua state 2023-02-10 10:54:52 -05:00
Jürgen Benvenuti
1e8ab76d70 po: Update German translation 2023-02-06 18:31:09 +00:00
Julian Bouzas
a0e8470764 restore-stream: add default-channel-volume config option
Allows users to set a default channel volume for streams whose properties have
never been saved before.
2023-01-31 17:06:10 +00:00
Wim Taymans
11733bed4c docs: add new ACP option do docs
Add api.acp.pro-channels to set the number of channels when probing the
Pro Audio profile.
2023-01-31 16:08:24 +01:00
Pauli Virtanen
2daa2da773 bluez-midi: add property for setting latency offset 2023-01-24 17:01:20 +02:00
Pauli Virtanen
69fcdb5b69 bluez-midi: set api.glib.mainloop
Indicate to the plugin that Glib mainloop = PW mainloop.
2023-01-24 17:01:20 +02:00
Pauli Virtanen
0978c224dc scripts: add bluez-midi monitor and its configuration
Add support for BLE MIDI devices and local endpoints.

Disabled by default for now, as the feature currently faces some
DBus/SELinux policy issues e.g. on Fedora.
2023-01-24 17:01:20 +02:00
Wim Taymans
6b32ef5e64 docs: add api.acp.probe-rate docs
document the property used to configure the samplerate used when
opening the device for probing.
2023-01-12 09:35:02 +01:00
Frédéric Danis
f3e62f31db bluez: Update headset roles default value
Since PipeWire commit 2e3347e85 HSP HS role has been replaced by HFP HFP
as default headset role profile
2023-01-10 08:52:30 +01:00
Julian Bouzas
6b761c03e1 m-lua-scripting: ignore string/integer table keys when constructing a JSON Array/Object 2023-01-04 11:20:14 -05:00
Julian Bouzas
10f85549a4 spa-json: make sure we only add encoded string data
The spa_json_encode_string() API does not add a null terminator character. We
need to use the return value to know the size of the encoded string when adding
it to the builder.
2023-01-04 10:07:36 -05:00
Supreeeme
6df6e1f392 Mention wpexec in lua docs 2022-12-22 18:13:55 -05:00
Dylan Aïssi
5d9fb9f678 Fix typo: numner to number 2022-12-14 10:51:52 +01:00
Wim Taymans
f6dc1b3347 alsa-monitor: handle snd_aloop devices better
Place Loopback as the device description for snd_aloop devices.

Fixes pipewire#2214
2022-12-13 15:19:06 +01:00
George Kiagiadakis
7cb1b8b92e release 0.4.13 2022-12-13 11:39:14 +02:00
Carlos Rafael Giani
784f03d57a module-si-audio-adapter: Pass through encoded audio 2022-12-07 15:18:25 +00:00
Sanchayan Maity
217f2babdf module-si-audio-adapter: Do not set channels if parsed result is 0 2022-12-07 15:18:25 +00:00
George Kiagiadakis
98d968caa6 policy-node: rescan also when streams are removed
This is useful, for example, to cleanup monitor streams in pavucontrol
after a stream has been destroyed.

Fixes #388
See also pipewire#1840
2022-12-06 12:01:34 +02:00
George Kiagiadakis
2107e301d6 object-manager: copy the objects array in the iterator
This avoids issues when adding or removing objects while iterating.

Fixes #388
See also pipewire#1840
2022-12-06 12:01:34 +02:00
George Kiagiadakis
afda44286b tests: add unit test verifying we can remove SIs from OMs while iterating
This is a tricky case where iteration matches the last 2 objects
managed by an object manager. When we remove them while iterating,
the last object is not removed because it takes the place of the first
upon removal (side-effect of g_ptr_array_remove_fast()) and the iterator
skips it.

See #388
2022-12-06 12:01:34 +02:00
George Kiagiadakis
43ef01cf89 tests: stop using fake{sink,src} to avoid skipping tests
fakesink/fakesrc are not installed by default with pipewire;
use audiotestsrc and null-sink instead, which are always available
2022-12-06 12:01:34 +02:00
Hemish
7a808c0202 Update Hindi (hi) translation 2022-12-05 08:19:49 +00:00
George Kiagiadakis
6fd04f5267 tests: wplua: json: test json object key with spaces and special characters
Related to: #386
2022-12-05 10:13:52 +02:00
Frédéric Danis
44cdce4ac1 bluez: Add Offload SCO nodes routing sample (for PinePhone)
This script selects the correct PinePhone audio routes when the SCO
offload loopback nodes are running.
2022-12-02 11:14:28 +01:00
Frédéric Danis
3152b89e82 bluez: Add Offload SCO nodes
For offload SCO, the audio stream should be routed to/from Bluetooth
chipset via ALSA.
To do this, this commit prevent the creation of the sco-source or sco-sink
nodes, and replace them by loopback nodes.
It's up to the platform to correctly the the route to the Bluetooth chipset
ALSA entries.

When the loopback node state change to running, the script also call the
bluetoothOffloadActive param of the device to start/stop the SCO link.
2022-12-02 10:57:03 +01:00
Ashok Sidipotu
09a6881269 restore-stream.lua: do not restore the target when it is defined in node props
Fixes #335
2022-12-01 11:25:37 +00:00
Dmitry Sharshakov
a40ab8243e monitors: v4l2: allow disabling devices and nodes 2022-11-30 16:54:02 +03:00