The message structures returned by pw_protocol_native_connection_get_next
point to data that is contained in the buffer of the connection.
The data was invalidated when pw_protocol_native_connection_get_next was
called the next time, which made the connection loop non-reentrant, in
cases where it was re-entered from demarshal callbacks.
Fix this by allocating new buffers when reentering and stashing the old
buffers onto a stack. The returned message structure is also stored on
the stack to make lifetimes to match.
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.