Commit graph

3341 commits

Author SHA1 Message Date
Wim Taymans
34c33ccdbf policy-node: clear target node for dont-reconnect streams
When a stream is marked don't reconnect, clear the target-node so that
it does not accidentally gets linked to a save target. This makes it
kill the monitor stream from pavucontrol after a client disconnects.
2020-12-20 12:32:54 +01:00
Wim Taymans
7ef15f3721 pw-dump: convert unknown ids to id-<hexnum> 2020-12-18 17:54:40 +01:00
Wim Taymans
abe12cf790 pw-dump: improve choice values
Place range and step values on a single line
2020-12-18 17:49:46 +01:00
Wim Taymans
f7a7feea4e pipewire-pulse: use defines for our keys 2020-12-18 17:19:24 +01:00
Wim Taymans
bcceff4ab0 module-access: update with checks for fuse like upstream xdp 2020-12-18 15:48:13 +01:00
Wim Taymans
5ea1fd3e7d impl-link: fix dependencies for feedback links
A feedback link is scheduled as a dependency from input to output
node. Make sure we also notify the client of this dependency.

Fixes #404
2020-12-18 13:10:08 +01:00
Wim Taymans
2bd5dac306 media-session: create seq-bridge after we have permissions
See #423
2020-12-18 12:04:49 +01:00
Wim Taymans
d2a5f5c1ae pulse-server: also cleanup sample when error
Remove the separate error event and merge with the done event with
error code. This then also marks the sample as done when in error
so that it gets cleaned up properly.

Fixes #486
2020-12-18 09:50:12 +01:00
Wim Taymans
1a690a0cbb pulse-server: limit writes to ringbuffer
We can't write more to the ringbuffer than its maxsize. Some clients
send more than the negotiated maxsize and cause a crash if we don't
clamp.

See #440
2020-12-17 19:39:12 +01:00
Wim Taymans
e0580fedc1 pulse-server: handle seek flags and offset
Fixes #485
2020-12-17 16:49:17 +01:00
Wim Taymans
b812dbcbf6 impl: always copy the id in param_info
Or else we will not have the right id when the flags are 0
2020-12-17 16:11:30 +01:00
Wim Taymans
f8c96167f9 impl: Only return -ENOENT when param does not exist
We checked above if the param exited and returned -ENOENT if not.
When we can't find any parameter, simply return 0.
2020-12-17 15:56:22 +01:00
Wim Taymans
724d2581f0 pw-dump: add final \n at the end 2020-12-17 15:10:43 +01:00
Wim Taymans
0e9ba69d3a pw-dump: simplify the state handling
Fixes first \n
2020-12-15 18:12:21 +01:00
Wim Taymans
5e99ff52e7 pw-dump: handle NULL in link format 2020-12-15 10:17:47 +01:00
Wim Taymans
cc31412ef3 pw-dump: handle 0 size string 2020-12-14 17:15:49 +01:00
Wim Taymans
69ea147a29 pw-dump: add optional object id 2020-12-14 16:57:09 +01:00
Wim Taymans
5e33352d5d pw-dump: escape keys and strings
Use the json escape function to escape keys and strings.
Make most put functions accept an optional key
Use flags helper for permissions as well
2020-12-14 16:46:23 +01:00
Wim Taymans
8f85e74b5d pw-dump: add colors on tty 2020-12-14 16:19:56 +01:00
Wim Taymans
3ac2bc0ad2 pod: descend in array type if possible 2020-12-14 16:18:57 +01:00
Wim Taymans
dd28937ccb pw-dump: refactor change_mask code 2020-12-14 15:42:54 +01:00
Wim Taymans
88fe2c4fb4 tools: add pw-dump tool
Dumps the complete object tree as json so that it can be processed
with tools like jq
2020-12-14 15:22:16 +01:00
Wim Taymans
00295b64b5 pulse-server: don't write too small buffers
Fixes #399
2020-12-11 18:09:21 +01:00
Wim Taymans
bcf6c0986e pulse-server: read in chunks of minreq from the ringbuffer
Don't read too large chunks from the ringbuffer but in minreq
increments. This is more what pulseaudio does.

