Commit graph

227 commits

Author SHA1 Message Date
Wim Taymans
71441565fd pulse: rework sync
Use a global sync that both syncs the globals and completes the
operations.

In the case of a card profile change, first the nodes are removed
and added and then the Profile and Route info updated. We need to
be able to bind to the new node and get the device.profile.id
before we can find the active port of the node.

See #279
2020-09-07 14:36:25 +02:00
Wim Taymans
289a8e86ca stream: move some debug to trace 2020-09-03 13:19:55 +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
4370675d2b pulse: fix crash when cleaning up signals
Also make sure the main pulseaudio binary can't be started.
2020-08-21 15:36:03 +02:00
Wim Taymans
f3c06372ef pulse: implement more directories 2020-08-21 15:35:21 +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
adfa88c961 pulse: always update and debug the error 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
cde6b99890 stream: call latency_update callback 2020-08-19 16:49:30 +02:00
Wim Taymans
5037a97690 stream: call started callback when started
.. instead of the suspended callback
2020-08-19 16:49:02 +02:00
Wim Taymans
bb323a82a7 stream: call the moved_callback when moved 2020-08-19 16:48:25 +02:00
Wim Taymans
4e17d4cdf8 pulse: don't leak device_name
Small cleanups
2020-08-19 16:47:52 +02:00
Wim Taymans
1f298cb5bf stream: guard against old timestamps 2020-08-19 16:02:52 +02:00
Wim Taymans
0c04481ba7 metadata: improve default sink/source
Only check defaults when subject is PW_ID_CORE
Handle NULL keys: remove the defaults
2020-08-18 17:56:05 +02:00
Wim Taymans
6aa6b4eac7 pulse: improve debug 2020-08-18 12:12:49 +02:00
Wim Taymans
a92d060de9 context: make sure required fields are not NULL 2020-08-18 12:11:54 +02:00
Wim Taymans
35bec2c7c4 context: also find monitor names 2020-08-18 12:11:24 +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
Wim Taymans
21e7c77e5e pulse: add symbol to check for PipeWire lib 2020-08-17 20:07:04 +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
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
9290137931 pulse: handle NULL pw_stream
The pipewire stream might have been destroyed when the pulse stream
is freed.
2020-08-04 18:20:20 +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
653465a1b1 pulse: handle device_name of NULL as error 2020-08-04 18:15:19 +02:00
Wim Taymans
979fec288e stream: let the operation emit the TERMINATED state
When we disconnect, let the operation emit the TERMINATED state
because some apps expect this state to be emited asynchronously.

Makes GStreamer pulsesink work.

Fixes #210
2020-08-04 18:13:37 +02:00
Wim Taymans
94c23b7ed1 pulse: handle memory user_data of NULL 2020-08-04 18:11:58 +02:00
Wim Taymans
35376fc415 pulse: improve debug 2020-08-04 18:07:20 +02:00
Wim Taymans
9edb0c1206 pulse: actually remember the default source 2020-08-04 17:21:15 +02:00
Wim Taymans
007c50df56 stream: clear user data on flush
Or else we might add the memory to the free list again when
we free the buffers. Fixes audacity using the pulseaudio backend
in portaudio.
2020-08-03 21:53:51 +02:00
Wim Taymans
2d76a00e20 stream: fix printf modifier 2020-08-03 09:56:37 +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
a5f85deabe pulse: also use PIPEWIRE_LATENCY as a fallback 2020-07-30 18:23:23 +02:00
Wim Taymans
aee95e76bb pulse: use the right sample spec 2020-07-30 18:22:03 +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
55bef12cda pulse: take queued data into account when asking for more
Don't use always ask for the maximum amount of data in the
write_callback but subtract the queued amount of data from it or else
we will queue too much and cause huge lag.

Fixes #258
2020-07-29 09:49:06 +02:00
Wim Taymans
c04d57d5d5 pulse: fix signedness warning 2020-07-28 16:53:13 +02:00
Wim Taymans
cb91e9c536 stream: improve flags 2020-07-28 10:49:33 +02:00