[PATCH BlueZ 3/6] bap: Move default qos to shared/bap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This moves the default BAP QoS structure to shared/bap, to be accessible
from other plugins without involving the BAP plugin.
---
 profiles/audio/bap.c | 39 ---------------------------------------
 profiles/audio/bap.h |  2 --
 src/shared/bap.c     | 39 +++++++++++++++++++++++++++++++++++++++
 src/shared/bap.h     |  2 ++
 4 files changed, 41 insertions(+), 41 deletions(-)

diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c
index 0dc5b4004..1889e1a1e 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 554670d4a..2bf93dd93 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 63c4c05c7..ce579e171 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 198ae50c5..248871b12 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;
-- 
2.43.0





[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux