All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ v2 0/6] To add support for Metadata, CID, VID
@ 2022-12-29 12:28 Abhay Maheta
  2022-12-29 12:22 ` Paul Menzel
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Abhay Maheta @ 2022-12-29 12:28 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Abhay Maheta, Abhay Maheta

This series of patches adds support for Metadata, Company ID and
Vendor Codec ID during Endpoint Registration for LE Audio.

Abhay Maheta (6):
  shared/bap: Fix handling for Company ID and Vendor Codec ID
  shared/bap: Add support to set stream metadata
  profiles: Add Support for Metadata, CID and VID
  media-api: Add CompanyID, VendorCodecID, Metadata
  client/player: Add support for Company ID, Vendor ID in BAP Profile
  client/player: Add support for Metadata in BAP Profile

 client/player.c            | 205 ++++++++++++++++++++++++++++++++++---
 doc/media-api.txt          |  18 ++++
 profiles/audio/bap.c       |  14 ++-
 profiles/audio/media.c     |  99 ++++++++++++++++--
 profiles/audio/transport.c |   4 +-
 src/shared/bap.c           |  31 +++++-
 src/shared/bap.h           |   4 +-
 7 files changed, 342 insertions(+), 33 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 12+ messages in thread
* [PATCH BlueZ v3 1/6] shared/bap: Fix handling for Company ID and Vendor Codec ID
@ 2022-12-29 15:52 Abhay Maheta
  2022-12-29 17:31 ` To add support for Metadata, CID, VID bluez.test.bot
  0 siblings, 1 reply; 12+ messages in thread
From: Abhay Maheta @ 2022-12-29 15:52 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Abhay Maheta, Abhay Maheta

This adds fixes for handing for Company ID and Vendor Codec ID
while adding PAC record to database and responding to Attribute
Read Request for Sink/Source PAC Characteristics.
---
 src/shared/bap.c | 5 +++++
 src/shared/bap.h | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/shared/bap.c b/src/shared/bap.c
index 2919f243f..0cafb75e6 100644
--- a/src/shared/bap.c
+++ b/src/shared/bap.c
@@ -344,6 +344,8 @@ static void pac_foreach(void *data, void *user_data)
 
 	p = util_iov_push(iov, sizeof(*p));
 	p->codec.id = pac->codec.id;
+	p->codec.cid = pac->codec.cid;
+	p->codec.vid = pac->codec.vid;
 
 	if (pac->data) {
 		p->cc_len = pac->data->iov_len;
@@ -2383,6 +2385,9 @@ struct bt_bap_pac *bt_bap_add_vendor_pac(struct gatt_db *db,
 	if (!bdb)
 		return NULL;
 
+	if ((id != 0xff) && ((cid != 0U)  || (vid != 0U)))
+		return NULL;
+
 	codec.id = id;
 	codec.cid = cid;
 	codec.vid = vid;
diff --git a/src/shared/bap.h b/src/shared/bap.h
index 3558d0445..47a15636c 100644
--- a/src/shared/bap.h
+++ b/src/shared/bap.h
@@ -39,8 +39,8 @@ struct bt_bap_stream;
 
 struct bt_bap_codec {
 	uint8_t  id;
-	uint16_t vid;
 	uint16_t cid;
+	uint16_t vid;
 } __packed;
 
 struct bt_ltv {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread
* [PATCH BlueZ 1/5] shared/bap: Fix handling for Company ID and Vendor Codec ID
@ 2022-10-29 17:04 Abhay Maheta
  2022-10-29 17:42 ` To add support for Metadata, CID, VID bluez.test.bot
  0 siblings, 1 reply; 12+ messages in thread
From: Abhay Maheta @ 2022-10-29 17:04 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Abhay Maheta

This adds fixes for handing for Company ID and Vendor Codec ID
while adding PAC record to database and responding to Attribute
Read Request for Sink/Source PAC Characteristics.
---
 src/shared/bap.c | 5 +++++
 src/shared/bap.h | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/shared/bap.c b/src/shared/bap.c
index c3c0d596f..0ae0eba33 100644
--- a/src/shared/bap.c
+++ b/src/shared/bap.c
@@ -416,6 +416,8 @@ static void pac_foreach(void *data, void *user_data)
 
 	p = iov_add(iov, sizeof(*p));
 	p->codec.id = pac->codec.id;
+	p->codec.cid = pac->codec.cid;
+	p->codec.vid = pac->codec.vid;
 
 	if (pac->data) {
 		p->cc_len = pac->data->iov_len;
@@ -2415,6 +2417,9 @@ struct bt_bap_pac *bt_bap_add_vendor_pac(struct gatt_db *db,
 	if (!bdb)
 		return NULL;
 
+	if ((id != 0xff) && ((cid != 0U)  || (vid != 0U)))
+		return NULL;
+
 	codec.id = id;
 	codec.cid = cid;
 	codec.vid = vid;
diff --git a/src/shared/bap.h b/src/shared/bap.h
index 7b9f88c83..923669f32 100644
--- a/src/shared/bap.h
+++ b/src/shared/bap.h
@@ -39,8 +39,8 @@ struct bt_bap_stream;
 
 struct bt_bap_codec {
 	uint8_t  id;
-	uint16_t vid;
 	uint16_t cid;
+	uint16_t vid;
 } __packed;
 
 struct bt_ltv {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-12-29 17:32 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-29 12:28 [PATCH BlueZ v2 0/6] To add support for Metadata, CID, VID Abhay Maheta
2022-12-29 12:22 ` Paul Menzel
2022-12-29 15:57   ` Maheta, Abhay
2022-12-29 12:28 ` [PATCH BlueZ v2 1/6] shared/bap: Fix handling for Company ID and Vendor Codec ID Abhay Maheta
2022-12-29 14:17   ` To add support for Metadata, CID, VID bluez.test.bot
2022-12-29 12:28 ` [PATCH BlueZ v2 2/6] shared/bap: Add support to set stream metadata Abhay Maheta
2022-12-29 12:28 ` [PATCH BlueZ v2 3/6] profiles: Add Support for Metadata, CID and VID Abhay Maheta
2022-12-29 12:28 ` [PATCH BlueZ v2 4/6] media-api: Add CompanyID, VendorCodecID, Metadata Abhay Maheta
2022-12-29 12:28 ` [PATCH BlueZ v2 5/6] client/player: Add support for Company ID, Vendor ID in BAP Profile Abhay Maheta
2022-12-29 12:28 ` [PATCH BlueZ v2 6/6] client/player: Add support for Metadata " Abhay Maheta
  -- strict thread matches above, loose matches on Subject: below --
2022-12-29 15:52 [PATCH BlueZ v3 1/6] shared/bap: Fix handling for Company ID and Vendor Codec ID Abhay Maheta
2022-12-29 17:31 ` To add support for Metadata, CID, VID bluez.test.bot
2022-10-29 17:04 [PATCH BlueZ 1/5] shared/bap: Fix handling for Company ID and Vendor Codec ID Abhay Maheta
2022-10-29 17:42 ` To add support for Metadata, CID, VID bluez.test.bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.