From 936def7977917acff76828c02a080d91ecb26b95 Mon Sep 17 00:00:00 2001 From: Wootak Jung Date: Tue, 13 Feb 2024 09:21:11 +0900 Subject: [PATCH] Apply DA model specification Disable A2DP/AVRCP profiles Change-Id: Ie20002629367c9383973dba6f900425aa0e9a763 Signed-off-by: Wootak Jung --- profiles/audio/avrcp.c | 10 ++++++++++ profiles/audio/media.c | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c index 387b1a06..a1ecc40f 100644 --- a/profiles/audio/avrcp.c +++ b/profiles/audio/avrcp.c @@ -5294,6 +5294,11 @@ static int avrcp_target_server_probe(struct btd_profile *p, sdp_record_t *record; struct avrcp_server *server; + if (TIZEN_FEATURE_BLUEZ_DA && !TIZEN_FEATURE_BLUEZ_FHUB) { + DBG("AVRCP Target not supported in DA (non-fhub) product"); + return -1; + } + DBG("path %s", adapter_get_path(adapter)); server = find_server(servers, adapter); @@ -5382,6 +5387,11 @@ static int avrcp_controller_server_probe(struct btd_profile *p, sdp_record_t *record; struct avrcp_server *server; + if (TIZEN_FEATURE_BLUEZ_DA && !TIZEN_FEATURE_BLUEZ_FHUB) { + DBG("AVRCP Controller not supported in DA (non-fhub) product"); + return -1; + } + DBG("path %s", adapter_get_path(adapter)); server = find_server(servers, adapter); diff --git a/profiles/audio/media.c b/profiles/audio/media.c index 24fd771b..8619cd84 100644 --- a/profiles/audio/media.c +++ b/profiles/audio/media.c @@ -873,6 +873,11 @@ static gboolean endpoint_init_a2dp_source(struct media_endpoint *endpoint, gboolean delay_reporting, int *err) { + if (TIZEN_FEATURE_BLUEZ_DA && !TIZEN_FEATURE_BLUEZ_FHUB) { + DBG("A2DP source not supported in DA (non-fhub) product"); + return FALSE; + } + endpoint->sep = a2dp_add_sep(endpoint->adapter->btd_adapter, AVDTP_SEP_TYPE_SOURCE, endpoint->codec, delay_reporting, &a2dp_endpoint, @@ -891,6 +896,11 @@ static gboolean endpoint_init_a2dp_sink(struct media_endpoint *endpoint, gboolean delay_reporting, int *err) { + if (TIZEN_FEATURE_BLUEZ_DA && !TIZEN_FEATURE_BLUEZ_FHUB) { + DBG("A2DP sink not supported in DA (non-fhub) product"); + return FALSE; + } + endpoint->sep = a2dp_add_sep(endpoint->adapter->btd_adapter, AVDTP_SEP_TYPE_SINK, endpoint->codec, delay_reporting, &a2dp_endpoint, -- 2.34.1