Bluetooth: Audio: define bt_bap_bass_subgroup struct.
The Broadcast Assistant API should be fully independent of the scan delegator. Therefore the new struct bt_bap_bass_subgroup has been defined to avoid a dependency. Fixes: #68338 Signed-off-by: Ping Wang <pinw@demant.com>
This commit is contained in:
parent
e01a66f10c
commit
5ccd75b49b
19 changed files with 95 additions and 110 deletions
|
@ -34,7 +34,7 @@ static uint8_t received_base_size;
|
|||
static struct bt_auto_scan {
|
||||
uint32_t broadcast_id;
|
||||
bool pa_sync;
|
||||
struct bt_bap_scan_delegator_subgroup subgroup;
|
||||
struct bt_bap_bass_subgroup subgroup;
|
||||
} auto_scan = {
|
||||
.broadcast_id = INVALID_BROADCAST_ID,
|
||||
};
|
||||
|
@ -128,7 +128,7 @@ static void bap_broadcast_assistant_recv_state_cb(
|
|||
is_bad_code ? ", bad code" : "", is_bad_code ? bad_code : "");
|
||||
|
||||
for (int i = 0; i < state->num_subgroups; i++) {
|
||||
const struct bt_bap_scan_delegator_subgroup *subgroup = &state->subgroups[i];
|
||||
const struct bt_bap_bass_subgroup *subgroup = &state->subgroups[i];
|
||||
struct net_buf_simple buf;
|
||||
|
||||
shell_print(ctx_shell, "\t[%d]: BIS sync 0x%04X, metadata_len %zu", i,
|
||||
|
@ -361,7 +361,7 @@ static int cmd_bap_broadcast_assistant_add_src(const struct shell *sh,
|
|||
size_t argc, char **argv)
|
||||
{
|
||||
struct bt_bap_broadcast_assistant_add_src_param param = { 0 };
|
||||
struct bt_bap_scan_delegator_subgroup subgroup = { 0 };
|
||||
struct bt_bap_bass_subgroup subgroup = { 0 };
|
||||
unsigned long broadcast_id;
|
||||
unsigned long adv_sid;
|
||||
int result;
|
||||
|
@ -586,7 +586,7 @@ static int cmd_bap_broadcast_assistant_add_broadcast_id(const struct shell *sh,
|
|||
size_t argc,
|
||||
char **argv)
|
||||
{
|
||||
struct bt_bap_scan_delegator_subgroup subgroup = { 0 };
|
||||
struct bt_bap_bass_subgroup subgroup = { 0 };
|
||||
static bool scan_cbs_registered;
|
||||
unsigned long broadcast_id;
|
||||
int err = 0;
|
||||
|
@ -666,7 +666,7 @@ static int cmd_bap_broadcast_assistant_mod_src(const struct shell *sh,
|
|||
size_t argc, char **argv)
|
||||
{
|
||||
struct bt_bap_broadcast_assistant_mod_src_param param = { 0 };
|
||||
struct bt_bap_scan_delegator_subgroup subgroup = { 0 };
|
||||
struct bt_bap_bass_subgroup subgroup = { 0 };
|
||||
unsigned long src_id;
|
||||
int result = 0;
|
||||
|
||||
|
@ -766,7 +766,7 @@ static int cmd_bap_broadcast_assistant_mod_src(const struct shell *sh,
|
|||
static inline bool add_pa_sync_base_subgroup_bis_cb(const struct bt_bap_base_subgroup_bis *bis,
|
||||
void *user_data)
|
||||
{
|
||||
struct bt_bap_scan_delegator_subgroup *subgroup_param = user_data;
|
||||
struct bt_bap_bass_subgroup *subgroup_param = user_data;
|
||||
|
||||
subgroup_param->bis_sync |= BIT(bis->index);
|
||||
|
||||
|
@ -777,7 +777,7 @@ static inline bool add_pa_sync_base_subgroup_cb(const struct bt_bap_base_subgrou
|
|||
void *user_data)
|
||||
{
|
||||
struct bt_bap_broadcast_assistant_add_src_param *param = user_data;
|
||||
struct bt_bap_scan_delegator_subgroup *subgroup_param;
|
||||
struct bt_bap_bass_subgroup *subgroup_param;
|
||||
uint8_t *data;
|
||||
int ret;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue