Bluetooth: Audio: Remove ISO disconnected and connected cbs
The callbacks were implemented to notify the application about the state of the ISO. However, since then, callbacks such as `started` and `stopped` have been implemented, and as such the `connected` and `disconnected` callbacks no longer server any purpose. Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit is contained in:
parent
04ea1ee1af
commit
628b54a959
10 changed files with 19 additions and 122 deletions
|
@ -83,16 +83,9 @@ static void unicast_client_ep_iso_recv(struct bt_iso_chan *chan,
|
|||
static void unicast_client_ep_iso_connected(struct bt_iso_chan *chan)
|
||||
{
|
||||
struct bt_audio_ep *ep = EP_ISO(chan);
|
||||
struct bt_audio_stream_ops *ops = ep->stream->ops;
|
||||
|
||||
BT_DBG("stream %p ep %p type %u", chan, ep, ep != NULL ? ep->type : 0);
|
||||
|
||||
if (ops != NULL && ops->connected != NULL) {
|
||||
ops->connected(ep->stream);
|
||||
} else {
|
||||
BT_WARN("No callback for connected set");
|
||||
}
|
||||
|
||||
if (ep->status.state != BT_AUDIO_EP_STATE_ENABLING) {
|
||||
BT_DBG("endpoint not in enabling state: %s",
|
||||
bt_audio_ep_state_str(ep->status.state));
|
||||
|
@ -112,10 +105,10 @@ static void unicast_client_ep_iso_disconnected(struct bt_iso_chan *chan,
|
|||
|
||||
BT_DBG("stream %p ep %p reason 0x%02x", chan, ep, reason);
|
||||
|
||||
if (ops != NULL && ops->disconnected != NULL) {
|
||||
ops->disconnected(stream, reason);
|
||||
if (ops != NULL && ops->stopped != NULL) {
|
||||
ops->stopped(stream);
|
||||
} else {
|
||||
BT_WARN("No callback for disconnected set");
|
||||
BT_WARN("No callback for stopped set");
|
||||
}
|
||||
|
||||
if (ep->type != BT_AUDIO_EP_LOCAL) {
|
||||
|
@ -503,13 +496,6 @@ static void unicast_client_ep_releasing_state(struct bt_audio_ep *ep,
|
|||
BT_DBG("dir 0x%02x",
|
||||
unicast_client_ep_is_snk(ep) ? BT_AUDIO_SINK : BT_AUDIO_SOURCE);
|
||||
|
||||
/* Notify upper layer */
|
||||
if (stream->ops != NULL && stream->ops->stopped != NULL) {
|
||||
stream->ops->stopped(stream);
|
||||
} else {
|
||||
BT_WARN("No callback for stopped set");
|
||||
}
|
||||
|
||||
/* The Unicast Client shall terminate any CIS established for that ASE
|
||||
* by following the Connected Isochronous Stream Terminate procedure
|
||||
* defined in Volume 3, Part C, Section 9.3.15 in when the Unicast
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue