Gleb Popov
af5ba6cf4c
Define ENODATA if it isn't defined.
2021-02-24 19:29:57 +00:00
Wim Taymans
6f26210361
media-session: simplify routing a bit
...
1) detect port changes
2) restore or save port changes
3) if port changes:
check and restore the best profile
else check and restore the best ports
4) if profile changed, check and restore best ports
See #533
See #708
2021-02-24 20:28:21 +01:00
Wim Taymans
27f85d1f52
tools: remove registry listener before destroying
...
Otherwise we access freed memory when we try to remove
the listener later.
2021-02-24 14:58:20 +01:00
Wim Taymans
72acd752f6
pulse-server: don't use the pending_sample after free
...
Destroying the sample_play will free the user_data, which is the
pending_sample info. So don't try to use the pending_sample anymore
after destroy.
2021-02-24 12:55:34 +01:00
Wim Taymans
1f2cb7ac67
don't crash with missing libraries
2021-02-23 17:48:57 +01:00
George Kiagiadakis
012a68f8ef
systemd: add unit files for pipewire-media-session
...
... and disable starting it from context.exec in the config
2021-02-23 16:21:59 +00:00
George Kiagiadakis
3a7ce9660a
meson: add option to enable/disable media-session
2021-02-23 16:21:59 +00:00
George Kiagiadakis
b7c6f70ae3
systemd: add sandboxing also for the system service
...
Based on dd1bf796cb
and https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/blob/master/src/daemon/systemd/user/pulseaudio.service.in
See also: #763
2021-02-23 16:21:59 +00:00
Wim Taymans
d54da879bf
jack: add config option to shorten and filter names
2021-02-23 16:13:08 +01:00
Wim Taymans
43f8f39d3a
pulse-server: move some config params to config file
...
Also make the minreq/fragsize larger by default.
2021-02-23 14:57:45 +01:00
Wim Taymans
8712cfb6a1
pulse-server: remove MIN_BLOCK
...
It is not really used and minreq is good enough
2021-02-23 12:29:39 +01:00
Wim Taymans
ab45b16a05
media-session: improve routing
...
First check all the routes to see if anything changed. If there is
a change check if we need a profile switch.
Then check all the active routes and restore state when they changed.
2021-02-23 11:09:42 +01:00
Wim Taymans
3b0fcdd525
media-session: don't save invalid route properties
...
When we switch away from a route, don't save the properties.
2021-02-22 17:47:04 +01:00
Wim Taymans
8414092763
Rework profile/route handling
...
Add save property to Profile and Route params to notify the session
manager that they should be saved. Let the session manager only save
the Profile and Routes with the save flag.
Make pulse-server set the save flag on Profile and Route changes.
The result is that we can make a difference between user requested
changes and automatical changes and only remember the user preferences.
When a port changes availability, first check if we need to perform
a profile switch, if not select the new best port.
2021-02-22 16:51:59 +01:00
Wim Taymans
5ae92fd643
media-session: Fix saved_profile check
...
ID_INVALID is when the profile was not saved.
2021-02-22 10:54:55 +01:00
Wim Taymans
1c3a17362e
pulse-server: fix weird property handling
...
There is no need to copy the properties, just pass ownership.
Make sure to always have properties for the server. Ensure we
clean up properties on error.
2021-02-21 09:43:02 +01:00
Wim Taymans
fa39cae9d3
pulse-server: we can add stream.properties as well
2021-02-20 21:06:47 +01:00
Wim Taymans
5738cb74ef
Add filter and stream properties
...
Mostly latency but also adapter properties for streams.
2021-02-20 21:03:38 +01:00
Wim Taymans
149319819a
jack: apply PIPEWIRE_PROPS after reading config
...
First apply config properties, then PIPEWIRE_PROPS.
We can set the node.latency in jack.conf
2021-02-20 21:02:05 +01:00
Wim Taymans
71e37f93f3
PIPEWIRE_LATENCY always overrides app settings
2021-02-20 20:59:41 +01:00
Wim Taymans
3673265ae2
policy-node: don't crash without metadata
2021-02-19 17:54:31 +01:00
Wim Taymans
72e03e3dc8
media-session: add -c option to load custom config
2021-02-19 17:48:27 +01:00
Wim Taymans
91875c1fd8
pw-cli: always output to stdout
...
Use spa_debug_pod because spa_debug_format outputs to stderr
2021-02-19 16:42:21 +01:00
Wim Taymans
fcf00b3d35
pulse-server: handle unsupported formats
...
We can only handle PCM encodings for now, fail conversion otherwise.
If we have no supported formats, return an error code.
VLC first try to send AC3 or EAC3 passthrough and then tries again
with decoded data. If we accept the encoded data we are just playing
noise.
Fixes #428
2021-02-19 15:25:32 +01:00
Wim Taymans
4b591df145
pulse-server: print encoding name in format_info
2021-02-19 14:57:11 +01:00
Wim Taymans
686524ce40
context: use the log.level from the config file
...
Use log.level from the config file if not otherwise set with
PIPEWIRE_DEBUG env.
Make client log.level = 0 by default to avoid spamming the console
with errors.
Fixes #725
Fixes #769
2021-02-19 12:44:03 +01:00
Wim Taymans
08ea7d5cd6
properties: ignore some property updates
...
Ignore property updates for keys that we manage ourselves like the
object.id, node.id etc. Otherwise a client can replace this with
their local ids and cause confusion.
2021-02-19 11:43:46 +01:00
Bryan Quigley
dd1bf796cb
systemd: add sandboxing and slice similar to pulseaudio
...
Adds as much sandboxing as seems to work with user sessions.
Adds pipewire to session slice per https://systemd.io/DESKTOP_ENVIRONMENTS/
Inspired from https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/blob/master/src/daemon/systemd/user/pulseaudio.service.in
Fixes: 763
2021-02-19 09:08:51 +00:00
Wim Taymans
84fc63e601
media-session: don't switch to pro-audio by default
...
Ignore the pro-audio profile when finding the best profile. We only
want to enable the profile when explicitly set.
Fixes #761
2021-02-18 19:51:00 +01:00
Wim Taymans
250a10cd63
conf: put "" around string with potential special chars
2021-02-18 17:21:29 +01:00
Wim Taymans
63a3811aa7
fix some warnings
2021-02-18 12:42:06 +01:00
Pauli Virtanen
2efdb78239
media-session: save and restore latencyOffsetNsec
2021-02-18 11:33:45 +00:00
Pauli Virtanen
ed9614077c
pulse-server: implement node latency offset
...
Also add facility for storing user data on objects.
2021-02-18 11:33:45 +00:00
Wim Taymans
7053936ffd
don't attempt to connect to empty remote name
...
Fixes jconvolver startup.
See #744
2021-02-18 10:22:39 +01:00
Wim Taymans
81ebc33b57
pw-top: period -> quantum
...
period has other connotations in alsa
2021-02-18 09:16:49 +01:00
Wim Taymans
c0d8edeb5a
conf: improve state directory access checks
...
We only need RW permission on the last directory.
2021-02-17 20:21:14 +01:00
Wim Taymans
bf062e455a
media-session: always remember the new route availability
2021-02-17 15:49:20 +01:00
Wim Taymans
aea79cd79c
media-session: sanitize description
...
Because we use the description as the JACK name, remove the : so
that it looks somewhat ok in more cases.
2021-02-17 13:12:22 +01:00
Wim Taymans
60233e30a7
jack: tweak names a little
...
Move the Description in the main node/port name. This then matches
the device names seen in pavucontrol.
Make the port alias contain the node nick.
2021-02-17 11:36:16 +01:00
Wim Taymans
1f2ba4b55f
port: set port id in properties
2021-02-17 11:15:08 +01:00
Wim Taymans
38a7333608
adapter: number unknown ports from 1 instead of 0
...
This makes it like what jack does.
2021-02-17 10:14:47 +01:00
Wim Taymans
3aa0a39e30
pulse-server: track volume/mute changes
...
When something else changes the volume of our stream, store the new
value in our volume/mute state so that we always have an up-to-date
value when we compare our volume to the desired volume.
See #721
2021-02-16 17:21:26 +01:00
Wim Taymans
6079830591
media-session: add option to configure suspend timeout
...
Set the property on the node and use the value when suspending the
node. a timeout of 0 disables suspend.
2021-02-16 15:41:53 +01:00
Wim Taymans
af686653a9
jack: add option to merge monitors
...
Make a different name for the monitor port prefix so that they
appear as different clients.
Add an option to restore the previous behaviour.
See #736
2021-02-16 13:23:47 +01:00
Wim Taymans
d1f21a939a
context: make method to get config section
...
Applications will likely need a section of the config, not the
whole thing.
2021-02-16 13:22:42 +01:00
Frédéric Danis
0b2d3730b6
bluez5: Add HFP HF support
2021-02-15 14:46:18 +00:00
Wim Taymans
7ba9044c3d
Revert "media-session: fix sm_object ownership"
...
This reverts commit 791a38f3fa .
2021-02-15 15:28:42 +01:00
Wim Taymans
a85be79135
Revert "media-session: when resolving duplicate objects, bind a proxy if missing"
...
This reverts commit 77e4fdb1e4 .
2021-02-15 15:28:35 +01:00
Wim Taymans
373fd53d2e
conf: fix audioconvert regex
2021-02-13 20:38:02 +01:00
Ivan
7e7f0225d4
style: Format and fix config files
...
Some minor formatting for recently added config files.
2021-02-13 19:20:10 +00:00