Commit graph

10060 commits

Author SHA1 Message Date
Pauli Virtanen
de595a78ff bluez5: add GDBus-based object monitor framework 2023-01-24 08:27:56 +00:00
Pauli Virtanen
8d438d26ab bluez5: remove libdbus object manager wrappers 2023-01-24 08:27:56 +00:00
Pauli Virtanen
bd45f846fc bluez5: midi: refcounting and other correctness fixes
Use stdalign.h instead of union.
Fix some refcounting and return values.
Fail early in add_filters.
Minor style cleanups.
Less magical spa_dbus_async_call.
2023-01-24 08:27:56 +00:00
Pauli Virtanen
2f8691b64f bluez5: add comments on possible SELinux + BLE MIDI issues 2023-01-24 08:27:56 +00:00
Pauli Virtanen
e13fed1a80 bluez5: midi: put node nick in GATT Characteristic User Description
As server, put node nick in GATT Characteristic User Description, so
that clients have some information which endpoint is which in case we
have multiple.  This is not in BLE MIDI standard, but cannot hurt.

As client, make use of that information, if present.
2023-01-24 08:27:56 +00:00
Pauli Virtanen
2ef126885a bluez5: midi-node: implement server role 2023-01-24 08:27:56 +00:00
Pauli Virtanen
d30a0c5ee6 bluez5: add MIDI server/peripheral implementation dbus part 2023-01-24 08:27:56 +00:00
Pauli Virtanen
fe11bfdba0 bluez5: implement Bluetooth MIDI nodes
Implement BLE MIDI node, providing an input and output port.  MIDI data
received is normalized and produced on output port.  Data from input
port is converted to BLE MIDI and sent to the device.

Event timestamps come from device clock, whose offset to wall clock we
determine by correlating packet reception times with their timestamps.
The jitter in packet reception is likely much larger than device clock
error, so we average over that.
2023-01-24 08:27:56 +00:00
Pauli Virtanen
fe3ca50818 bluez5: Add BLE MIDI parser/writer tests 2023-01-24 08:27:56 +00:00
Pauli Virtanen
5d6f25e8f0 bluez5: implement BLE midi data writer 2023-01-24 08:27:56 +00:00
Pauli Virtanen
e3cf7f6d87 bluez5: implement BLE MIDI parser 2023-01-24 08:27:56 +00:00
Pauli Virtanen
931e8da3ea bluez5: implement Bluetooth MIDI device enumeration
Add monitor for enumerating connected Bluetooth MIDI devices.
2023-01-24 08:27:56 +00:00
Pauli Virtanen
a07dfbbdb9 bluez5: add convenience helper for dbus pending calls 2023-01-24 08:27:56 +00:00
Pauli Virtanen
42e463f726 bluez5: add abstraction for remote DBus objects
Add framework for enumerating remote objects via DBus object manager
interfaces.
2023-01-24 08:27:56 +00:00
Pauli Virtanen
57956ad100 bluez5: add abstraction for local DBus object manager
Add framework for exposing local objects via DBus object manager
interfaces.
2023-01-24 08:27:56 +00:00
Wim Taymans
3bfee14d7f pw-cli: add -m option to help 2023-01-24 09:14:33 +01:00
Wim Taymans
94b4fd80eb module-combine: destroy stream when unconnected 2023-01-23 18:06:07 +01:00
Wim Taymans
2db9035538 module-combine-stream: safely add/remove stream from data thread
Use invoke to sync the data thread with the main thread when adding
and removing streams.
2023-01-23 17:53:22 +01:00
Wim Taymans
29787b51ef modules: add combine-stream module
The module can:

- Make a sink that sends all or some channels to other sinks.
- Make a source that combines multiple sources into one.

