Diff between b6bc216fd7754caaa7fd579beb3d96f31fa93ded and cf52741577d672494c4b475e71335b941c7ec0ee

Changed Files

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

Full Patch

diff --git a/unit/test-avrcp.c b/unit/test-avrcp.c
index 9e97ac5..fc7d0fe 100644
--- a/unit/test-avrcp.c
+++ b/unit/test-avrcp.c
@@ -536,6 +536,16 @@ static int register_notification(struct avrcp *session, uint8_t transaction,
 	return -EAGAIN;
 }
 
+static int set_volume(struct avrcp *session, uint8_t transaction,
+					uint8_t volume, void *user_data)
+{
+	DBG("");
+
+	avrcp_set_volume_rsp(session, transaction, volume);
+
+	return -EAGAIN;
+}
+
 static int set_addressed(struct avrcp *session, uint8_t transaction,
 						uint16_t id, void *user_data)
 {
@@ -643,6 +653,7 @@ static const struct avrcp_control_ind control_ind = {
 	.get_play_status = get_play_status,
 	.get_element_attributes = get_element_attributes,
 	.register_notification = register_notification,
+	.set_volume = set_volume,
 	.set_addressed = set_addressed,
 	.get_folder_items = get_folder_items,
 	.change_path = change_path,
@@ -1585,5 +1596,14 @@ int main(int argc, char *argv[])
 				0x00, 0x19, 0x58, AVRCP_SET_ABSOLUTE_VOLUME,
 				0x00, 0x00, 0x01, 0x00));
 
+	/* Set absolute volume – TG */
+	define_test("/TP/VLH/BV-02-C", test_server,
+			raw_pdu(0x00, 0x11, 0x0e, 0x00, 0x48, 0x00,
+				0x00, 0x19, 0x58, AVRCP_SET_ABSOLUTE_VOLUME,
+				0x00, 0x00, 0x01, 0x00),
+			raw_pdu(0x02, 0x11, 0x0e, 0x0c, 0x48, 0x00,
+				0x00, 0x19, 0x58, AVRCP_SET_ABSOLUTE_VOLUME,
+				0x00, 0x00, 0x01, 0x00));
+
 	return g_test_run();
 }