From 97b5bf5d9a4377b650560a20f4a0f8ad6a9f40d8 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Fri, 8 May 2015 12:07:26 +0300 Subject: [PATCH] audio/avrcp: Reduce the interval of position changed Using UINT32_MAX overflow in Android implementation as it multiple the value by 1000 to get the interval in miliseconds which seem to truncate the value causing it to send position changed too frequently flooding the channel. --- profiles/audio/avrcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c index 245b3fc21..60f8cbf6c 100644 --- a/profiles/audio/avrcp.c +++ b/profiles/audio/avrcp.c @@ -3228,7 +3228,7 @@ static void avrcp_register_notification(struct avrcp *session, uint8_t event) * use it to resync. */ if (event == AVRCP_EVENT_PLAYBACK_POS_CHANGED) - bt_put_be32(UINT32_MAX, &pdu->params[1]); + bt_put_be32(UINT32_MAX / 1000, &pdu->params[1]); pdu->params_len = htons(AVRCP_REGISTER_NOTIFICATION_PARAM_LENGTH); -- 2.47.3