From 05aeeed90cf6c3cfe8459cfedaf9c524176d69f3 Mon Sep 17 00:00:00 2001 From: Julian Bouzas Date: Thu, 11 Jun 2020 15:20:24 -0400 Subject: [PATCH] m-device-activation: always activate alsa devices if no api alsa card property was set --- modules/module-device-activation.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/module-device-activation.c b/modules/module-device-activation.c index 4daf9c7b..60c7232c 100644 --- a/modules/module-device-activation.c +++ b/modules/module-device-activation.c @@ -151,10 +151,10 @@ on_device_added (WpObjectManager *om, WpProxy *proxy, gpointer d) /* ALSA */ if (g_str_has_prefix (device_api, "alsa")) { - /* If "dbus" mode, let dbus handle the activation, otherwise activate */ - if (self->mode && g_strcmp0 (self->mode, "dbus") == 0) { - const gchar *id = wp_proxy_get_property (proxy, SPA_KEY_API_ALSA_CARD); - g_return_if_fail (id); + const gchar *id = wp_proxy_get_property (proxy, SPA_KEY_API_ALSA_CARD); + /* If "dbus" mode and Id is valid, let dbus handle the activation, + * otherwise always activate the device */ + if (self->mode && g_strcmp0 (self->mode, "dbus") == 0 && id) { add_reserve_device_data (self, proxy, atoi (id)); } else { set_device_profile (proxy, 1);