platform/core/uifw/tts.git
2 years agoUpdate version to 1.70.4 70/273870/1 accepted/tizen/unified/20220418.141248 submit/tizen/20220415.011716
wn.jang [Fri, 15 Apr 2022 01:04:06 +0000 (10:04 +0900)]
Update version to 1.70.4

Change-Id: I8e73638367b4c660e0082df6079e9a101bbee170

2 years agoAdd metadata profile xml file 69/273769/1
wn.jang [Wed, 13 Apr 2022 10:38:42 +0000 (19:38 +0900)]
Add metadata profile xml file

Change-Id: I0b48c7bafbe1773e7ad97c2112ef593d104aaba6

2 years agoUpdate version to 1.70.3 36/272936/1 accepted/tizen/unified/20220328.131441 submit/tizen/20220328.080118
wn.jang [Mon, 28 Mar 2022 07:15:42 +0000 (16:15 +0900)]
Update version to 1.70.3

Change-Id: I5f21a34f8f853fdd8536f33625f40a289dc3f4c9

2 years agoAdd to check return value 32/272932/1
wn.jang [Mon, 28 Mar 2022 07:01:07 +0000 (16:01 +0900)]
Add to check return value

Change-Id: I7e8033925bef9f14010fdf5409d8fd008bebb097

2 years agoInitialize type of app data 26/272926/1 submit/tizen/20220328.060712
wn.jang [Mon, 28 Mar 2022 05:34:46 +0000 (14:34 +0900)]
Initialize type of app data

This issue was detected by static analysis tool.

Change-Id: I4b1d4dc81d94f3bd6fa492f680697a7670ed79f8

2 years agoUpdate version 1.70.2 11/272811/1 submit/tizen/20220325.021820
wn.jang [Fri, 25 Mar 2022 01:54:12 +0000 (10:54 +0900)]
Update version 1.70.2

Change-Id: I4f3a608b9adf8fb4c4fc5dd9dcef8b346815b18e

2 years agoInitialize result_event of app data 08/272808/1
wn.jang [Fri, 25 Mar 2022 01:34:56 +0000 (10:34 +0900)]
Initialize result_event of app data

This issue was detected by static analysis tool.

Change-Id: Iac86b73641a1feacb59b29781a1f777f12b8f0b5

2 years agoClean up header files 96/271896/2
Suyeon Hwang [Mon, 24 Jan 2022 05:54:52 +0000 (14:54 +0900)]
Clean up header files

Change-Id: I87127a6429e4396dfaf5492c06eba9a6cbb230b2
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoRemove ttsd_player_resume() 95/271895/2
Suyeon Hwang [Thu, 20 Jan 2022 03:11:15 +0000 (12:11 +0900)]
Remove ttsd_player_resume()

Change-Id: Iea7fdeeef07dc83f4a75997c4b9c5ecf2aa5dbb9
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoRearrange code to stop all client 94/271894/2
Suyeon Hwang [Thu, 20 Jan 2022 02:26:47 +0000 (11:26 +0900)]
Rearrange code to stop all client

Change-Id: I1395e10b466b998a6b14d4d17ccb2cf6839b20e4
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoRemove code for mode of service engine 93/271893/2
Suyeon Hwang [Wed, 19 Jan 2022 07:02:39 +0000 (16:02 +0900)]
Remove code for mode of service engine

Change-Id: I49ca352cd1dc35a9404903079467277445a35af8
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoRemove unused code about sound focus change 92/271892/2
Suyeon Hwang [Wed, 19 Jan 2022 06:05:51 +0000 (15:05 +0900)]
Remove unused code about sound focus change

Change-Id: I7769384e7d16697b460a7b12af669c08b5627dc7
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoRearrange the policy handling code 91/271891/2
Suyeon Hwang [Wed, 19 Jan 2022 05:08:37 +0000 (14:08 +0900)]
Rearrange the policy handling code

In order to service by one process, server would handle policy for client mode without sound focus.

This patch removes the sound focus changed callback from ttsd_player because it is not used from
now. And this patch changes the policy code in ttsd_server to make the code cover all cases of
policy.

Change-Id: I48f92e4453d7299df805af938bbb1fdac2403e3b
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoMake play type to identify the method to stop playing 90/271890/2
Suyeon Hwang [Fri, 14 Jan 2022 09:03:36 +0000 (18:03 +0900)]
Make play type to identify the method to stop playing

Change-Id: Ief42fe91d71fc74db33fd3bea79b1419a9be7a5b
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoRun only one service process regardless of client mode 89/271889/2
Suyeon Hwang [Mon, 10 Jan 2022 05:58:05 +0000 (14:58 +0900)]
Run only one service process regardless of client mode

To support multiple mode, current code runs multiple service process for each mode. However,
this architecture needs huge resource for launching multiple process.

