Profiles: Enable bt_vcp_set_debug
authorSathish Narasimman <sathish.narasimman@intel.com>
Wed, 21 Sep 2022 10:27:32 +0000 (15:57 +0530)
committerAyush Garg <ayush.garg@samsung.com>
Mon, 15 May 2023 09:25:55 +0000 (14:55 +0530)
Set bt_vcp_set_debug to be used for VCP.

Signed-off-by: Manika Shrivastava <manika.sh@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
profiles/audio/vcp.c

index 52287c3..4158e45 100644 (file)
@@ -64,6 +64,11 @@ struct vcp_data {
 
 static struct queue *sessions;
 
+static void vcp_debug(const char *str, void *user_data)
+{
+       DBG_IDX(0xffff, "%s", str);
+}
+
 static int vcp_disconnect(struct btd_service *service)
 {
        DBG("");
@@ -89,6 +94,8 @@ static void vcp_data_add(struct vcp_data *data)
                return;
        }
 
+       bt_vcp_set_debug(data->vcp, vcp_debug, NULL, NULL);
+
        if (!sessions)
                sessions = queue_new();