All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ v1 4/6] shared/bap: Add bt_bap_stream_is_client
Date: Mon,  2 Nov 2026 13:12:54 -0500	[thread overview]
Message-ID: <20261102181256.2321329-5-luiz.dentz@gmail.com> (raw)
In-Reply-To: <20261102181256.2321329-1-luiz.dentz@gmail.com>

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

Tell whether the stream is handled by the local client, which enables
its ASEs, or by the server, whose ASEs are enabled by the remote.

Assisted-by: Claude:claude-opus-5-5
---
 src/shared/bap.c | 8 ++++++++
 src/shared/bap.h | 2 ++
 2 files changed, 10 insertions(+)

diff --git a/src/shared/bap.c b/src/shared/bap.c
index 10cc81a51c3e..b1180b532b8d 100644
--- a/src/shared/bap.c
+++ b/src/shared/bap.c
@@ -4549,6 +4549,14 @@ struct iovec *bt_bap_pac_get_metadata(struct bt_bap_pac *pac)
 	return pac->metadata;
 }
 
+bool bt_bap_stream_is_client(struct bt_bap_stream *stream)
+{
+	if (!stream)
+		return false;
+
+	return stream->client;
+}
+
 uint8_t bt_bap_stream_get_type(struct bt_bap_stream *stream)
 {
 	if (!stream)
diff --git a/src/shared/bap.h b/src/shared/bap.h
index 5bdc5f8dbc34..242bfbb39b30 100644
--- a/src/shared/bap.h
+++ b/src/shared/bap.h
@@ -122,6 +122,8 @@ struct iovec *bt_bap_pac_get_metadata(struct bt_bap_pac *pac);
 
 uint8_t bt_bap_stream_get_type(struct bt_bap_stream *stream);
 
+bool bt_bap_stream_is_client(struct bt_bap_stream *stream);
+
 struct bt_bap_stream *bt_bap_pac_get_stream(struct bt_bap_pac *pac);
 
 /* Session related function */
-- 
2.56.0


  parent reply	other threads:[~2026-11-02 18:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-02 18:12 [PATCH BlueZ v1 0/6] Fix linked transports of an ASE not enabled yet Luiz Augusto von Dentz
2026-11-02 18:12 ` [PATCH BlueZ v1 1/6] client/scripts: Add bap-duplex-lc3.bt Luiz Augusto von Dentz
2026-11-02 19:43   ` Fix linked transports of an ASE not enabled yet bluez.test.bot
2026-11-02 18:12 ` [PATCH BlueZ v1 2/6] doc/functional-bap: Document the duplex unicast test cases Luiz Augusto von Dentz
2026-11-02 18:12 ` [PATCH BlueZ v1 3/6] test: functional: Cover enabling one ASE of a bidirectional CIS Luiz Augusto von Dentz
2026-11-02 18:12 ` Luiz Augusto von Dentz [this message]
2026-11-02 18:12 ` [PATCH BlueZ v1 5/6] transport: Don't set linked transports pending before they are enabled Luiz Augusto von Dentz
2026-11-02 18:12 ` [PATCH BlueZ v1 6/6] transport: Don't disable desynchronized links on release Luiz Augusto von Dentz

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=20261102181256.2321329-5-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 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.