To reduce the resource usage, this patch makes client request to launch only one service
process.

Change-Id: I8e0161e0615bdf6a3548b7004c4aab34b826dbdf
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoRemove unused parameter of ttsd_server_pause() 88/271888/2
Suyeon Hwang [Fri, 14 Jan 2022 10:32:01 +0000 (19:32 +0900)]
Remove unused parameter of ttsd_server_pause()

Change-Id: Id1970c88a563b86ccbbf3125cbd8b409fb876927
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoChange name of function to increase readability 86/271886/2
Suyeon Hwang [Mon, 26 Apr 2021 07:24:38 +0000 (16:24 +0900)]
Change name of function to increase readability

Change-Id: I604c31fb357678c61f0b1c18e144842ff6c13f8a
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoClean up code to enhance readability 84/271884/2
Suyeon Hwang [Fri, 28 May 2021 09:40:07 +0000 (18:40 +0900)]
Clean up code to enhance readability

This patch includes these to enhance readability.
- Remove unused headers and invaluable comments
- Change log level to help logging.
- Remove invaluable keywords.
- Fix NULL to nullptr.

Change-Id: Iadb75d1fb42cebf5740b9e0d2df0581785427acb
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoUse PlayerThread class to manage utterance playing thread 83/271883/2 accepted/tizen/unified/20220322.010041 submit/tizen/20220314.051039 submit/tizen/20220315.015714
Suyeon Hwang [Fri, 28 May 2021 09:13:39 +0000 (18:13 +0900)]
Use PlayerThread class to manage utterance playing thread

Change-Id: I7965754245c4f8422e19771483d63deb45015120
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoRemove functions and variables relative with player_s 82/271882/2
Suyeon Hwang [Thu, 27 May 2021 11:52:08 +0000 (20:52 +0900)]
Remove functions and variables relative with player_s

Change-Id: I572a1b1420cafca0bfc9c3aab3e0f548b903f4c4
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoUse PlayerThread class to manage current playing client 81/271881/2
Suyeon Hwang [Mon, 8 Nov 2021 08:09:12 +0000 (17:09 +0900)]
Use PlayerThread class to manage current playing client

Change-Id: I8d32b0570de420485b3c50fea9d28933ba62bf0b
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoDefine class for new TTS play thread 80/271880/2
Suyeon Hwang [Fri, 30 Apr 2021 08:20:09 +0000 (17:20 +0900)]
Define class for new TTS play thread

ttsd_player.cpp has too complexity responsibility to play PCM data. This complexity makes bad code
to maintain.

This patch makes new class PlayerThread to manage thread for playing pcm data. By this new class,
we can simplify the responsibility of ttsd_player.cpp, and this enhance the maintainability.

Change-Id: Icc7c6f294a8879243a310383c59e46358780cd75
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoMerge "Make new functions to manager last event of played sound data" into tizen
Suyeon Hwang [Tue, 8 Mar 2022 00:42:40 +0000 (00:42 +0000)]
Merge "Make new functions to manager last event of played sound data" into tizen

2 years agoRevert to Dbus service activation, not systemd service activation 38/272038/1 accepted/tizen/unified/20220308.133510 submit/tizen/20220307.201852
sooyeon [Mon, 7 Mar 2022 16:55:55 +0000 (01:55 +0900)]
Revert to Dbus service activation, not systemd service activation

Change-Id: I701066ac290f1aa4969c1df14380e9fffc3e3c48
Signed-off-by: sooyeon <sooyeon.kim@samsung.com>
2 years agoFix build error by order of initializer 33/272033/1
Suyeon Hwang [Mon, 7 Mar 2022 07:13:28 +0000 (16:13 +0900)]
Fix build error by order of initializer

Change-Id: I9e2f157fe2503af0d09e6f515b3d7083711afa44
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoMerge "Fix defect from static analysis tool" into tizen
Suyeon Hwang [Mon, 7 Mar 2022 02:07:12 +0000 (02:07 +0000)]
Merge "Fix defect from static analysis tool" into tizen

2 years agoMake new functions to manager last event of played sound data 79/271879/2
Suyeon Hwang [Thu, 4 Nov 2021 06:13:25 +0000 (15:13 +0900)]
Make new functions to manager last event of played sound data

Change-Id: I51f101ddbeb7379a3b783c54bc55c2abef8026d9
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoExtract function for waiting synthesis 78/271878/2
Suyeon Hwang [Mon, 24 May 2021 11:07:05 +0000 (20:07 +0900)]
Extract function for waiting synthesis

Change-Id: I92c385d1d3dc2d5c4871d19a4e28f62c7f76bfbc
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoUnify state check of player and ttsd_data 77/271877/3
Suyeon Hwang [Fri, 21 May 2021 04:26:15 +0000 (13:26 +0900)]
Unify state check of player and ttsd_data

