Commit graph

8 commits

Author SHA1 Message Date
Wim Taymans
7bce1762de alsa-endpoint: set param on node 2019-11-29 13:34:08 +01:00
Wim Taymans
3cd7d90d88 media-session: link all stream ports
Create a helper in the session manager to link all ports between
2 nodes.

Make the output endpoint call the input endpoint create_link, passing
the node or ports to link to.

Make the input endpoint complete the link by calling the session
helper to link all ports.

Remove the node policy, we're only using a policy for the endpoints
now.
2019-11-29 13:34:07 +01:00
Wim Taymans
161cf46898 media-session: add media session helpers
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.
2019-11-29 13:34:07 +01:00
Wim Taymans
3f3dfbc67e More session manager work
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.
2019-11-29 13:34:07 +01:00
Wim Taymans
3c51f559ef elsa-endpoint: include asoundlib first 2019-11-18 10:40:50 +01:00
Wim Taymans
4ad7ce3aa2 session-manager: split policy and monitor
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.
2019-11-07 16:03:00 +01:00
Wim Taymans
60cd74fdb0 alsa: set MEDIA_CLASS in nodes 2019-11-05 16:34:12 +01:00
Wim Taymans
8409e8be49 endpoint: make endpoints of alsa devices
Make one endpoint for each device
Make a stream for each node
2019-11-04 17:30:33 +01:00