diff mbox series

[BlueZ,v3,1/1] Rename BAA_SERVICE to BCAA_SERVICE add BAA_SERVICE(0x1851)

Message ID 20230731091642.3712-2-silviu.barbulescu@nxp.com
State New
Headers show
Series Rename BAA_SERVICE to BCAA_SERVICE add BAA_SERVICE(0x1851) | expand

Commit Message

Silviu Florian Barbulescu July 31, 2023, 9:16 a.m. UTC
Rename BAA_SERVICE to BCAA_SERVICE and added BAA_SERVICE(0x1851)
as UUID for the broadcast sink.

---
 client/player.c            | 8 ++++----
 lib/uuid.h                 | 7 +++++--
 profiles/audio/media.c     | 2 +-
 profiles/audio/transport.c | 4 ++--
 4 files changed, 12 insertions(+), 9 deletions(-)
diff mbox series

Patch

diff --git a/client/player.c b/client/player.c
index e5084967a..9bc5f2a36 100644
--- a/client/player.c
+++ b/client/player.c
@@ -1180,7 +1180,7 @@  static const struct capabilities {
 	 * Channel count: 3
 	 * Frame length: 30-240
 	 */
-	CODEC_CAPABILITIES(BAA_SERVICE_UUID, LC3_ID,
+	CODEC_CAPABILITIES(BCAA_SERVICE_UUID, LC3_ID,
 					LC3_DATA(LC3_FREQ_ANY, LC3_DURATION_ANY,
 						3u, 30, 240)),
 };
@@ -1464,7 +1464,7 @@  static struct preset {
 	PRESET(A2DP_SINK_UUID, A2DP_CODEC_SBC, sbc_presets, 6),
 	PRESET(PAC_SINK_UUID, LC3_ID, lc3_presets, 3),
 	PRESET(PAC_SOURCE_UUID, LC3_ID, lc3_presets, 3),
-	PRESET(BAA_SERVICE_UUID,  LC3_ID, lc3_presets, 3),
+	PRESET(BCAA_SERVICE_UUID,  LC3_ID, lc3_presets, 3),
 };
 
 static void parse_vendor_codec(const char *codec, uint16_t *vid, uint16_t *cid)
@@ -2455,7 +2455,7 @@  static void endpoint_auto_accept(const char *input, void *user_data)
 {
 	struct endpoint *ep = user_data;
 
-	if (!strcmp(ep->uuid, BAA_SERVICE_UUID)) {
+	if (!strcmp(ep->uuid, BCAA_SERVICE_UUID)) {
 		ep->broadcast = true;
 	} else {
 		ep->broadcast = false;
@@ -3189,7 +3189,7 @@  static struct endpoint *endpoint_new(const struct capabilities *cap)
 
 	ep = new0(struct endpoint, 1);
 	ep->uuid = g_strdup(cap->uuid);
-	ep->broadcast = strcmp(cap->uuid, BAA_SERVICE_UUID) ? false : true;
+	ep->broadcast = strcmp(cap->uuid, BCAA_SERVICE_UUID) ? false : true;
 	ep->codec = cap->codec_id;
 	ep->path = g_strdup_printf("%s/ep%u", BLUEZ_MEDIA_ENDPOINT_PATH,
 					g_list_length(local_endpoints));
diff --git a/lib/uuid.h b/lib/uuid.h
index cd3b3655f..817a5e843 100644
--- a/lib/uuid.h
+++ b/lib/uuid.h
@@ -157,8 +157,11 @@  extern "C" {
 #define PAC_SOURCE_UUID		"00002bcb-0000-1000-8000-00805f9b34fb"
 #define PAC_SOURCE_LOC_CHRC_UUID			0x2bcc
 
-#define BAA_SERVICE		0x1852
-#define BAA_SERVICE_UUID	"00001852-0000-1000-8000-00805f9b34fb"
+#define BCAA_SERVICE				0x1852
+#define BCAA_SERVICE_UUID	"00001852-0000-1000-8000-00805f9b34fb"
+
+#define BAA_SERVICE					0x1851
+#define BAA_SERVICE_UUID	"00001851-0000-1000-8000-00805f9b34fb"
 
 #define PAC_CONTEXT					0x2bcd
 #define PAC_SUPPORTED_CONTEXT				0x2bce
diff --git a/profiles/audio/media.c b/profiles/audio/media.c
index bcf4eae26..15c64c8d6 100644
--- a/profiles/audio/media.c
+++ b/profiles/audio/media.c
@@ -1364,7 +1364,7 @@  static struct media_endpoint_init {
 				experimental_endpoint_supported },
 	{ PAC_SOURCE_UUID, endpoint_init_pac_source,
 				experimental_endpoint_supported },
-	{ BAA_SERVICE_UUID, endpoint_init_broadcast_source,
+	{ BCAA_SERVICE_UUID, endpoint_init_broadcast_source,
 			experimental_broadcaster_ep_supported },
 };
 
diff --git a/profiles/audio/transport.c b/profiles/audio/transport.c
index aa3a718b0..cf5662d1d 100644
--- a/profiles/audio/transport.c
+++ b/profiles/audio/transport.c
@@ -552,7 +552,7 @@  static DBusMessage *acquire(DBusConnection *conn, DBusMessage *msg,
 	owner = media_owner_create(msg);
 
 	if (!strcmp(media_endpoint_get_uuid(transport->endpoint),
-						BAA_SERVICE_UUID)) {
+						BCAA_SERVICE_UUID)) {
 		req = media_request_create(msg, 0x00);
 		media_owner_add(owner, req);
 		media_transport_set_owner(transport, owner);
@@ -1631,7 +1631,7 @@  struct media_transport *media_transport_create(struct btd_device *device,
 		properties = a2dp_properties;
 	} else if (!strcasecmp(uuid, PAC_SINK_UUID) ||
 				!strcasecmp(uuid, PAC_SOURCE_UUID) ||
-				!strcasecmp(uuid, BAA_SERVICE_UUID)) {
+				!strcasecmp(uuid, BCAA_SERVICE_UUID)) {
 		if (media_transport_init_bap(transport, stream) < 0)
 			goto fail;
 		properties = bap_properties;