From 2a397faa30d57c1ef9352b2869ba11183dffa704 Mon Sep 17 00:00:00 2001
From: George Kiagiadakis <george.kiagiadakis@collabora.com>
Date: Fri, 5 Jul 2019 18:33:17 +0300
Subject: [PATCH] softdsp-endpoint/dsp: actually notify controls on the
 endpoint, not the dsp object

---
 modules/module-pw-audio-softdsp-endpoint/dsp.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/module-pw-audio-softdsp-endpoint/dsp.c b/modules/module-pw-audio-softdsp-endpoint/dsp.c
index d1a3a287..3dc6f4ef 100644
--- a/modules/module-pw-audio-softdsp-endpoint/dsp.c
+++ b/modules/module-pw-audio-softdsp-endpoint/dsp.c
@@ -274,6 +274,7 @@ audio_dsp_event_param (void *object, int seq, uint32_t id,
     uint32_t index, uint32_t next, const struct spa_pod *param)
 {
   WpPwAudioDsp *self = WP_PW_AUDIO_DSP (object);
+  g_autoptr (WpEndpoint) ep = g_weak_ref_get (&self->endpoint);
 
   switch (id) {
     case SPA_PARAM_Props:
@@ -301,12 +302,12 @@ audio_dsp_event_param (void *object, int seq, uint32_t id,
 
       if (self->volume != volume) {
         self->volume = volume;
-        wp_endpoint_notify_control_value (WP_ENDPOINT (self),
+        wp_endpoint_notify_control_value (ep,
             wp_pw_audio_dsp_id_encode (self->id, CONTROL_VOLUME));
       }
       if (self->mute != mute) {
         self->mute = mute;
-        wp_endpoint_notify_control_value (WP_ENDPOINT (self),
+        wp_endpoint_notify_control_value (ep,
             wp_pw_audio_dsp_id_encode (self->id, CONTROL_MUTE));
       }
 
-- 
GitLab