Add an utility API to check if MSFT a2dp codec feature is enabled in Kernel. --- src/adapter.c | 6 ++++++ src/adapter.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/adapter.c b/src/adapter.c index 1627cc127057..fd5ce614bec5 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -9796,6 +9796,12 @@ static void codec_offload_func(struct btd_adapter *adapter, uint8_t action) btd_error(adapter->dev_id, "Failed to set Codec Offload"); } +bool is_msft_a2dp_offload_supported(struct btd_adapter *adapter) +{ + return queue_find(adapter->exps, is_exp_feature_uuid_the_same, + (void *)msft_a2dp_offload_codecs_uuid.val) != NULL; +} + static void msft_a2dp_offload_complete(uint8_t status, uint16_t len, const void *param, void *user_data) { diff --git a/src/adapter.h b/src/adapter.h index d191daf5dc12..3857126b4dff 100644 --- a/src/adapter.h +++ b/src/adapter.h @@ -261,3 +261,5 @@ bool btd_adapter_set_allowed_uuids(struct btd_adapter *adapter, struct queue *uuids); bool btd_adapter_is_uuid_allowed(struct btd_adapter *adapter, const char *uuid_str); + +bool is_msft_a2dp_offload_supported(struct btd_adapter *adapter); -- 2.17.1