[PATCH 04/13] AVRCP: Keep AVRCP version of connected device in server

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

 



This can be used to improve compatibility between
AVRCP 1.3 vs AVRCP 1.4 devices and implementation in stack.
---
 audio/avrcp.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/audio/avrcp.c b/audio/avrcp.c
index 7576e19..9ff0700 100644
--- a/audio/avrcp.c
+++ b/audio/avrcp.c
@@ -200,6 +200,7 @@ struct avrcp_server {
 	uint32_t ct_record_id;
 	GSList *players;
 	struct avrcp_player *addressed_player;
+	uint16_t version;
 };
 
 struct pending_pdu {
@@ -1288,8 +1289,12 @@ static void state_changed(struct audio_device *dev, avctp_state_t old_state,
 			return;
 
 		desc = list->data;
+		if (desc)
+			server->version = desc->version;
+		else
+			server->version = AVRCP_VERSION_UNKNOWN;
 
-		if (desc && desc->version >= AVRCP_VERSION_1_4)
+		if (server->version >= AVRCP_VERSION_1_4)
 			register_volume_notification(player);
 
 		sdp_list_free(list, free);
@@ -1380,6 +1385,8 @@ int avrcp_register(DBusConnection *conn, const bdaddr_t *src, GKeyFile *config)
 
 	bacpy(&server->src, src);
 
+	server->version = AVRCP_VERSION_UNKNOWN;
+
 	servers = g_slist_append(servers, server);
 
 	return 0;
-- 
on behalf of ST-Ericsson

--
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