Change-Id: Id736520f6ac18f4d1f9ceec3d5abc82235be1596
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoFix ttsd_data_get_client_state() returns state value directly 76/271876/2
Suyeon Hwang [Thu, 20 May 2021 06:08:19 +0000 (15:08 +0900)]
Fix ttsd_data_get_client_state() returns state value directly

Change-Id: I4ae4bbe95e236e2f957fa40b855b6ecd92958664
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoMerge "Extract function for utterance start/complete event" into tizen
Suyeon Hwang [Thu, 3 Mar 2022 04:23:37 +0000 (04:23 +0000)]
Merge "Extract function for utterance start/complete event" into tizen

2 years agoExtract function for utterance start/complete event 75/271875/1
Suyeon Hwang [Tue, 18 May 2021 09:26:46 +0000 (18:26 +0900)]
Extract function for utterance start/complete event

Change-Id: I490a61bc8707ba0cc189d8c1804cebebf17b46d7
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoRemove ttsd_network.c/h 72/271872/2
Suyeon Hwang [Thu, 3 Mar 2022 02:23:16 +0000 (11:23 +0900)]
Remove ttsd_network.c/h

ttsd_network.c/h is providing function for checking network connection, but this is too small
responsibilty and ttsd_server only uses this function. And also, initializing and
finalizing functions are not implemented.

This patch removes these files and moves the function to ttsd_server. By this change, we do not
need to check unnecessary files and functions.

Change-Id: Iebb7ed340aaf7272a232fcfe5f5a3b21aa21aab2
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoMerge "Extract function for playting pcm data" into tizen accepted/tizen/unified/20220303.131738 submit/tizen/20220303.025855
Suyeon Hwang [Thu, 3 Mar 2022 02:41:56 +0000 (02:41 +0000)]
Merge "Extract function for playting pcm data" into tizen

2 years agoMerge changes I7c724fff,I3e1607f8 into tizen
Suyeon Hwang [Thu, 3 Mar 2022 00:56:33 +0000 (00:56 +0000)]
Merge changes I7c724fff,I3e1607f8 into tizen

* changes:
  Add ttse_terminate() and tts_prepare_sync() into public API
  Clean up ttse_terminate(), tts_prepare_sync() function

2 years agoFix defect from static analysis tool 57/271857/1
wn.jang [Wed, 2 Mar 2022 11:43:32 +0000 (20:43 +0900)]
Fix defect from static analysis tool

This issue is UNINIT_CTOR which means "Uninitialize pointer field".

Change-Id: I90f75258797ac2460a5b85d03f0fd663feb6d2a8

2 years agoExtract function for playting pcm data 27/271827/1
Suyeon Hwang [Mon, 8 Nov 2021 06:26:28 +0000 (15:26 +0900)]
Extract function for playting pcm data

Change-Id: I595011cac656c1a90936fbf0cf1bdaa7aead0839
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoMerge "Refactor retry IPC code to enhance readability" into tizen
Suyeon Hwang [Wed, 2 Mar 2022 06:20:40 +0000 (06:20 +0000)]
Merge "Refactor retry IPC code to enhance readability" into tizen

2 years agoMerge "Fix paused data handling logic" into tizen
Suyeon Hwang [Wed, 2 Mar 2022 06:20:30 +0000 (06:20 +0000)]
Merge "Fix paused data handling logic" into tizen

2 years agoRefactor retry IPC code to enhance readability 13/271613/2
Suyeon Hwang [Wed, 23 Feb 2022 10:04:25 +0000 (19:04 +0900)]
Refactor retry IPC code to enhance readability

The code for retry IPC is too complex to understand.

To simplify the code, this patch refactors the code for retry IPC. By this patch, the name of
function and its logic become more clear to understand.

Change-Id: I9b7cdc4265ce639f3ebc5d71230af14c684adc95
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoAdd ttse_terminate() and tts_prepare_sync() into public API 69/271169/4
Suyeon Hwang [Wed, 16 Feb 2022 07:00:23 +0000 (16:00 +0900)]
Add ttse_terminate() and tts_prepare_sync() into public API

Change-Id: I7c724fff803f9d2aa85ef7f24638685683430075
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoChange dbus-based to systemd-based and Change a directory to install service files... 67/271567/1
sooyeon [Wed, 23 Feb 2022 14:41:56 +0000 (23:41 +0900)]
Change dbus-based to systemd-based and Change a directory to install service files in accordance with architecture

Change-Id: I6b86b13e0c40f85e787f9576f7e3377061a62401
Signed-off-by: sooyeon <sooyeon.kim@samsung.com>
2 years agoClean up ttse_terminate(), tts_prepare_sync() function 68/271168/2
Suyeon Hwang [Wed, 16 Feb 2022 08:47:53 +0000 (17:47 +0900)]
Clean up ttse_terminate(), tts_prepare_sync() function

