Commit graph

1203 commits

Author SHA1 Message Date
Julian Bouzas
e1faf3f095 si-standard-link: configure the format in WpSiAdapters before linking 2021-05-12 10:37:18 -04:00
Julian Bouzas
9cf1f94045 modules: implement WpSiAdapter in si-audio-adapter and si-audio-endpoint 2021-05-12 10:37:15 -04:00
Julian Bouzas
51964d30cf si-interfaces: add WpSiAdapter interface to set and get session item fortmat 2021-05-12 10:36:31 -04:00
Julian Bouzas
a37b4bf20d session-item: add _get_property API 2021-05-12 10:36:31 -04:00
Julian Bouzas
05aba22c5a si-audio-adapter: remove unneeded 'preferred.n.channels' property 2021-05-12 10:36:24 -04:00
Julian Bouzas
47ae4f28a3 si-standard-link: make sure create_links creates at least 1 link 2021-05-11 10:56:50 -04:00
Julian Bouzas
888667d784 modules: remove role and priority properties from si-audio-adapter and si-node 2021-05-11 10:56:50 -04:00
Julian Bouzas
d68636f9b3 si-interfaces: rename WpSiPortInfo to WpSiLinkable 2021-05-11 10:56:44 -04:00
Julian Bouzas
ee121e3093 scripts: cleaned and improved policy scripts
The policy scripts can handle now client nodes that want to be linked with other
client nodes. This is needed for nodes created by the Pulse Audio Volume Control
to monitor audio comming from other application client nodes.
2021-05-10 15:24:40 -04:00
Julian Bouzas
b46a907df4 create-item.lua: always enable monitor ports by default 2021-05-10 15:19:25 -04:00
Julian Bouzas
3f60716f30 modules: remove 'monitor' port context from si-audio-adapter and si-node 2021-05-10 15:19:25 -04:00
George Kiagiadakis
ecef960b78 release 0.3.95 2021-05-07 13:34:01 +03:00
George Kiagiadakis
ed6184a773 meson: depend on pipewire 0.3.26
Not really a hard requirement, wrt libpipewire API, but it's
hard to keep runtime compatibility with earlier versions when
it comes to configuration options
2021-05-07 12:14:43 +03:00
George Kiagiadakis
c0099a99d6 config: bluez: update to match media-session's bluez-monitor.conf 2021-05-07 12:10:31 +03:00
George Kiagiadakis
fc5aa7db1f lua: rename Plugin() to Plugin.find()
Plugin() is confusing because it's not a constructor, it just finds
an existing instance of a plugin object. All other camel-case
functions are constructors in the current lua API.
2021-05-07 11:53:47 +03:00
Julian Bouzas
e4d8f2a2df session-item: remove undefined API 2021-05-06 13:41:42 -04:00
George Kiagiadakis
a93dbf0845 wp: remove WpSessionBin
This is no longer used and likely not very useful now that we have
a simpler design.
We can re-add it in the future if necessary, but let's keep it out
of the 0.4 release.
2021-05-06 16:04:39 +03:00
George Kiagiadakis
257d5cba47 wp: rename debug.{h,c} to log.{h,c}
Also rename the intermediate lua api table WpDebug -> WpLog

Keeps things more consistent with the function names (wp_log*),
with the lua api (Log.*) and with pipewire using log.{h,c} as well.
After all, these functions are for logging...
2021-05-06 15:50:07 +03:00
George Kiagiadakis
157d4d95c9 config: disable ipc module by default and move it to the main instance
This is not part of the policy, it's something standalone that writes metadata

Needs to be disabled by default, since it's not built by default now
2021-05-06 15:19:55 +03:00
George Kiagiadakis
86ffac19e5 wpipc: place sockets in the same runtime directory as pipewire 2021-05-06 14:15:24 +03:00
George Kiagiadakis
a555d72cff m-ipc: cleanup server using g_clear_pointer() for consistency and safety 2021-05-06 13:33:48 +03:00
George Kiagiadakis
cf0226c29b wpipc: remove socket files after shutdown of the server 2021-05-06 13:32:38 +03:00
George Kiagiadakis
c35a58ca7b meson: generate and install pkg-config file for wpipc 2021-05-06 13:06:49 +03:00
George Kiagiadakis
226ae5772e meson: find threads_dep early and also use it in the wpipc-client 2021-05-06 13:00:55 +03:00
George Kiagiadakis
a2477d2d2c wpipc: use proper api & so versions 2021-05-06 12:34:49 +03:00
George Kiagiadakis
cb4fa024b2 meson: replace join_paths() with operator / 2021-05-06 12:15:52 +03:00
George Kiagiadakis
d4b230b994 meson: remove audiofade pipewire branch check
We no longer have the audiofade-related code
2021-05-06 12:04:22 +03:00
George Kiagiadakis
5efb46a3e2 meson: make wpipc optional and disabled by default
This is only intended to be used with specific embedded
applications. There is no good reason to use it on
a standard desktop environment.
2021-05-06 12:00:56 +03:00
George Kiagiadakis
272022b8ea policy-node: accept node names or paths in a stream's node.target property 2021-05-05 18:26:16 +03:00
Julian Bouzas
48b4f00d8c policy-endpoint-client-links.lua: consider 'suspend.playback' metadata 2021-05-04 19:52:14 -04:00
Julian Bouzas
207268e189 modules: add ipc module
Handles SUSPEND and RESUME wpipc requests in order to set metadata that will
eventually unlink or re-link endpoints.
2021-05-04 19:52:09 -04:00
Julian Bouzas
795df4b693 lib: add wpipc library
Simple library that uses sockets for inter-process communication. It provides an
API to create server and client objects. Users can add custom handlers in the
server, and clients can send requests for those custom handlers.
2021-05-04 18:55:10 -04:00
George Kiagiadakis
28a4229681 config: unify config and config-split
After all, we can just load multiple lua config files/directories
from a single .conf file and so have both styles available for the
user to choose at runtime
2021-04-27 19:50:38 +03:00
George Kiagiadakis
14f4337cdb systemd: add templated systemd unit files
These allow running multiple instances of wireplumber with
different config files. The config file is denoted on the service
name, ex: wireplumber@bluetooth loads bluetooth.conf
2021-04-27 19:06:08 +03:00
George Kiagiadakis
4f79bccbe8 policy-endpoint: implement volume ducking 2021-04-26 18:31:19 +03:00
George Kiagiadakis
07a8b5035e m-mixer-api: track monitorVolumes and allow modifying them
This only applies to non-device nodes, because monitorVolumes
are not exposed on device Routes
2021-04-26 17:35:32 +03:00
George Kiagiadakis
42e75028d2 access: add a more generic "default" access policy script
Configurable. Replaces the "flatpak" access policy.
2021-04-26 16:56:17 +03:00
George Kiagiadakis
c7ff629f99 config: add an example of split-instance configuration
This configuration allows splitting wireplumber into multiple instances.
The "main" instance takes care of loading and managing devices
The "policy" instance does all the linking and implements endpoints
The "bluetooth" instance runs the bluetooth devices & nodes

