public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Feryllt Pryderi <feryllt@gmail.com>
To: linux-bluetooth@vger.kernel.org
Cc: feryllt@gmail.com
Subject: [PATCH BlueZ] audio/transport: Emit Volume changed if endpoint is source
Date: Wed, 31 Mar 2021 13:38:12 +0200	[thread overview]
Message-ID: <80f40fbd-c903-6f10-1d9f-e75f0f214db5@gmail.com> (raw)

Change set_volume to send a Volume PropertyChanged signal also if
transport->sink_watch is set (and not only if source_watch is set).

This fixes volume changes signals not being sent for devices like speakers and
headphone adapters with volume control (like Bose Soundlink Revolve or Fiio BTR5).
---
 profiles/audio/transport.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/profiles/audio/transport.c b/profiles/audio/transport.c
index 8248014ae..26aa237a3 100644
--- a/profiles/audio/transport.c
+++ b/profiles/audio/transport.c
@@ -662,6 +662,7 @@ static void set_volume(const GDBusPropertyTable *property,
     a2dp->volume = volume;
 
     notify = transport->source_watch ? true : false;
+    notify = notify || (transport->sink_watch ? true : false);
     if (notify)
         g_dbus_emit_property_changed(btd_get_dbus_connection(),
                         transport->path,
-- 
2.31.0


             reply	other threads:[~2021-03-31 11:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-31 11:38 Feryllt Pryderi [this message]
2021-03-31 18:33 ` [PATCH BlueZ] audio/transport: Emit Volume changed if endpoint is source Luiz Augusto von Dentz
2021-03-31 20:03   ` Feryllt Pryderi
2021-03-31 20:14     ` Luiz Augusto von Dentz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=80f40fbd-c903-6f10-1d9f-e75f0f214db5@gmail.com \
    --to=feryllt@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox