public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ] audio/avrcp: fix EVENT_VOLUME_CHANGED not supported
@ 2026-03-02  9:22 Pavel Bozhko
  2026-03-02 10:24 ` [BlueZ] " bluez.test.bot
  2026-03-03 18:57 ` [PATCH BlueZ] " Luiz Augusto von Dentz
  0 siblings, 2 replies; 4+ messages in thread
From: Pavel Bozhko @ 2026-03-02  9:22 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Pavel Bozhko

Some devices with AVRCP 1.3 may support remote volume
control—for example, certain TV models such as:
- LG webOS TV UM7450PLA
- Xiaomi Mi TV 4A 43
when they act as the audio source, provided that
Category 2 (Monitor/Amplifier) functionality is supported.
---
 profiles/audio/avrcp.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c
index 724b46c59..d501315b6 100644
--- a/profiles/audio/avrcp.c
+++ b/profiles/audio/avrcp.c
@@ -1765,10 +1765,11 @@ err:
 	return AVC_CTYPE_REJECTED;
 }
 
-/* SetAbsoluteVolume requires at least version 1.4 and a category-2 */
+/* SetAbsoluteVolume requires at least version 1.4 and or category-2 */
 static bool avrcp_volume_supported(struct avrcp_data *data)
 {
-	if (!data || data->version < 0x0104)
+	if (!data || (data->version < 0x0104 &&
+		!(data->features & AVRCP_FEATURE_CATEGORY_2)))
 		return false;
 
 	if (btd_opts.avrcp.volume_category &&
@@ -4293,13 +4294,13 @@ static void target_init(struct avrcp *session)
 				(1 << AVRCP_EVENT_TRACK_REACHED_END) |
 				(1 << AVRCP_EVENT_SETTINGS_CHANGED);
 
-	if (target->version < 0x0104)
-		return;
-
 	if (avrcp_volume_supported(target))
 		session->supported_events |=
 				(1 << AVRCP_EVENT_VOLUME_CHANGED);
 
+	if (target->version < 0x0104)
+		return;
+
 	session->supported_events |=
 				(1 << AVRCP_EVENT_ADDRESSED_PLAYER_CHANGED) |
 				(1 << AVRCP_EVENT_AVAILABLE_PLAYERS_CHANGED);
-- 
2.50.1 (Apple Git-155)


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-03-03 19:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-02  9:22 [PATCH BlueZ] audio/avrcp: fix EVENT_VOLUME_CHANGED not supported Pavel Bozhko
2026-03-02 10:24 ` [BlueZ] " bluez.test.bot
2026-03-03 18:57 ` [PATCH BlueZ] " Luiz Augusto von Dentz
2026-03-03 19:06   ` Luiz Augusto von Dentz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox