Commit graph

3366 commits

Author SHA1 Message Date
Wim Taymans
95ecbacfe0 meson: install headers in versioned paths
Make sure all headers and plugins are installed in versioned paths
so that we can parallel install versions if we want.
2020-02-05 16:28:22 +01:00
Wim Taymans
d0f69e44cd command: add -ifexists option to load-module
If the module doesn't exist, the error is ignored.
2020-02-05 13:01:13 +01:00
Wim Taymans
8b6a163233 context: set defaults as properties on the context 2020-02-05 11:50:22 +01:00
Wim Taymans
5c4be385ad jack: only append node id when name already taken 2020-02-05 10:27:37 +01:00
Wim Taymans
5ff970a62e param: add Control param
A control param contains a set of timed events that are applied
in the next cycle.
2020-02-05 10:01:14 +01:00
Wim Taymans
1404cb4182 alsa-pcm: add device to object path
Use card id and device in the object path.
2020-02-04 18:01:48 +01:00
Wim Taymans
41b47e726e context: add some more defaults
Make a property to allow mlock and use it.
mlock in stream and filter when asked to mmap mem.
2020-02-04 17:09:41 +01:00
Wim Taymans
dcec3f12b5 remote-node: safely activate and deactivate a link
Make sure we execute the admin of the target links in the data
thread.
2020-02-04 16:29:48 +01:00
Wim Taymans
8abbf653e6 pw-cat: Use default channel layout when nothing given
Make channel layout definitions a little more useful. We can now
assign them to a layout_info struct or in the raw_info.
Make some default channel layouts for use in pw-cat
2020-02-04 15:54:57 +01:00
Julian Bouzas
25e81d844a spa: add SPA_PARAM_PORT_CONFIG_control param
Needed for nodes with optional configurable control ports.
2020-02-04 13:25:25 +01:00
Wim Taymans
4bd6f5a055 examples: fix some typos and indentation errors 2020-02-04 13:02:38 +01:00
Wim Taymans
50ce87df32 node: we are supposed to produce data when != HAVE_DATA
We can produce data whenever the io area status != HAVE_DATA. We
don't need to look for NEED_DATA.
Also recycling buffer happens whenever the status != HAVE_DATA.
2020-02-04 12:59:16 +01:00
Wim Taymans
f9d6a42f63 audiotestsrc: set stride correctly 2020-02-04 12:41:43 +01:00
Julian Bouzas
a5d17ba6d1 spa: add adapter-control example to test audioadapter nodes
Example executable that runs an output audioadapter using audiotestsrc as slave
with an input audioadapter using alsa-pcm-sink as slave for easy testing.
2020-02-04 12:00:27 +01:00
Julian Bouzas
1eba8d7f74 spa: add support system so that example-control can play audio
The example-control executable does not play audio. This is because
alsa-pcm-sink needs a data system to run. This patch fixes the example by
loading a data system from libspa-support before creating the nodes.
2020-02-04 11:55:28 +01:00
Wim Taymans
1cce9a69c8 pw-cat: add channel-map option and option to delay connect
If the target node is set to 0, remove the autoconnect flag. This makes
the session manager disable stream autoconnect and some other program
needs to connect the stream to a sink or node.

Use the channelmap from the file, if available.

