diff mbox series

[v2,4/9] adapter: API to check if MSFT a2dp codec is enabled

Message ID 20211119094235.2432-4-kiran.k@intel.com
State New
Headers show
Series [v2,1/9] adapter: Enable MSFT a2dp offload codec when Experimental is set | expand

Commit Message

K, Kiran Nov. 19, 2021, 9:42 a.m. UTC
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 mbox series

Patch

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);