All of lore.kernel.org
 help / color / mirror / Atom feed
From: Iulia Tanasescu <iulia.tanasescu@nxp.com>
To: linux-bluetooth@vger.kernel.org
Cc: claudia.rosu@nxp.com, mihai-octavian.urzica@nxp.com,
	silviu.barbulescu@nxp.com, vlad.pruteanu@nxp.com,
	andrei.istodorescu@nxp.com, luiz.dentz@gmail.com
Subject: [PATCH v2 3/3] bap:Update transport acquire/release flow for bcast src
Date: Mon,  2 Oct 2023 18:33:52 +0300	[thread overview]
Message-ID: <20231002153352.3163-4-iulia.tanasescu@nxp.com> (raw)
In-Reply-To: <20231002153352.3163-1-iulia.tanasescu@nxp.com>

From: Silviu Florian Barbulescu <silviu.barbulescu@nxp.com>

Update transport acquire/release flow for BAP bcast source

---
 profiles/audio/bap.c | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c
index 48a1a4f86..9a46b16ab 100644
--- a/profiles/audio/bap.c
+++ b/profiles/audio/bap.c
@@ -1328,6 +1328,10 @@ static void iso_connect_cb(GIOChannel *chan, GError *err, gpointer user_data)
 	fd = g_io_channel_unix_get_fd(chan);
 
 	if (bt_bap_stream_set_io(stream, fd)) {
+		if (bt_bap_stream_get_type(stream) ==
+						BT_BAP_STREAM_TYPE_BCAST) {
+			bt_bap_stream_start(stream, NULL, NULL);
+		}
 		g_io_channel_set_close_on_unref(chan, FALSE);
 		return;
 	}
@@ -1887,18 +1891,16 @@ static void bap_state(struct bt_bap_stream *stream, uint8_t old_state,
 		}
 		break;
 	case BT_BAP_STREAM_STATE_QOS:
-		bap_create_io(data, ep, stream, true);
+		if (bt_bap_stream_get_type(stream) ==
+					BT_BAP_STREAM_TYPE_UCAST) {
+			bap_create_io(data, ep, stream, true);
+		}
 		break;
 	case BT_BAP_STREAM_STATE_ENABLING:
 		if (ep)
 			bap_create_io(data, ep, stream, false);
 		break;
 	case BT_BAP_STREAM_STATE_STREAMING:
-		if (bt_bap_stream_get_type(stream) ==
-				BT_BAP_STREAM_TYPE_BCAST) {
-			if (ep)
-				bap_create_io(data, ep, stream, false);
-		}
 		break;
 	}
 }
@@ -2116,6 +2118,8 @@ static void bap_connecting(struct bt_bap_stream *stream, bool state, int fd,
 
 			ep->qos.bcast.big = qos.bcast.big;
 			ep->qos.bcast.bis = qos.bcast.bis;
+			bt_bap_stream_config(ep->stream, &ep->qos,
+					ep->caps, NULL, NULL);
 		}
 
 		DBG("stream %p fd %d: BIG 0x%02x BIS 0x%02x", stream, fd,
-- 
2.39.2


  parent reply	other threads:[~2023-10-02 15:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-02 15:33 [PATCH v2 0/3] Update transport acquire/release flow BAP bcast source Iulia Tanasescu
2023-10-02 15:33 ` [PATCH v2 1/3] shared/bap:Update stream enable/disable flow bcast src Iulia Tanasescu
2023-10-02 17:42   ` Update transport acquire/release flow BAP bcast source bluez.test.bot
2023-10-02 15:33 ` [PATCH v2 2/3] transport: Update transport release flow for bcast src Iulia Tanasescu
2023-10-02 15:44   ` Pauli Virtanen
2023-10-02 15:33 ` Iulia Tanasescu [this message]
2023-10-02 21:30   ` [PATCH v2 3/3] bap:Update transport acquire/release " Luiz Augusto von Dentz
2023-10-04 15:33     ` [EXT] " Silviu Florian Barbulescu
2023-10-02 21:50 ` [PATCH v2 0/3] Update transport acquire/release flow BAP bcast source 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=20231002153352.3163-4-iulia.tanasescu@nxp.com \
    --to=iulia.tanasescu@nxp.com \
    --cc=andrei.istodorescu@nxp.com \
    --cc=claudia.rosu@nxp.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=mihai-octavian.urzica@nxp.com \
    --cc=silviu.barbulescu@nxp.com \
    --cc=vlad.pruteanu@nxp.com \
    /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 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.