[PATCH v4 3/3] android/avrcp: Fix setting wrong type for volume changed event

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>

Notification for volume changed should carry the original ctype and
not translate to HAL_AVRCP_EVENT_TYPE_INTERIM or
HAL_AVRCP_EVENT_TYPE_CHANGED which are only valid for register
notification command.
---
 android/avrcp.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/android/avrcp.c b/android/avrcp.c
index eab519a..f0a6d59 100644
--- a/android/avrcp.c
+++ b/android/avrcp.c
@@ -788,17 +788,7 @@ static gboolean register_notification_rsp(struct avctp *conn,
 	if (params == NULL || params[0] != AVRCP_EVENT_VOLUME_CHANGED)
 		return FALSE;
 
-	switch (code) {
-	case AVC_CTYPE_INTERIM:
-		ev.type = HAL_AVRCP_EVENT_TYPE_INTERIM;
-		break;
-	case AVC_CTYPE_CHANGED:
-		ev.type = HAL_AVRCP_EVENT_TYPE_CHANGED;
-		break;
-	default:
-		return FALSE;
-	}
-
+	ev.type = code;
 	ev.volume = params[1] & 0x7F;
 
 	ipc_send_notif(hal_ipc, HAL_SERVICE_ID_AVRCP,
-- 
1.8.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux