Revert "Remove far field package" 52/202352/4 accepted/tizen/unified/20190327.160621 submit/tizen/20190327.115623
authorSooyeon Kim <sooyeon.kim@samsung.com>
Wed, 27 Mar 2019 11:26:24 +0000 (11:26 +0000)
committersooyeon.kim <sooyeon.kim@samsung.com>
Wed, 27 Mar 2019 11:48:55 +0000 (20:48 +0900)
This reverts commit 025197c2bd58336a3be24fefe01cfae3923c320c.

Change-Id: I38bb9b3df563d30c37ac96d46f691a5368418f52

CMakeLists.txt
packaging/voice-control.spec
server/vcd_recorder.c

index 7a6f5ed..ffeca96 100644 (file)
@@ -46,8 +46,7 @@ INCLUDE(FindPkgConfig)
 IF("${_TV_PRODUCT}" STREQUAL "TRUE")
 pkg_check_modules(pkgs REQUIRED
     aul capi-appfw-app-control capi-appfw-app-manager capi-base-common capi-media-audio-io capi-media-sound-manager ecore-wayland
-    capi-network-bluetooth capi-network-bluetooth-tv capi-system-info cynara-client cynara-session dbus-1 db-util dlog ecore glib-2.0 json-glib-1.0 libgum libtzplatform-config libxml-2.0 sqlite3 vconf msfapi 
-#farfield-voice-api
+    capi-network-bluetooth capi-network-bluetooth-tv capi-system-info cynara-client cynara-session dbus-1 db-util dlog ecore glib-2.0 json-glib-1.0 libgum libtzplatform-config libxml-2.0 sqlite3 vconf msfapi farfield-voice-api
 )
 ELSE()
 pkg_check_modules(pkgs REQUIRED
index 5eeb57e..1115948 100644 (file)
@@ -36,7 +36,7 @@ BuildRequires:  pkgconfig(pkgmgr-installer)
 BuildRequires:  pkgconfig(capi-network-bluetooth)
 BuildRequires:  pkgconfig(capi-network-bluetooth-tv)
 BuildRequires:  pkgconfig(msfapi)
-#BuildRequires:  pkgconfig(farfield-voice-api)
+BuildRequires:  pkgconfig(farfield-voice-api)
 %endif
 BuildRequires:  pkgconfig(vconf)
 BuildRequires:  cmake
index 8f69004..7a85e9a 100644 (file)
@@ -17,7 +17,7 @@
 #ifdef TV_PRODUCT
 #define TV_BT_MODE
 #define TV_MSF_WIFI_MODE
-//#define TV_FFV_MODE
+#define TV_FFV_MODE
 #endif
 
 #include <audio_io.h>
@@ -226,6 +226,16 @@ static void _bt_hid_audio_data_receive_cb(bt_hid_voice_data_s *voice_data, void
 #ifdef TV_FFV_MODE
 static void _ffv_audio_function_cb(void* data, unsigned int length, void* user_data)
 {
+       if (0 == g_buffer_count || 0 == g_buffer_count % 50) {
+               SLOG(LOG_INFO, TAG_VCD, "[Recorder INFO] farfield audio function callback is invoked");
+
+               if (100000 == g_buffer_count) {
+                       g_buffer_count = 0;
+               }
+       }
+
+       g_buffer_count++;
+
        if (0 != strncmp(g_current_audio_type, VCE_AUDIO_ID_FFV, sizeof(VCE_AUDIO_ID_FFV))) {
                vcd_state_e state = vcd_config_get_service_state();
                if (VCD_STATE_READY == state) {
@@ -456,6 +466,7 @@ int vcd_recorder_create(vcd_recoder_audio_cb audio_cb, vcd_recorder_interrupt_cb
        }
 
        if (g_farfieldvoice_h) {
+               SLOG(LOG_INFO, TAG_VCD, "[Recorder INFO] Register farfield voice audio callback");
                farfield_voice_register_audio_cb(g_farfieldvoice_h, _ffv_audio_function_cb, NULL);
        }
 #endif
@@ -533,6 +544,7 @@ int vcd_recorder_destroy()
 
 #ifdef TV_FFV_MODE
        if (NULL != g_farfieldvoice_h) {
+               SLOG(LOG_INFO, TAG_VCD, "[Recorder INFO] Unregister farfield voice");
                farfield_voice_unregister_audio_cb(g_farfieldvoice_h);
                farfield_voice_final(g_farfieldvoice_h);
                g_farfieldvoice_h = NULL;