Change-Id: I3e1607f831f1371d626fc57b34de7d13e1c69e01
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoFix paused data handling logic 80/271380/1
Suyeon Hwang [Fri, 14 May 2021 05:37:55 +0000 (14:37 +0900)]
Fix paused data handling logic

By current pause logic, player_s stores pointer of paused sound_data_s and its data index for
resuming, and these are stored sperately by member variable of player_s.
However, the index and sound_data_s can be managed together if sound_data_s has the member for
data index, although current logic has no problem.
And also, managing together is easy and safe to handle paused data.
If we combine paseud index and data with sound_data_s, player_s should not store the data, because
the first data of the list from ttsd_data is the last played data and it should be paused data
itself.

By this patch, new functions are defined on ttsd_data. These functions provides interface to access
sound data. And also this patch creates new functions for checking whether client has pasued data
or not.

Change-Id: I9ca41a08bafdff97ae7b4ba3981897cd9485bbe4
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoMerge changes Ifddb8324,I3537411c into tizen
Suyeon Hwang [Fri, 18 Feb 2022 09:41:43 +0000 (09:41 +0000)]
Merge changes Ifddb8324,I3537411c into tizen

* changes:
  Use AudioStream class on ttsd_player
  Define class for managing audio stream

2 years agoMerge "Fix the description of tts_repeat()" into tizen accepted/tizen/unified/20220221.080259 submit/tizen/20220218.073949
Suyeon Hwang [Fri, 18 Feb 2022 06:43:34 +0000 (06:43 +0000)]
Merge "Fix the description of tts_repeat()" into tizen

2 years agoUse AudioStream class on ttsd_player 68/271268/2
Suyeon Hwang [Mon, 10 May 2021 09:20:28 +0000 (18:20 +0900)]
Use AudioStream class on ttsd_player

Change-Id: Ifddb83248619e710356fab0ee0bcef274b1b8d29
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoDefine class for managing audio stream 67/271267/2
Suyeon Hwang [Wed, 28 Apr 2021 02:48:38 +0000 (11:48 +0900)]
Define class for managing audio stream

ttsd_player.cpp has too complexity responsibility to play PCM data. This complexity makes bad code
to maintain.

This patch makes new class AudioStream to manage audio stream. By this new class, we can simplify
the responsibility of ttsd_player.cpp, and this enhance the maintainability.

Change-Id: I3537411c41349166cd617815e65415676dda4723
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoMerge "Fix potential defects on ttsd_player" into tizen
Suyeon Hwang [Thu, 17 Feb 2022 02:46:48 +0000 (02:46 +0000)]
Merge "Fix potential defects on ttsd_player" into tizen

2 years agoUse BackgroundVolume class on ttsd_player 20/271120/3
Suyeon Hwang [Fri, 7 May 2021 07:13:40 +0000 (16:13 +0900)]
Use BackgroundVolume class on ttsd_player

Change-Id: I598a0d7c7525ca97c1edd747b1a1c0e38ef9baab
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoDefine class for managing background sound 19/271119/3
Suyeon Hwang [Thu, 6 May 2021 02:54:15 +0000 (11:54 +0900)]
Define class for managing background sound

ttsd_player.cpp has too complexity responsibility to play PCM data. This complexity makes bad code
to maintain.

This patch makes new class BackgroundVolume to manage background sound. By this new class,
we can simplify the responsibility of ttsd_player.cpp, and this enhance the maintainability.

Change-Id: I080b092af1c833473bac30f768fefac3ec2d0674
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoFix potential defects on ttsd_player 45/271145/1
Suyeon Hwang [Wed, 16 Feb 2022 02:30:02 +0000 (11:30 +0900)]
Fix potential defects on ttsd_player

This patch includes this changes in order to fix some potential defects:
- Remove null pointer dereferencing
- Add mutex lock in order to use conditional wait
- Move assigning code to avoid change out of critical section

Change-Id: Iad704cfd30316b5299ab5acbb47178fb6ef2c12a
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoFix the description of tts_repeat() 51/270651/3
Suyeon Hwang [Mon, 7 Feb 2022 08:25:28 +0000 (17:25 +0900)]
Fix the description of tts_repeat()

Current descprion is not matched with the behavior and purpose of the function.

This patch changes the description in order to match the description and behavior of the function.

Change-Id: I3f8e39348c327206a38522a3853541b6ee1fc1aa
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoAdd code to check whether the player is initialized 95/271095/2
Suyeon Hwang [Thu, 20 Jan 2022 06:57:51 +0000 (15:57 +0900)]
Add code to check whether the player is initialized

