public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ] avrcp: fix AVRCP_STATUS_INVALID_PARAM
@ 2025-11-07  9:00 Pavel Bozhko
  2025-11-07 10:28 ` [BlueZ] " bluez.test.bot
  2025-11-10 18:36 ` [PATCH BlueZ] " Luiz Augusto von Dentz
  0 siblings, 2 replies; 3+ messages in thread
From: Pavel Bozhko @ 2025-11-07  9:00 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Pavel Bozhko

The first AVRCP_EVENT_VOLUME_CHANGED event triggers
an AVRCP_STATUS_INVALID_PARAM response.

When pairing, the org.bluez.MediaTransport1 instance
may not have time to be created, but the org.bluez.Device1
instance has already been created.
avrcp_handle_register_notification receives an
AVRCP_EVENT_VOLUME_CHANGED event and
media_transport_get_device_volume will return a Volume
of -1 from the org.bluez.Device1 object, resulting in
an AVRCP_STATUS_INVALID_PARAM being sent to the audio source.
After receiving the first AVRCP_STATUS_INVALID_PARAM,
the Audio-Source will consider volume changes
from the Audio-Sink unsupported.
Relevant for all iPhone models as Audio Source.
---
 src/device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/device.c b/src/device.c
index 91b6cc0c6..352323167 100644
--- a/src/device.c
+++ b/src/device.c
@@ -4818,7 +4818,7 @@ static struct btd_device *device_new(struct btd_adapter *adapter,
 		return NULL;
 
 	device->tx_power = 127;
-	device->volume = -1;
+	device->volume = 0;
 	device->wake_id = -1U;
 
 	device->db = gatt_db_new();
-- 
2.43.0


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

end of thread, other threads:[~2025-11-10 18:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-07  9:00 [PATCH BlueZ] avrcp: fix AVRCP_STATUS_INVALID_PARAM Pavel Bozhko
2025-11-07 10:28 ` [BlueZ] " bluez.test.bot
2025-11-10 18:36 ` [PATCH BlueZ] " 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