diff --git a/unit/test-avrcp.c b/unit/test-avrcp.c
index a48e085..972be42 100644
--- a/unit/test-avrcp.c
+++ b/unit/test-avrcp.c
context_quit(context);
}
+static void set_volume_rsp(struct avrcp *session, int err, uint8_t volume,
+ void *user_data)
+{
+ struct context *context = user_data;
+
+ g_assert_cmpint(err, ==, 0);
+ g_assert_cmpint(volume, ==, 1);
+
+ context_quit(context);
+}
+
static bool register_notification_rsp(struct avrcp *session, int err,
uint8_t code, uint8_t event,
uint8_t *params, void *user_data)
static const struct avrcp_control_cfm control_cfm = {
.register_notification = register_notification_rsp,
+ .set_volume = set_volume_rsp,
.get_folder_items = get_folder_items_rsp,
};
avrcp_register_notification(context->session,
AVRCP_EVENT_VOLUME_CHANGED, 0);
+ if (g_str_equal(context->data->test_name, "/TP/VLH/BI-03-C"))
+ avrcp_set_volume(context->session, 0x01);
+
execute_context(context);
}
0x00, 0x19, 0x58, AVRCP_SET_ABSOLUTE_VOLUME,
0x00, 0x00, 0x01, 0x00));
+ /* Set Absolute Volume invalid behavior CT */
+ define_test("/TP/VLH/BI-03-C", test_client,
+ raw_pdu(0x00, 0x11, 0x0e, 0x00, 0x48, 0x00,
+ 0x00, 0x19, 0x58, AVRCP_SET_ABSOLUTE_VOLUME,
+ 0x00, 0x00, 0x01, 0x01),
+ raw_pdu(0x02, 0x11, 0x0e, 0x0c, 0x48, 0x00,
+ 0x00, 0x19, 0x58, AVRCP_SET_ABSOLUTE_VOLUME,
+ 0x00, 0x00, 0x01, 0x81));
+
/* Request continuing response - TG */
define_test("/TP/RCR/BV-02-C", test_server,
raw_pdu(0x00, 0x11, 0x0e, 0x01, 0x48, 0x00,