summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gvc-mixer-control.c48
1 files changed, 28 insertions, 20 deletions
diff --git a/gvc-mixer-control.c b/gvc-mixer-control.c
index 8b39080..45c729c 100644
--- a/gvc-mixer-control.c
+++ b/gvc-mixer-control.c
@@ -1250,28 +1250,36 @@ match_stream_with_devices (GvcMixerControl *control,
"port-name", &device_port_name,
NULL);
- card_id = gvc_mixer_card_get_index (card);
-
- g_debug ("Attempt to match_stream update_with_existing_outputs - Try description : '%s', origin : '%s', device port name : '%s', card : %p, AGAINST stream port: '%s', sink card id %i",
- description,
- origin,
- device_port_name,
- card,
- stream_port->port,
- stream_card_id);
-
- if (stream_card_id == card_id &&
- g_strcmp0 (device_port_name, stream_port->port) == 0) {
- g_debug ("Match device with stream: We have a match with description: '%s', origin: '%s', cached already with device id %u, so set stream id to %i",
+ if (card == NULL) {
+ if (device_stream_id == stream_id) {
+ g_debug ("Matched stream %u with card-less device '%s', with stream already setup",
+ stream_id, description);
+ in_possession = TRUE;
+ }
+ } else {
+ card_id = gvc_mixer_card_get_index (card);
+
+ g_debug ("Attempt to match_stream update_with_existing_outputs - Try description : '%s', origin : '%s', device port name : '%s', card : %p, AGAINST stream port: '%s', sink card id %i",
description,
origin,
- gvc_mixer_ui_device_get_id (device),
- stream_id);
-
- g_object_set (G_OBJECT (device),
- "stream-id", (gint)stream_id,
- NULL);
- in_possession = TRUE;
+ device_port_name,
+ card,
+ stream_port->port,
+ stream_card_id);
+
+ if (stream_card_id == card_id &&
+ g_strcmp0 (device_port_name, stream_port->port) == 0) {
+ g_debug ("Match device with stream: We have a match with description: '%s', origin: '%s', cached already with device id %u, so set stream id to %i",
+ description,
+ origin,
+ gvc_mixer_ui_device_get_id (device),
+ stream_id);
+
+ g_object_set (G_OBJECT (device),
+ "stream-id", (gint)stream_id,
+ NULL);
+ in_possession = TRUE;
+ }
}
g_free (device_port_name);