Add option to specify/override the channel map for playback.
2020-02-04 11:45:45 +01: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
f79dfcd77f profiler: fix method prototype 2020-02-03 16:44:09 +01:00
Wim Taymans
64391f1ed5 profiler: avoid negative times 2020-02-03 13:14:56 +01:00
Wim Taymans
a4a93a2a16 profiler: Improve profiler info
Split the profiler info into multiple properties.
Give feedback about time and logged samples while profiling.
2020-02-03 12:33:01 +01:00
Wim Taymans
bdad7d87f9 global: fix comment and use constant for core id 2020-02-03 12:32:17 +01:00
Wim Taymans
ef965dfc23 meson: install profiler extension 2020-01-31 17:59:30 +01:00
Wim Taymans
6f31a16024 pw-profiler: add some more driver measurements
Add estimated period
Add reported driver delay
2020-01-31 17:56:00 +01:00
Wim Taymans
8b303361d8 pw-profiler: avoid copying invalid values 2020-01-31 16:31:35 +01:00
Wim Taymans
afdb6586b5 pw-profiler: various improvements
Small cleanups.
Print some useful status info.
Fail when there is no Profiler API found.
Only log data from the first driver we find.
2020-01-31 16:03:05 +01:00
Wim Taymans
f7ed9a5ca7 context: clamp default qantum to min and max
When min or max is set in the config file, make sure we clamp the
default to it as well.
2020-01-31 15:49:40 +01:00
Wim Taymans
3317af804b pw-profiler: add profiler tool
Add Profiler object and fields.
Add profiler extension API. It notifies Profiler objects with
real-time performance data.
Add module that implements the profiler extension.
Add pw-profiler tool that binds to the profiler API and dumps the
data into a log file, gnuplot files, a html page and a script to
generate svg graphs. This is almost the same as what JACK2
JackEngineProfiling does.
2020-01-31 15:13:47 +01:00
Wim Taymans
5a47652dc2 node: emit driver start on completion of the graph.
This gives better info about the elapsed cycle.
2020-01-31 13:38:46 +01:00
Wim Taymans
43257e8676 graph: make pending/required fields signed
So that we can check for negative value.
Also don't signal incomplete graph when we signaled more than
expected, this can happen when we add new nodes in the current
cycle and then triggered the driver.
2020-01-31 13:36:44 +01:00
Wim Taymans
5e5bab4680 jack: don't take clock time as awake timestamp
Take a sample from the monotonic clock to generate the AWAKE
timestamp.
2020-01-31 13:35:39 +01:00
Wim Taymans
e7b5bd5e5b alsa: actually place the delay in clock.delay 2020-01-30 19:32:19 +01:00
Wim Taymans
3d8eaf8e02 ffmpeg: fix install dir 2020-01-30 17:50:45 +01:00
Wim Taymans
cd21f5292b context: emit events for driver
Make new private events to monitor the state of driver nodes. This
can be used to implement profiling.
2020-01-30 17:21:33 +01:00
Wim Taymans
9f0c5d403e node: collect sync_timeout and use smallest
Collect all sync_timeout values from the clients and use the
smallest one as the timeout.
2020-01-30 11:48:24 +01:00
Wim Taymans
65caf8832c spa: install in versioned directory
So that we can run old and new plugins side by side.
2020-01-29 15:51:41 +01:00
Wim Taymans
82e099ed37 alsa: use the card name in the object.path
The card name (id) can be configured with udev rules to remain
constant based on where the device is plugged in even when there
mulitple of the same devices.
2020-01-29 13:37:35 +01:00
Wim Taymans
898a7be9a6 autogen: make symbolic links
Make links for the pulse and jack libraries to our versions
2020-01-29 12:17:39 +01:00
Wim Taymans
7450bfd88b Improve mlock failure warning message 2020-01-29 11:07:26 +01:00
Wim Taymans
8de267cf02 jack: handle plugins that cache jack_port_get_buffer()
Some plugins (calfjackhost) only call jack_port_get_buffer()
once and cache the pointer. This behaviour has been deprecated
in JACK2 but still works.

Add a workaround for this by getting a buffer ourselves and memcpy
into it from the scratch buffer.
2020-01-29 10:29:26 +01:00
Wim Taymans
84258c9078 jack: fix set_sync_timeout
It needs to update the node activation, not the driver activation.
2020-01-28 20:49:21 +01:00
Wim Taymans
34e776a930 man: fix command names and issues ref 2020-01-28 16:09:56 +01:00
Wim Taymans
6cc180f252 0.2.93 2020-01-28 15:49:18 +01:00
Wim Taymans
b4c76ba78a policy-node: only set PortConfig when we find a format 2020-01-28 15:38:35 +01:00
Wim Taymans
d2d1647634 media-session: fix cleanup of objects
Don't free the proxy twice in some cases.
2020-01-28 15:38:11 +01:00
Fabrice Fontaine
281e61735b properties.h: include stdarg.h
Include stdarg.h to avoid a build failure on uclibc due to va_list

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2020-01-28 15:10:41 +01:00
Wim Taymans
ed13cd2ec8 pw-cli: improve help 2020-01-28 13:04:21 +01:00
Wim Taymans
1c6ce1778b pw-cli: handle NULL when iterating globals
It is possible that the global map contains holes and then the
pw_map item has NULL data.
2020-01-28 12:55:01 +01:00
Pantelis Antoniou
e258382bec pipewire-cli: Introduce an improved object dump method
The dump method can dump objects in a manner that is easy
for humans to parse and understand.

