Send message for setting valiables(latency,adjust time) when the loopback stream... 62/57062/1 accepted/tizen/tv/20160115.114948 submit/tizen_tv/20160115.045016
authorSangchul Lee <sc11.lee@samsung.com>
Fri, 15 Jan 2016 01:51:30 +0000 (10:51 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Fri, 15 Jan 2016 02:13:19 +0000 (11:13 +0900)
[Version] 0.2.15
[Profile] TV
[Issue Type] Feature Enhancement

Change-Id: Iddc7a6fae45f08eeabcc224a3ed079b66d9255f8

packaging/audio-hal-max98090.spec
tizen-audio-device.c

index db53dbbc698851acdef17af7aef59aaa908c2b36..1d9ce95254e8fa8bc671778fa2a0e9897bfce186 100644 (file)
@@ -1,6 +1,6 @@
 Name:       audio-hal-max98090
 Summary:    TIZEN Audio HAL for MAX98090
-Version:    0.2.14
+Version:    0.2.15
 Release:    0
 Group:      System/Libraries
 License:    Apache-2.0
index 25de3cb971d138fd0aafdec13efaf15bd9250c3a..afc0af69a42d42b6b84f3a346564e5ef12da42d7 100644 (file)
@@ -286,6 +286,8 @@ static audio_return_t _do_route_reset(audio_hal_t *ah, uint32_t direction)
     return audio_ret;
 }
 
+#define LOOPBACK_ARG_LATENCY_MSEC      40
+#define LOOPBACK_ARG_ADJUST_TIME_SEC   3
 audio_return_t audio_do_route(void *audio_handle, audio_route_info_t *info)
 {
     audio_return_t audio_ret = AUDIO_RET_OK;
@@ -310,6 +312,11 @@ audio_return_t audio_do_route(void *audio_handle, audio_route_info_t *info)
             AUDIO_LOG_WARN("set reset return 0x%x", audio_ret);
         }
     } else {
+        /* send latency and adjust time for loopback */
+        if (!strncmp("loopback", info->role, MAX_NAME_LEN)) {
+            _audio_comm_send_message(ah, "loopback::latency", LOOPBACK_ARG_LATENCY_MSEC);
+            _audio_comm_send_message(ah, "loopback::adjust_time", LOOPBACK_ARG_ADJUST_TIME_SEC);
+        }
         /* need to prepare for "alarm","notification","emergency","voice-information","voice-recognition","ringtone" */
         audio_ret = _do_route_ap_playback_capture(ah, info);
         if (AUDIO_IS_ERROR(audio_ret)) {