Skip to contentSkip to conversation

UNITINFO and SUBUNITINFO in avrcp

Bluez-devel Frédéric Dalleau 2 participants 2 messages Jan 16, 2008 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

This little patch enables support of UNITINFO and SUBUNITINFO commands in audio service. The implementation is not very useful itself but it is mandatory in AVRCP.

PTS has some test cases to check for it.

Comments are welcome!

Frédéric.

audio/control.c +13 -0
index bb3f2bf..5eb1053 100644
@@ -643,6 +643,19 @@ static gboolean session_cb(GIOChannel *chan, GIOCondition cond,
 		ret = write(session->sock, buf, packet_size);
 	}
 
+	if (avctp->packet_type == AVCTP_PACKET_SINGLE &&
+		   avctp->cr == AVCTP_COMMAND &&
+		   avctp->pid == htons(AV_REMOTE_SVCLASS_ID) &&
+		   avrcp->code == CTYPE_STATUS &&
+		   (avrcp->opcode == OP_UNITINFO
+		   	|| avrcp->opcode == OP_SUBUNITINFO)) {
+		avctp->cr = AVCTP_RESPONSE;
+		avrcp->code = CTYPE_STABLE;
+		debug("reply to %s", avrcp->opcode == OP_UNITINFO ?
+				"OP_UNITINFO" : "OP_SUBUNITINFO");
+		ret = write(session->sock, buf, packet_size);
+	}
+
 	return TRUE;
 
 failed:

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

maintainer
#1 lore raw

Hi Frederic,

Quoted 5 lines

This little patch enables support of UNITINFO and SUBUNITINFO commands in audio service.
The implementation is not very useful itself but it is mandatory in AVRCP.

PTS has some test cases to check for it.

patch seems to be in the CVS. Thanks.

Regards

Marcel

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel