@@ -1138,6 +1138,21 @@ static void stream_notify_release(struct bt_bap_stream *stream)
bt_bap_get_att(stream->bap));
}
+static void stream_notify_idle(struct bt_bap_stream *stream)
+{
+ struct bt_bap_endpoint *ep = stream->ep;
+ struct bt_ascs_ase_status status;
+
+ DBG(stream->bap, "stream %p", stream);
+
+ memset(&status, 0, sizeof(status));
+ status.id = ep->id;
+ status.state = BT_ASCS_ASE_STATE_IDLE;
+
+ gatt_db_attribute_notify(ep->attr, (void *)&status, sizeof(status),
+ bt_bap_get_att(stream->bap));
+}
+
static struct bt_bap *bt_bap_ref_safe(struct bt_bap *bap)
{
if (!bap || !bap->ref_count || !queue_find(sessions, NULL, bap))
@@ -1712,6 +1727,7 @@ static void stream_notify(struct bt_bap_stream *stream, uint8_t state)
switch (state) {
case BT_ASCS_ASE_STATE_IDLE:
+ stream_notify_idle(stream);
break;
case BT_ASCS_ASE_STATE_CONFIG:
stream_notify_config(stream);
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> The idle state must be notified like any other state. --- src/shared/bap.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)