Thread (24 messages) flat view 24 messages, 2 authors, 2011-07-21

[RFC 08/19] avrcp: handle InformDisplayableCharacterSet pdu

From: Lucas De Marchi <hidden>
Date: 2011-07-19 19:49:19
Subsystem: the rest · Maintainer: Linus Torvalds

---
 audio/control.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/audio/control.c b/audio/control.c
index 36f727f..2825e6c 100644
--- a/audio/control.c
+++ b/audio/control.c
@@ -119,6 +119,7 @@
 #define AVRCP_SET_PLAYER_VALUE		0x14
 #define AVRCP_GET_PLAYER_ATTRIBUTE_TEXT	0x15
 #define AVRCP_GET_PLAYER_VALUE_TEXT	0x16
+#define AVRCP_DISPLAYABLE_CHARSET	0x17
 
 /* Capabilities for AVRCP_GET_CAPABILITIES pdu */
 #define CAP_COMPANY_ID		0x02
@@ -840,6 +841,18 @@ static int handle_vendordep_pdu(struct control *control,
 		 */
 		pdu->params[0] = E_INVALID_PARAM;
 		goto err_metadata;
+	case AVRCP_DISPLAYABLE_CHARSET:
+		if (len < 3 || avrcp->code != CTYPE_STATUS)
+			break;
+
+		/*
+		 * We acknowledge the commands, but we always use UTF-8 for
+		 * encoding since CT is obliged to support it
+		 */
+		pdu->params_len = 0;
+
+		return AVRCP_HEADER_LENGTH +
+			AVRCP_SPECAVCPDU_HEADER_LENGTH;
 	}
 
 	/*
-- 
1.7.6
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help