Do the check for the client event mask in only one place where we
are actually going to send the event. This avoids sending events to
clients that did not register them.
Rework some of the event handling when the manager emit an
add/remove/change event. Make it possible to send multiple events, like
when a sink changes, also emit a change for the monitor.
See #1042
The simple protocol listens on a socket, creates a new pw_client for
each connected client and reads/writes raw audio bytes on the
socket. Incomming bytes are copied to a playback stream, outgoing
bytes are copied from a capture pw_stream.
Fixes#954
When the session becomes inactive (eg. user on active seat switched),
udev may make devices inaccessible. In this case, pipewire should give
up the devices and close their open file descriptors.
In case headset fails to reply with AT+BCS to the codec selection
following AT+CMER, try to retry the codec selection, and if it still
fails, assume the headset is configured for CVSD.
When current user is no longer active on the seat, unregister the bluez
handler. This disconnects all bluez devices.
When the user becomes active on a seat, start bluez monitor again.
This will also reconnect devices.
Some properties don't have type info and then we want to skip
constructing the pod instead of crashing. This makes it possible to
cut and paste the output of pw-dump Route into pw-cli s <card> Route,
for example.
Add an entry in the config file for default format and channel map.
Use the defaults in the server_info request
Use the defaults for the default channels and map in the modules.
priority.session is meant to be used to set routing priorities.
priority.driver is meant to be used by the scheduler to select what
nodes is best for driving the graph. This usually depends on the
hardware quality and the use case (Pro Audio devices are likely
to be used as driving the graph).
See #1028
Make it possible to use object.id, node.name, node.nick,
node.description and object.path to select nodes and object.id,
port.name, port.alias and object.path to select ports when linking.
This makes it possible to use pw-cli creat-link to make nodes
without having to deal with the ids.
Previously, the return value of `strrchr()` was not checked
in `spa_log_impl_logv()` which could cause a segmentation fault
in `snprintf()` if the `file` string argument does not contain
any directory separators ('/').
For example,
./build/spa/tools/spa-inspect ./build/spa/plugins/alsa/libspa-alsa.so
could run into this problem:
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7f1d505 in __strlen_avx2 () from /usr/lib/libc.so.6
(gdb) bt
#0 0x00007ffff7f1d505 in __strlen_avx2 () from /usr/lib/libc.so.6
#1 0x00007ffff7e29408 in __vfprintf_internal () from /usr/lib/libc.so.6
#2 0x00007ffff7e3a19a in __vsnprintf_internal () from /usr/lib/libc.so.6
#3 0x00007ffff7e146f6 in snprintf () from /usr/lib/libc.so.6
#4 0x0000555555558818 in spa_log_impl_logv (object=<optimized out>, level=SPA_LOG_LEVEL_INFO,
file=0x7fffffffd4d0 "[I][", line=260, func=0x7ffff7ce8090 "error_node", fmt=<optimized out>,
args=0x7fffffffd920) at ../spa/include/spa/support/log-impl.h:49
#5 0x00007ffff7d8c69e in alsa_error_handler (file=<optimized out>, line=<optimized out>,
function=<optimized out>, err=<optimized out>, fmt=<optimized out>)
at ../spa/plugins/alsa/acp/alsa-util.c:866
#6 0x00007ffff7cd6a8f in ?? () from /usr/lib/libasound.so.2
#7 0x00007ffff7cdb55e in snd_use_case_mgr_open () from /usr/lib/libasound.so.2
#8 0x00007ffff7d8940f in pa_alsa_ucm_query_profiles (ucm=ucm@entry=0x55555556ba28, card_index=0)
at ../spa/plugins/alsa/acp/alsa-ucm.c:752
#9 0x00007ffff7d6e3c2 in acp_card_new (index=0, props=props@entry=0x7fffffffdc50)
at ../spa/plugins/alsa/acp/acp.c:1508
#10 0x00007ffff7d29b7a in impl_init (factory=<optimized out>, handle=0x55555556b540,
info=<optimized out>, support=<optimized out>, n_support=<optimized out>)
at ../spa/plugins/alsa/alsa-acp-device.c:963
#11 0x0000555555558429 in inspect_factory (factory=0x7ffff7daefa0 <spa_alsa_acp_device_factory>,
data=0x7fffffffdcf0) at ../spa/tools/spa-inspect.c:231
#12 main (argc=<optimized out>, argv=<optimized out>) at ../spa/tools/spa-inspect.c:309
as in that particular case, the filename was returned by libasound,
and it was just "parser.c".
Furthermore, separate the static variable from the rest, and apply
the `const` qualifier to the pointers in the `levels` array.
There won't be further battery level updates when RFCOMM connection is
down, so remove the battery then.
Fix minor things with canceling the provider registration.