The selection of what streams to combine is implemented with rules so
that the selection is very configurable. By default all Audio/Sink or
Audio/Source nodes are selected.
2023-01-23 17:06:56 +01:00
Wim Taymans
8f90446042 conf: factor out pw_conf_match_rules()
Refactor and expose the rules matching code so that it can be used
elsewhere.
2023-01-23 09:47:21 +01:00
Wim Taymans
d83f2520b6 pw-cli: silence port changes outside of monitor mode 2023-01-20 17:10:52 +01:00
Wim Taymans
74673c0862 pw-cli: suppress some output
Only print changes to object when monitoring.
Only print results from commands when interactive.
2023-01-20 16:28:50 +01:00
Wim Taymans
ca1b32393d pipewire: expose pw_impl_module_schedule_destroy()
And then remove the custom code in the example sink/source.
2023-01-20 16:10:06 +01:00
Wim Taymans
164e343dbf remove pipewire/private.h includes when possible
In many places this is not needed.
Expose pw_impl_node_set_param() for adapter.
2023-01-20 16:08:38 +01:00
Wim Taymans
ee55df9f9e alsa: add option to change the volume-method
Add option to set linear or cubic volume, cubic is now the default.
2023-01-20 10:11:49 +01:00
Wim Taymans
c7239b1f2a alsa: also use client-rt.conf for the mixer
There is no reason to use the non-rt version. It makes more sense to be
able to put all ALSA properties and rules in the same conf file.
2023-01-20 09:30:37 +01:00
Wim Taymans
eadab2ffe3 alsa: clean up volume min/max values 2023-01-20 09:29:59 +01:00
anteater
1442fa7da7 alsa: add mathlib dep 2023-01-20 08:16:50 +00:00
anteater
057a6c490b alsa: make displayed ALSA volume match PulseAudio volume
This is the same behavior as `apulse`, for example, and is more clear for users.
2023-01-20 08:16:50 +00:00
Wim Taymans
6af85f2371 alsa: fix compilation 2023-01-19 19:18:53 +01:00
Wim Taymans
e0bfd7421b alsa: improve property handling some more
Use properties from the context for matching first, then fill in some
defaults, then override with env variables.
Add property rules in ctl as well.
2023-01-19 18:15:32 +01:00
Martin Geier
98163d90df client-node: iterate the buffer datas correctly
Don't just read the first buffer data in the loop but use the loop index to
get the right one.
2023-01-19 17:22:29 +01:00
Wim Taymans
3c11772df6 alsa: rework config and properties
Place the configuration options directly into a pw_properties and use
that to connect the client and stream.
Add support for alsa.properties and alsa.rules to set default client and
stream properties based on rules.

See !1502
2023-01-19 17:12:29 +01:00
Wim Taymans
3873256211 alsa: free properties
When we simply update the properties of an existing stream, don't leak
the properties.
2023-01-19 15:32:29 +01:00
Wim Taymans
d11fb766c6 module-pipe: improve properties on nodes
Actually move the stream properties in stream.props object for the pipe
tunnel module.
Set pipe.filename on the node. Remap this to device.string in pulse.
Add some more default properties on the pipe nodes.

See #2973
2023-01-19 11:05:54 +01:00
Wim Taymans
cb8d9f38b2 stream: handle the case where io is NULL
Some older servers set the io area after starting the node and so the
node runs first without io areas, just return an error instead of
crashing.

Fixes #2964
2023-01-19 10:19:14 +01:00
Wim Taymans
1126fbd26c filter-chain: simplify a little
We can reuse the array of filenames for the single filename case
and remove some duplicate code.
Handle some errors better.
2023-01-18 18:22:34 +01:00
Wim Taymans
30057967dd module-filter-chain: fix array size 2023-01-18 18:06:19 +01:00
Wim Taymans
9d66de446b convolver: parse array from filename 2023-01-18 16:59:25 +00:00
Barnabás Pőcze
051d223d73 filter-chain: review suggestions 2023-01-18 16:59:25 +00:00
Dmitry Sharshakov
2251b9b1d9 filter-chain: allow multiple filters for convolver
Choose the closest match to reduce resampling loss. If match is not equal, resample.

Keep the backwards compatibility retaining `filename` property. When both set, `filenames` takes priority
2023-01-18 16:59:25 +00:00
Arun Raghavan
134a20c3c5 spa: Minor documentation copy-pasto fix 2023-01-18 16:59:05 +00:00
Wim Taymans
6207d98ff1 spa: add debug log context
Make a real debug context with a log function and move it to a new file.
This way we don't need to redefine a macro.
Make a new context for debugging to a log file. Make new functions to
debug to a log file.
Move the stringbuffer to string utils.
Integrate file/line/func and topics into the debug log.
We can remove some more things from the pipewire log_object function and
also add support for topics.
2023-01-18 17:51:16 +01:00
Wim Taymans
3c67821c4a spa: add context to debug functions
Add new spa_debugc_ funnctions that take a context. The user should also
redefine the spa_debugc macro to handle the context.

Use this to let some plugins log the pod and format to the log without
using the global logger.

Also use this to remove our custom pod logger function by reusing the
spa one with a custom context.
2023-01-18 13:12:16 +01:00
Wim Taymans
f472fd736d fix includes
Only include debug we need. We usually only need the debug types.
2023-01-18 13:12:16 +01:00
Wim Taymans
5e58e03da7 spa: redirect adapter log to logfile
Fixes #2923
2023-01-18 13:12:16 +01:00
Pauli Virtanen
4b408e2978 bluez5: fix reported BAP profile index 2023-01-17 20:14:14 +02:00
Pauli Virtanen
37d78ce29e bluez5: disable LE Audio if using legacy bluez API 2023-01-17 19:58:42 +02:00
Pauli Virtanen
a372c89544 bluez5: lc3: handle multiple PACs in capabilities
BlueZ may send multiple PACs in the capabilities delimited by zero LTV.
Handle this case by selecting the "best" one.

The configuration size may also for BAP generally be different from PAC
size.
2023-01-17 19:58:42 +02:00
Wim Taymans
37a5dca31e module-echo-cancel: update docs with monitor.mode property 2023-01-17 13:18:13 +01:00