From 6e5905f6f39d179334622897769576389adfe177 Mon Sep 17 00:00:00 2001
From: George Kiagiadakis <george.kiagiadakis@collabora.com>
Date: Fri, 5 Jul 2019 13:01:49 +0300
Subject: [PATCH] softdsp-endpoint: dont't add the stream-id field on the
 description of the master controls

This is currently the documented way of describing controls
that have an effect on all streams
---
 modules/module-pw-audio-softdsp-endpoint/dsp.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/module-pw-audio-softdsp-endpoint/dsp.c b/modules/module-pw-audio-softdsp-endpoint/dsp.c
index c1d214fc..62bdb931 100644
--- a/modules/module-pw-audio-softdsp-endpoint/dsp.c
+++ b/modules/module-pw-audio-softdsp-endpoint/dsp.c
@@ -125,7 +125,8 @@ register_controls (WpPwAudioDsp * self)
   g_variant_dict_init (&d, NULL);
   g_variant_dict_insert (&d, "id", "u",
       wp_pw_audio_dsp_id_encode (self->id, CONTROL_VOLUME));
-  g_variant_dict_insert (&d, "stream-id", "u", self->id);
+  if (self->id != WP_STREAM_ID_NONE)
+    g_variant_dict_insert (&d, "stream-id", "u", self->id);
   g_variant_dict_insert (&d, "name", "s", "volume");
   g_variant_dict_insert (&d, "type", "s", "d");
   g_variant_dict_insert (&d, "range", "(dd)", 0.0, 1.0);
@@ -136,7 +137,8 @@ register_controls (WpPwAudioDsp * self)
   g_variant_dict_init (&d, NULL);
   g_variant_dict_insert (&d, "id", "u",
       wp_pw_audio_dsp_id_encode (self->id, CONTROL_MUTE));
-  g_variant_dict_insert (&d, "stream-id", "u", self->id);
+  if (self->id != WP_STREAM_ID_NONE)
+    g_variant_dict_insert (&d, "stream-id", "u", self->id);
   g_variant_dict_insert (&d, "name", "s", "mute");
   g_variant_dict_insert (&d, "type", "s", "b");
   g_variant_dict_insert (&d, "default-value", "b", self->mute);
-- 
GitLab