Diff between fd622a5bb2e3409f39956edba20afc6fa3cff09e and 5204f17cb9d32b05e64081d0940e26b8f5cd05fb

Changed Files

File Additions Deletions Status
profiles/audio/bap.c +0 -39 modified
profiles/audio/bap.h +0 -2 modified
src/shared/bap.c +39 -0 modified
src/shared/bap.h +2 -0 modified

Full Patch

diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c
index 0dc5b40..1889e1a 100644
--- a/profiles/audio/bap.c
+++ b/profiles/audio/bap.c
@@ -115,45 +115,6 @@ struct bap_data {
 
 static struct queue *sessions;
 
-/* Structure holding the parameters for Periodic Advertisement create sync.
- * The full QOS is populated at the time the user selects and endpoint and
- * configures it using SetConfiguration.
- */
-struct bt_iso_qos bap_sink_pa_qos = {
-	.bcast = {
-		.options		= 0x00,
-		.skip			= 0x0000,
-		.sync_timeout		= BT_ISO_SYNC_TIMEOUT,
-		.sync_cte_type	= 0x00,
-		/* TODO: The following parameters are not needed for PA Sync.
-		 * They will be removed when the kernel checks will be removed.
-		 */
-		.big			= BT_ISO_QOS_BIG_UNSET,
-		.bis			= BT_ISO_QOS_BIS_UNSET,
-		.encryption		= 0x00,
-		.bcode			= {0x00},
-		.mse			= 0x00,
-		.timeout		= BT_ISO_SYNC_TIMEOUT,
-		.sync_factor		= 0x07,
-		.packing		= 0x00,
-		.framing		= 0x00,
-		.in = {
-			.interval	= 10000,
-			.latency	= 10,
-			.sdu		= 40,
-			.phy		= 0x02,
-			.rtn		= 2,
-		},
-		.out = {
-			.interval	= 10000,
-			.latency	= 10,
-			.sdu		= 40,
-			.phy		= 0x02,
-			.rtn		= 2,
-		}
-	}
-};
-
 static bool bap_data_set_user_data(struct bap_data *data, void *user_data)
 {
 	if (!data)
diff --git a/profiles/audio/bap.h b/profiles/audio/bap.h
index 554670d..2bf93dd 100644
--- a/profiles/audio/bap.h
+++ b/profiles/audio/bap.h
@@ -7,8 +7,6 @@
  *
  */
 
-extern struct bt_iso_qos bap_sink_pa_qos;
-
 void bap_iso_qos_to_bap_qos(struct bt_iso_qos *iso_qos,
 				struct bt_bap_qos *bap_qos);
 void bap_qos_to_iso_qos(struct bt_bap_qos *bap_qos,
diff --git a/src/shared/bap.c b/src/shared/bap.c
index 63c4c05..ce579e1 100644
--- a/src/shared/bap.c
+++ b/src/shared/bap.c
@@ -349,6 +349,45 @@ static struct queue *bap_db;
 static struct queue *bap_cbs;
 static struct queue *sessions;
 
+/* Structure holding the parameters for Periodic Advertisement create sync.
+ * The full QOS is populated at the time the user selects and endpoint and
+ * configures it using SetConfiguration.
+ */
+struct bt_iso_qos bap_sink_pa_qos = {
+	.bcast = {
+		.options		= 0x00,
+		.skip			= 0x0000,
+		.sync_timeout		= BT_ISO_SYNC_TIMEOUT,
+		.sync_cte_type	= 0x00,
+		/* TODO: The following parameters are not needed for PA Sync.
+		 * They will be removed when the kernel checks will be removed.
+		 */
+		.big			= BT_ISO_QOS_BIG_UNSET,
+		.bis			= BT_ISO_QOS_BIS_UNSET,
+		.encryption		= 0x00,
+		.bcode			= {0x00},
+		.mse			= 0x00,
+		.timeout		= BT_ISO_SYNC_TIMEOUT,
+		.sync_factor		= 0x07,
+		.packing		= 0x00,
+		.framing		= 0x00,
+		.in = {
+			.interval	= 10000,
+			.latency	= 10,
+			.sdu		= 40,
+			.phy		= 0x02,
+			.rtn		= 2,
+		},
+		.out = {
+			.interval	= 10000,
+			.latency	= 10,
+			.sdu		= 40,
+			.phy		= 0x02,
+			.rtn		= 2,
+		}
+	}
+};
+
 static void bap_stream_set_io(void *data, void *user_data);
 static void stream_find_io(void *data, void *user_data);
 static void bap_stream_get_dir(void *data, void *user_data);
diff --git a/src/shared/bap.h b/src/shared/bap.h
index 198ae50..248871b 100644
--- a/src/shared/bap.h
+++ b/src/shared/bap.h
@@ -50,6 +50,8 @@ typedef void (*bt_bap_bcode_func_t)(struct bt_bap_stream *stream,
 				bt_bap_bcode_reply_t reply, void *reply_data,
 				void *user_data);
 
+extern struct bt_iso_qos bap_sink_pa_qos;
+
 /* Local PAC related functions */
 struct bt_bap_pac_qos {
 	uint8_t  framing;