Test with (in separate terminals):
./wp-uninstalled.sh -c config-split -- wireplumber -c main.conf
./wp-uninstalled.sh -c config-split -- wireplumber -c policy.conf
./wp-uninstalled.sh -c config-split -- wireplumber -c bluetooth.conf
2021-04-26 10:02:27 +03:00
George Kiagiadakis
3b144fa9ca Add a wp-uninstalled.sh script for easily running programs uninstalled
Similar to pw-uninstalled.sh, but without an interactive shell
2021-04-26 09:59:33 +03:00
George Kiagiadakis
c2834ea344 lua: remove the ability to specify spa_libs in the lua config
This is not useful, we can do this on the pipewire-style config files
2021-04-22 17:44:17 +03:00
George Kiagiadakis
af9b9a84f0 daemon: init export core in the daemon and share it with modules
Also, use a context property to control whether to enable this core
or not and enable it only in the daemon
2021-04-22 15:07:47 +03:00
George Kiagiadakis
b46587393c lua: change the "wireplumber.interactive" property to "wireplumber.daemon"
with inverted semantics
2021-04-22 13:48:06 +03:00
George Kiagiadakis
9c8e5b3081 daemon: Use a pipewire-style config file to load initial configuration
This allows configuring:
* the scripting engine, in case we ever add another one
* the app name, so that we can distinguish multiple instances
  of wireplumber
* the log level in the same way as pipewire
* wireplumber components to load. This allows loading components
  even without a scripting engine (for a mimimal daemon) and also
  allows configuring which lua config file(s) to load
* additional pw_context properties that pipewire modules may be using
* the exact pipewire modules to load (instead of relying on client.conf)
2021-04-22 13:28:58 +03:00
George Kiagiadakis
6939d8900a core: use log.level from the pw_context
And don't override PIPEWIRE_DEBUG, unless WIREPLUMBER_DEBUG is set.
This allows pipewire to use log.level as well to set up its logging.

If WIREPLUMBER_DEBUG is set, though, override PIPEWIRE_DEBUG to prevent
log.level from being used.
2021-04-21 19:03:47 +03:00
George Kiagiadakis
61876a97b9 log: factor out the log level configuration into wp_log_level_set()
Initialize the log level with WIREPLUMBER_DEBUG in wp_init()
2021-04-21 13:49:03 +03:00
George Kiagiadakis
bc1413e1cd audio-endpoint: configure adapter for null sink with monitor.channel-volumes
This allows the channelVolumes and mute props to affect the output
of the null sink's monitor ports. This way we will be able to use
channelVolumes to track the configured volume of the endpoint
and the monitorVolumes to implement volume ducking.
2021-04-19 11:08:17 +03:00
George Kiagiadakis
44c96b6c49 impl-node: implement WpPipewireObject
This fixes adjusting volume for bluetooth nodes.
Previously, the spa device would request a software volume change
that we did not handle because WpImplNode was not a WpPipewireObject
and there was no way to set the Props param on it.
2021-04-16 20:02:54 +03:00
George Kiagiadakis
9b74fbc6ac device: debug and enhance spa device event handling 2021-04-16 20:01:56 +03:00
George Kiagiadakis
fdac497f0b config: policy: improve the endpoints & roles example config 2021-04-15 18:18:13 +03:00
George Kiagiadakis
d1da39b4f6 policy-endpoint-client: remove handling of move & follow and endpoint priorities
These don't make much sense here. In the endpoint policy we want
the clients to be linked to the endpoint that matches their role
and never move.

Also, endpoint priorities are useless. If no endpoint matches the
role, then just ignore the client.
2021-04-15 18:14:25 +03:00