@@ -6400,9 +6400,11 @@ static void check_local_pac(void *data, void *user_data)
/* We have a match if all selected LTVs have a match */
if ((bis_compare_data.data32 &
- CODEC_SPECIFIC_CONFIGURATION_MASK) ==
- CODEC_SPECIFIC_CONFIGURATION_MASK)
+ CODEC_SPECIFIC_CONFIGURATION_MASK) ==
+ CODEC_SPECIFIC_CONFIGURATION_MASK) {
compare_data->found = true;
+ compare_data->data = data;
+ }
}
}
@@ -6427,7 +6429,8 @@ static void bap_sink_match_allocation(size_t i, uint8_t l, uint8_t t,
data->found = false;
}
-static bool bap_check_bis(struct bt_bap_db *ldb, struct iovec *bis_data)
+static struct bt_ltv_match bap_check_bis(struct bt_bap_db *ldb,
+ struct iovec *bis_data)
{
struct bt_ltv_match compare_data = {};
@@ -6453,7 +6456,7 @@ static bool bap_check_bis(struct bt_bap_db *ldb, struct iovec *bis_data)
&compare_data);
}
- return compare_data.found;
+ return compare_data;
}
void bt_bap_add_bis(struct bt_bap *bap, uint8_t bis_index,
@@ -6468,6 +6471,7 @@ void bt_bap_add_bis(struct bt_bap *bap, uint8_t bis_index,
struct bt_bap_pac_qos bis_qos = {0};
uint8_t type = 0;
struct bt_ltv_extract merge_data = {0};
+ struct bt_ltv_match match_data = {0};
merge_data.src = l3_caps;
merge_data.result = new0(struct iovec, 1);
@@ -6483,7 +6487,8 @@ void bt_bap_add_bis(struct bt_bap *bap, uint8_t bis_index,
/* Check each BIS Codec Specific Configuration LTVs against our Codec
* Specific Capabilities and if the BIS matches create a PAC with it
*/
- if (bap_check_bis(bap->ldb, merge_data.result) == false)
+ match_data = bap_check_bis(bap->ldb, merge_data.result);
+ if (match_data.found == false)
goto cleanup;
DBG(bap, "Matching BIS %i", bis_index);