Compare commits
4 Commits
fix/compil
...
dev
| Author | SHA1 | Date |
|---|---|---|
|
|
69698271e5 | |
|
|
5ea0a86564 | |
|
|
1052bb0052 | |
|
|
e937a254ea |
|
|
@ -476,6 +476,9 @@ struct bt_a2dp_cb {
|
|||
* bt_a2dp_err_code or bt_avdtp_err_code
|
||||
*/
|
||||
void (*config_rsp)(struct bt_a2dp_stream *stream, uint8_t rsp_err_code);
|
||||
int (*get_config_req)(struct bt_a2dp_stream *stream, uint8_t *rsp_err_code);
|
||||
void (*get_config_rsp)(struct bt_a2dp_stream *stream,
|
||||
struct bt_a2dp_codec_cfg *config, uint8_t rsp_err_code);
|
||||
/**
|
||||
* @brief Stream establishment request callback
|
||||
*
|
||||
|
|
|
|||
|
|
@ -576,6 +576,8 @@ struct bt_sdp_discover_params {
|
|||
struct net_buf_pool *pool;
|
||||
/** Discover type */
|
||||
uint8_t type;
|
||||
void (*disconnected)(struct bt_conn *conn,
|
||||
const struct bt_sdp_discover_params *params);
|
||||
};
|
||||
|
||||
/** @brief Allows user to start SDP discovery session.
|
||||
|
|
|
|||
|
|
@ -115,6 +115,12 @@ const struct bt_conn_cb *_bt_conn_cb_list[] = {
|
|||
};
|
||||
/* bt_conn_cb END */
|
||||
|
||||
/* bt_sco_conn_cb START */
|
||||
struct bt_sco_conn_cb *_bt_sco_conn_cb_list[] = {
|
||||
NULL,
|
||||
};
|
||||
/* bt_sco_conn_cb END */
|
||||
|
||||
/* net_buf_pool START */
|
||||
extern struct net_buf_pool sine_tx_pool;
|
||||
extern struct net_buf_pool tx_pool;
|
||||
|
|
@ -149,7 +155,7 @@ extern struct net_buf_pool prep_pool;
|
|||
extern struct net_buf_pool att_pool;
|
||||
extern struct net_buf_pool acl_in_pool;
|
||||
extern struct net_buf_pool acl_tx_pool;
|
||||
extern struct net_buf_pool dummy_pool;
|
||||
struct net_buf_pool dummy_pool;
|
||||
// extern struct net_buf_pool a2dp_tx_pool; // for Zephyr shell
|
||||
extern struct net_buf_pool bt_a2dp_tx_pool; // for openvela sal
|
||||
|
||||
|
|
|
|||
|
|
@ -168,6 +168,7 @@ source "$APPSDIR/external/zblue/zblue/subsys/bluetooth/audio/Kconfig"
|
|||
config BT_HOST_CRYPTO
|
||||
bool "Use crypto functionality implemented in the Bluetooth host"
|
||||
default y if !BT_CTLR_CRYPTO
|
||||
select CRYPTO_MBEDTLS if !BUILD_WITH_TFM
|
||||
select MBEDTLS if !BUILD_WITH_TFM
|
||||
select MBEDTLS_PSA_CRYPTO_C if !BUILD_WITH_TFM
|
||||
select PSA_WANT_KEY_TYPE_AES
|
||||
|
|
|
|||
|
|
@ -3362,7 +3362,9 @@ static void bt_att_connected(struct bt_l2cap_chan *chan)
|
|||
|
||||
conn = br_chan->chan.conn;
|
||||
/* ATT over BR negotiates MTU via L2CAP configuration. */
|
||||
#if defined(CONFIG_BT_GATT_CLIENT)
|
||||
atomic_set_bit(chan->conn->flags, BT_CONN_ATT_MTU_EXCHANGED);
|
||||
#endif
|
||||
|
||||
SYS_SLIST_FOR_EACH_CONTAINER(&chan->conn->hdev->att_ctx->conn_cbs, callback, _node) {
|
||||
if (callback->connected) {
|
||||
|
|
|
|||
|
|
@ -256,6 +256,9 @@ struct bt_avdtp_ops_cb {
|
|||
int (*set_configuration_ind)(struct bt_avdtp *session, struct bt_avdtp_sep *sep,
|
||||
uint8_t int_seid, struct net_buf *buf, uint8_t *errcode);
|
||||
|
||||
int (*get_configuration_ind)(struct bt_avdtp *session, struct bt_avdtp_sep *sep,
|
||||
struct net_buf *rsp_buf, uint8_t *errcode);
|
||||
|
||||
int (*re_configuration_ind)(struct bt_avdtp *session, struct bt_avdtp_sep *sep,
|
||||
struct net_buf *buf, uint8_t *errcode);
|
||||
|
||||
|
|
|
|||
|
|
@ -1154,7 +1154,7 @@ static int process_register_notification_rsp(struct bt_avrcp *avrcp, uint8_t tid
|
|||
return BT_AVRCP_STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
break;
|
||||
case BT_AVRCP_EVT_TRACK_CHANGED:
|
||||
case BT_AVRCP_EVT_TRACK_CHANGED: {
|
||||
if (buf->len < sizeof(event_data->identifier)) {
|
||||
LOG_ERR("Invalid TRACK_CHANGED response length");
|
||||
return BT_AVRCP_STATUS_INVALID_PARAMETER;
|
||||
|
|
@ -1163,6 +1163,7 @@ static int process_register_notification_rsp(struct bt_avrcp *avrcp, uint8_t tid
|
|||
|
||||
memcpy(event_data->identifier, &identifier, sizeof(uint64_t));
|
||||
break;
|
||||
}
|
||||
case BT_AVRCP_EVT_PLAYBACK_POS_CHANGED:
|
||||
if (buf->len < sizeof(event_data->playback_pos)) {
|
||||
LOG_ERR("Invalid PLAYBACK_POS_CHANGED response length");
|
||||
|
|
@ -1268,23 +1269,29 @@ static int process_register_notification_rsp(struct bt_avrcp *avrcp, uint8_t tid
|
|||
}
|
||||
return BT_AVRCP_STATUS_OPERATION_COMPLETED;
|
||||
notify_callback:
|
||||
/* Find the event registered with this TID and clear ONLY that one */
|
||||
uint8_t failed_evt = 0;
|
||||
bool found = false;
|
||||
/* Find the event registered with this TID and clear ONLY that one.
|
||||
* The braces here form a compound statement so the label is followed
|
||||
* by a statement (C forbids a declaration directly after a label).
|
||||
*/
|
||||
{
|
||||
uint8_t failed_evt = 0;
|
||||
bool found = false;
|
||||
|
||||
ARRAY_FOR_EACH(ct->ct_notify, i) {
|
||||
if (ct->ct_notify[i].tid == tid && ct->ct_notify[i].cb != NULL) {
|
||||
failed_evt = i;
|
||||
ct->ct_notify[i].cb = NULL;
|
||||
ct->ct_notify[i].interim_received = 0;
|
||||
found = true;
|
||||
break;
|
||||
ARRAY_FOR_EACH(ct->ct_notify, i) {
|
||||
if (ct->ct_notify[i].tid == tid && ct->ct_notify[i].cb != NULL) {
|
||||
failed_evt = i;
|
||||
ct->ct_notify[i].cb = NULL;
|
||||
ct->ct_notify[i].interim_received = 0;
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
avrcp_ct_cb->notification(get_avrcp_ct(avrcp), tid, status,
|
||||
found ? failed_evt : 0, NULL);
|
||||
|
||||
return BT_AVRCP_STATUS_OPERATION_COMPLETED;
|
||||
}
|
||||
|
||||
avrcp_ct_cb->notification(get_avrcp_ct(avrcp), tid, status, found ? failed_evt : 0, NULL);
|
||||
|
||||
return BT_AVRCP_STATUS_OPERATION_COMPLETED;
|
||||
}
|
||||
|
||||
static int process_set_absolute_volume_rsp(struct bt_avrcp *avrcp, uint8_t tid,
|
||||
|
|
@ -4331,11 +4338,12 @@ static int build_notification_rsp_data(uint8_t event_id, struct bt_avrcp_event_d
|
|||
}
|
||||
net_buf_add_u8(buf, data->play_status);
|
||||
break;
|
||||
case BT_AVRCP_EVT_TRACK_CHANGED:
|
||||
case BT_AVRCP_EVT_TRACK_CHANGED: {
|
||||
uint64_t identifier = sys_get_be64(data->identifier);
|
||||
|
||||
net_buf_add_be64(buf, identifier);
|
||||
break;
|
||||
}
|
||||
case BT_AVRCP_EVT_PLAYBACK_POS_CHANGED:
|
||||
net_buf_add_be32(buf, data->playback_pos);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in New Issue