Bluetooth: ASCS: Fixed wrong state for detaching stream
The audio stream should be detached from the endpoint when the endpoint goes into the releasing state, instead of the idle state. Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit is contained in:
parent
84e923cea3
commit
55de0fd353
1 changed files with 3 additions and 1 deletions
|
@ -141,7 +141,7 @@ void ascs_ep_set_state(struct bt_audio_ep *ep, uint8_t state)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state == BT_AUDIO_EP_STATE_IDLE) {
|
if (state == BT_AUDIO_EP_STATE_RELEASING) {
|
||||||
bt_audio_stream_detach(ep->stream);
|
bt_audio_stream_detach(ep->stream);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -755,6 +755,8 @@ static void ase_process(struct k_work *work)
|
||||||
struct bt_ascs_ase *ase = CONTAINER_OF(work, struct bt_ascs_ase, work);
|
struct bt_ascs_ase *ase = CONTAINER_OF(work, struct bt_ascs_ase, work);
|
||||||
struct bt_gatt_attr attr;
|
struct bt_gatt_attr attr;
|
||||||
|
|
||||||
|
BT_DBG("ase %p, ep %p, ep.stream %p", ase, &ase->ep, ase->ep.stream);
|
||||||
|
|
||||||
ascs_ep_get_status(&ase->ep, &ase_buf);
|
ascs_ep_get_status(&ase->ep, &ase_buf);
|
||||||
|
|
||||||
memset(&attr, 0, sizeof(attr));
|
memset(&attr, 0, sizeof(attr));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue