Commit graph

68 commits

Author SHA1 Message Date
Wim Taymans
35bec2c7c4 context: also find monitor names 2020-08-18 12:11:24 +02:00
Wim Taymans
ebc659330e pulse: also update ports after profiles
The ports have references to the profile info.
2020-08-13 16:58:40 +02:00
Wim Taymans
f058f86670 pulse: also update the profiles when the active one changes 2020-08-13 16:10:30 +02:00
Wim Taymans
374210c890 acp: add per device port list
Add the list of possible ports for a device.
Pass the allowed devices in the routes.
Store the active port in the device.

Fixes enumeration of ports on devices with UCM.
2020-08-10 14:25:03 +02:00
Wim Taymans
e71936f870 Improve naming
master -> driving
priority_master -> priority_driver
segment_master -> segment_owner
2020-08-06 13:49:33 +02:00
Wim Taymans
8e3ae33550 pulse: enable rtkit on the client 2020-08-05 17:37:17 +02:00
Wim Taymans
377b3f9d42 pulse: always load the registry
Always get the registry, even if we're not using the introspect API
we still need it to keep track of the linked devices.
2020-08-04 18:16:02 +02:00
Wim Taymans
9edb0c1206 pulse: actually remember the default source 2020-08-04 17:21:15 +02:00
Wim Taymans
0b12cc96cc pulse: remove metadata store
We don't actually need to store all the metadata, we just need to
track the default sink and source property and store the value.
2020-07-31 15:47:14 +02:00
Wim Taymans
f231392093 pulse: improve param enumeration
Use user data field in param to check for changes and only
perform a clear+enum when it changed.
2020-07-31 13:57:19 +02:00
Wim Taymans
47ce374636 pulse: refactor param enumeration 2020-07-31 13:33:28 +02:00
Wim Taymans
c7d7dd91f8 permission: add M permission
The M permission is needed to set metadata on an object.
2020-07-30 16:35:14 +02:00
Wim Taymans
f5e78196c4 pulse: check that we have access to change metadata 2020-07-30 16:23:13 +02:00
Wim Taymans
24755afee9 pulse: use format from node if available
And fall back to some defaults otherwise.
2020-07-29 14:42:29 +02:00
Wim Taymans
18b4aee677 Parse format param and store in node 2020-07-29 14:29:03 +02:00
Wim Taymans
c04d57d5d5 pulse: fix signedness warning 2020-07-28 16:53:13 +02:00
Wim Taymans
63dbf7b7b7 context: connect to given server 2020-07-23 20:12:10 +02:00
Wim Taymans
266e1301d2 use id to store default sink/source
This is easier to handle in general and we should not use the name
as a unique id. If the session manager wants to save things, it can
use whatever fields it wants from the object to create a unique
persistent name.
2020-07-23 11:59:13 +02:00
Wim Taymans
62f7da880a pulse: clean up introspection
Make sure we always first update the registry.
Call callbacks with the right return value and set the context
error on errors correctly.
Remove some old code.
2020-07-20 13:13:22 +02:00
Wim Taymans
ac97175380 pulse: don't try to do set_param when not writable 2020-07-16 13:25:03 +02:00
Wim Taymans
bf9b58e1f5 pulse: emit server change events when default sink/source change 2020-07-08 17:10:27 +02:00
Wim Taymans
6d41e17ca3 pulse: improve name of monitors 2020-07-08 16:10:45 +02:00
Wim Taymans
ee54cb96aa pulse: use metadata to store default source/sink
The metadata is implemented by the session manager and it can decide
what to do when the defaults change. It can also choose to save
(some of) the metadata to a database.

