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
In order to further simplify "unprivileged" builds, add "udev" boolean,
which make installing Udev rules optional.
I.e. without requiring any ugly hacks (mktemp -d), an privileged build
capable of running PulseAudio and JACK applications, can be configured
trivially:
meson --prefix=~/.local build
meson configure build -Dsystemd-user-unit-dir=$HOME/.config/systemd/user
meson configure build -Dpipewire-alsa=false
meson configure build -Dudev=false
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@iki.fi>
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
Add a new build option 'system-user-unit=dir', which can be used to
override the pkg-config default value.
By doing this, it becomes more practical to make a local unprivileged
build of the latest PipeWire:
$ meson --prefix=~/.local build
$ meson configure build -Dpipewire-alsa=false
$ meson configure build -Dsystemd-user-unit-dir=~/.config/systemd/user
$ meson configure build -Dudevrulesdir="`mktemp -d`"
$ ninja -C build install
For a local build enabling ALSA plugins is not plausible.
JACK needs a simple addition to the ~/.profile:
export LD_LIBRARY_PATH=$HOME/.local/lib/x86_64-linux-gnu/pipewire-0.3/jack
Finally, the genuine PulseAudio must be masked and local services
enabled:
systemctl --user enable pipewire.socket
systemctl --user enable pipewire-pulse.socket
systemctl --user mask pulseaudio.service
A sanity check [*] shows that nothing has leaked out of the home
directory (even though at least on my Debian 10 system PolKit still
asks for authorization during the meson build).
Not perfect, but lowers a barrier to run the development version a lot,
as that does not anymore to trash your system.
[*] find / -name "*pipewire*" \! -path "/home/*" \! -path "/var/lib/flatpak/*" 2> /dev/null
Signed-off-by: Jarkko Sakkinen <jarkko@suppilovahvero.lan>
Use the rate match io are to read the exact amount of samples we
need for this cycle from the ringbuffer. We can then request lower
latency.
There will also be less buffering in the audioconverter, which makes
our timestamps more accurate.
Instead of requiring the upstream node to resubmit the delayed
samples, keep the samples ourselves. The benefit is probably too
small to measure but it simplifies things a lot.
Use parse_string for everything else to use it as a string value.
Make it possible to use short name for the param.
so now you can do:
pw-cli set-param 55 Props '{ channelVolumes: [ 0.3, 0.3 ], channelMap: [ FR,FL ] }'
Implement routes on the device. This makes it possible for the
session manager to restore the device volumes.
Use validate_config to get the negotiated channels for the route
volumes.
UCM profiles can use the same ports, but with different priorities. One
good example is a phone, having an earpiece and a speaker:
- the default profile will put a higher priority on the speaker
- the "voice call" profile will put a higher priority on the earpiece
When switching to the "voice call" profile, we want pipewire to take
into account the priority change, so that the earpiece gets the highest
priority and is selected by default.
As the ports have the same name in both profiles, we have a single
instance of each port in memory, and therefore need to trigger a port
update when the profile is changed, so that the priority set by the new
profile is used.
Moreover, the UCM code updates only the priority inside the
`pa_device_port` structure, so this commit also makes sure we reflect
this value into the `acp_port` structure when enabling a device.