Rename __TIZEN_INTERNAL_BT_SCO__ to __TIZEN_TV_EXTERNAL_BT_SCO__ 84/276584/1 submit/test/20220628.062718 submit/test/20220628.063255 submit/tizen/20220628.063508
authorSangchul Lee <sc11.lee@samsung.com>
Tue, 21 Jun 2022 08:05:56 +0000 (17:05 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Tue, 21 Jun 2022 08:13:11 +0000 (17:13 +0900)
The 'external bt sco' feature is only for tv binary. So, the preprocessor
definition name is changed to have __TIZEN_TV_ prefix as well as to invert
the meaning of the previous name.

[Version] 15.0.19
[Issue Type] Rename

Change-Id: Iff1847574b925d8fb72efc3687f1926d3e110b8e
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
packaging/pulseaudio-modules-tizen.spec
src/device-manager-dbus.c
src/device-manager.c
src/module-tizenaudio-policy.c
src/tizen-device.c
src/tizen-device.h

index 6ec8a2b..5a5282f 100644 (file)
@@ -2,7 +2,7 @@
 
 Name:             pulseaudio-modules-tizen
 Summary:          Pulseaudio modules for Tizen
-Version:          15.0.18
+Version:          15.0.19
 Release:          0
 Group:            Multimedia/Audio
 License:          LGPL-2.1+
@@ -45,9 +45,7 @@ PulseAudio module-acm-sink for sending PCM data to ACM core.
 %build
 export CFLAGS="%{optflags} -fno-strict-aliasing -D__TIZEN__ -DSYSCONFDIR=\\\"%{_hal_sysconfdir}\\\" "
 %if "%{tizen_profile_name}" == "tv"
-       export CFLAGS+=" -DTIZEN_TV -D__TIZEN_TV_BUILTIN_MIC__";
-%else
-    export CFLAGS+=" -D__TIZEN_INTERNAL_BT_SCO__"
+export CFLAGS+=" -DTIZEN_TV -D__TIZEN_TV_EXTERNAL_BT_SCO__ -D__TIZEN_TV_BUILTIN_MIC__";
 %endif
 
 export LD_AS_NEEDED=0
index 8c067af..7752ce6 100644 (file)
@@ -219,7 +219,7 @@ static void handle_dump_device_list(DBusConnection *conn, DBusMessage *msg, void
 static void handle_test_device_status_change(DBusConnection *conn, DBusMessage *msg, void *userdata);
 static void handle_set_acm_mode(DBusConnection *conn, DBusMessage *msg, void *userdata);
 
-#ifdef __TIZEN_INTERNAL_BT_SCO__
+#ifndef __TIZEN_TV_EXTERNAL_BT_SCO__
 static int method_call_bt_get_name(DBusConnection *conn, const char *device_path, char **name);
 #endif
 
@@ -433,7 +433,7 @@ static int _translate_external_value(const char *type, int value, device_detecte
     return 0;
 }
 
-#ifdef __TIZEN_INTERNAL_BT_SCO__
+#ifndef __TIZEN_TV_EXTERNAL_BT_SCO__
 static int handle_bluez_headset_property_changed(DBusConnection *c, DBusMessage *s, pa_device_manager *dm) {
     DBusMessageIter msg_iter, variant_iter;
     char *property_name;
@@ -507,7 +507,7 @@ static int handle_bluez_headset_property_changed(DBusConnection *c, DBusMessage
 
     return 0;
 }
-#endif /* __TIZEN_INTERNAL_BT_SCO__ */
+#endif /* __TIZEN_TV_EXTERNAL_BT_SCO__ */
 
 static DBusHandlerResult dbus_filter_device_detect_handler(DBusConnection *c, DBusMessage *s, void *userdata) {
     DBusError error;
@@ -554,7 +554,7 @@ static DBusHandlerResult dbus_filter_device_detect_handler(DBusConnection *c, DB
             goto fail;
         }
         handle_device_status_changed(dm, DEVICE_TYPE_FORWARDING, NULL, NULL, detected);
-#ifdef __TIZEN_INTERNAL_BT_SCO__
+#ifndef __TIZEN_TV_EXTERNAL_BT_SCO__
     } else if (dbus_message_is_signal(s, DBUS_INTERFACE_BLUEZ_HEADSET, "PropertyChanged")) {
         if (handle_bluez_headset_property_changed(c, s, dm) < 0)
             goto fail;
@@ -639,7 +639,7 @@ static bool device_is_match_with_mask(pa_tz_device *device, int mask) {
             device_is_match_type(device, mask & DEVICE_TYPE_FLAGS));
 }
 
-#ifdef __TIZEN_INTERNAL_BT_SCO__
+#ifndef __TIZEN_TV_EXTERNAL_BT_SCO__
 static int method_call_bt_get_name(DBusConnection *conn, const char *device_path, char **name) {
     const char *intf = DBUS_INTERFACE_BLUEZ_DEVICE, *prop = "Alias";
     DBusMessage *msg, *reply;
@@ -687,7 +687,7 @@ static int method_call_bt_get_name(DBusConnection *conn, const char *device_path
     dbus_message_unref(reply);
     return 0;
 }
-#endif /* __TIZEN_INTERNAL_BT_SCO__ */
+#endif /* __TIZEN_TV_EXTERNAL_BT_SCO__ */
 
 static void array_iter_append(DBusMessageIter *array_iter, pa_idxset *device_list, int mask) {
     uint32_t device_idx;
@@ -732,7 +732,7 @@ static void array_iter_append(DBusMessageIter *array_iter, pa_idxset *device_lis
     }
 }
 
-#ifndef __TIZEN_INTERNAL_BT_SCO__
+#ifdef __TIZEN_TV_EXTERNAL_BT_SCO__
 static int include_device_filter_func(const void *d, const void *include_device_type) {
     pa_tz_device *device = (pa_tz_device *)d;
 
@@ -750,14 +750,14 @@ static int exclude_device_filter_func(const void *d, const void *exclude_device_
 
     return (int)!pa_safe_streq(pa_tz_device_get_type(device), (const char *)exclude_device_type);
 }
-#endif /* __TIZEN_INTERNAL_BT_SCO__ */
+#endif /* __TIZEN_TV_EXTERNAL_BT_SCO__ */
 
 static void handle_get_connected_device_list(DBusConnection *conn, DBusMessage *msg, void *userdata) {
     pa_device_manager *dm = (pa_device_manager *)userdata;
     DBusMessage *reply = NULL;
     DBusMessageIter msg_iter, array_iter;
     int mask;
-#ifndef __TIZEN_INTERNAL_BT_SCO__
+#ifdef __TIZEN_TV_EXTERNAL_BT_SCO__
     pa_idxset *idxset1, *idxset2;
 #endif
 
@@ -776,7 +776,7 @@ static void handle_get_connected_device_list(DBusConnection *conn, DBusMessage *
     dbus_message_iter_init_append(reply, &msg_iter);
     pa_assert_se(dbus_message_iter_open_container(&msg_iter, DBUS_TYPE_ARRAY, "(isiisiib)", &array_iter));
 
-#ifdef __TIZEN_INTERNAL_BT_SCO__
+#ifndef __TIZEN_TV_EXTERNAL_BT_SCO__
     array_iter_append(&array_iter, dm->device_list, mask);
 #else
     /* divide into two groups and merge them because dbus message doesn't support sorting or prepend */
@@ -788,7 +788,7 @@ static void handle_get_connected_device_list(DBusConnection *conn, DBusMessage *
 
     pa_idxset_free(idxset1, NULL);
     pa_idxset_free(idxset2, NULL);
-#endif /* __TIZEN_INTERNAL_BT_SCO__ */
+#endif /* __TIZEN_TV_EXTERNAL_BT_SCO__ */
 
     pa_assert_se(dbus_message_iter_close_container(&msg_iter, &array_iter));
 
index acd3c38..f541685 100644 (file)
@@ -85,7 +85,7 @@
 #define DEVICE_API_RAOP                     "raop"
 #define DEVICE_API_TUNNEL                   "tunnel"
 #define DEVICE_API_RTSP                     "rtsp"
-#ifndef __TIZEN_INTERNAL_BT_SCO__
+#ifdef __TIZEN_TV_EXTERNAL_BT_SCO__
 #define DEVICE_API_BTSCO                    "btsco"
 #endif
 #define DEVICE_BUS_USB                      "usb"
@@ -487,7 +487,7 @@ static bool pulse_device_is_tvmic(pa_object *pdevice) {
 }
 #endif
 
-#ifndef __TIZEN_INTERNAL_BT_SCO__
+#ifdef __TIZEN_TV_EXTERNAL_BT_SCO__
 static bool pulse_device_is_btsco(pa_object *pdevice) {
     pa_proplist *prop = pulse_device_get_proplist(pdevice);
 
@@ -1198,7 +1198,7 @@ static const char* pulse_device_get_system_id(pa_object *pdevice) {
         return pa_proplist_gets(prop, PA_PROP_DEVICE_DESCRIPTION);
     else if (pulse_device_is_rtsp(pdevice))
         return pa_proplist_gets(prop, PA_PROP_DEVICE_DESCRIPTION);
-#ifndef __TIZEN_INTERNAL_BT_SCO__
+#ifdef __TIZEN_TV_EXTERNAL_BT_SCO__
     else if (pulse_device_is_btsco(pdevice))
         return pa_proplist_gets(prop, PA_PROP_DEVICE_DESCRIPTION);
 #endif
@@ -1620,7 +1620,7 @@ static void handle_rtsp_pulse_device(pa_object *pdevice, bool is_loaded, pa_devi
     }
 }
 
-#ifndef __TIZEN_INTERNAL_BT_SCO__
+#ifdef __TIZEN_TV_EXTERNAL_BT_SCO__
 static void handle_external_btsco_pulse_device(pa_object *pdevice, bool is_loaded, pa_device_manager *dm) {
     const char *name, *system_id;
     dm_device_direction_t direction;
@@ -1662,7 +1662,7 @@ static void handle_external_btsco_pulse_device(pa_object *pdevice, bool is_loade
             pa_tz_device_free(device);
     }
 }
-#endif /* __TIZEN_INTERNAL_BT_SCO__ */
+#endif /* __TIZEN_TV_EXTERNAL_BT_SCO__ */
 
 static void handle_internal_pulse_device(pa_object *pdevice, bool is_loaded, pa_device_manager *dm) {
     pa_tz_device *device;
@@ -1737,7 +1737,7 @@ static pa_hook_result_t sink_put_hook_callback(pa_core *c, pa_sink *sink, pa_dev
         pulse_device_set_use_internal_codec(PA_OBJECT(sink), true);
         handle_internal_pulse_device(PA_OBJECT(sink), true, dm);
         return PA_HOOK_OK;
-#ifndef __TIZEN_INTERNAL_BT_SCO__
+#ifdef __TIZEN_TV_EXTERNAL_BT_SCO__
     } else if (pulse_device_is_btsco(PA_OBJECT(sink))) {
         pulse_device_set_use_internal_codec(PA_OBJECT(sink), false);
         handle_external_btsco_pulse_device(PA_OBJECT(sink), true, dm);
@@ -1787,7 +1787,7 @@ static pa_hook_result_t sink_unlink_hook_callback(pa_core *c, pa_sink *sink, pa_
     } else if (pulse_device_is_alsa(PA_OBJECT(sink)) || pulse_device_is_tizenaudio(PA_OBJECT(sink))) {
         handle_internal_pulse_device(PA_OBJECT(sink), false, dm);
         return PA_HOOK_OK;
-#ifndef __TIZEN_INTERNAL_BT_SCO__
+#ifdef __TIZEN_TV_EXTERNAL_BT_SCO__
     } else if (pulse_device_is_btsco(PA_OBJECT(sink))) {
         handle_external_btsco_pulse_device(PA_OBJECT(sink), false, dm);
         return PA_HOOK_OK;
@@ -1829,7 +1829,7 @@ static pa_hook_result_t source_put_hook_callback(pa_core *c, pa_source *source,
         pulse_device_set_use_internal_codec(PA_OBJECT(source), false);
         handle_rtsp_pulse_device(PA_OBJECT(source), true, dm);
         return PA_HOOK_OK;
-#ifndef __TIZEN_INTERNAL_BT_SCO__
+#ifdef __TIZEN_TV_EXTERNAL_BT_SCO__
     } else if (pulse_device_is_btsco(PA_OBJECT(source))) {
         pulse_device_set_use_internal_codec(PA_OBJECT(source), false);
         handle_external_btsco_pulse_device(PA_OBJECT(source), true, dm);
@@ -1878,7 +1878,7 @@ static pa_hook_result_t source_unlink_hook_callback(pa_core *c, pa_source *sourc
         return PA_HOOK_OK;
     } else if (pulse_device_is_rtsp(PA_OBJECT(source))) {
         handle_rtsp_pulse_device(PA_OBJECT(source), false, dm);
-#ifndef __TIZEN_INTERNAL_BT_SCO__
+#ifdef __TIZEN_TV_EXTERNAL_BT_SCO__
     } else if (pulse_device_is_btsco(PA_OBJECT(source))) {
         handle_external_btsco_pulse_device(PA_OBJECT(source), false, dm);
         return PA_HOOK_OK;
index bb331e0..81dbb4e 100644 (file)
@@ -85,7 +85,7 @@ struct userdata;
 #define LOOPBACK_DEFAULT_LATENCY_MSEC    40
 #define LOOPBACK_DEFAULT_ADJUST_SEC      3
 
-#ifdef __TIZEN_INTERNAL_BT_SCO__
+#ifndef __TIZEN_TV_EXTERNAL_BT_SCO__
 #define TIMED_BT_SCO_CLOSE_USEC          3000000
 #endif
 
@@ -185,7 +185,7 @@ struct userdata {
         int32_t latency_msec;
         int32_t adjust_sec;
     } loopback_args;
-#ifdef __TIZEN_INTERNAL_BT_SCO__
+#ifndef __TIZEN_TV_EXTERNAL_BT_SCO__
     pa_time_event *time_event_bt_sco_close;
 #endif
 };
@@ -212,7 +212,7 @@ static void __load_dump_config(struct userdata *u)
     iniparser_freedict(dict);
 }
 
-#ifdef __TIZEN_INTERNAL_BT_SCO__
+#ifndef __TIZEN_TV_EXTERNAL_BT_SCO__
 /* threre is only one sco connected device */
 static pa_tz_device* _get_sco_connected_device(pa_device_manager *dm) {
     pa_idxset *device_list;
@@ -696,7 +696,7 @@ static bool skip_device(const char *stream_role, const char *device_type)
     return false;
 }
 
-#ifdef __TIZEN_INTERNAL_BT_SCO__
+#ifndef __TIZEN_TV_EXTERNAL_BT_SCO__
 static bool skip_bt_sco_device(struct userdata *u, const char *stream_role, const char *device_type) {
     pa_assert(u);
     pa_assert(stream_role);
@@ -827,7 +827,7 @@ static void select_device_by_auto_or_auto_all_routing(struct userdata *u, pa_str
             if (!pa_safe_streq(device_type, dm_device_type) || !IS_AVAILABLE_DIRECTION(data->stream_type, dm_device_direction))
                 continue;
             pa_log_info("  ** found a matched device: type[%-16s], direction[0x%x]", dm_device_type, dm_device_direction);
-#ifdef __TIZEN_INTERNAL_BT_SCO__
+#ifndef __TIZEN_TV_EXTERNAL_BT_SCO__
             if (skip_bt_sco_device(u, data->stream_role, dm_device_type))
                 continue;
 #endif
@@ -901,7 +901,7 @@ static void select_device_by_auto_last_connected_routing(struct userdata *u, pa_
                             dm_device_type, dm_device_direction, dm_device_id, creation_time);
             if (!pa_safe_streq(device_type, dm_device_type) || !IS_AVAILABLE_DIRECTION(data->stream_type, dm_device_direction))
                 continue;
-#ifdef __TIZEN_INTERNAL_BT_SCO__
+#ifndef __TIZEN_TV_EXTERNAL_BT_SCO__
             if (skip_bt_sco_device(u, data->stream_role, dm_device_type))
                 continue;
 #endif
@@ -1149,7 +1149,7 @@ static void reset_route(struct userdata *u, stream_type_t stream_type) {
 
     pa_assert(u);
 
-#ifdef __TIZEN_INTERNAL_BT_SCO__
+#ifndef __TIZEN_TV_EXTERNAL_BT_SCO__
     /* update BT SCO: close */
     update_bt_sco_state(u, false, true, NULL);
 #endif
@@ -1305,7 +1305,7 @@ static void fill_device_info(hal_route_info *route_info, const char *type, uint3
                 route_info->num_of_devices -1, type, direction, id);
 }
 
-#ifdef __TIZEN_INTERNAL_BT_SCO__
+#ifndef __TIZEN_TV_EXTERNAL_BT_SCO__
 static pa_hook_result_t update_combine_sink_and_bt_sco(struct userdata *u, pa_stream_manager_hook_data_for_route *data,
                                                     pa_tz_device *device, const char *stream_role, const char *dm_device_type,
                                                     pa_sink **combine_sink_arg1, pa_sink **combine_sink_arg2) {
@@ -1329,7 +1329,7 @@ static pa_hook_result_t update_combine_sink(struct userdata *u, pa_stream_manage
             else
                 pa_log_error("[ROUTE][AUTO] could not get sink");
         }
-#ifdef __TIZEN_INTERNAL_BT_SCO__
+#ifndef __TIZEN_TV_EXTERNAL_BT_SCO__
         if (pa_safe_streq(dm_device_type, DEVICE_TYPE_BT_SCO)) {
             if (IS_ROLE_AVAILABLE_BT_SCO_OPEN(stream_role)) {
                 if (update_bt_sco_state(u, true, false, stream_role)) {
@@ -1350,7 +1350,7 @@ static pa_hook_result_t update_combine_sink(struct userdata *u, pa_stream_manage
         void *s = NULL;
         stream_route_type_t route_type;
 
-#ifdef __TIZEN_INTERNAL_BT_SCO__
+#ifndef __TIZEN_TV_EXTERNAL_BT_SCO__
         update_bt_sco_state(u, false, false, NULL);
 #endif
 
@@ -1436,7 +1436,7 @@ static int32_t update_route_by_preemptive_device(struct userdata *u, pa_stream_m
         /* if it needs to skip it, keep going to next device for proper UCM setting */
         if (skip_device(data->stream_role, dm_device_type))
             return -1;
-#ifdef __TIZEN_INTERNAL_BT_SCO__
+#ifndef __TIZEN_TV_EXTERNAL_BT_SCO__
         if (skip_bt_sco_device(u, data->stream_role, dm_device_type))
             return -1;
 #endif
@@ -1492,7 +1492,7 @@ static pa_hook_result_t handle_auto_or_auto_all_routing(struct userdata *u, pa_s
                 /* if it needs to skip it, keep going to next device for proper UCM setting */
                 if (skip_device(data->stream_role, dm_device_type))
                     continue;
-#ifdef __TIZEN_INTERNAL_BT_SCO__
+#ifndef __TIZEN_TV_EXTERNAL_BT_SCO__
                 if (skip_bt_sco_device(u, data->stream_role, dm_device_type))
                     continue;
 #endif
@@ -1513,14 +1513,14 @@ update_auto_active_dev:
             else
                 pa_proplist_sets(GET_STREAM_PROPLIST(data->stream, data->stream_type),
                                 PA_PROP_MEDIA_ROUTE_AUTO_ACTIVE_DEV, dm_device_type);
-#ifdef __TIZEN_INTERNAL_BT_SCO__
+#ifndef __TIZEN_TV_EXTERNAL_BT_SCO__
             return update_combine_sink_and_bt_sco(u, data, *device, route_info->role, dm_device_type, NULL, NULL);
 #else
             return update_combine_sink(u, data, *device, route_info->role, dm_device_type, NULL, NULL);
 #endif
 
         } else if (data->route_type == STREAM_ROUTE_TYPE_AUTO_ALL) {
-#ifdef __TIZEN_INTERNAL_BT_SCO__
+#ifndef __TIZEN_TV_EXTERNAL_BT_SCO__
             update_combine_sink_and_bt_sco(u, data, *device, NULL, NULL, &combine_sink_arg1, &combine_sink_arg2);
 #else
             update_combine_sink(u, data, *device, NULL, NULL, &combine_sink_arg1, &combine_sink_arg2);
@@ -1575,7 +1575,7 @@ static pa_hook_result_t handle_auto_last_connected_routing(struct userdata *u, p
                 continue;
             if ((use_internal_codec = pa_tz_device_is_use_internal_codec(*device))) {
                 /* if it needs to skip it, keep going to next device for proper UCM setting */
-#ifdef __TIZEN_INTERNAL_BT_SCO__
+#ifndef __TIZEN_TV_EXTERNAL_BT_SCO__
                 if (skip_device(data->stream_role, dm_device_type) ||
                     skip_bt_sco_device(u, data->stream_role, dm_device_type))
 #else
@@ -1622,7 +1622,7 @@ update_auto_active_dev:
                 pa_log_error("[ROUTE][AUTO_LAST_CONN] could not get sink");
         }
 
-#ifdef __TIZEN_INTERNAL_BT_SCO__
+#ifndef __TIZEN_TV_EXTERNAL_BT_SCO__
         if (pa_safe_streq(dm_device_type, DEVICE_TYPE_BT_SCO)) {
             if (IS_ROLE_AVAILABLE_BT_SCO_OPEN(route_info->role)) {
                 if (update_bt_sco_state(u, true, false, route_info->role)) {
@@ -1674,7 +1674,7 @@ static pa_hook_result_t handle_manual_routing(struct userdata *u, pa_stream_mana
             pa_log_debug("  ** found a matched device: type[%-16s], direction[0x%x]",
                             dm_device_type, dm_device_direction);
 
-#ifdef __TIZEN_INTERNAL_BT_SCO__
+#ifndef __TIZEN_TV_EXTERNAL_BT_SCO__
             /* Check for availability for opening Bluetooth SCO */
             if (pa_safe_streq(dm_device_type, DEVICE_TYPE_BT_SCO) && IS_ROLE_AVAILABLE_BT_SCO_OPEN(route_info->role)) {
                 /* update BT SCO: open */
@@ -2016,7 +2016,7 @@ void pa__done(pa_module *m)
     if (!(u = m->userdata))
         return;
 
-#ifdef __TIZEN_INTERNAL_BT_SCO__
+#ifndef __TIZEN_TV_EXTERNAL_BT_SCO__
     bt_sco_close(u, false);
 #endif
 
index cbeae10..0f8a481 100644 (file)
@@ -145,7 +145,7 @@ static char* _device_get_info_str(pa_tz_device *device) {
         pa_strbuf_printf(buf, "  Product ID   : %04x\n", device->product_id);
         pa_strbuf_printf(buf, "  Specified Stream role : %s\n", device->specified_stream_role);
     }
-#ifdef __TIZEN_INTERNAL_BT_SCO__
+#ifndef __TIZEN_TV_EXTERNAL_BT_SCO__
     if (device_type_is_equal(device->type, DEVICE_TYPE_BT_SCO))
         pa_strbuf_printf(buf, "    SCO opened   : %s\n", pa_yes_no(device->sco_opened));
 #endif
@@ -494,7 +494,7 @@ pa_tz_device* pa_tz_device_new(pa_tz_device_new_data *data) {
     device->state = DM_DEVICE_STATE_DEACTIVATED;
     device->creation_time = pa_rtclock_now();
     device->use_internal_codec = data->use_internal_codec;
-#ifdef __TIZEN_INTERNAL_BT_SCO__
+#ifndef __TIZEN_TV_EXTERNAL_BT_SCO__
     device->sco_opened = false;
 #endif
     device->is_running = false;
@@ -836,7 +836,7 @@ pa_intset* pa_tz_device_get_stream_list(pa_tz_device *device) {
     return stream_id_set;
 }
 
-#ifdef __TIZEN_INTERNAL_BT_SCO__
+#ifndef __TIZEN_TV_EXTERNAL_BT_SCO__
 static int method_call_bt_sco_enable_pcm(pa_dbus_connection *conn, bool enable) {
     DBusMessage *msg, *reply;
     DBusError err;
@@ -1086,5 +1086,5 @@ int pa_tz_device_sco_get_status(pa_tz_device *device, dm_device_bt_sco_status_t
     pa_log_info("BT SCO (%u) Get Status, %d", device->id, *status);
     return 0;
 }
-#endif /* __TIZEN_INTERNAL_BT_SCO__ */
+#endif /* __TIZEN_TV_EXTERNAL_BT_SCO__ */
 
index a7649ae..a809eed 100644 (file)
@@ -59,8 +59,8 @@ struct pa_tz_device {
     /* Will be true, if this device uses internal codec(card),
      * false, if this device uses external card(bt-a2dp, usb */
     bool use_internal_codec;
+#ifndef __TIZEN_TV_EXTERNAL_BT_SCO__
     /* If this is sco device, this can be used to */
-#ifdef __TIZEN_INTERNAL_BT_SCO__
     bool sco_opened;
 #endif
 
@@ -155,7 +155,7 @@ bool pa_tz_device_is_use_internal_codec(pa_tz_device *device);
 bool pa_tz_device_is_all_suspended(pa_tz_device *device);
 pa_intset* pa_tz_device_get_stream_list(pa_tz_device *device);
 
-#ifdef __TIZEN_INTERNAL_BT_SCO__
+#ifndef __TIZEN_TV_EXTERNAL_BT_SCO__
 /* Only for BT SCO device */
 int pa_tz_device_sco_enable_pcm(pa_tz_device *device, bool enable);
 int pa_tz_device_sco_open(pa_tz_device *device);