@@ -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;
@@ -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 {