mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
media-session: add alsa.reserve property to alsa-monitor
This commit is contained in:
parent
640f34d8e2
commit
d624ed26f4
2 changed files with 12 additions and 6 deletions
|
|
@ -6,6 +6,9 @@ properties = {
|
|||
# not used by the session manager, in order to be able to
|
||||
# connect to the real JACK server.
|
||||
#alsa.jack-device = false
|
||||
|
||||
# Reserve devices.
|
||||
#alsa.reserve = true
|
||||
}
|
||||
|
||||
rules = [
|
||||
|
|
|
|||
|
|
@ -1026,12 +1026,15 @@ int sm_alsa_monitor_start(struct sm_media_session *session)
|
|||
if ((str = pw_properties_get(impl->conf, "properties")) != NULL)
|
||||
pw_properties_update_string(impl->props, str, strlen(str));
|
||||
|
||||
if (session->dbus_connection)
|
||||
impl->conn = spa_dbus_connection_get(session->dbus_connection);
|
||||
if (impl->conn == NULL)
|
||||
pw_log_warn("no dbus connection, device reservation disabled");
|
||||
else
|
||||
pw_log_debug("got dbus connection %p", impl->conn);
|
||||
if ((str = pw_properties_get(impl->props, "alsa.reserve")) == NULL ||
|
||||
pw_properties_parse_bool(str)) {
|
||||
if (session->dbus_connection)
|
||||
impl->conn = spa_dbus_connection_get(session->dbus_connection);
|
||||
if (impl->conn == NULL)
|
||||
pw_log_warn("no dbus connection, device reservation disabled");
|
||||
else
|
||||
pw_log_debug("got dbus connection %p", impl->conn);
|
||||
}
|
||||
|
||||
impl->handle = pw_context_load_spa_handle(context, SPA_NAME_API_ALSA_ENUM_UDEV, NULL);
|
||||
if (impl->handle == NULL) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue