@@ -56,14 +56,14 @@ static void cap_stream_configured_cb(struct bt_bap_stream *bap_stream,
56
56
57
57
LOG_DBG ("%p" , cap_stream );
58
58
59
+ if (ops != NULL && ops -> configured != NULL ) {
60
+ ops -> configured (bap_stream , pref );
61
+ }
62
+
59
63
if (IS_ENABLED (CONFIG_BT_CAP_INITIATOR ) && IS_ENABLED (CONFIG_BT_BAP_UNICAST_CLIENT ) &&
60
64
stream_is_central (bap_stream )) {
61
65
bt_cap_initiator_codec_configured (cap_stream );
62
66
}
63
-
64
- if (ops != NULL && ops -> configured != NULL ) {
65
- ops -> configured (bap_stream , pref );
66
- }
67
67
}
68
68
69
69
static void cap_stream_qos_set_cb (struct bt_bap_stream * bap_stream )
@@ -75,14 +75,14 @@ static void cap_stream_qos_set_cb(struct bt_bap_stream *bap_stream)
75
75
76
76
LOG_DBG ("%p" , cap_stream );
77
77
78
+ if (ops != NULL && ops -> qos_set != NULL ) {
79
+ ops -> qos_set (bap_stream );
80
+ }
81
+
78
82
if (IS_ENABLED (CONFIG_BT_CAP_INITIATOR ) && IS_ENABLED (CONFIG_BT_BAP_UNICAST_CLIENT ) &&
79
83
stream_is_central (bap_stream )) {
80
84
bt_cap_initiator_qos_configured (cap_stream );
81
85
}
82
-
83
- if (ops != NULL && ops -> qos_set != NULL ) {
84
- ops -> qos_set (bap_stream );
85
- }
86
86
}
87
87
88
88
static void cap_stream_enabled_cb (struct bt_bap_stream * bap_stream )
@@ -94,14 +94,14 @@ static void cap_stream_enabled_cb(struct bt_bap_stream *bap_stream)
94
94
95
95
LOG_DBG ("%p" , cap_stream );
96
96
97
+ if (ops != NULL && ops -> enabled != NULL ) {
98
+ ops -> enabled (bap_stream );
99
+ }
100
+
97
101
if (IS_ENABLED (CONFIG_BT_CAP_INITIATOR ) && IS_ENABLED (CONFIG_BT_BAP_UNICAST_CLIENT ) &&
98
102
stream_is_central (bap_stream )) {
99
103
bt_cap_initiator_enabled (cap_stream );
100
104
}
101
-
102
- if (ops != NULL && ops -> enabled != NULL ) {
103
- ops -> enabled (bap_stream );
104
- }
105
105
}
106
106
107
107
static void cap_stream_metadata_updated_cb (struct bt_bap_stream * bap_stream )
@@ -113,14 +113,14 @@ static void cap_stream_metadata_updated_cb(struct bt_bap_stream *bap_stream)
113
113
114
114
LOG_DBG ("%p" , cap_stream );
115
115
116
+ if (ops != NULL && ops -> metadata_updated != NULL ) {
117
+ ops -> metadata_updated (bap_stream );
118
+ }
119
+
116
120
if (IS_ENABLED (CONFIG_BT_CAP_INITIATOR ) && IS_ENABLED (CONFIG_BT_BAP_UNICAST_CLIENT ) &&
117
121
stream_is_central (bap_stream )) {
118
122
bt_cap_initiator_metadata_updated (cap_stream );
119
123
}
120
-
121
- if (ops != NULL && ops -> metadata_updated != NULL ) {
122
- ops -> metadata_updated (bap_stream );
123
- }
124
124
}
125
125
126
126
static void cap_stream_disabled_cb (struct bt_bap_stream * bap_stream )
@@ -146,16 +146,16 @@ static void cap_stream_released_cb(struct bt_bap_stream *bap_stream)
146
146
147
147
LOG_DBG ("%p" , cap_stream );
148
148
149
+ if (ops != NULL && ops -> released != NULL ) {
150
+ ops -> released (bap_stream );
151
+ }
152
+
149
153
/* Here we cannot use stream_is_central as bap_stream->conn is NULL, so fall back to
150
154
* a more generic, less accurate check
151
155
*/
152
156
if (IS_ENABLED (CONFIG_BT_CAP_INITIATOR ) && IS_ENABLED (CONFIG_BT_BAP_UNICAST_CLIENT )) {
153
157
bt_cap_initiator_released (cap_stream );
154
158
}
155
-
156
- if (ops != NULL && ops -> released != NULL ) {
157
- ops -> released (bap_stream );
158
- }
159
159
}
160
160
161
161
#endif /* CONFIG_BT_BAP_UNICAST */
@@ -169,14 +169,14 @@ static void cap_stream_started_cb(struct bt_bap_stream *bap_stream)
169
169
170
170
LOG_DBG ("%p" , cap_stream );
171
171
172
+ if (ops != NULL && ops -> started != NULL ) {
173
+ ops -> started (bap_stream );
174
+ }
175
+
172
176
if (IS_ENABLED (CONFIG_BT_CAP_INITIATOR ) && IS_ENABLED (CONFIG_BT_BAP_UNICAST_CLIENT ) &&
173
177
stream_is_central (bap_stream )) {
174
178
bt_cap_initiator_started (cap_stream );
175
179
}
176
-
177
- if (ops != NULL && ops -> started != NULL ) {
178
- ops -> started (bap_stream );
179
- }
180
180
}
181
181
182
182
static void cap_stream_stopped_cb (struct bt_bap_stream * bap_stream , uint8_t reason )
@@ -228,14 +228,14 @@ static void cap_stream_connected_cb(struct bt_bap_stream *bap_stream)
228
228
CONTAINER_OF (bap_stream , struct bt_cap_stream , bap_stream );
229
229
struct bt_bap_stream_ops * ops = cap_stream -> ops ;
230
230
231
+ if (ops != NULL && ops -> connected != NULL ) {
232
+ ops -> connected (bap_stream );
233
+ }
234
+
231
235
if (IS_ENABLED (CONFIG_BT_CAP_INITIATOR ) && IS_ENABLED (CONFIG_BT_BAP_UNICAST_CLIENT ) &&
232
236
stream_is_central (bap_stream )) {
233
237
bt_cap_initiator_connected (cap_stream );
234
238
}
235
-
236
- if (ops != NULL && ops -> connected != NULL ) {
237
- ops -> connected (bap_stream );
238
- }
239
239
}
240
240
241
241
static void cap_stream_disconnected_cb (struct bt_bap_stream * bap_stream , uint8_t reason )
0 commit comments