Change-Id: Ic651a374b408dd10f0cee033e49c080d678d178f
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoChange file format of ttsd_player from c to cpp 14/266214/9
Suyeon Hwang [Tue, 27 Apr 2021 09:33:04 +0000 (18:33 +0900)]
Change file format of ttsd_player from c to cpp

To enhance readability, this patch changes the format of ttsd_player from c to cpp.

By this change, we can apply cpp grammar into ttsd_player code to enhance the readability and
simplify the code. And also, we can use class to seperate the responsibility of ttsd_player to
decrease the complexity.

Change-Id: I63ce7efe9729a4b31377265fc21d0551397aa160
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoFix condition to remove dead code 41/268941/5
Suyeon Hwang [Wed, 5 Jan 2022 04:44:56 +0000 (13:44 +0900)]
Fix condition to remove dead code

In current code, speak_data is not null if ttsd_data_get_speak_data() returns error none, so null
check on line #99 ~ #102 would become dead code.

To remove this dead code, this patch fixes the condition to check the result of
ttsd_data_get_speak_data(). And this patch fixes some potential memory leak and enhances the
readability.

Change-Id: Ic8dcf0eea79cb57a4a8ad8cf6afc9d59fcd60e49
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoFix prototypes of internal functions to increase readability 13/266213/9
Suyeon Hwang [Mon, 26 Apr 2021 10:36:04 +0000 (19:36 +0900)]
Fix prototypes of internal functions to increase readability

Some internal functions are not declared as a static. Using static keyword, each functions can
avoid the access from out of file.
And also, some functions have too many parameters and it makes difficult to use.

This patch adds static keywords to internal functions and simplify some internal function.

Change-Id: I6e315f19fe84c063f094cd1a665b2c2ae7097b19
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoMake function for managing sound_data_s 12/266212/9
Suyeon Hwang [Tue, 27 Apr 2021 08:47:06 +0000 (17:47 +0900)]
Make function for managing sound_data_s

In previous code, instance of sound_data_s is created by ttsd_server.c. However, destruction of
instance is by ttsd_data.c.
This way of memory management is dangerous, because invalid memory access can occur by the mistake
of developers.

This patch provides two new function for creating and destroying instance of sound_data_s.
These functions provide safe creation and destruction of the instance.

Change-Id: I18634d45e5a145238989c5eeefb7457332e7a782
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoMake function for managing speak_data_s 11/266211/9
Suyeon Hwang [Mon, 26 Apr 2021 06:36:59 +0000 (15:36 +0900)]
Make function for managing speak_data_s

In previous code, instance of speak_data_s created by ttsd_server.c but destroyed by ttsd_data.c.
This way of memory management is dangerous because invalid memory access can occur by the mistake
of developers.

This patch provides two new function for creating and destroying instance of speak_data_s.
These functions provide safe creation and destruction of the instance.

Change-Id: I016720eccbffd16bdfcb23878573caa1cb9f3115
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoUse single play thread to play PCM data 10/266210/9
Suyeon Hwang [Wed, 21 Apr 2021 10:40:41 +0000 (19:40 +0900)]
Use single play thread to play PCM data

To simplify the management of player thread, this patch makes only one sub thread to play PCM data.

Change-Id: I9f0a050f59411bb692e038488e474dce0716cb46
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoMerge "Return error when TTS engine is terminated before beginning the main loop... submit/tizen/20220211.020451
Suyeon Hwang [Thu, 10 Feb 2022 02:38:13 +0000 (02:38 +0000)]
Merge "Return error when TTS engine is terminated before beginning the main loop" into tizen

2 years agoSend return value from server to client 32/270832/1
Suyeon Hwang [Fri, 28 Jan 2022 08:57:44 +0000 (17:57 +0900)]
Send return value from server to client

Current code does not send return value of server error to client which uses TIDL as IPC method.
However, this can make unintented behavior because some function like tts_play() needs to error
value for returning.

This patch makes server send return value to client although the client uses TIDL. By this change,
clients can always get proper error values from server.

Change-Id: Ibb98cd1bf64e92746022632f3bc5bf9eded904df
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
(cherry picked from commit 3a86f249ae8266bf145944f108088af0dd5f2ba3)

2 years agoReturn error when TTS engine is terminated before beginning the main loop 31/270831/1
sooyeon [Fri, 28 Jan 2022 00:49:43 +0000 (09:49 +0900)]
Return error when TTS engine is terminated before beginning the main loop

Change-Id: I93e5a1b189632629f3e3334d08d7d99a9942042a
Signed-off-by: sooyeon <sooyeon.kim@samsung.com>
(cherry picked from commit 8ac094519445240d9c29133b1ada3dd7c2a7b73a)

2 years agoSend new state to client synchornously 75/269575/3
Suyeon Hwang [Wed, 12 Jan 2022 04:30:41 +0000 (13:30 +0900)]
Send new state to client synchornously

