public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Michal Dzik <michal.dzik@streamunlimited.com>
To: linux-bluetooth@vger.kernel.org
Cc: Michal Dzik <michal.dzik@streamunlimited.com>
Subject: [PATCH BlueZ v2 3/4] audio/bap: fill BIG and BIS for receiver
Date: Fri, 17 Apr 2026 13:29:13 +0200	[thread overview]
Message-ID: <20260417112914.3752605-4-michal.dzik@streamunlimited.com> (raw)
In-Reply-To: <20260417112914.3752605-1-michal.dzik@streamunlimited.com>

This is for some reason a missing feature.
We receive QoS structure from the kernel via BT_ISO_QOS, but BIG and BIS
are not set there. In fact it is even impossible to pass them that way,
as it is only one structure per remote device. That's why we have to parse
BASE data to extract BIS and set it to stream->qos. BIG is not present
explicitly in BASE, but we can use subgroup index with success.

As a result of this commit, MediaTransport1 object has now a valid BIG
and BIS set in QoS property.
---
 profiles/audio/bap.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c
index 375026440..5333267f7 100644
--- a/profiles/audio/bap.c
+++ b/profiles/audio/bap.c
@@ -1502,6 +1502,7 @@ static void iso_bcast_confirm_cb(GIOChannel *io, GError *err, void *user_data)
 
 static void create_stream_for_bis(struct bap_data *bap_data,
 				struct bt_bap_pac *lpac, uint8_t sid,
+				uint8_t bis, uint8_t sgrp,
 				struct bt_bap_qos *qos, struct iovec *caps,
 				struct iovec *meta, char *path)
 {
@@ -1512,6 +1513,8 @@ static void create_stream_for_bis(struct bap_data *bap_data,
 
 	/* Create an internal copy for bcode */
 	setup->qos.bcast.bcode = util_iov_dup(qos->bcast.bcode, 1);
+	setup->qos.bcast.big = sgrp;
+	setup->qos.bcast.bis = bis;
 
 	setup->data = bap_data;
 
@@ -1550,7 +1553,8 @@ static void bis_handler(uint8_t sid, uint8_t bis, uint8_t sgrp,
 			sid, bis) < 0)
 		return;
 
-	create_stream_for_bis(data, lpac, sid, qos, caps, meta, path);
+	create_stream_for_bis(data, lpac, sid, bis, sgrp, qos, caps, meta,
+									path);
 }
 
 static gboolean big_info_report_cb(GIOChannel *io, GIOCondition cond,
-- 
2.43.0


  parent reply	other threads:[~2026-04-17 11:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-17 11:29 [PATCH BlueZ v2 0/4] BAP broadcast fixes Michal Dzik
2026-04-17 11:29 ` [PATCH BlueZ v2 1/4] transport: allow setting Metadata property on broadcast Michal Dzik
2026-04-17 12:27   ` BAP broadcast fixes bluez.test.bot
2026-04-17 11:29 ` [PATCH BlueZ v2 2/4] shared/bap: run callback after setting the broadcast metadata Michal Dzik
2026-04-17 11:29 ` Michal Dzik [this message]
2026-04-17 11:29 ` [PATCH BlueZ v2 4/4] audio: update QoS dbus property after it is set Michal Dzik

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=20260417112914.3752605-4-michal.dzik@streamunlimited.com \
    --to=michal.dzik@streamunlimited.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