Wim Taymans
c0ed88f2f9
media-session: always try to activate the saved profile
...
When the current profile is not the saved profile, check if the
saved profile is available again and try to activate it.
2021-01-28 16:56:27 +01:00
Wim Taymans
f03deb5324
media-session: try to avoid switching away from hdmi
...
When HDMI goes to sleep the profile becomes unavailable. Avoid
switching to Off in that case.
2021-01-28 15:41:14 +01:00
Wim Taymans
fc08c79dad
media-session: start timeout only when something changed
2021-01-28 14:36:29 +01:00
Wim Taymans
072d3a191c
media-session: keep track of all active routes
...
Keep track of active profile in default-routes so that we can restore
the prefered routes later.
Keep track of all active routes in an array. There can be more than
one active route per direction.
New routes will get their volume restored. Route changes will be saved.
2021-01-28 14:28:46 +01:00
Wim Taymans
b8bac95dad
media-session: add info logging to profile restore logic
2021-01-28 11:43:17 +01:00
Wim Taymans
5dc2a7b793
policy-node: reverse config direction for virtual devices
...
For a virtual source we want to configure it like a sink with
input ports and the monitor ports as the capture ports.
2021-01-27 16:27:06 +01:00
Wim Taymans
295cba8404
policy-node: a virtual source is an output node
2021-01-27 16:14:39 +01:00
Wim Taymans
82bc0710f0
media-session: use a default volume if unknown
...
Set a safe volume when there is no previously saved volume.
2021-01-27 15:44:52 +01:00
Wim Taymans
0be851739f
improve config parsing
...
Use get_string to get object keys in a more generic way.
2021-01-27 15:36:32 +01:00
Wim Taymans
585f533d27
media-session: move profile selection to media-session
...
Disable automatic profile selection in the acp device
Implement selection of profiles in the default-profile module
2021-01-27 13:48:10 +01:00
Wim Taymans
cf35e52586
media-session: use the right define for the bitmask
2021-01-27 13:48:10 +01:00
Wim Taymans
c95bd1c3d4
media-session: avoid restoring an unavailable profile
2021-01-25 16:00:20 +01:00
Wim Taymans
98a3527685
media-session: init current_profile to invalid
...
So that we can detect a switch..
2021-01-25 15:53:54 +01:00
Wim Taymans
39f082fc86
default-profile: don't try to restore bluetooth profiles
2021-01-25 13:17:22 +01:00
Wim Taymans
3366eeb65e
media-session: restore route volumes
...
Follow the active input/output routes. If the route changes, restore
the previously saved settings. If only the properties change, save
them to be restored later.
Fixes #402
2021-01-25 12:11:16 +01:00
Wim Taymans
2c4c78c51e
media-session: add alsa.jack-device property to alsa-monitor
2021-01-20 13:48:06 +01:00
Wim Taymans
8f80a2bc15
media-session: handle key == NULL
...
The key can be null when the metadata subject is removed.
2021-01-19 17:01:24 +01:00
Wim Taymans
579e8a4ea6
json: allocate one extra byte for the \0
2021-01-19 16:56:55 +01:00
Wim Taymans
8c84c96fe1
daemon: add support for mlockall
2021-01-19 12:17:29 +01:00
Pauli Virtanen
d1a0121b7c
policy-node: handle moving streams when target.node is removed
...
When target.node metadata is unset, unset it also from the session node.
Schedule rescan in case this affects links.
2021-01-18 22:22:43 +02:00
Wim Taymans
272c0a4d83
policy-node: silence some normal warning
...
When a target-node is destroyed from a dont-reconnect node,
kill the node.
2021-01-18 20:56:40 +01:00
Pauli Virtanen
b10123eceb
policy-node: make streams follow default sink/src changes
...
The motivation is to have both existing and new streams that have been
created without explicit target node, to be directed to the same devices
at all times. To achieve this:
Consider what find_node returns as the "default node".
Consider streams that auto+reconnect and don't have an explicit target,
as following default. In rescan, if the default node has changed,
relink such streams to the new default.
Remove the old code that explicitly moved streams when the default.*
metadata changed, as it implements a similar thing but in a less robust
way (may fail to do what's intended, because the default device
metadata is commonly unset, or the metadata callback comes before
session_create has seen the new nodes).
Enable this feature based on "policy-node.streams-follow-default"
property. Allow setting the property also by loading the
streams-follow-default module. Enable it by default only for the
with-pulseaudio module group.
2021-01-18 20:49:58 +01:00
Wim Taymans
9b9b85ddbf
alsa: put card name in udev monitor event
...
So that we can use it to construct a good name for the card.
Fixes #524
2021-01-17 11:35:27 +01:00
Wim Taymans
abe73c9146
meson: use global b_pie to build PIE executables
2021-01-14 16:29:32 +01:00
Wim Taymans
de851018c1
media-session: fall back to card_name for description
...
Also try to use the alsa.card_name property for the description if
there is nothing else.
Fixes #524
2021-01-13 19:49:24 +01:00
Wim Taymans
c9354c238f
Add -fPIE to installed executables
...
Fixes #570
2021-01-13 19:40:37 +01:00
Wim Taymans
c771bc9b5a
media-session: move bluetooth properties to bluez config
2021-01-13 11:42:08 +01:00
Wim Taymans
8aec26f5bd
v4l2-monitor: make nicer names
2021-01-12 21:51:10 +01:00
Wim Taymans
fac80e76d2
media-session: add conf file for v4l2 and bluez as well
2021-01-12 20:42:58 +01:00
Wim Taymans
24c7f45118
alsa-monitor: also try card_name as description
...
See #524
2021-01-11 15:23:59 +01:00
Wim Taymans
4d15df6f24
bluez5: improve device and node properties
...
Set form factor, name routes based on form factor.
Improve profile names
Make card and node names like pulseaudio, with bt address in them.
Fill in port type in the route info.
Fixes #544
2021-01-10 20:56:27 +01:00
Wim Taymans
86576f1e63
bluez5: don't crash when proxy is not created yet
...
We export a node and get a handle (of type ClientNode). The
session manager then later creates a proxy for the new object. We
can't assume the proxy is created yet when the device emits an
event so check for this.
This is a temporary bandaid. We should likely use get_node() to
create our own proxy for this purpose.
Fixes #552
2021-01-09 20:07:32 +01:00
Pauli Virtanen
d87f838e09
media-session: don't write to freed memory in sm_object_destroy
...
Unref of node->handle may also free obj, if it was created by
init_object.
2021-01-09 20:37:01 +02:00
Wim Taymans
deb3fa1d9b
media-session: handle device events
...
The object config event should set props on the object.
2021-01-07 17:30:10 +01:00
Wim Taymans
962bf4d897
media-session: clean proxy and handle in destroy
...
After we called destroy on the handle and proxy we should not
try to access them anymore so we set them to NULL.
See #534
2021-01-05 10:05:30 +01:00
Wim Taymans
b4f359ed77
media-session: ensure unique node names
...
Fixes #525
2021-01-02 20:07:27 +01:00
Wim Taymans
498b4bd080
media-session: ensure unique device.name
...
See #525
2021-01-02 20:00:03 +01:00
columbarius
e871b761fe
examples: only announce SPA_DATA_MemPtr
2021-01-01 21:12:00 +01:00
columbarius
7ad1ee0cec
examples: use dataType mask for consumers
...
Set the dataType mask to MemFd and MemPtr since we implemented the MemPtr API and get MemFd mapped by pipewire.
2021-01-01 21:12:00 +01:00
Wim Taymans
d3f314cf82
media-session: remove -p option
...
Place properties in the config file now.
2020-12-31 21:25:38 +01:00
Wim Taymans
0bf1aa8f45
media-session: load properties from config
2020-12-31 13:06:17 +01:00
Wim Taymans
85306917a2
media-session: try to load config from state dir first
...
First try to load conf from the user config directory and then from
the global config dir. Allows users to copy and modify a custom
config file.
2020-12-31 11:46:54 +01:00
Wim Taymans
f29bc42b4d
media-session: improve conf parsing
...
Just use parse_string to convert the value.
2020-12-31 10:11:10 +01:00
Wim Taymans
24c68b0067
media-session: add config files
...
Remove -e and -d options
Manage modules in media-session.conf
Add alsa-monitor.conf that can match node/device properties with
a regex and update properties on it. All previous configuration and
more cane be done with this.
2020-12-30 13:15:08 +01:00
Wim Taymans
cb8e627b1e
media-session: use new properties method to load state
2020-12-29 13:30:04 +01:00
Wim Taymans
921aba9edf
media-session: fix help
...
Use enabled and disabled options from the implementation so that we
can parse them in help.
2020-12-25 19:47:34 +01:00
Wim Taymans
d7a2b569e4
alsa-monitor: make no-auto-port/profile instead
...
auto-port and auto-profile are enabled by default so make a no-auto
version to disable.
2020-12-22 13:12:12 +01:00
Wim Taymans
a8937413e6
acp: add options to disable profile and port switching
...
See #498
2020-12-22 13:08:14 +01:00
Pauli Virtanen
09265e116e
media-session: accept multiple -p, -e, and -d command-line arguments
...
Combine arguments together if given multiple times, instead of using the
last one. Useful, since pipewire.conf appears to not do quotes.
Fixes !348
2020-12-22 12:47:34 +01:00
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