Current code sends new state asynchornously using ecore timer in order to prohibit main loop
from being blocked. However, sending new state can be delayed by the event from
ecore_main_loop_thread_safe_call_async(). Callback registered by this function has higher priority
than the ecore timer callback. This may cause uninteded behavior on client side.

To prevent this situation, this patch sends new state synchornously. By this patch, client gets
new state immediately after stop player. Of course, IPC overhead can be added into
ttsd_server_play(), but the overhead is short enough.

Change-Id: Ia580edbd957d57a215d3d760fdcd8de54b73c49c
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoUpdate version to 1.70.0 15/269815/1 submit/tizen/20220120.074959
wn.jang [Thu, 20 Jan 2022 07:35:36 +0000 (16:35 +0900)]
Update version to 1.70.0

Change-Id: I1025a116f660c8006dad779956dbe88d77c740ed

2 years agoCoverage support for robot profile 93/269693/3
wn.jang [Thu, 20 Jan 2022 04:22:14 +0000 (13:22 +0900)]
Coverage support for robot profile

Change-Id: I94628c39ae124a282001a1ccf4f2afc8cc07e5b4

2 years agoTerminate service engine when engine is changed 52/269452/1
Suyeon Hwang [Fri, 14 Jan 2022 02:55:12 +0000 (11:55 +0900)]
Terminate service engine when engine is changed

Change-Id: I2d9bc90b0ce71cb37b9c9f4997debdb7dc517061
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
(cherry picked from commit 4bd34ef0d4ef885642c3752b7ecfcdf76d5d2694)

2 years agoAdd credential field into app data on server side 67/268967/1
Suyeon Hwang [Wed, 5 Jan 2022 09:32:14 +0000 (18:32 +0900)]
Add credential field into app data on server side

Change-Id: I7e0ddb44b6053c4cd6002414f3157e4a32640567
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoAdd app check code to handle TCs 83/268883/1
Suyeon Hwang [Tue, 4 Jan 2022 03:00:34 +0000 (12:00 +0900)]
Add app check code to handle TCs

Change-Id: Iaaf4804ec6099dbb072e6473faba3eff8c427685
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
(cherry picked from commit 85cf465610d564ba60ebb9f7a2d7b2ac711a39bb)

2 years agoCall finalize synchronously when app termination is requested by app fw 95/268695/2
Suyeon Hwang [Thu, 30 Dec 2021 03:05:30 +0000 (12:05 +0900)]
Call finalize synchronously when app termination is requested by app fw

Current code always calls finalize using ecore timer, so finalize codes must be called on next
event loop. However, finalize can not be worked because there is no event loop when app is
terminated by outside app terminate request. This behavior can make unintended problem.

To resolve this problem this patch makes server call finalize synchronously when app is terminated
by outside request. By this change, finalize must be called in the case.

Change-Id: Ib22cf36fd16e227ad606b78dbbfbd660242335bf
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoMerge branch 'tizen_6.5' into tizen 94/268594/1
Suyeon Hwang [Mon, 27 Dec 2021 09:08:28 +0000 (18:08 +0900)]
Merge branch 'tizen_6.5' into tizen

Change-Id: Ic8aa8568180c89b29c2be41178951385ac972605

2 years agoUpdate version (1.70.0) 93/268593/1
Suyeon Hwang [Mon, 27 Dec 2021 08:55:17 +0000 (17:55 +0900)]
Update version (1.70.0)

Change-Id: I3b3e91576cf1854ab633a593c46feea4a923cf3f
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoUpdate version (1.65.17) 82/268582/1
Suyeon Hwang [Mon, 27 Dec 2021 08:38:23 +0000 (17:38 +0900)]
Update version (1.65.17)

Change-Id: I07459ac7d601073736b62dda9efc6b199e72e43a
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoGet UID from list using tts_config_client_s structure 94/268294/4
Suyeon Hwang [Mon, 20 Dec 2021 04:53:26 +0000 (13:53 +0900)]
Get UID from list using tts_config_client_s structure

Current code converts the type of element as integer. However, the element of the list is instance
of tts_config_client_s structure. Because the first member of the structure is uid, so current code
has no problem until now. But this can occur problem if the type of uid or the order of member is
changed.

To solve this problem, this patch changes the type from integer to the structure. This can provide
safe access to member.

Change-Id: I168011529efec4a59a1a1abc8b7d203e412a4972
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoFix the data type for uid 41/268241/6
Suyeon Hwang [Fri, 17 Dec 2021 08:44:16 +0000 (17:44 +0900)]
Fix the data type for uid

On 32bit architecture, signed integer is enough to store uid value. However, on 64bit architecture,
signed integer is not enough because maximum value of pid is 4194304 and value of pid * 1000 is
bigger than the limit of signed integer. And it cause overflow problem.

