Handle AVRCP control function as A2DP connect for TV stack 50/245550/1
authorDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 12 Oct 2020 07:36:56 +0000 (16:36 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 12 Oct 2020 07:36:56 +0000 (16:36 +0900)
VD stack does not implement AVRCP control connect API. And
it uses the automatic connection after connecting A2DP.
But AVRCP Control connect C# API is exposed. And we should
handle it by TCT. To PASS it, we replace the function into
service adaptation layer.

Change-Id: Ic81a5d0d595b14e9608bd75b5a7b5ef47c1b199d
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
bt-service/services/audio/bt-service-audio.c

index 420d0ad..9ebe68d 100644 (file)
@@ -427,7 +427,12 @@ static int __bt_process_audio_profile_connect(bt_audio_type_t type, bluetooth_de
                result = _bt_avrcp_connect_remote_ctrl(address);
                break;
        case BT_AVRCP:
+#ifdef TIZEN_BLUEDROID_PORTING
+               BT_INFO("Try to connect A2DP remote Source");
+               result = _bt_a2dp_connect_remote_source(address);
+#else
                result = _bt_avrcp_connect_remote_target(address);
+#endif
                break;
        case BT_AUDIO_A2DP_SOURCE:
                return _bt_a2dp_connect_remote_source(address);
@@ -471,7 +476,12 @@ static int __bt_process_audio_profile_disconnect(bt_audio_type_t type, bluetooth
                result = _bt_avrcp_disconnect_remote_ctrl(address);
                break;
        case BT_AVRCP:
+#ifdef TIZEN_BLUEDROID_PORTING
+               BT_INFO("Try to disconnect A2DP remote Source");
+               result = _bt_a2dp_disconnect_remote_source(address);
+#else
                result = _bt_avrcp_disconnect_remote_target(address);
+#endif
                break;
        case BT_AUDIO_A2DP_SOURCE:
                return _bt_a2dp_disconnect_remote_source(address);