diff mbox series

[BlueZ,2/6] bap: Remove bap_get_session

Message ID 20250307154457.85751-3-iulia.tanasescu@nxp.com (mailing list archive)
State Accepted
Commit fd622a5bb2e3409f39956edba20afc6fa3cff09e
Headers show
Series bap: Remove interface | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success

Commit Message

Iulia Tanasescu March 7, 2025, 3:44 p.m. UTC
This removes the bap_get_session API from the BAP plugin interface and
replaces the call inside BASS with the shared/bap API.
---
 profiles/audio/bap.c  | 11 -----------
 profiles/audio/bap.h  |  2 --
 profiles/audio/bass.c |  2 +-
 3 files changed, 1 insertion(+), 14 deletions(-)
diff mbox series

Patch

diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c
index 0489f6655..0dc5b4004 100644
--- a/profiles/audio/bap.c
+++ b/profiles/audio/bap.c
@@ -2708,17 +2708,6 @@  static bool match_device(const void *data, const void *match_data)
 	return bdata->device == device;
 }
 
-struct bt_bap *bap_get_session(struct btd_device *device)
-{
-	struct bap_data *data;
-
-	data = queue_find(sessions, match_device, device);
-	if (!data)
-		return NULL;
-
-	return data->bap;
-}
-
 static struct bap_data *bap_data_new(struct btd_device *device)
 {
 	struct bap_data *data;
diff --git a/profiles/audio/bap.h b/profiles/audio/bap.h
index 522072340..554670d4a 100644
--- a/profiles/audio/bap.h
+++ b/profiles/audio/bap.h
@@ -9,8 +9,6 @@ 
 
 extern struct bt_iso_qos bap_sink_pa_qos;
 
-struct bt_bap *bap_get_session(struct btd_device *device);
-
 void bap_iso_qos_to_bap_qos(struct bt_iso_qos *iso_qos,
 				struct bt_bap_qos *bap_qos);
 void bap_qos_to_iso_qos(struct bt_bap_qos *bap_qos,
diff --git a/profiles/audio/bass.c b/profiles/audio/bass.c
index 44320a78a..6f68b80f3 100644
--- a/profiles/audio/bass.c
+++ b/profiles/audio/bass.c
@@ -1113,7 +1113,7 @@  static void bis_probe(uint8_t bis, uint8_t sgrp, struct iovec *caps,
 			/* Only client sessions must be handled */
 			continue;
 
-		bap = bap_get_session(data->device);
+		bap = bt_bap_get_session(bt_bass_get_att(data->bass), NULL);
 		if (!bap)
 			continue;