Commit graph

63 commits

Author SHA1 Message Date
Wim Taymans
60df925dfd pulse: set monitor as device.class for monitor sources 2020-09-30 10:14:04 +02:00
Wim Taymans
5dedf483bb pulse: fix load_module 2020-09-28 16:05:10 +02:00
Wim Taymans
023281fd0b pulse: parse and fill up the array of formats
A sink and source can have an array of pa_format_info structures
that contain the possible formats of the device. Parse them from
the EnumFormat and return them when introspecting.
2020-09-17 16:34:18 +02:00
Wim Taymans
1f9b0c75b7 pulse: always use the default pulse channel map
This causes the least surprises when the channelmap is not
propagated correctly from pipewire.
2020-09-17 12:37:57 +02:00
Wim Taymans
310ed89aad context: match wildcards @DEFAULT_SINK/SOURCE/MONITOR@
See #291
2020-09-14 13:21:39 +02:00
Wim Taymans
67f4acaf1d pulse: try hard to always create a valid channel map
Unknown channel names are mapped to aux channels.
Add extra AUX channels when we don't know the channel layout.
This makes sure apps always receive valid channel layouts so they
don't abort (pactl).
2020-09-14 11:06:11 +02:00
Wim Taymans
af64666716 pulse: call operation_done at end of callback 2020-09-09 13:48:01 +02:00
Wim Taymans
a477e39de2 pulse: improve debug 2020-09-09 13:47:20 +02:00
Wim Taymans
0720eb2aeb introspect: fix sink monitor name 2020-08-21 17:27:14 +02:00
Wim Taymans
0b588b2bfd pulse: track loaded modules
Track the proxies we load in a module_info and free the proxy
on unload or exit.
2020-08-21 15:40:19 +02:00
Wim Taymans
157b15d643 pulse: implement load_module of null-sink
Implement load_module of the null sink
Keep track of sink_input/source_output linked sink/source in a
better way.
Associate the global with our streams and the streams with the
global.
Don't emit the sink_input/source_output before there is a linked device
and before our stream is READY.
Improve server info to make it more look like pulse.
2020-08-20 18:00:00 +02:00
Wim Taymans
7cdc36d506 pulse: DSP -> MONITOR 2020-08-20 18:00:00 +02:00
Wim Taymans
120090741a pulse: return NOENTITY when an item was not found
It's possible that the object was removed right after doing the call, in
that case we need to return NOENTITY because apps handle this
gracefully.
2020-08-19 17:03:44 +02:00
Wim Taymans
fa66bf8187 pulse: use device.api property to mark HARDWARE
Check if there is a device.api property on the sink/source and
if there is, mark the sink/source as a hardware device.
2020-08-17 20:57:32 +02:00
Emmanuel Gil Peyrot
14fdf07e8f Run codespell on the entire codebase
This tool detects and fixes common English spelling mistakes, with
generally very few mistakes.

Here is the command I used to generate this commit.  There were a few
changes that had to be done manually, and of course adding the ignore
file:
```shell
codespell -I .codespell-ignore -x .codespell-ignore -w
```

I didn’t add it to the CI, but this would be a good place for it.
2020-08-17 17:16:31 +00:00
Wim Taymans
451fee2208 pulse: implement some more extensions
Most just return nothing or say that the extension is not supported.
Remove some warnings, they should show up in the log from setting
the error in the context.
2020-08-17 17:40:34 +02:00
Wim Taymans
62cea9c6d5 pulse: implement some more methods
Makes paman work
2020-08-17 17:22:14 +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
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
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
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
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
ff876bf58e introspect: set metadata type as well 2020-07-20 14:40:34 +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
246ad5fb37 introspect: set target node as property
Use the metadata to tag streams with the desired target node.
2020-07-20 11:26:32 +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
d3748ef254 introspect: fix default source/sink 2020-07-01 15:38:42 +02:00
Wim Taymans
f30a8f6895 context: fix context_id, use the client bound id 2020-07-01 15:38:36 +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
9ad2732405 pulse: handle volume and mute with the Route params
Update the device volume with properties from the Route param is
available.
Rework pulse a little to make sure we have all the globals ready
before performing the operation.
Update the volume/mute in the device route
2020-07-01 15:31:19 +02:00
Wim Taymans
4d7d9484e6 pulse: use route param to set current active ports 2020-07-01 15:24:50 +02:00
Wim Taymans
2bffb3561f pulse: handle error from volume set 2020-07-01 15:20:32 +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
698509ef55 alsa: set classes in the profile
parse classes in the pulse layer
2020-07-01 13:39:10 +02:00
Wim Taymans
03cef06dd2 pulse: improve introspect of profile availability 2020-07-01 13:27:20 +02:00
Wim Taymans
f79f0de681 introspect: improve card info 2020-07-01 13:24:57 +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
George Kiagiadakis
715be5dfe7 pulse: fix counter while populating card_info profiles 2020-06-18 10:01:47 +02:00
Wim Taymans
ba57de9b81 pulse: fix size calculation 2020-06-17 16:56:40 +02:00
George Kiagiadakis
9c8279aa6e pulse: fix pa_card_info.profiles2 array to be NULL terminated
profiles2 is meant to be NULL terminated, according to its documentation
Fixes a crash in pavucontrol-qt
2020-06-17 17:17:51 +03:00
Wim Taymans
7febf7ea25 improve debug 2020-04-06 18:01:19 +02:00
Wim Taymans
a5b0553328 Fix some -Wenum-conversion errors
Make pw_direction and spa_direction the same
Explicitly cast some enums or use the right enums
2020-04-04 20:03:08 +02:00