To solve this issue, this patch changes the data type of variable that stores uid.
Unsigned integer can provides enough space to store uid value on 64bit os.

Change-Id: I7e4cc46ca454c8a8fb38d37a4434eee492aefee9
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoReset flag and thread pointer 98/268398/1
Suyeon Hwang [Wed, 22 Dec 2021 08:06:36 +0000 (17:06 +0900)]
Reset flag and thread pointer

Change-Id: Id26e7dedbb3baf6657e50c24c259c3d4a3b34a56
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoSkip waiting if reprepare by engine changed 81/263681/2
Suyeon Hwang [Wed, 8 Sep 2021 06:02:03 +0000 (15:02 +0900)]
Skip waiting if reprepare by engine changed

Change-Id: Ia4fd4aa75f4d49c21aea8c59cfaf08d2a64e5512
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoDefine constant for max length of app ID 80/263680/2
Suyeon Hwang [Wed, 8 Sep 2021 03:36:26 +0000 (12:36 +0900)]
Define constant for max length of app ID

Change-Id: Id8d394884fb5136a9e577ff735e9e3197e91760e
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoReactivate sound ducking when background volume ratio is changed 44/268344/1
Suyeon Hwang [Tue, 21 Dec 2021 06:57:53 +0000 (15:57 +0900)]
Reactivate sound ducking when background volume ratio is changed

To avoid some side effect or unintended behavior, current code does not apply the change of
background volume ratio immediately. To apply it immediately, tts service has to deactivate the
sound ducking and activate it again. This may cause tick noise or failure to recover background
volume. However, the requirement wants to apply the background volume ratio immediately.

Thus, this patch deactivate and activate the sound ducking right after changing background volume
ratio. To do this safely, the new code handles the behavior for background volume on main loop.
And this new code only works when the sound ducking is activated.

Change-Id: I11ea051aaa69b5a0bd959853d72943569c678a57
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoSet client type when config already initialized 17/268317/2 submit/tizen_6.5/20211223.020506
Suyeon Hwang [Mon, 20 Dec 2021 08:46:56 +0000 (17:46 +0900)]
Set client type when config already initialized

Change-Id: I72a698aeb074890d03e642b2ccb11e65c839dd4a
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoAdd retry logic when rpc_port_stub_tts_register() is failed 75/268275/1
sooyeon [Sun, 19 Dec 2021 13:40:04 +0000 (22:40 +0900)]
Add retry logic when rpc_port_stub_tts_register() is failed

Change-Id: Ide6d36eb8b6f66fd156358fead29e911f936ffd1
Signed-off-by: sooyeon <sooyeon.kim@samsung.com>
2 years agoMerge "Add thread_wait to wait g_reprepare_thread is terminated" into tizen_6.5
Sooyeon Kim [Fri, 17 Dec 2021 07:49:40 +0000 (07:49 +0000)]
Merge "Add thread_wait to wait g_reprepare_thread is terminated" into tizen_6.5

2 years agoAdd thread_wait to wait g_reprepare_thread is terminated 33/268233/1
sooyeon [Fri, 17 Dec 2021 16:03:50 +0000 (01:03 +0900)]
Add thread_wait to wait g_reprepare_thread is terminated

Change-Id: Icabe75f263144ba51c03487d2e918e4d6529547d
Signed-off-by: sooyeon <sooyeon.kim@samsung.com>
2 years agoRearrange logs 88/268188/3
sooyeon [Fri, 17 Dec 2021 09:00:48 +0000 (18:00 +0900)]
Rearrange logs

Change-Id: Ia6089503030001bd8072c79518fe05a997333c72
Signed-off-by: sooyeon <sooyeon.kim@samsung.com>
2 years agoMerge "Fix config client type as a bit flat" into tizen_6.5
Wonnam Jang [Fri, 17 Dec 2021 07:40:48 +0000 (07:40 +0000)]
Merge "Fix config client type as a bit flat" into tizen_6.5

2 years agoFix config client type as a bit flat 19/268219/2
Suyeon Hwang [Fri, 17 Dec 2021 06:47:52 +0000 (15:47 +0900)]
Fix config client type as a bit flat

There is case that the app uses both client and setting API. In current code, this kind of usage
can cause invalid blocking to fix configuration file. Because current config client type is only
store single mode in one process.

To solve this problem, this patch changes config client type to bit flag variable. By this change,
a process can store multiple client type, and this can avoid wrong behavior.

Change-Id: I66bdb64cff148da5a0cc3cc725842265534d4842
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoFix SVACE issue (Add mutex_unlock before returning) 29/268129/1
sooyeon [Thu, 16 Dec 2021 19:49:00 +0000 (04:49 +0900)]
Fix SVACE issue (Add mutex_unlock before returning)

