Diff between 272157c65ca900393fcecd8e491a02aeae51a094 and ea331a25f85dc8de35c636892ffb03b0b8a52e32

Changed Files

File Additions Deletions Status
unit/test-avrcp.c +14 -0 modified

Full Patch

diff --git a/unit/test-avrcp.c b/unit/test-avrcp.c
index 7f288a8..d0b1c36 100644
--- a/unit/test-avrcp.c
+++ b/unit/test-avrcp.c
@@ -1073,6 +1073,9 @@ static void test_client(gconstpointer data)
 		avrcp_register_notification(context->session,
 						AVRCP_EVENT_VOLUME_CHANGED, 0);
 
+	if (g_str_equal(context->data->test_name, "/TP/PTH/BV-01-C"))
+		avrcp_send_passthrough(context->session, 0, AVC_PLAY);
+
 	execute_context(context);
 }
 
@@ -2109,6 +2112,17 @@ int main(int argc, char *argv[])
 				0x00, 0x00, 0x02, 0x0d,
 				0x81));
 
+	/* PASS THROUGH Handling */
+
+	/* Press and release – CT */
+	define_test("/TP/PTH/BV-01-C", test_client,
+			raw_pdu(0x00, 0x11, 0x0e, 0x00, 0x48,
+				AVC_OP_PASSTHROUGH, AVC_PLAY, 0x00),
+			raw_pdu(0x02, 0x11, 0x0e, AVC_CTYPE_ACCEPTED, 0x48,
+				AVC_OP_PASSTHROUGH, AVC_PLAY),
+			raw_pdu(0x10, 0x11, 0x0e, 0x00, 0x48,
+				AVC_OP_PASSTHROUGH, AVC_PLAY | 0x80, 0x00));
+
 	/* Request continuing response - TG */
 	define_test("/TP/RCR/BV-02-C", test_server,
 			raw_pdu(0x00, 0x11, 0x0e, 0x01, 0x48, 0x00,