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
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
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
Wim Taymans
d43b98e1a4
pw-cat: print errno on errors
2020-01-28 10:35:07 +01:00
Wim Taymans
525ca21ece
pw-cat: fix pw-play and pw-record names
2020-01-28 10:33:48 +01:00
Wim Taymans
37396096df
pw-cat: fill in the media-name property
2020-01-27 16:54:19 +01:00
Wim Taymans
116b13b1e2
pw-cat: relax some more checks
...
Don't really care about the format, let sndfile convert and decode
for us to the nearest supported format or else to f32. Fixes support
for ogg.
2020-01-27 16:38:35 +01:00
Wim Taymans
e1e93e5a88
pw-cat: fix s24 formats
...
Treat s24 format as s32 and let sndfile convert for us. This is
needed because using the raw read bypasses decoding in some cases.
This makes 24 bits flac work.
2020-01-27 15:47:13 +01:00
Wim Taymans
c047bab910
rename pipewire tools
...
Use the pw- prefix for all pipewire tools. This makes the
commands shorter but also avoids conflicts with password
and patchwork tools (pwcli is taken, pwconv is maybe we someday
can make).
pipewire-monitor -> pw-mon
pipewire-cli -> pw-cli
pipewire-dot -> pw-dot
pwcat -> pw-cat
2020-01-27 15:42:59 +01:00
Wim Taymans
88cd3d3f1e
pwcat: add support for WAVEX and 24 bits
2020-01-27 13:32:05 +01:00
Pantelis Antoniou
00fb00924b
pwcat: Add list-targets option
...
The --list-targets option will report on the available
targets for the --target command (and some info about it).
Example:
$ pwplay --list-targets
Available targets ("*" denotes default):
30: name="alsa_card.pci-0000:00:03.0.playback.3.0" description="Built-in Audio (HDMI 0)" prio=696
31: name="alsa_card.pci-0000:00:03.0.playback.7.0" description="Built-in Audio (HDMI 1)" prio=632
32: name="alsa_card.pci-0000:00:03.0.playback.8.0" description="Built-in Audio (HDMI 2)" prio=616
33: name="alsa_card.pci-0000:00:03.0.playback.9.0" description="Built-in Audio (HDMI 3)" prio=600
* 34: name="alsa_card.pci-0000:00:1b.0.playback.0.0" description="Built-in Audio" prio=936
Getting this working required abandoning the simple stream API, and
the resultant increase in code size.
Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
2020-01-27 12:23:33 +01:00
Pantelis Antoniou
3f11f7e505
pwcat: Fix --target option
...
The target option was not working properly. Now you can use
arbitrary nodes as targets.
Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
2020-01-27 12:23:27 +01:00
Pantelis Antoniou
f0d5d7ec09
pwcat: Add volume control option.
...
Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
2020-01-27 12:23:21 +01:00
Pantelis Antoniou
588e9562f9
pwcat: simple native playback/record tool
...
pwcat is analogous to pacat of PulseAudio which implements
both playback and recording capability.
Only wav files are supported for now, and you can use the
handy pwplay and pwrecord aliases for easy use.
Playback a wav file
$ pwplay foo.wav
Record a wav file
$ pwrecord -r 44100 -c 1 -f s16 foo.wav
Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
2020-01-27 12:23:15 +01:00
Wim Taymans
6ac9b7b3a7
spa: add spa_aprintf helper
...
Add a asprintf helper function that handles errors correctly.
Use this in places where we use asprintf to avoid warnings when we
don't check the return value.
2020-01-27 12:19:21 +01:00
Wim Taymans
043e7f24fe
add some more useful defines
...
Add define to match all ids for nodes and params.
Add define for invalid permissions
2020-01-15 11:15:51 +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
f724319e8a
context: move core implementation to impl-core.h
...
Move the core implementation to a separate file. Make a default
core object in the context.
Pass impl-core to server. We now tie the server to a core. Also
keep track of the core that a client connected to.
Fill the properties that we usually use to connect in the context
and copy them when a connection is made.
Use "internal" as the remote name to connect to the default
internal core.
2019-12-12 16:34:01 +01:00
Wim Taymans
bc0dcd2e34
pw_impl_module_load -> pw_context_load_module
2019-12-11 17:40:32 +01:00
Wim Taymans
3805d5dfa2
pw_endpoint_stream_proxy -> pw_endpoint_stream
2019-12-11 16:48:00 +01:00
Wim Taymans
9b53c65c72
pw_endpoint_proxy -> pw_endpoint
2019-12-11 16:43:53 +01:00
Wim Taymans
85103d128e
pw_session_proxy -> pw_session
2019-12-11 16:39:24 +01:00
Wim Taymans
c23006fcdb
pw_port_proxy -> pw_port
2019-12-11 15:59:26 +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
e633e205c2
pw_link_proxy -> pw_link
2019-12-11 15:11:56 +01:00
Wim Taymans
114982f3f5
pw_factory_proxy -> pw_factory
2019-12-11 15:06:00 +01:00
Wim Taymans
f1eb5f6046
pw_device_proxy -> pw_device
2019-12-11 15:00:41 +01:00
Wim Taymans
a8f1d756c3
pw_client_proxy -> pw_client
2019-12-11 14:53:39 +01:00
Wim Taymans
aa378417c2
interfaces: move proxy API into their own header files
2019-12-11 14:44:59 +01:00
Wim Taymans
443a49947e
pw_module -> pw_impl_module
2019-12-11 11:57:56 +01:00
Wim Taymans
d70a47b7fe
move proxy implementations in their own file
...
Rearrange headers
2019-12-11 10:58:51 +01:00
Wim Taymans
49d736bbb7
pw_registry_proxy -> pw_registry
2019-12-11 09:44:48 +01:00
Wim Taymans
ecc6b27cd7
rename core_proxy -> core
...
Rename core_proxy to core and move the introspect and interface
contents to core.h
In an effort to promote the proxy API.
2019-12-11 07:46:59 +01:00
Wim Taymans
8ea78c2e3f
pw_core -> pw_context
...
The proxy API is the one that we would like to expose for applications
and the other API is used internally when implementing modules or
factories.
The current pw_core object is really a context for all objects so
name it that way. It also makes it possible to rename pw_core_proxy
to pw_proxy later.
2019-12-10 18:19:56 +01:00
Wim Taymans
8917e1e149
cli: set error when connection failed
2019-12-10 16:03:19 +01:00
Wim Taymans
ca6f1bd2f1
remote: remove the remote
...
Mostly rename pw_remote_* to pw_core_proxy_*
2019-12-06 13:40:23 +01:00
Wim Taymans
8a959ea7a1
core_proxy: prepare to rename pw_remote -> pw_core_proxy
...
The pw_remote object is really a wrapper around the pw_core_proxy.
The events it emits are also available in the core proxy and are
generally awkward to use.
With some clever new pw_core_proxy_* methods and a pw_core_connect
to create the core_proxy, we can convert all code away from pw_remote.
This is a first step in this conversion, using the pw_remote behind
the scenes. It leaks into some places because it really needs to become
its own struct in a next step.
2019-12-06 11:48:40 +01:00
Wim Taymans
3f3dfbc67e
More session manager work
...
pulseaudio card is mapped to device
pulseaudio sink/source is mapped to an endpoint
prepare to map streams to card profiles
Add Route param to implement the endpoint routing later (ports)
Create an alsa endpoint for each device
Create one stream for each endpoint (Playback/Capture)
Implement create_link on the endpoint. The idea is to call
create link on the peer endpoint to complete the link. Remove
create_link on the session.
Add stream-monitor to turn pw_stream nodes into endpoints
Add a policy manager that tries to link endpoints
Use enum pw_direction for the endpoint direction. We can use the
media_class to determine if this is a pw_stream or not but it should
not really matter, you can link any output to any input.
Add autoconnect property for endpoints to make the policy connect.
2019-11-29 13:34:07 +01:00
Julian Bouzas
ef94b5c345
tools: add new pipewire-dot tool to generate a global objects dot graph
2019-11-19 15:41:50 +01:00
Wim Taymans
085f1822b9
session-manager: fix protocol
...
Add separate types for interfaces and implementation
Fix some bugs in the protocol
Add some introspection support in cli
2019-11-04 17:30:33 +01:00
George Kiagiadakis
d6dc0d0356
pipewire-cli: add support for printing endpoint info & params
...
Upstream-Status: Pending
2019-11-04 17:30:33 +01:00
Wim Taymans
128a8e6c3c
cli: add create-device command
...
Add create-device command
Add short command aliases
2019-10-21 16:00:43 +02:00
Wim Taymans
6e0ffb0c47
flags: change flag macros
...
SPA_FLAG_CHECK -> SPA_FLAG_IS_SET
SPA_FLAG_UNSET -> SPA_FLAG_CLEAR
Add SPA_FLAG_UPDATE
2019-10-02 18:00:42 +02:00