From ecff7fa9ac35b76c5fb664605b26e10d2f59030b Mon Sep 17 00:00:00 2001 From: Silviu Florian Barbulescu Date: Mon, 31 Jul 2023 12:16:42 +0300 Subject: [PATCH] Rename BAA_SERVICE to BCAA_SERVICE add BAA_SERVICE(0x1851) 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 --git a/client/player.c b/client/player.c index 6b0f150..136ef30 100644 --- a/client/player.c +++ b/client/player.c @@ -1179,7 +1179,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)), }; @@ -1463,7 +1463,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) @@ -2454,7 +2454,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; @@ -3188,7 +3188,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 a3b0600..5b39ffe 100755 --- a/lib/uuid.h +++ b/lib/uuid.h @@ -180,8 +180,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 7829bb2..1b67f64 100644 --- a/profiles/audio/media.c +++ b/profiles/audio/media.c @@ -1575,7 +1575,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 0b133e5..b56f1ba 100644 --- a/profiles/audio/transport.c +++ b/profiles/audio/transport.c @@ -557,7 +557,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); @@ -1725,7 +1725,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; -- 2.7.4