The metadata is also shared between applications so that changes can
be picked up immediately.
2020-07-07 17:09:46 +02:00
Wim Taymans
e030445e49 acp: add volume base and step
Add a READONLY property flag to makr properties READONLY
Set the base_volume and volume_step in the acp device
Send the base volume and step as REAONLY properties. Use these
in pulse layer.
2020-07-07 13:12:57 +02:00
Wim Taymans
cf8db93cd4 pod: add HARDWARE flag to spa_pod_prop
Add HARDWARE flag to mark a property that does some hardware control.
Mark the device volume/mute property as HARDWARE or not.
Use the HARDWARE property in pulse to set the right flags.
2020-07-06 17:46:32 +02:00
Wim Taymans
f30a8f6895 context: fix context_id, use the client bound id 2020-07-01 15:38:36 +02:00
Wim Taymans
813e2d22a6 context: fix sorted insert 2020-07-01 15:38:29 +02:00
Wim Taymans
34775b7577 context: use different variable to avoid confusion 2020-07-01 15:38:24 +02:00
Wim Taymans
f126501f83 context: don't enum profile/route when one is pending 2020-07-01 15:38:17 +02:00
Wim Taymans
dc7868a476 pulse: control volume on device or node
Send the mute and volume values in the route param when hw volume
is available.
Check if the route has volume/mute and then use that to control the
volume instead of them node volume.
2020-07-01 15:36:50 +02:00
Wim Taymans
ebd8695345 pulse: use route param to get/set current active routes 2020-07-01 14:02:59 +02:00
Wim Taymans
1277e6cded context: update the Profiles and Routes in the card
Update the Profile and Route information directly into the card
info. Use this info to fill the port info for the sink and sources.
2020-07-01 13:57:14 +02:00
Wim Taymans
42cc30e1ee pulse: use EnumRoute to collect and report port info 2020-07-01 13:52:25 +02:00
Wim Taymans
5feedbfd42 context: ensure the registry exists
Make sure we are watching the registry before we try to enumerate
objects.
When we wait for new object info, resync the pending operations
because they might depend on the info.
2020-06-24 19:36:47 +02:00
Wim Taymans
65798ca566 context: only set TERMINATED when -EPIPE
Other errors don't cause the connection to terminate.
2020-06-08 11:57:51 +02:00
Wim Taymans
ee5d6b4451 pulse: add more checks 2020-06-05 12:43:26 +02:00
Wim Taymans
549431e8f3 pulse: fix leaks 2020-06-04 18:26:36 +02:00
Wim Taymans
4e44da6c4b pulse: hide the pa_proplist implementation
Hide the proplist implementation.
Add some more methods to update the proplist
Make sure our integration functions only use exported symbols
so that they even work against the original pulse implementations
in case they are loaded first.

Fixes #236
2020-05-08 14:17:45 +02:00
Wim Taymans
ed2d6b2cce pulse: only find links to source or sink
Those are the only links we care about in the sink_input or
source_output info.
2020-05-03 18:49:10 +02:00
Wim Taymans
7febf7ea25 improve debug 2020-04-06 18:01:19 +02:00
Wim Taymans
c8f435ec41 pulse: also disconnect when we unlink the context 2020-04-02 15:31:20 +02:00
Wim Taymans
f51ba55dae pulse: avoid emiting the NEW event too soon
Let the NEW event be emited when all params are updated.
2020-04-02 15:30:15 +02:00
Wim Taymans
4346cad322 pulse: improve debug of events 2020-04-02 15:28:24 +02:00
Wim Taymans
272fd4bd9f pulse: improve pa_operation compatibility
Methods that return a pa_operation should not return NULL.

pa_context_success_cb_t should return 1 on success and 0 on failure
with the error set in the context.

When a global is not found, let the info operation return eol = -1
with the error set in the context.
2020-02-03 16:44:50 +01:00
Wim Taymans
3dbcc7808c pulse: don't use endpoints
Revert back to using nodes, ports and devices. Let's first get this
stable until we add endpoints in the mix.
2020-01-13 11:44:55 +01:00
Wim Taymans
f391353c7f Make interface types a string
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.
2019-12-19 13:36:04 +01:00
Wim Taymans
9b53c65c72 pw_endpoint_proxy -> pw_endpoint 2019-12-11 16:43:53 +01:00
Wim Taymans
beb3c69dfe pw_node_proxy -> pw_node 2019-12-11 15:26:11 +01:00
Wim Taymans
199fa47216 pw_module_proxy -> pw_module 2019-12-11 15:16:30 +01:00
Wim Taymans
f1eb5f6046 pw_device_proxy -> pw_device 2019-12-11 15:00:41 +01:00