Make it possible to run the session manager without endpoint
modules. Add a simple node policy that links nodes.
Move the session-manager implementation and startup of the
endpoint monitors to a separate module.
Handle async set_param on the device
This is more in line with wayland and it allows us to create new
interfaces in modules without having to add anything to the type
enum. It also removes some lookups to map type_id to readable
name in debug.
Don't pass pw_properties around when we simply need to pass around
config info, only use pw_properties when used to construct an object
that keeps the properties.
The proxy API is the one that we would like to expose for applications
and the other API is used internally when implementing modules or
factories.
The current pw_core object is really a context for all objects so
name it that way. It also makes it possible to rename pw_core_proxy
to pw_proxy later.
media-session: Wait for devices to appear and be bound before setting
the profile on the device. Then wait for all the nodes to appear
before attempting the create endpoints on the device.
Let the session manager monitor device objects as well.
Make the alsa-endpoint monitor a separate service instead of letting
the alsa-monitor call it directly. This means that it listens for
device objects and then tries to configure the endpoints when the
device profile is set to active. This does not work yet because we
can't link the nodes to the device yet because there is no way to know
what the global id is of the device we created.
Make sure implementations of objects run in a separate remote connection
because the main remote connection might block while waiting for a
return value from the implementation.
Trigger an object update after all object info is collected. We do this
by triggering a roundtrip after receiving the info event. When we get
the reply, we can assume all info is flushed. This includes the
parameters that we received.
Add a method to create a node and track the proxy. We can then
use this to track the params on a node.
Don't listen end enumerate the params in the monitors bbut let the
session do that. Use the collected params from the session to create
endpoints and streams.
Always activate the default stream on alsa nodes to create the
ports and have something we can present to apps.
Move all the media-session object monitoring into one place and
provide an API to get to the session objects.
Make API to add module specific info to objects.
Add methods to export and create objects in the session. This should
make it possible to link proxy to implementation and avoid a server
roundtrip in some cases.
pulseaudio card is mapped to device
pulseaudio sink/source is mapped to an endpoint
prepare to map streams to card profiles
Add Route param to implement the endpoint routing later (ports)
Create an alsa endpoint for each device
Create one stream for each endpoint (Playback/Capture)
Implement create_link on the endpoint. The idea is to call
create link on the peer endpoint to complete the link. Remove
create_link on the session.
Add stream-monitor to turn pw_stream nodes into endpoints
Add a policy manager that tries to link endpoints
Use enum pw_direction for the endpoint direction. We can use the
media_class to determine if this is a pw_stream or not but it should
not really matter, you can link any output to any input.
Add autoconnect property for endpoints to make the policy connect.
Separate the session manager in a monitor and policy part.
The monitor manages the devices and endpoints.
The policy watches the nodes/ports/clients and applies the policy
of linking them.
Because both now have a separate connection, we can remove some
hacks in the protocol. When a remote was both the implementer and
user of an object we could get in a deadlock when the user was
blocked waiting and the implementator was blocked sending a reply.
We used to un-busy a client when it was expecting a reply from a
ping or sync for this reason.
Add and use some more keys for the endpoints and streams.
Change node.priority to priority.session to indicate that this
is the priority that the session manager uses to select the node.
Add another priority.master that the core uses to select a master
driver. Keep the driver nodes sorted by master priority.
Let jack always prefer to connect to the master driver nodes.
Add a jack device and activate it when we release the device (for JACK
presumably). We need to work around some issues, jack does not allow
us to connect yet when it asks to release the device so we need to
wait a little and then connect.
Implement the device reservation DBus API.
When we acquire the device name, set our device profile to 'On'. This
adds our sources and sinks to the graph.
When we lose the name, switch back to 'Off' and remove our nodes
again.
Move the session mamager stuff in a directory.
Fixes#191
2019-09-30 21:51:46 +02:00
Renamed from src/examples/alsa-monitor.c (Browse further)