Skip to content

Commit b546582

Browse files
MariuszSkamracarlescufi
authored andcommitted
Bluetooth: ascs: Remove duplicated logic
The ase_stream_add does the same job as bt_bap_stream_attach that is called right below. Signed-off-by: Mariusz Skamra <[email protected]>
1 parent 608a9bc commit b546582

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

subsys/bluetooth/audio/ascs.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,17 +1150,6 @@ static struct bt_bap_iso *bap_iso_get_or_new(struct bt_ascs *ascs, uint8_t cig_i
11501150
return iso;
11511151
}
11521152

1153-
static void ase_stream_add(struct bt_ascs *ascs, struct bt_ascs_ase *ase,
1154-
struct bt_bap_stream *stream)
1155-
{
1156-
LOG_DBG("ase %p stream %p", ase, stream);
1157-
ase->ep.stream = stream;
1158-
if (stream->conn == NULL) {
1159-
stream->conn = bt_conn_ref(ascs->conn);
1160-
}
1161-
stream->ep = &ase->ep;
1162-
}
1163-
11641153
static void ascs_init(struct bt_ascs *ascs, struct bt_conn *conn)
11651154
{
11661155
memset(ascs, 0, sizeof(*ascs));
@@ -1515,15 +1504,10 @@ static int ase_config(struct bt_ascs *ascs, struct bt_ascs_ase *ase,
15151504

15161505
return err;
15171506
}
1518-
1519-
ase_stream_add(ascs, ase, stream);
15201507
}
15211508

15221509
ascs_cp_rsp_success(ASE_ID(ase), BT_ASCS_CONFIG_OP);
15231510

1524-
/* TODO: bt_bap_stream_attach duplicates some of the
1525-
* ase_stream_add. Should be cleaned up.
1526-
*/
15271511
bt_bap_stream_attach(ascs->conn, stream, &ase->ep, &ase->ep.codec);
15281512

15291513
ascs_ep_set_state(&ase->ep, BT_BAP_EP_STATE_CODEC_CONFIGURED);

0 commit comments

Comments
 (0)