Skip to content

Commit d8f35a5

Browse files
MarkWangChinesekartben
authored andcommitted
bluetooth: sdp: add avdtp protocol
get the avdtp version through the bt_sdp_get_proto_param Signed-off-by: Mark Wang <yichang.wang@nxp.com>
1 parent 88de138 commit d8f35a5

File tree

2 files changed

+5
-2
lines changed
  • include/zephyr/bluetooth/classic
  • subsys/bluetooth/host/classic

2 files changed

+5
-2
lines changed

include/zephyr/bluetooth/classic/sdp.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -639,6 +639,7 @@ int bt_sdp_discover_cancel(struct bt_conn *conn,
639639
/** @brief Protocols to be asked about specific parameters */
640640
enum bt_sdp_proto {
641641
BT_SDP_PROTO_RFCOMM = 0x0003,
642+
BT_SDP_PROTO_AVDTP = 0x0019,
642643
BT_SDP_PROTO_L2CAP = 0x0100,
643644
};
644645

subsys/bluetooth/host/classic/sdp.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3200,7 +3200,8 @@ int bt_sdp_get_proto_param(const struct net_buf *buf, enum bt_sdp_proto proto,
32003200
struct bt_sdp_uuid_desc pd;
32013201
int res;
32023202

3203-
if (proto != BT_SDP_PROTO_RFCOMM && proto != BT_SDP_PROTO_L2CAP) {
3203+
if (proto != BT_SDP_PROTO_RFCOMM && proto != BT_SDP_PROTO_L2CAP &&
3204+
proto != BT_SDP_PROTO_AVDTP) {
32043205
LOG_ERR("Invalid protocol specifier");
32053206
return -EINVAL;
32063207
}
@@ -3227,7 +3228,8 @@ int bt_sdp_get_addl_proto_param(const struct net_buf *buf, enum bt_sdp_proto pro
32273228
struct bt_sdp_uuid_desc pd;
32283229
int res;
32293230

3230-
if (proto != BT_SDP_PROTO_RFCOMM && proto != BT_SDP_PROTO_L2CAP) {
3231+
if (proto != BT_SDP_PROTO_RFCOMM && proto != BT_SDP_PROTO_L2CAP &&
3232+
proto != BT_SDP_PROTO_AVDTP) {
32313233
LOG_ERR("Invalid protocol specifier");
32323234
return -EINVAL;
32333235
}

0 commit comments

Comments
 (0)