Change-Id: I6b5749b8221d577231db6b60361fb69658659bdc
Signed-off-by: sooyeon <sooyeon.kim@samsung.com>
2 years agoUpdate version (1.65.16) 13/267613/1 accepted/tizen/6.5/unified/20211212.212705 submit/tizen_6.5/20211208.023642
Suyeon Hwang [Wed, 8 Dec 2021 01:40:46 +0000 (10:40 +0900)]
Update version (1.65.16)

Change-Id: If5beefbbc7c1826f3ccf63785a7eb8ab16c09608
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoMerge "Call ttse_terminate when engine is changed before registering vconfkey callbac...
Suyeon Hwang [Tue, 7 Dec 2021 09:58:08 +0000 (09:58 +0000)]
Merge "Call ttse_terminate when engine is changed before registering vconfkey callback" into tizen_6.5

2 years agoCall ttse_terminate when engine is changed before registering vconfkey callback 79/267579/1
sooyeon [Tue, 7 Dec 2021 17:58:57 +0000 (02:58 +0900)]
Call ttse_terminate when engine is changed before registering vconfkey callback

Change-Id: I92785e18c480154f4802500c759ff725c8d116b6
Signed-off-by: sooyeon <sooyeon.kim@samsung.com>
2 years agoAdd parameter to detemine client and others 91/267491/4
Suyeon Hwang [Mon, 6 Dec 2021 07:19:24 +0000 (16:19 +0900)]
Add parameter to detemine client and others

Client app does not need to fix configuration, but current code has allowed the client to fix
configuration file. And this behavior makes race condition of configuration. By this problem,
configuration file has invalid value, and it is possible to make side effect.

To solve this problem, this patch adds new parameter to identify client app. By this change,
framework can block the fix from client, and by this behavior, possibility of race condition
would be reduced.

Change-Id: I37d26f78c9d1aa185d4ab22b15a8cd76fb890196
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoMerge "Add mutex on tts_config_info for thread safety" into tizen_6.5
Sooyeon Kim [Mon, 6 Dec 2021 02:23:51 +0000 (02:23 +0000)]
Merge "Add mutex on tts_config_info for thread safety" into tizen_6.5

2 years agoMerge "Seperate memory of tts_config_info for thread safety" into tizen_6.5
Sooyeon Kim [Mon, 6 Dec 2021 02:23:42 +0000 (02:23 +0000)]
Merge "Seperate memory of tts_config_info for thread safety" into tizen_6.5

2 years agoMake g_synth_control as atomic and Add extra logs 22/267422/3
sooyeon [Fri, 3 Dec 2021 15:59:44 +0000 (00:59 +0900)]
Make g_synth_control as atomic and Add extra logs

Change-Id: I68eda73b4b4c458b4ea17d387def2d6b478eb564
Signed-off-by: sooyeon <sooyeon.kim@samsung.com>
2 years agoAdd mutex on tts_config_info for thread safety 08/267408/1
wn.jang [Fri, 3 Dec 2021 01:25:02 +0000 (10:25 +0900)]
Add mutex on tts_config_info for thread safety

Change-Id: Ia4b9a35c2c15aeb6a419892a9bde072f9455afad

2 years agoSeperate memory of tts_config_info for thread safety 06/267406/1
wn.jang [Fri, 3 Dec 2021 01:15:13 +0000 (10:15 +0900)]
Seperate memory of tts_config_info for thread safety

Change-Id: I15f7802301e03515f5f88081aa73c4e2c83efcdc

2 years agoUpdate version (1.65.15) 81/267281/1 accepted/tizen/6.5/unified/20211205.214036 submit/tizen_6.5/20211202.041353
Suyeon Hwang [Wed, 1 Dec 2021 03:03:04 +0000 (12:03 +0900)]
Update version (1.65.15)

Change-Id: Icac35e6f2dbce38430ffe5bea92e8cf9578681e4
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoSet playing status into vconf 80/267280/1
Suyeon Hwang [Wed, 1 Dec 2021 02:33:35 +0000 (11:33 +0900)]
Set playing status into vconf

Change-Id: I1fb76eb58d87a54516bbf15fcd02ea6829c59f85
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoFix invalid file pointer access to avoid crash 11/267011/3
Suyeon Hwang [Wed, 24 Nov 2021 05:41:32 +0000 (14:41 +0900)]
Fix invalid file pointer access to avoid crash

Change-Id: I71ce23eb03e181a5157bddbccfe18221e349d01c
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
2 years agoUpdate version (1.65.14) 36/266436/1 accepted/tizen/6.5/unified/20211116.032717 submit/tizen_6.5/20211112.081028 submit/tizen_6.5/20211115.015659
Suyeon Hwang [Fri, 12 Nov 2021 07:49:50 +0000 (16:49 +0900)]
Update version (1.65.14)

Change-Id: I6ad69319e504dd2844712482be6543cb48a93d50
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>