KKopyscinski commented on code in PR #1677:
URL: https://github.com/apache/mynewt-nimble/pull/1677#discussion_r1476063243


##########
nimble/host/audio/src/ble_audio_bsnk.c:
##########
@@ -0,0 +1,724 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include "os/util.h"
+#include "sysinit/sysinit.h"
+
+#include "host/ble_gap.h"
+#include "host/ble_hs.h"
+#include "host/ble_iso.h"
+#include "host/ble_uuid.h"
+#include "host/audio/ble_audio.h"
+
+#include "ble_audio_priv.h"
+
+#if MYNEWT_VAL(BLE_ISO_BROADCAST_SINK)
+struct ble_audio_bsnk {

Review Comment:
   Also, I think this struct should also contain `Num_Subgroups`, 
`BIS_Sync_State` bifield and `Metadata` with length, for every subgroup as 
described in BASS 3.2.1.8-11, which would be filled on sync established. Maybe 
something like this:
   
   ```c
   struct ble_audio_bsnk_soubgroup_entry {
         SLIST_ENTRY(ble_audio_bsnk_soubgroup_entry) next;
         uint32_t bis_sync_state;
         uint8_t metadata_len;
         uint8_t *metadata;
   };
   
   struct ble_audio_bsnk {
       /** Advertiser Address for the Broadcast Source */
       ble_addr_t adv_addr;
   
       /** Advertising Set ID */
       uint8_t adv_sid;
       .
       .
       .
       uint8_t num_subgroups;
   
       SLIST_ENTRY(, ble_audio_bsnk_soubgroup_entry) subgroups;
   
       /** Singly-linked list entry. */
       SLIST_ENTRY(ble_audio_bsnk) next;
   };
   ```
   and I think Broadcast Sink should handle memory for 
`ble_audio_bsnk_soubgroup_entry` and metadata



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to