For instance a simple command (on a vanilla NUC2):

	pipewire-0>>dump -sd Device

	23: c="Audio/Device" n="alsa_card.pci-0000:00:03.0" d="Built-in Audio" a="alsa:pcm" p="hw:0" id="HDMI"
		nodes:
		24: s="suspended" i=2/128 n="api.alsa.pcm.sink/alsa_card.pci-0000:00:03.0/HDMI 0" p="alsa:pcm:hw:0,3:playback"
			ports:
			31: d="input" n="playback_FL" f="32 bit float mono audio"
			32: d="input" n="playback_FR" f="32 bit float mono audio"
		25: s="suspended" i=2/128 n="api.alsa.pcm.sink/alsa_card.pci-0000:00:03.0/HDMI 1" p="alsa:pcm:hw:0,7:playback"
			ports:
			33: d="input" n="playback_FL" f="32 bit float mono audio"
			34: d="input" n="playback_FR" f="32 bit float mono audio"
		26: s="suspended" i=2/128 n="api.alsa.pcm.sink/alsa_card.pci-0000:00:03.0/HDMI 2" p="alsa:pcm:hw:0,8:playback"
			ports:
			35: d="input" n="playback_FL" f="32 bit float mono audio"
			36: d="input" n="playback_FR" f="32 bit float mono audio"
		27: s="suspended" i=2/128 n="api.alsa.pcm.sink/alsa_card.pci-0000:00:03.0/HDMI 3" p="alsa:pcm:hw:0,9:playback"
			ports:
			37: d="input" n="playback_FL" f="32 bit float mono audio"
			38: d="input" n="playback_FR" f="32 bit float mono audio"
		43: s="suspended" i=2/128 o=2/128 n="audio.convert/api.alsa.pcm.sink/alsa_card.pci-0000:00:03.0/HDMI 0/Multimedia" p="alsa:pcm:hw:0,3:playback:Multimedia"
			ports:
			44: d="input" n="in_FL" f="32 bit float mono audio"
			45: d="output" n="out_FL" f="32 bit float mono audio"
			106: d="output" n="out_FR" f="32 bit float mono audio"
			107: d="input" n="in_FR" f="32 bit float mono audio"
		46: s="suspended" i=2/128 o=2/128 n="audio.convert/api.alsa.pcm.sink/alsa_card.pci-0000:00:03.0/HDMI 0/Navigation" p="alsa:pcm:hw:0,3:playback:Navigation"
			ports:
			47: d="input" n="in_FL" f="32 bit float mono audio"
			48: d="output" n="out_FL" f="32 bit float mono audio"
			108: d="output" n="out_FR" f="32 bit float mono audio"
			109: d="input" n="in_FR" f="32 bit float mono audio"
		49: s="suspended" i=2/128 o=2/128 n="audio.convert/api.alsa.pcm.sink/alsa_card.pci-0000:00:03.0/HDMI 0/Communication" p="alsa:pcm:hw:0,3:playback:Communication"
			ports:
			50: d="input" n="in_FL" f="32 bit float mono audio"
			51: d="output" n="out_FL" f="32 bit float mono audio"
			110: d="output" n="out_FR" f="32 bit float mono audio"
			111: d="input" n="in_FR" f="32 bit float mono audio"
		52: s="suspended" i=2/128 o=2/128 n="audio.convert/api.alsa.pcm.sink/alsa_card.pci-0000:00:03.0/HDMI 0/Emergency" p="alsa:pcm:hw:0,3:playback:Emergency"
			ports:
			53: d="input" n="in_FL" f="32 bit float mono audio"
			54: d="output" n="out_FL" f="32 bit float mono audio"
			112: d="output" n="out_FR" f="32 bit float mono audio"
			113: d="input" n="in_FR" f="32 bit float mono audio"
		55: s="suspended" i=2/128 o=2/128 n="audio.convert/api.alsa.pcm.sink/alsa_card.pci-0000:00:03.0/HDMI 1/Multimedia" p="alsa:pcm:hw:0,7:playback:Multimedia"
			ports:
			56: d="input" n="in_FL" f="32 bit float mono audio"
			57: d="output" n="out_FL" f="32 bit float mono audio"
			114: d="output" n="out_FR" f="32 bit float mono audio"
			115: d="input" n="in_FR" f="32 bit float mono audio"
		58: s="suspended" i=2/128 o=2/128 n="audio.convert/api.alsa.pcm.sink/alsa_card.pci-0000:00:03.0/HDMI 1/Navigation" p="alsa:pcm:hw:0,7:playback:Navigation"
			ports:
			59: d="input" n="in_FL" f="32 bit float mono audio"
			60: d="output" n="out_FL" f="32 bit float mono audio"
			116: d="output" n="out_FR" f="32 bit float mono audio"
			117: d="input" n="in_FR" f="32 bit float mono audio"
		61: s="suspended" i=2/128 o=2/128 n="audio.convert/api.alsa.pcm.sink/alsa_card.pci-0000:00:03.0/HDMI 1/Communication" p="alsa:pcm:hw:0,7:playback:Communication"
			ports:
			62: d="input" n="in_FL" f="32 bit float mono audio"
			63: d="output" n="out_FL" f="32 bit float mono audio"
			118: d="output" n="out_FR" f="32 bit float mono audio"
			119: d="input" n="in_FR" f="32 bit float mono audio"
		64: s="suspended" i=2/128 o=2/128 n="audio.convert/api.alsa.pcm.sink/alsa_card.pci-0000:00:03.0/HDMI 1/Emergency" p="alsa:pcm:hw:0,7:playback:Emergency"
			ports:
			65: d="input" n="in_FL" f="32 bit float mono audio"
			66: d="output" n="out_FL" f="32 bit float mono audio"
			120: d="output" n="out_FR" f="32 bit float mono audio"
			121: d="input" n="in_FR" f="32 bit float mono audio"
		67: s="suspended" i=2/128 o=2/128 n="audio.convert/api.alsa.pcm.sink/alsa_card.pci-0000:00:03.0/HDMI 2/Multimedia" p="alsa:pcm:hw:0,8:playback:Multimedia"
			ports:
			68: d="input" n="in_FL" f="32 bit float mono audio"
			69: d="output" n="out_FL" f="32 bit float mono audio"
			122: d="output" n="out_FR" f="32 bit float mono audio"
			123: d="input" n="in_FR" f="32 bit float mono audio"
		70: s="suspended" i=2/128 o=2/128 n="audio.convert/api.alsa.pcm.sink/alsa_card.pci-0000:00:03.0/HDMI 2/Navigation" p="alsa:pcm:hw:0,8:playback:Navigation"
			ports:
			71: d="input" n="in_FL" f="32 bit float mono audio"
			72: d="output" n="out_FL" f="32 bit float mono audio"
			124: d="output" n="out_FR" f="32 bit float mono audio"
			125: d="input" n="in_FR" f="32 bit float mono audio"
		73: s="suspended" i=2/128 o=2/128 n="audio.convert/api.alsa.pcm.sink/alsa_card.pci-0000:00:03.0/HDMI 2/Communication" p="alsa:pcm:hw:0,8:playback:Communication"
			ports:
			74: d="input" n="in_FL" f="32 bit float mono audio"
			75: d="output" n="out_FL" f="32 bit float mono audio"
			126: d="output" n="out_FR" f="32 bit float mono audio"
			127: d="input" n="in_FR" f="32 bit float mono audio"
		76: s="suspended" i=2/128 o=2/128 n="audio.convert/api.alsa.pcm.sink/alsa_card.pci-0000:00:03.0/HDMI 2/Emergency" p="alsa:pcm:hw:0,8:playback:Emergency"
			ports:
			77: d="input" n="in_FL" f="32 bit float mono audio"
			78: d="output" n="out_FL" f="32 bit float mono audio"
			128: d="output" n="out_FR" f="32 bit float mono audio"
			129: d="input" n="in_FR" f="32 bit float mono audio"
		79: s="suspended" i=2/128 o=2/128 n="audio.convert/api.alsa.pcm.sink/alsa_card.pci-0000:00:03.0/HDMI 3/Multimedia" p="alsa:pcm:hw:0,9:playback:Multimedia"
			ports:
			80: d="input" n="in_FL" f="32 bit float mono audio"
			81: d="output" n="out_FL" f="32 bit float mono audio"
			130: d="output" n="out_FR" f="32 bit float mono audio"
			131: d="input" n="in_FR" f="32 bit float mono audio"
		82: s="suspended" i=2/128 o=2/128 n="audio.convert/api.alsa.pcm.sink/alsa_card.pci-0000:00:03.0/HDMI 3/Navigation" p="alsa:pcm:hw:0,9:playback:Navigation"
			ports:
			83: d="input" n="in_FL" f="32 bit float mono audio"
			84: d="output" n="out_FL" f="32 bit float mono audio"
			132: d="output" n="out_FR" f="32 bit float mono audio"
			133: d="input" n="in_FR" f="32 bit float mono audio"
		85: s="suspended" i=2/128 o=2/128 n="audio.convert/api.alsa.pcm.sink/alsa_card.pci-0000:00:03.0/HDMI 3/Communication" p="alsa:pcm:hw:0,9:playback:Communication"
			ports:
			86: d="input" n="in_FL" f="32 bit float mono audio"
			87: d="output" n="out_FL" f="32 bit float mono audio"
			134: d="output" n="out_FR" f="32 bit float mono audio"
			135: d="input" n="in_FR" f="32 bit float mono audio"
		88: s="suspended" i=2/128 o=2/128 n="audio.convert/api.alsa.pcm.sink/alsa_card.pci-0000:00:03.0/HDMI 3/Emergency" p="alsa:pcm:hw:0,9:playback:Emergency"
			ports:
			89: d="input" n="in_FL" f="32 bit float mono audio"
			90: d="output" n="out_FL" f="32 bit float mono audio"
			136: d="output" n="out_FR" f="32 bit float mono audio"
			137: d="input" n="in_FR" f="32 bit float mono audio"
	28: c="Audio/Device" n="alsa_card.pci-0000:00:1b.0" d="Built-in Audio" a="alsa:pcm" p="hw:1" id="PCH"
		nodes:
		29: s="running" i=2/128 n="api.alsa.pcm.sink/alsa_card.pci-0000:00:1b.0/ALC283 Analog" p="alsa:pcm:hw:1,0:playback"
			ports:
			39: d="input" n="playback_FL" f="32 bit float mono audio"
			40: d="input" n="playback_FR" f="32 bit float mono audio"
		30: s="suspended" o=2/128 n="api.alsa.pcm.source/alsa_card.pci-0000:00:1b.0/ALC283 Analog" p="alsa:pcm:hw:1,0:capture"
			ports:
			41: d="output" n="capture_FL" f="32 bit float mono audio"
			42: d="output" n="capture_FR" f="32 bit float mono audio"
		91: s="running" i=2/128 o=2/128 n="audio.convert/api.alsa.pcm.sink/alsa_card.pci-0000:00:1b.0/ALC283 Analog/Multimedia" p="alsa:pcm:hw:1,0:playback:Multimedia"
			ports:
			92: d="input" n="in_FL" f="32 bit float mono audio"
			93: d="output" n="out_FL" f="32 bit float mono audio"
			138: d="output" n="out_FR" f="32 bit float mono audio"
			139: d="input" n="in_FR" f="32 bit float mono audio"
		94: s="suspended" i=2/128 o=2/128 n="audio.convert/api.alsa.pcm.sink/alsa_card.pci-0000:00:1b.0/ALC283 Analog/Navigation" p="alsa:pcm:hw:1,0:playback:Navigation"
			ports:
			95: d="input" n="in_FL" f="32 bit float mono audio"
			96: d="output" n="out_FL" f="32 bit float mono audio"
			140: d="output" n="out_FR" f="32 bit float mono audio"
			141: d="input" n="in_FR" f="32 bit float mono audio"
		97: s="suspended" i=2/128 o=2/128 n="audio.convert/api.alsa.pcm.sink/alsa_card.pci-0000:00:1b.0/ALC283 Analog/Communication" p="alsa:pcm:hw:1,0:playback:Communication"
			ports:
			98: d="input" n="in_FL" f="32 bit float mono audio"
			99: d="output" n="out_FL" f="32 bit float mono audio"
			142: d="output" n="out_FR" f="32 bit float mono audio"
			143: d="input" n="in_FR" f="32 bit float mono audio"
		100: s="suspended" i=2/128 o=2/128 n="audio.convert/api.alsa.pcm.sink/alsa_card.pci-0000:00:1b.0/ALC283 Analog/Emergency" p="alsa:pcm:hw:1,0:playback:Emergency"
			ports:
			101: d="input" n="in_FL" f="32 bit float mono audio"
			102: d="output" n="out_FL" f="32 bit float mono audio"
			144: d="output" n="out_FR" f="32 bit float mono audio"
			145: d="input" n="in_FR" f="32 bit float mono audio"
		103: s="suspended" i=2/128 o=2/128 n="audio.convert/api.alsa.pcm.source/alsa_card.pci-0000:00:1b.0/ALC283 Analog/Capture" p="alsa:pcm:hw:1,0:capture:Capture"
			ports:
			104: d="input" n="in_FL" f="32 bit float mono audio"
			105: d="output" n="out_FL" f="32 bit float mono audio"
			146: d="input" n="in_FR" f="32 bit float mono audio"
			147: d="output" n="out_FR" f="32 bit float mono audio"

Will dump the devices, while following to dump nodes and ports
of the nodes.

Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
2020-01-28 12:45:24 +01:00
Pantelis Antoniou
193360abe6 pipewire-cli: Immediately bind the object on creation
Immediately bind the global object upon creation. This
allows to iterate over them without having to wait for
the bind to be completed asynchronously.

Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
2020-01-28 12:45:21 +01:00
Wim Taymans
b5b3bfbe84 pw-cat: Don't set RT_PROCESS flag
The soundfile function calls are not safe to call from the real-time
thread so don't do that.
2020-01-28 10:35:29 +01:00