Apply DA model specification 87/305887/2 accepted/tizen/7.0/unified/20240214.013044
authorWootak Jung <wootak.jung@samsung.com>
Tue, 13 Feb 2024 00:21:11 +0000 (09:21 +0900)
committerWootak Jung <wootak.jung@samsung.com>
Tue, 13 Feb 2024 06:05:12 +0000 (15:05 +0900)
Disable A2DP/AVRCP profiles

Change-Id: Ie20002629367c9383973dba6f900425aa0e9a763
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
profiles/audio/avrcp.c
profiles/audio/media.c

index 387b1a0..a1ecc40 100644 (file)
@@ -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);
index 24fd771..8619cd8 100644 (file)
@@ -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,