Fixes #463
2020-12-11 12:45:01 +01:00
Wim Taymans
d3db703f77 pulse-server: improve some debug 2020-12-11 12:39:46 +01:00
Wim Taymans
4ef0ef464e pulse-server: warn for unsupported seek flags 2020-12-11 10:39:15 +01:00
Wim Taymans
bec950440b alsa-monitor: add wildcard to disable hardware-mixers 2020-12-11 10:10:05 +01:00
Wim Taymans
760a63d340 metadata: clear item before remove
Otherwise the item is overwritten with the next entry and we should
not clear it.
2020-12-09 21:18:58 +01:00
Wim Taymans
606d48a3e8 adapter: remove unused defines 2020-12-09 20:32:05 +01:00
Wim Taymans
4e7be858e4 node: Add ParamBegin/End
Use these commands to mark the begin and end of a series of Param
enumerations and configuration, like when doing format negotiation. The
idea is that the device can remain open while we do this.
Use this in adapter when negotiating a format.
2020-12-09 17:10:52 +01:00
Wim Taymans
ccfe439786 Cache node, port and device params
So that we don't need to keep asking when it didn't change.

Fixes #455
2020-12-09 17:07:34 +01:00
Wim Taymans
5469ac19ab pulse-server: map node.description to device.description
Makes Teamspeak work

Fixes #462
2020-12-08 12:20:47 +01:00
Wim Taymans
5a94bfc6cd pulse-server: add some more supported channel_map values 2020-12-07 21:52:09 +01:00
Wim Taymans
157d6de607 pulse-server: convert channel_map channels
channel_map contains pulseaudio channel names, convert them to
pipewire channel ids and then into pipewire channel names for the
null sink.
2020-12-07 20:29:22 +01:00
Wim Taymans
316a96d501 improve debug 2020-12-06 09:32:12 +01:00
Wim Taymans
203679f27e pulse-server: support lookup of monitor names
Support setting a monitor as default source.
2020-12-05 19:16:04 +01:00
Wim Taymans
cfe43cbea7 pulse-server: handle NULL as default sink/source
Fixes #444
2020-12-05 13:30:02 +01:00
Wim Taymans
8c4145291e pulse-server: name and id can't be both set in volume/mute 2020-12-05 13:27:42 +01:00
Wim Taymans
0fba936b06 pulse-server: use defines for default sink/source 2020-12-05 13:26:59 +01:00
Wim Taymans
c6663b6a18 pulse-server: fix set-port
Parse the name as a string
Pass the device id and port_id in the right properties
Return an error when unknown port was specified.

Fixes #443
2020-12-04 15:41:11 +01:00
Wim Taymans
745b7ee900 pulse-server: tweak some parameters to get lower latency 2020-12-04 15:11:35 +01:00
Wim Taymans
ecc975d089 pulse-server: make sure our buffers are large enough
Allocate the buffers a bit larger so that we can handle a client that
sends a bit more data and we don't underrun.
2020-12-04 12:16:07 +01:00
Wim Taymans
3005d33113 module-device-factory: clean up properties in all cases 2020-12-03 10:24:38 +01:00
Wim Taymans
e98931023f device-factory: save factory_name for debug later
Make a copy of the factory_name, the properties it is inside are
destroyed when the device can't be created and we still need the
name for the debug message.
2020-12-03 10:16:38 +01:00
Wim Taymans
3c2ab98a2a Add support for virtual source
A virtual source is usually implemented with a null-sink, it looks
like a source to pulseaudio clients but just forwards what it gets
as input.

Make sure the port names make sense.

You can use the null sink now as:

pactl load-module module-null-sink sink_name=source object.linger=1
     media.class=Audio/Source/Virtual channel_map=FL,FR,RL,RR

     This creates a node with "input" and "capture" ports and looks
     like a virtual source for pulseaudio clients.

pactl load-module module-null-sink sink_name=source object.linger=1
     media.class=Audio/Sink channel_map=FL,FR,RL,RR

     This creates a node with "playback" and "monitor" ports and looks
     like a virtual sink for pulseaudio clients.

pactl load-module module-null-sink sink_name=source object.linger=1
     media.class=Audio/Duplex channel_map=FL,FR,RL,RR

     This creates a node with "playback" and "capture" ports and looks
     like a virtual source and sink for pulseaudio clients.
2020-12-02 15:42:56 +01:00
Wim Taymans
e2f0ab5710 pulse-server: handle channel_map null-sink option 2020-12-02 15:39:31 +01:00
Wim Taymans
53adabea19 adapter: name Duplex port names capture/playback 2020-12-02 13:00:21 +01:00
Wim Taymans
d6127a4745 handle Duplex media class
Audio/Duplex is both a source and a sink. Name the ports as input/output
and make sure we list them in the source and sink lists in pulse-server.
2020-12-02 11:44:19 +01:00
Wim Taymans
b0a717c95e pulse-server: use right prefix for object check 2020-12-02 10:59:25 +01:00
Wim Taymans
f8059be328 adapter: small cleanup 2020-12-02 10:33:30 +01:00