From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ 1/5] shared/bap: Add unespecified bit in audio context to PAC records
Date: Mon, 19 Jun 2023 13:30:28 -0700 [thread overview]
Message-ID: <20230619203032.6812-1-luiz.dentz@gmail.com> (raw)
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This makes sure unespecified bit is properly marked in both audio
contexts since that required by many platforms in order to work properly
and while doing that add proper defines to the defaults values used in
PACS.
---
src/shared/bap.c | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/src/shared/bap.c b/src/shared/bap.c
index 4b31536ee..270f0fd64 100644
--- a/src/shared/bap.c
+++ b/src/shared/bap.c
@@ -47,6 +47,14 @@
#define BAP_PROCESS_TIMEOUT 10
+#define PACS_SRC_LOCATION 0x00000001
+#define PACS_SNK_LOCATION 0x00000003
+
+#define PACS_SRC_CTXT 0x000f
+#define PACS_SUPPORTED_SRC_CTXT PACS_SRC_CTXT
+#define PACS_SNK_CTXT 0x0fff
+#define PACS_SUPPORTED_SNK_CTXT PACS_SNK_CTXT
+
struct bt_bap_pac_changed {
unsigned int id;
bt_bap_pac_func_t added;
@@ -467,12 +475,12 @@ static struct bt_pacs *pacs_new(struct gatt_db *db)
pacs = new0(struct bt_pacs, 1);
/* Set default values */
- pacs->sink_loc_value = 0x00000003;
- pacs->source_loc_value = 0x00000001;
- pacs->sink_context_value = 0x0fff;
- pacs->source_context_value = 0x000e;
- pacs->supported_sink_context_value = 0x0fff;
- pacs->supported_source_context_value = 0x000e;
+ pacs->sink_loc_value = PACS_SNK_LOCATION;
+ pacs->source_loc_value = PACS_SRC_LOCATION;
+ pacs->sink_context_value = PACS_SNK_CTXT;
+ pacs->source_context_value = PACS_SRC_CTXT;
+ pacs->supported_sink_context_value = PACS_SUPPORTED_SNK_CTXT;
+ pacs->supported_source_context_value = PACS_SUPPORTED_SRC_CTXT;
/* Populate DB with PACS attributes */
bt_uuid16_create(&uuid, PACS_UUID);
--
2.40.1
next reply other threads:[~2023-06-19 20:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-19 20:30 Luiz Augusto von Dentz [this message]
2023-06-19 20:30 ` [PATCH BlueZ 2/5] client: Print integers decimal value Luiz Augusto von Dentz
2023-06-19 20:30 ` [PATCH BlueZ 3/5] client/player: Fix auto registration of broadcast endpoint Luiz Augusto von Dentz
2023-06-19 20:30 ` [PATCH BlueZ 4/5] client/player: Fix transport.acquire for linked transports Luiz Augusto von Dentz
2023-06-19 20:30 ` [PATCH BlueZ 5/5] shared/bap: Pass bcode as a reference instead of value Luiz Augusto von Dentz
2023-06-19 22:26 ` [BlueZ,1/5] shared/bap: Add unespecified bit in audio context to PAC records bluez.test.bot
2023-06-20 20:00 ` [PATCH BlueZ 1/5] " patchwork-bot+bluetooth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230619203032.6812-1-luiz.dentz@gmail.com \
--to=luiz.dentz@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).