platform/core/multimedia/pulseaudio-modules-tizen.git
3 years agoFix SVACE defect(DEREF_OF_NULL.RET.STAT) 15/242615/5 accepted/tizen/unified/20200829.113359 submit/tizen/20200828.155654
Seungbae Shin [Fri, 28 Aug 2020 08:54:19 +0000 (17:54 +0900)]
Fix SVACE defect(DEREF_OF_NULL.RET.STAT)

[Version] 13.0.32
[Issue Type] Vulnerability

Change-Id: Ideb267ce415c92c51702558cfdba9cb8cb0bc179

3 years agoFix Coverity defects 21/242521/1 accepted/tizen/unified/20200828.121501 submit/tizen/20200827.104847
Seungbae Shin [Thu, 27 Aug 2020 10:28:52 +0000 (19:28 +0900)]
Fix Coverity defects

 - Unchecked return value (CHECKED_RETURN)
 - String not null terminated (STRING_NULL)

[Version] 13.0.31
[Issue Type] Vulnerability

Change-Id: I0e4b8c824c0d6dd9efe71d34d3576aa81453aa83

3 years agofixup! tizenaudio-publish: publish only built-in devices 74/241974/1 accepted/tizen/unified/20200824.134513 submit/tizen/20200821.074009 submit/tizen/20200824.023231
Seungbae Shin [Fri, 21 Aug 2020 07:31:03 +0000 (16:31 +0900)]
fixup! tizenaudio-publish: publish only built-in devices

adjust log level for ignoring publish

[Version] 13.0.30
[Issue Type] Update

Change-Id: I0476c340de9b4bffc13bf9734bd837fd5f169f92

3 years agofixup! tizenaudio-discover: ignore local services 76/241876/4
Seungbae Shin [Thu, 20 Aug 2020 10:07:32 +0000 (19:07 +0900)]
fixup! tizenaudio-discover: ignore local services

skip discovered from localhost(127.0.0.1)

[Version] 13.0.29
[Issue Type] Update

Change-Id: I5faa7ae58b5ebfa8dae5a8c68ba64ff2309096f4

3 years agostream-manager-dbus: launch mdnsd when remote publish/discover 32/241432/4
Seungbae Shin [Thu, 20 Aug 2020 06:17:38 +0000 (15:17 +0900)]
stream-manager-dbus: launch mdnsd when remote publish/discover

[Version] 13.0.28
[Issue Type] Update

Change-Id: I0a63ba5c5636e249f640337b25bfd698c18311d9

3 years agostream-manager: add publish/discover/set_permission interfaces 73/241273/9
Jaechul Lee [Wed, 19 Aug 2020 02:48:15 +0000 (11:48 +0900)]
stream-manager: add publish/discover/set_permission interfaces

method name     : SetRemotePermission
method argument : [in] string for type
                  [in] unsigned  for index
                  [in] boolean for allowed
return value    : None

method name     : DiscoverRemoteDevice
method argument : [in] boolean for enable
return value    : None

method name     : PublishLocalDevice
method argument : [in] boolean for enable
return value    : None

[Version] 13.0.27
[Issue Type] New feature

Change-Id: I6ab4a388410dcf4d9480bdc1aaaaa7202a199a9f
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
3 years agostream-manager: add restriction for accessing denied remote device 92/241192/7
Seungbae Shin [Tue, 18 Aug 2020 11:10:32 +0000 (20:10 +0900)]
stream-manager: add restriction for accessing denied remote device

includes minor code refactoring

[Version] 13.0.26
[Issue Type] Update

Change-Id: I1d77ff249192bde15b861c9a9d481e3564b791d6

3 years agodevice-manager: handle tunnel device 89/241189/6
Seungbae Shin [Tue, 18 Aug 2020 10:36:53 +0000 (19:36 +0900)]
device-manager: handle tunnel device

tunnel device will be registered(unregistered) when the remote access permission is allowed(denied).
tunnel device will be a network type device

[Version] 13.0.25
[Issue Type] Update

Change-Id: I897fcb5a74ee55c60112e5a9d956c909aae736d0

3 years agotizenaudio-publish: publish only built-in devices 84/238684/4 accepted/tizen/unified/20200817.134629 submit/tizen/20200814.044955
Seungbae Shin [Mon, 13 Jul 2020 02:13:47 +0000 (11:13 +0900)]
tizenaudio-publish: publish only built-in devices

[Version] 13.0.24
[Issue Type] Update

Change-Id: I69753da561c813c80c35df7690d4efc1efc48a43

3 years agotizenaudio-discover: use new tunnel module 85/238685/4
Seungbae Shin [Tue, 14 Jul 2020 11:24:16 +0000 (20:24 +0900)]
tizenaudio-discover: use new tunnel module

[Version] 13.0.23
[Issue Type] Update

Change-Id: I42946234489dffb5e936d49ce7a6eb46aec5dcaa

3 years agotizenaudio-discover: ignore local services 82/238682/5
Seungbae Shin [Mon, 13 Jul 2020 02:12:18 +0000 (11:12 +0900)]
tizenaudio-discover: ignore local services

[Version] 13.0.22
[Issue Type] Update

Change-Id: I6e8f334e6a16f5f4367c002ea5bd5809dc6b561b

3 years agoAdd module-tizenaudio-discover / module-tizenaudio-publish for remote audio feature 25/229025/17
Seungbae Shin [Mon, 23 Mar 2020 11:22:54 +0000 (20:22 +0900)]
Add module-tizenaudio-discover / module-tizenaudio-publish for remote audio feature

module-tizenaudio-discover : based on module-zeroconf-discover with mDNSResponder porting
module-tizenaudio-publish  : based on module-bonjour-publish with minor changes

[Version] 13.0.21
[Issue Type] New feature

Change-Id: Id47dad038bfae487bbe57a09aaece674b30f9008

3 years agoExclude ringbacktone stream from changing call active routing logic 27/237127/3 accepted/tizen/unified/20200710.114034 submit/tizen/20200709.084332
Sangchul Lee [Thu, 25 Jun 2020 07:05:26 +0000 (16:05 +0900)]
Exclude ringbacktone stream from changing call active routing logic

stream_is_call_family() is also renamed to
is_stream_related_call_active_routing()

[Version] 13.0.20
[Issue Type] Bug fix

Change-Id: Iedee8a5c2e655d4bf4c9f0275c0ed8c0c5450621
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agoAdd Tizen_HW_Touch.ogg at /usr/share/sound/mm-sound directory 61/234661/3 accepted/tizen/unified/20200623.080530 submit/tizen/20200619.020710 submit/tizen/20200623.011651
Jaechul Lee [Thu, 28 May 2020 01:53:46 +0000 (10:53 +0900)]
Add Tizen_HW_Touch.ogg at /usr/share/sound/mm-sound directory

This file is moved from libmm-sound because sound_server doesn't exist.

[Version] 13.0.19
[Issue Type] None

Change-Id: I14801824c87c4388addfbb465092d04b965e2bb9
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
4 years agotone-player: Add sink_input_detach callback 13/234513/5 accepted/tizen/unified/20200615.135431 submit/tizen/20200608.021130 submit/tizen/20200610.005134 submit/tizen/20200610.094452 submit/tizen/20200611.012834 submit/tizen/20200611.075746
Jaechul Lee [Wed, 27 May 2020 01:41:01 +0000 (10:41 +0900)]
tone-player: Add sink_input_detach callback

sink_input_detach_cb function was added to synchronize I/O and main
thread. This commit fixes the unlink issue(f8cde9099) completely.

In additional, handle_sound_stop returns invalid param error when it is
called with invalid handle.

[Version] 13.0.18
[Issue Type] Bug fix

Change-Id: I1f2ede6c0acc6728e1055317124815db3dbd859c
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
4 years agostream-manager: Select new proper device even if sink or source of new data is set 45/233745/2 accepted/tizen/unified/20200601.051755 submit/test/20200612.071313 submit/tizen/20200529.085112
Sangchul Lee [Tue, 19 May 2020 01:32:38 +0000 (10:32 +0900)]
stream-manager: Select new proper device even if sink or source of new data is set

In tizen policy, selecting device is performed in tizenaudio-policy
module. The previous codes skip selecting the device logic if sink or
source of new data is defined(probably aka default sink/source) in
somewhere before the codes. This patch set it regardless of this matter.

We need to be aware of this modification for possible issues regarding
it. If the skip logic is needed anyway later, we may put that in
another place.

[Version] 13.0.17
[Issue Type] Bug fix

Change-Id: I92df553b259d8ae1ff9de6c29723ccbb78bfaee6
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agotone-player: Adds unlinked variable when a stream is stopped 68/233668/2
Jaechul Lee [Mon, 18 May 2020 06:44:24 +0000 (15:44 +0900)]
tone-player: Adds unlinked variable when a stream is stopped

Unlink messages is sent twice in a row in I/O thread. So, it make
sink_input_kill function call twice without a guard on TM1.

[Version] 13.0.16
[Issue Type] Bugs

Change-Id: Ibbe3041a64107ce4fdcf842658a472aad3c23d02
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
4 years agotone-player: Adds new tone playback APIs 29/231429/12 submit/tizen/20200512.012802
Jaechul Lee [Fri, 3 Apr 2020 00:32:53 +0000 (09:32 +0900)]
tone-player: Adds new tone playback APIs

These new APIs will be used by capi-media-tone-player.

  server          : org.pulseaudio.Server
  object path     : /org/pulseaudio/TonePlayer
  interface       : org.pulseaudio.TonePlayer

  method name     : TonePlay
  method argument : [in] unsigned int for tone index
                    [in] signed int for duration
                    [in] signed int for client pid
                    [in] string for role
                    [in] signed int for parent id
                    [out] unsigned int for stream index
  return value    : None

  method name     : ToneStop
  method argument : [in] unsigned int for stream index
  return value    : None

[Version] 13.0.15
[Issue Type] Improvement

Change-Id: I090e917e26697250bb187b0d2df8cd6042875354
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
4 years agoFix resource leaks when pulseaudio is terminated 79/232379/2
Jaechul Lee [Mon, 4 May 2020 01:31:10 +0000 (10:31 +0900)]
Fix resource leaks when pulseaudio is terminated

This resource leak makes abort signal in core_free function and then
spends times to make unnecessary crash dump.

Change-Id: Iccc7cdce2e60985f73a819e83cf7f4887cfdaac9
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
4 years agoChanges PA_PCM_DUMP_PA_* to PA_PCM_DUMP_* 46/232046/1
Jaechul Lee [Tue, 28 Apr 2020 01:27:38 +0000 (10:27 +0900)]
Changes PA_PCM_DUMP_PA_* to PA_PCM_DUMP_*

Change-Id: Ie02cdb0a276b0f440057bb6b1124e1d5076f3124
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
4 years agotizenaudio-policy: Removes unused pcm dump define 55/231655/2
Jaechul Lee [Thu, 23 Apr 2020 08:12:13 +0000 (17:12 +0900)]
tizenaudio-policy: Removes unused pcm dump define

[Version] 13.0.14
[Issue Type] None

Change-Id: I83e01e8eeb120ad76f68d7f9070e1e40f0543be9
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
4 years agosound-player: Fix memory leak in stop APIs 13/231413/2 accepted/tizen/unified/20200422.215421 submit/tizen/20200422.064310
Jaechul Lee [Wed, 22 Apr 2020 01:32:41 +0000 (10:32 +0900)]
sound-player: Fix memory leak in stop APIs

Every time stop APIs called, memory leak found. The reason why
sink_input's userdata that has wrapper structure such as
memblockq_stream, file_stream should be freed.

[Version] 13.0.13
[Issue Type] Bug

Change-Id: I221a6ace56b4c57f288c263c6e3b5fe5abf5e38a
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
4 years agosound-player: Adds error return for not supported media type 32/230132/5 accepted/tizen/unified/20200417.152647 submit/tizen/20200417.044433
Jaechul Lee [Wed, 8 Apr 2020 06:06:48 +0000 (15:06 +0900)]
sound-player: Adds error return for not supported media type

added checking not support media type error and checking invalid handle
in sound_stop function. in this case, sound_server returns
org.tizen.multimedia.audio.InvalidState and it changes to INVALID_OPERATION

[Version] 13.0.12
[Issue Type] Add

Change-Id: I35db85891d6c54f6af09449668e09ea01c09ff7a
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
4 years agostream-manager: Check role/route_type functions to skip process are revised 39/229539/2 accepted/tizen/unified/20200408.131511 submit/tizen/20200406.030837 submit/tizen/20200407.002130 submit/tizen/20200408.002613
Sangchul Lee [Wed, 1 Apr 2020 23:43:22 +0000 (08:43 +0900)]
stream-manager: Check role/route_type functions to skip process are revised

check_role_to_skip()/check_route_type_to_skip() are renamed to
is_invalid_role()/is_invalid_route_type() respectively.

Specific conditions inside of the previous functions are
moved out of the new renamed functions.

[Version] 13.0.10
[Issue Type] Refactoring

Change-Id: Ie6ec2e0a3b42078d1265e15ef35db240daad2111
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agoRemove unused header files 04/229304/3 submit/tizen/20200403.080755
Jaechul Lee [Tue, 31 Mar 2020 05:11:34 +0000 (14:11 +0900)]
Remove unused header files

symdef.h isn't used anymore.
backport mainline commit d9624e038 for removing unused code

[Version] 13.0.10
[Issue Type] Refactoring

Change-Id: Id249e22d1cdf41a37b331d89bcdaefc1f5a4e67e
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
4 years agosound-player: Adds new sound playback APIs 01/228901/11
Jaechul Lee [Thu, 26 Mar 2020 08:13:48 +0000 (17:13 +0900)]
sound-player: Adds new sound playback APIs

These new APIs will be used by capi-media-wav-player.

  server          : org.pulseaudio.Server
  object path     : /org/pulseaudio/SoundPlayer
  interface       : org.pulseaudio.SoundPlayer

  method name     : SoundPlay
  method argument : [in] string for input filename
                    [in] signed int for loop count
                    [in] signed int for client pid
                    [in] string for role
                    [in] signed int for parent id
                    [out] signed int for stream index
  return value    : None

  method name     : SoundStop
  method argument : [in] signed int for stream index
  return value    : None

  signal aname     : EOS
  signal argument  : [out] signed int for stream index
  return value    : None

[Version] 13.0.9
[Issue Type] Add

Change-Id: Ifff7fc327a8fdd47595c9411b983e97b9623b259
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
4 years agostream-manager: Add conditions not to notify stream connection/disconnection twice 27/229427/1
Sangchul Lee [Wed, 1 Apr 2020 00:02:46 +0000 (09:02 +0900)]
stream-manager: Add conditions not to notify stream connection/disconnection twice

This notification invokes HAL function for stream connection changed.
There were cases that this functions is invoked twice unintentionally
according to the scenario related to calling cork/uncork from client
side. For example, gstreamer pulsesink and playbacks from sound-server.

It is now fixed to trigger the notification one at a time properly.

[Version] 13.0.8
[Issue Type] Improvement

Change-Id: I1ef748ad514c87e01034e4f5bd8fc9b1083be34b
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agosound-player: add stop / stop_all operation for simple playbacks 22/227322/12 accepted/tizen/unified/20200323.172915 submit/tizen/20200323.095035
Seungbae Shin [Wed, 11 Mar 2020 07:36:57 +0000 (16:36 +0900)]
sound-player: add stop / stop_all operation for simple playbacks

[Version] 13.0.7
[Issue Type] Add

Change-Id: I9b9e1653496f77d24c0aab0d7b3e093b547e080f

4 years agopoweroff: Changes the file permission to 644 98/228098/3
Jaechul Lee [Thu, 19 Mar 2020 04:24:09 +0000 (13:24 +0900)]
poweroff: Changes the file permission to 644

removed unnecessary permissions.

Change-Id: I729f31ccdfa748c0dfc0a8b9484940962ead4b69
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
4 years agostream-manager-dbus: Send signal for ducking immediately when duration is 0 17/227817/7 accepted/tizen/unified/20200318.130518 submit/tizen/20200317.075627
Jeongmo Yang [Mon, 16 Mar 2020 11:15:09 +0000 (20:15 +0900)]
stream-manager-dbus: Send signal for ducking immediately when duration is 0

- sink_input_ramp_finish_cb is not called when duration is 0

[Version] 13.0.6
[Profile] Common
[Issue Type] Bug fix

Change-Id: I292d620472a57b13ecaa6b69d81206e289552a6b
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
4 years agoreplace source SET_STATE handlers with callbacks 33/227733/2 submit/tizen/20200316.105549
Seungbae Shin [Mon, 16 Mar 2020 05:58:32 +0000 (14:58 +0900)]
replace source SET_STATE handlers with callbacks

[Version] 13.0.5
[Issue Type] Bug / Upgrade

Change-Id: I46b2885d566b8ebcdc555d28260f4ce25f7fe7d2

4 years agoreplace sink SET_STATE handlers with callbacks 44/227544/1 accepted/tizen/unified/20200315.214844 submit/tizen/20200313.024309
Seungbae Shin [Thu, 12 Mar 2020 12:21:17 +0000 (21:21 +0900)]
replace sink SET_STATE handlers with callbacks

[Version] 13.0.4
[Issue Type] Bug / Upgrade

Change-Id: Ic762a7ea4262b4d661a6a85191a00e0e45f884a3

4 years agoFix coverty defects (CHECKED_RETURN) 99/226999/2 accepted/tizen/unified/20200310.151112 submit/tizen/20200309.034736 submit/tizen/20200309.095617
Seungbae Shin [Mon, 9 Mar 2020 03:01:40 +0000 (12:01 +0900)]
Fix coverty defects (CHECKED_RETURN)

[Version] 13.0.2
[Issue Type] Vulnerability

Change-Id: Ifc9ef1f508155b34c06a8b14b5cd27fde67ae35d

4 years agoRemove module-hw-keysound which is no longer supported 04/225804/2 accepted/tizen/unified/20200304.123928 submit/tizen/20200303.010146
Seungbae Shin [Mon, 24 Feb 2020 11:49:58 +0000 (20:49 +0900)]
Remove module-hw-keysound which is no longer supported

[Version] 13.0.2
[Issue Type] Dependencies

Change-Id: I2eb24577bd68fe6ce6cadb84b90ba3c63c057e00

4 years agofixup! stream-manager: Fix svace defects (CHECK_AFTER_OVERFLOW / UNREACHABLE_CODE) 98/224498/3 submit/tizen/20200224.103343
Seungbae Shin [Tue, 11 Feb 2020 05:31:18 +0000 (14:31 +0900)]
fixup! stream-manager: Fix svace defects (CHECK_AFTER_OVERFLOW / UNREACHABLE_CODE)

+ remove minor warning

Change-Id: Icca68a8fc1e1369208c3e6a91a74e1b099e05a84

4 years agoAdapt codes for PulseAudio 13.0 88/222888/3 submit/tizen/20200211.115824
Sangchul Lee [Tue, 21 Jan 2020 07:03:42 +0000 (16:03 +0900)]
Adapt codes for PulseAudio 13.0

[Version] 13.0.1
[Issue Type] Update

Change-Id: I6524931df89b70d573b209eb6a4479cd6b7adafc
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agostream-manager: Improve sending ducking state changed signal 97/223797/1 submit/tizen/20200205.062641 submit/tizen/20200206.023537
Sangchul Lee [Tue, 4 Feb 2020 03:39:32 +0000 (12:39 +0900)]
stream-manager: Improve sending ducking state changed signal

If two or more ducking requests have been activated to the same
target stream type during ducking operation, ducking state changed
signal should be emitted for each ducking request handle respectively.
Previously, it did not work well. It is now fixed.

Note that these ducking state changed signals will be emitted at the
same time when the sink-input's ramp finish hook is called in the
thread context as soon as the final ducking operation has been done.

[Version] 11.1.97
[Issue Type] Bug fix

Change-Id: I3de608a7053c6c61e74ff67af271d2972f5149a1
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agostream-manager: Fix svace defects (CHECK_AFTER_OVERFLOW / UNREACHABLE_CODE) 30/223630/3 accepted/tizen/unified/20200203.125727 submit/tizen/20200203.035951
Seungbae Shin [Fri, 31 Jan 2020 09:47:09 +0000 (18:47 +0900)]
stream-manager: Fix svace defects (CHECK_AFTER_OVERFLOW / UNREACHABLE_CODE)

[Version] 11.1.96
[Profile] Common
[Issue Type] Svace

Change-Id: If8546bafff603b9a4443f0452f5533627f991009

4 years agostream-manager: Update volume for all channels 76/223476/1
Jeongmo Yang [Wed, 29 Jan 2020 03:49:53 +0000 (12:49 +0900)]
stream-manager: Update volume for all channels

[Version] 11.1.95
[Profile] Common
[Issue Type] Update

Change-Id: I28f1ef5d696d800e96b5ffadcd5e8ccf8653769a
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
4 years agostream-manager: Change ratio from 1.0 to previoulsy set value 44/222544/1 accepted/tizen/unified/20200116.102954 submit/tizen/20200116.065956
Jeongmo Yang [Thu, 16 Jan 2020 03:26:59 +0000 (12:26 +0900)]
stream-manager: Change ratio from 1.0 to previoulsy set value

[Version] 11.1.94
[Profile] Common
[Issue Type] Bug fix

Change-Id: I8daa4c574b6366225635d028354038a505892193
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
4 years agostream-manager-volume: Fix for iniparser upgrade 53/221953/3 accepted/tizen/unified/20200113.130551 submit/tizen/20200110.100453
Seungbae Shin [Wed, 8 Jan 2020 10:33:02 +0000 (19:33 +0900)]
stream-manager-volume: Fix for iniparser upgrade

iniparser_getstring() will returns 'const char *' type

[Version] 11.1.93
[Issue Type] Update

Change-Id: If7f243f770c26c524ae00aa3c84af97cdcc6f77e

4 years agotizenaudio-policy: Add support for the preemptive device routing 08/221108/7
Sangchul Lee [Fri, 20 Dec 2019 03:04:57 +0000 (12:04 +0900)]
tizenaudio-policy: Add support for the preemptive device routing

This new feature is only able to be applid to two routing types below.
 - STREAM_ROUTE_TYPE_AUTO, STREAM_ROUTE_TYPE_AUTO_LAST_CONNECTED

If user sets the preemptive device to a specific stream role, this device
has priority over all other devices that can be selected by the policy of
the stream role. Once it is set to a particular stream role, audio routing
of all other streams with the same stream role will be affected.

  server          : org.pulseaudio.Server
  object path     : /org/pulseaudio/StreamManager
  interface       : org.pulseaudio.StreamManager

  method name     : SetStreamPreemptiveDevice
  method argument : [in] string for stream type (e.g. 'media')
                    [in] string for io direction ('in' or 'out')
                    [in] unsigned int for device id
  return value    : string for return message
                    - success                   : STREAM_MANAGER_RETURN_OK
                    - invalid argument error    : STREAM_MANAGER_RETURN_ERROR_INVALID_ARGUMENT
                    - policy error              : STREAM_MANAGER_RETURN_ERROR_POLICY
                    - internal error            : STREAM_MANAGER_RETURN_ERROR_INTERNAL

  method name     : GetStreamPreemptiveDevice
  method argument : [in] string for stream type (e.g. 'media')
                    [out] unsigned int for input device id
                    [out] unsigned int for output device id
  return value    : string for return message
                    - success                   : STREAM_MANAGER_RETURN_OK
                    - internal error            : STREAM_MANAGER_RETURN_ERROR_INTERNAL

[Version] 11.1.92
[Issue Type] New feature

Change-Id: I12dd1d8d5463426331955a4f7a3799b551685a4d
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agoValidate duckding state with command in handle_activate_ducking() 41/218341/2 accepted/tizen/unified/20191122.053253 submit/tizen/20191122.024811
Jeongmo Yang [Thu, 21 Nov 2019 10:32:52 +0000 (19:32 +0900)]
Validate duckding state with command in handle_activate_ducking()

[Version] 11.1.91
[Profile] Common
[Issue Type] Improvement

Change-Id: I07ff4491f2adc53d623cab82cfb779aeb60e943a
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
4 years agoFix coverity issue - Unchecked return value 22/218022/1 accepted/tizen/unified/20191119.083904 submit/tizen/20191119.015812
Jeongmo Yang [Tue, 19 Nov 2019 01:33:42 +0000 (10:33 +0900)]
Fix coverity issue - Unchecked return value

[Version] 11.1.90
[Profile] Common
[Issue Type] Coverity

Change-Id: I337ad24b87cff98b9ce0160fac28ce7728e42bbb
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
4 years agofixup! Add ducking state to prevent invalid operation. 98/217998/2 accepted/tizen/unified/20191118.234456 submit/tizen/20191118.103834
Jeongmo Yang [Mon, 18 Nov 2019 10:33:17 +0000 (19:33 +0900)]
fixup! Add ducking state to prevent invalid operation.

Add missed string for error

Change-Id: Ieab3be9b2f2889c9187e8f1345bcd662f1c3aec3
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
4 years agoAdd ducking state to prevent invalid operation. 65/217965/2
Jeongmo Yang [Mon, 18 Nov 2019 05:28:07 +0000 (14:28 +0900)]
Add ducking state to prevent invalid operation.

- Previously, ducking command(activation or deactivation) could be sent
  although it's already sent but the operation is not completed.

[Version] 11.1.89
[Profile] Common
[Issue Type] Bug fix

Change-Id: If7c57b2bae38663ae206dd1b55343b10daa5359d
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
4 years agostream-manager-dbus: Support invalid argument error returned by handle_set_volume_level() 28/217728/1 accepted/tizen/unified/20191118.122954 submit/tizen/20191115.044113
Sangchul Lee [Wed, 13 Nov 2019 05:38:19 +0000 (14:38 +0900)]
stream-manager-dbus: Support invalid argument error returned by handle_set_volume_level()

[Version] 11.1.88
[Issue Type] Improvement

Change-Id: Icd45ce7efd08b651341027385ca5b7f184410c0a
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agostream-manager: Skip invalid streams before invoking pa_sink_input_remove_volume_factor() 63/217663/1
Sangchul Lee [Wed, 13 Nov 2019 07:19:46 +0000 (16:19 +0900)]
stream-manager: Skip invalid streams before invoking pa_sink_input_remove_volume_factor()

It is added temporarily to avoid crash. It will be removed if we find
the crash case due to the omission of removal of stream index from
idx_ducking_streams and fix it.

[Version] 11.1.87
[Issue Type] Crash

Change-Id: I5aa655240a951019750da1ae1941790c08c77bd7
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agostream-manager: Add error handling code for ducking instead of assertion 67/217067/1 accepted/tizen/unified/20191106.124641 submit/tizen/20191106.060006
Jeongmo Yang [Wed, 6 Nov 2019 03:48:38 +0000 (12:48 +0900)]
stream-manager: Add error handling code for ducking instead of assertion

[Version] 11.1.86
[Profile] Common
[Issue Type] Error handling

Change-Id: I146f886a47c623fabd8f2729d8c0d5bf41d2e0f5
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
4 years agostream-manager: Fix bug in sink_input_ramp_finish_cb 27/216927/2 accepted/tizen/unified/20191105.110652 submit/tizen/20191105.051822
Jeongmo Yang [Tue, 5 Nov 2019 03:25:22 +0000 (12:25 +0900)]
stream-manager: Fix bug in sink_input_ramp_finish_cb

- If two or more duckings are activated to the same stream,
  only the first ducking state changed callback is invoked.

[Version] 11.1.85
[Profile] Common
[Issue Type] Bug fix

Change-Id: I2f043030aa7f339f42fc6176442974286c33c605
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
4 years agofixup! stream-manager: Revise process_stream() to use sub-functions 66/214966/1 accepted/tizen_5.5_unified_mobile_hotfix tizen_5.5_mobile_hotfix accepted/tizen/5.5/unified/20191031.022340 accepted/tizen/5.5/unified/mobile/hotfix/20201027.090202 accepted/tizen/unified/20191001.062526 submit/tizen/20190930.080259 submit/tizen/20191001.005911 submit/tizen_5.5/20191031.000004 submit/tizen_5.5_mobile_hotfix/20201026.185104 tizen_5.5.m2_release
Sangchul Lee [Mon, 30 Sep 2019 07:57:38 +0000 (16:57 +0900)]
fixup! stream-manager: Revise process_stream() to use sub-functions

Change-Id: Id2d0063434d0db7609459b7499326c72c404f4a6
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agostream-manager: Revise do_notify() to use sub-functions 38/214738/2
Sangchul Lee [Thu, 26 Sep 2019 03:41:33 +0000 (12:41 +0900)]
stream-manager: Revise do_notify() to use sub-functions

It'll reduce cyclomatic complexity of SAM.

[Version] 11.1.84
[Issue Type] Refactoring

Change-Id: Ifeac4de2c4ddbab0101fc34ba54a508cffcdd37c
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agostream-manager: Revise init_stream_map() to use sub-functions 86/214286/3 accepted/tizen/unified/20190923.110254 submit/tizen/20190923.062727
Sangchul Lee [Fri, 20 Sep 2019 01:05:10 +0000 (10:05 +0900)]
stream-manager: Revise init_stream_map() to use sub-functions

It'll reduce cyclomatic complexity of SAM.

[Version] 11.1.83
[Issue Type] Refactoring

Change-Id: Ieabf4fe1f4dd7b5723777f49bfb3ce6a27a76c2a
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agostream-manager: Revise pa_stream_manager_unref() to use new function to free hook... 83/214283/2
Sangchul Lee [Thu, 19 Sep 2019 23:04:56 +0000 (08:04 +0900)]
stream-manager: Revise pa_stream_manager_unref() to use new function to free hook slots

It'll reduce cyclomatic complexity of SAM.

[Version] 11.1.82
[Issue Type] Refactoring

Change-Id: Iadc01db1502b3e7d35431a7a68ad2733098c0e5d
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agostream-manager: Revise device_connection_changed_hook_cb() to use new sub-function 53/214253/2
Sangchul Lee [Thu, 19 Sep 2019 08:13:25 +0000 (17:13 +0900)]
stream-manager: Revise device_connection_changed_hook_cb() to use new sub-function

It'll reduce cyclomatic complexity of SAM.

update_sink_or_source_as_device_change() is renamed to
check_and_move_streams_by_device_connection_change().

[Version] 11.1.81
[Issue Type] Refactoring

Change-Id: I1c0546ba92fc4555512e040df3256eff67bc3992
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agostream-manager: Revise fill_device_info_to_hook_data() to reduce if-else condition... 39/214239/4
Sangchul Lee [Thu, 19 Sep 2019 06:55:58 +0000 (15:55 +0900)]
stream-manager: Revise fill_device_info_to_hook_data() to reduce if-else condition statements

It'll reduce cyclomatic complexity of SAM.

[Version] 11.1.80
[Issue Type] Refactoring

Change-Id: I2efa140fa215addbc1ac83b776d3324228121f79
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agostream-manager: Revise process_stream() to use sub-functions 17/214217/2
Sangchul Lee [Thu, 19 Sep 2019 05:35:06 +0000 (14:35 +0900)]
stream-manager: Revise process_stream() to use sub-functions

It'll reduce cyclomatic complexity of SAM.

[Version] 11.1.79
[Issue Type] Refactoring

Change-Id: Ic3f0a7a834761ac739094d53cc4ca17131d7b86a
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agotizenaudio-policy: Use new sub-functions inside of select_proper_sink_or_source_hook_cb() 88/214188/3
Sangchul Lee [Thu, 19 Sep 2019 01:19:05 +0000 (10:19 +0900)]
tizenaudio-policy: Use new sub-functions inside of select_proper_sink_or_source_hook_cb()

It'll reduce cyclomatic complexity of SAM.

[Version] 11.1.78
[Issue Type] Refactoring

Change-Id: I371317af1c9f732154b1e271f03d86d72a67e675
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agotizenaudio-policy: Use new sub-functions inside of route_change_hook_cb() 05/214105/3
Sangchul Lee [Wed, 18 Sep 2019 05:59:05 +0000 (14:59 +0900)]
tizenaudio-policy: Use new sub-functions inside of route_change_hook_cb()

It'll reduce cyclomatic complexity of SAM.

[Version] 11.1.77
[Issue Type] Refactoring

Change-Id: I2d9aeefc4c503532273cf09668139c034f961589
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agostream-manager-volume: Revise codes to reduce if-else statements 53/214053/2
Sangchul Lee [Tue, 17 Sep 2019 10:30:45 +0000 (19:30 +0900)]
stream-manager-volume: Revise codes to reduce if-else statements

It'll reduce cyclomatic complexity of SAM.

[Version] 11.1.76
[Issue Type] Refactoring

Change-Id: Ie44c99bc701dbb9741baec43723450040e5ebde5
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agostream-manager-dbus: Revise handle_set_stream_preferred_device() to reduce condition... 69/213969/1 accepted/tizen/unified/20190918.010327 submit/tizen/20190917.095054
Sangchul Lee [Tue, 17 Sep 2019 05:22:58 +0000 (14:22 +0900)]
stream-manager-dbus: Revise handle_set_stream_preferred_device() to reduce condition statements

It'll reduce cyclomatic complexity of SAM.

[Version] 11.1.75
[Issue Type] Refactoring

Change-Id: I771f94082848490365a0703b78bfb6d6f59daadc
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agodevice-manager-dbus: Add new function to handle bluez headset property changed signal 90/213890/2
Sangchul Lee [Mon, 16 Sep 2019 07:34:41 +0000 (16:34 +0900)]
device-manager-dbus: Add new function to handle bluez headset property changed signal

It'll reduce cyclomatic complexity of SAM.

[Version] 11.1.74
[Issue Type] Refactoring

Change-Id: I2579f9e68662a55bff331959d377977029f29b46
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agoUse static keyword for global variables 75/213675/1 submit/tizen/20190910.071813
Seungbae Shin [Tue, 10 Sep 2019 05:43:14 +0000 (14:43 +0900)]
Use static keyword for global variables

[Version] 11.1.73
[Issue Type] Refactorying

Change-Id: I4acbbc86ae3c4e4bbcef6647d6ce703f8f81cec0

4 years agofixup! acm: Fix coverity defects 29/212929/2 accepted/tizen/unified/20190830.040810 submit/tizen/20190829.103037
Seungbae Shin [Wed, 28 Aug 2019 07:43:57 +0000 (16:43 +0900)]
fixup! acm: Fix coverity defects

[Version] 11.1.72
[Issue Type] Security

Change-Id: I1dcd3ea1626f0113b3d2696748c9d2ca4412808e

4 years agostream-manager-dbus: Add new DBus method to get preferred device id 36/212936/4 submit/tizen/20190829.100932
Sangchul Lee [Wed, 28 Aug 2019 08:27:01 +0000 (17:27 +0900)]
stream-manager-dbus: Add new DBus method to get preferred device id

  server          : org.pulseaudio.Server
  object path     : /org/pulseaudio/StreamManager
  interface       : org.pulseaudio.StreamManager

  method name     : GetStreamPreferredDevice
  method argument : [in] unsigned int for stream index
                    [out] unsigned int for input device id
                    [out] unsigned int for output device id
  return value    : string for return message
                    - success          : "STREAM_MANAGER_RETURN_OK"
                    - internal error   : "STREAM_MANAGER_RETURN_ERROR_INTERNAL"

[Version] 11.1.71
[Issue Type] Improvement

Change-Id: I9a344d013d81369e1ad909eab31f2d68d0dda1b3
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agostream-manager-dbus: Improve ducking API regarding a stream not running 89/212889/2
Sangchul Lee [Wed, 28 Aug 2019 02:17:13 +0000 (11:17 +0900)]
stream-manager-dbus: Improve ducking API regarding a stream not running

If there's only one stream that belongs to the target stream of ducking
effect and is not running, PA_CORE_HOOK_SINK_INPUT_RAMP_FINISH is not
invoked because it is not a stream to be rendered in this state.

This patch adds condition to use pa_sink_input_add_volume_factor() to
make the effect properly and to send the signal immediately in this case.

[Version] 11.1.70
[Issue Type] Bug fix

Change-Id: Id4339211318c8ce8388f2fce1b290b2a1dc1e09f
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agostream-manager: Fix missed notification 64/212664/5
Jeongmo Yang [Mon, 26 Aug 2019 03:46:26 +0000 (12:46 +0900)]
stream-manager: Fix missed notification

- When stream ducking is disconnected without deactivation,
  notification for audio-HAL is missed.

[Version] 11.1.69
[Profile] Common
[Issue Type] Bug fix

Change-Id: I23ac8257fe5b1f8142864701edd4f514a50f8119
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
4 years agoacm: Fix coverity defects 75/211675/2 accepted/tizen/unified/20190809.110817 submit/tizen/20190809.041132
Seungbae Shin [Thu, 8 Aug 2019 04:49:27 +0000 (13:49 +0900)]
acm: Fix coverity defects

[Version] 11.1.68
[Issue Type] Security

Change-Id: I4a8f4a0d6136c3c52716e1c4e682a9d574991f5a

4 years agostream-manager: Notify ducking activation to HAL 41/211041/2 accepted/tizen/unified/20190807.111819 submit/tizen/20190807.024035
Jeongmo Yang [Mon, 29 Jul 2019 08:32:36 +0000 (17:32 +0900)]
stream-manager: Notify ducking activation to HAL

[Version] 11.1.67
[Issue Type] Update

Change-Id: I1b94cc0c3b8f6f0936ff64347eff4e55631487f1
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
4 years agostream-manager: Ensure sending ducking changed signal even when unlinking sink-input... 56/210856/2 accepted/tizen/unified/20190729.081033 submit/tizen/20190726.021654 submit/tizen/20190728.111739
Sangchul Lee [Thu, 25 Jul 2019 07:44:57 +0000 (16:44 +0900)]
stream-manager: Ensure sending ducking changed signal even when unlinking sink-input during ducking or unducking

Even though a sink-input affected by ducking DBus method is unlinking
in the middle of ducking or unducking process by ramp factor, the DBus
signal for ducking changed callback should be emitted properly.
This patch checks some conditions and emits the signal in that case.

[Version] 11.1.66
[Issue type] Improvement

Change-Id: Iab46f03af623f204ba351fa83941a2a03e77b4d3
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agostream-manager: Revise logs regarding ducking 39/210839/1
Sangchul Lee [Thu, 25 Jul 2019 07:20:12 +0000 (16:20 +0900)]
stream-manager: Revise logs regarding ducking

[Version] 11.1.65
[Issue type] Log

Change-Id: Ic568205d567e6a3d65629e4aefecc7a526c186d8
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agostream-manager: Fix not to apply ducking to new stream when after deactivating ducking 01/210801/1
Sangchul Lee [Thu, 25 Jul 2019 03:03:34 +0000 (12:03 +0900)]
stream-manager: Fix not to apply ducking to new stream when after deactivating ducking

The target role member variable of stream ducking structure was not
de-initialized when deactivating ducking. It causes that new stream
with matching the target role is applied by the previous ducking.
It is now fixed.

[Version] 11.1.64
[Issue type] Bug fix

Change-Id: I74f34905e762ffe35aab32a5eff1c260cac0a43e
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agotizenaudio-policy: Take into account the preferred device in case of auto-last-connec... 13/210613/4
Sangchul Lee [Tue, 23 Jul 2019 02:39:42 +0000 (11:39 +0900)]
tizenaudio-policy: Take into account the preferred device in case of auto-last-connected route type

[Version] 11.1.63
[Issue type] Improvement

Change-Id: I86a91db883c58ec251fa5ec1bf79c93a757778f6
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agotizenaudio-policy: Fix to select a valid device if a device role is specified 16/210416/6
Sangchul Lee [Fri, 19 Jul 2019 02:15:44 +0000 (11:15 +0900)]
tizenaudio-policy: Fix to select a valid device if a device role is specified

[Version] 11.1.62
[Issue type] Bug fix

Change-Id: Icbb61235e2431f8c078c823551507fc5da94252b
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agodevice-manager: Add role parameter to pa_device_manager_get_device() 87/210687/2
Sangchul Lee [Wed, 24 Jul 2019 01:16:10 +0000 (10:16 +0900)]
device-manager: Add role parameter to pa_device_manager_get_device()

The new parameter is for device role. It can be nullable.

[Version] 11.1.61
[Issue Type] API

Change-Id: I336a1e82521e9b21300fb907333127c17c0249c5
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agostream-manager: Improve audio ducking function 55/210455/6 accepted/tizen/unified/20190724.063810 submit/tizen/20190723.054438
Jeongmo Yang [Fri, 19 Jul 2019 05:56:14 +0000 (14:56 +0900)]
stream-manager: Improve audio ducking function

1. Fix crash
: If ducked stream is removed without deactivating,
  the pointer for the removed stream is still remained in idxset of ducking_streams.
  It caused crash when ducking stream is destroyed.

2. Apply ducking to new stream
: If new role-matched stream is created when after ducked,
  apply ducking to it without fade-out.

[Version] 11.1.60
[Issue Type] Improvement

Change-Id: Ida0556e5d8c1d10f001357291ca17193174c26ae
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
4 years agofixup! stream-manager-dbus: Add direction argument to the DBus method - set preferred... 16/210616/1
Sangchul Lee [Tue, 23 Jul 2019 02:51:44 +0000 (11:51 +0900)]
fixup! stream-manager-dbus: Add direction argument to the DBus method - set preferred device

Change-Id: If70a0a2410bc15ee6d77cbb4438e92dfce560fa9
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agostream-manager-dbus: Add direction argument to the DBus method - set preferred device 41/210241/2 accepted/tizen/unified/20190717.220448 submit/tizen/20190717.085922
Sangchul Lee [Wed, 17 Jul 2019 06:38:46 +0000 (15:38 +0900)]
stream-manager-dbus: Add direction argument to the DBus method - set preferred device

  server          : org.pulseaudio.Server
  object path     : /org/pulseaudio/StreamManager
  interface       : org.pulseaudio.StreamManager

  method name     : SetStreamPreferredDevice
  method argument : unsigned int for stream index
                    string for io direction ('in' or 'out')
                    unsigned int for device id
  return value    : string for return message
                    - success          : "STREAM_MANAGER_RETURN_OK"
                    - no match found   : "STREAM_MANAGER_RETURN_ERROR_DEVICE_NOT_FOUND"
                    - policy error     : "STREAM_MANAGER_RETURN_ERROR_POLICY"
                    - internal error   : "STREAM_MANAGER_RETURN_ERROR_INTERNAL"

[Version] 11.1.59
[Issue type] Improvement

Change-Id: I1a3b6b1e27438f4e5aace0f430d2afbc9b3d0bf7
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agostream-manager: Support ducking API 41/208741/14 accepted/tizen/unified/20190716.111227 submit/tizen/20190716.020521
Jeongmo Yang [Fri, 28 Jun 2019 00:57:20 +0000 (09:57 +0900)]
stream-manager: Support ducking API

- Add new handler for ducking API

  server          : org.pulseaudio.Server
  object path     : /org/pulseaudio/StreamManager
  interface       : org.pulseaudio.StreamManager

  method name     : ActivateDucking
  method argument : unsigned int for stream index
                    boolean for enable
                    string for target stream
                    unsigned int for duration
                    double for ratio
  return value    : string for return message
                    - success : "STREAM_MANAGER_RETURN_OK"

[Version] 11.1.58
[Issue Type] New feature

Change-Id: Ib10aa11fe84ff73419798ead2b0db3b3f88c3c74
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
4 years agostream-manager-dbus: Add new DBus methods to set preferred device 76/209476/6 accepted/tizen/unified/20190715.111909 submit/tizen/20190712.062844
Sangchul Lee [Mon, 8 Jul 2019 06:44:27 +0000 (15:44 +0900)]
stream-manager-dbus: Add new DBus methods to set preferred device

  server          : org.pulseaudio.Server
  object path     : /org/pulseaudio/StreamManager
  interface       : org.pulseaudio.StreamManager

  method name     : SetStreamPreferredDevice
  method argument : unsigned int for stream index
                    unsidned int for device id
  return value    : string for return message
                    - success          : "STREAM_MANAGER_RETURN_OK"
                    - no match found   : "STREAM_MANAGER_RETURN_ERROR_DEVICE_NOT_FOUND"
                    - policy error     : "STREAM_MANAGER_RETURN_ERROR_POLICY"
                    - internal error   : "STREAM_MANAGER_RETURN_ERROR_INTERNAL"

[Version] 11.1.57
[Issue type] New feature

Change-Id: I2830efed90c7a76ca720766f1f01ab47db55ef03
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agotizenaudio-policy: Add support for the preferred device role of built-in devices 72/209472/2
Sangchul Lee [Mon, 8 Jul 2019 05:54:18 +0000 (14:54 +0900)]
tizenaudio-policy: Add support for the preferred device role of built-in devices

[Version] 11.1.56
[Issue type] New feature

Change-Id: Icaabe87ceeb0336bde8f5487c1748d44e83f3c52
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agodevice-manager: Revise handle_device_connected() to pass device_type_info 47/209047/1
Sangchul Lee [Tue, 2 Jul 2019 02:57:06 +0000 (11:57 +0900)]
device-manager: Revise handle_device_connected() to pass device_type_info

Each device_type_info has hashmap of playback[capture]_devices
that have device descriptions per device role.
This patch makes it possible to load the same built-in device type
with different device role.

[Version] 11.1.55
[Issue type] Improvement

Change-Id: I14fea61488dc6d3f4289acee339380bf33c67bde
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agofixup! stream-manager: Do not apply tizen group volume to a stream belongs to a netwo... 33/208533/1 accepted/tizen/unified/20190626.114510 submit/tizen/20190626.013326 submit/tizen/20190626.053216
Sangchul Lee [Tue, 25 Jun 2019 23:47:52 +0000 (08:47 +0900)]
fixup! stream-manager: Do not apply tizen group volume to a stream belongs to a network device

Change-Id: If63666f1dadf4826649d0442b6c653d70d201461
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agostream-manager: Do not apply tizen group volume to a stream belongs to a network... 37/208237/2 accepted/tizen/unified/20190621.121845 submit/tizen/20190620.095920
Sangchul Lee [Thu, 20 Jun 2019 07:27:55 +0000 (16:27 +0900)]
stream-manager: Do not apply tizen group volume to a stream belongs to a network device

Let it just go without manipulating volume value that is according to
tizen group volume when a stream goes to a network device. Note that
only individual volume can be applied to these streams.

[Version] 11.1.54
[Issue type] Improvement

Change-Id: I7e334b1285edc8d44e37f03f032aa577be35af02
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agodevice-manager: Add support for ACM device 60/207560/5 submit/tizen/20190619.053430
Sangchul Lee [Fri, 7 Jun 2019 06:49:48 +0000 (15:49 +0900)]
device-manager: Add support for ACM device

A new ACM role that will be used with the network type is added.
A DBus method to set ACM mode triggering loading/unloading ACM
sink is added.

  server          : org.pulseaudio.Server
  object path     : /org/pulseaudio/DeviceManager
  interface       : org.pulseaudio.DeviceManager
  method name     : SetAcmMode
  method argument : unsigned int for mode (0:off)

[Version] 11.1.53
[Issue type] New feature

Change-Id: Ib59795979086fcb8ddf5e4f15c47ab3b3a1a317c
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agodevice-manager: Add support for network device type 67/208067/1
Sangchul Lee [Mon, 17 Jun 2019 23:22:02 +0000 (08:22 +0900)]
device-manager: Add support for network device type

The previous raop device type is changed to network device type.
Rather the 'raop' is demoted from device type to a role of the
type. A new role will be added to this network device type in the
upcoming patch.

[Version] 11.1.52
[Issue type] Improvement

Change-Id: I939d253de1a5804b85dae6cdb0ae375209ee41e9
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agofixup! device-manager: Add 'role' parameter to device_list_get_device() 23/208023/1
Sangchul Lee [Mon, 17 Jun 2019 07:15:17 +0000 (16:15 +0900)]
fixup! device-manager: Add 'role' parameter to device_list_get_device()

Change-Id: I10a3720e3b55e39f27aaf21ab057c1be3a1d7040

4 years agotizen-device: Introduce default sink/source of device_get_sink/source() 19/208019/1
Sangchul Lee [Mon, 17 Jun 2019 05:13:40 +0000 (14:13 +0900)]
tizen-device: Introduce default sink/source of device_get_sink/source()

If these two functions are invoked with 'NULL' role parameter,
it will return the first sink/source of its device hashmap list.

[Version] 11.1.51
[Issue type] Improvement

Change-Id: I5b42c4dd536b3962af42294955481ff8e6639305
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agodevice-manager: Add 'role' parameter to _device_manager_get_type_info() 54/207954/1
Sangchul Lee [Fri, 14 Jun 2019 07:26:56 +0000 (16:26 +0900)]
device-manager: Add 'role' parameter to _device_manager_get_type_info()

This function is related to device descriptions in device-map.json.
It is also revised considering the role.

load_sink/source() is fixed to return sink/source even if the device
has been already loaded instead of NULL.

[Version] 11.1.50
[Issue type] Improvement

Change-Id: I01a2d898e48e4e06ce5d316e68eaa50f9d7b3a6f
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agodevice-manager: Add 'role' parameter to device_list_get_device() 14/207914/3
Sangchul Lee [Fri, 14 Jun 2019 03:15:59 +0000 (12:15 +0900)]
device-manager: Add 'role' parameter to device_list_get_device()

With new role parameter is specified, it returns a device considering
the role. For this, pa_tz_device_get_role() is added to tizen-device.c.

It is revised not to judge whether a device type is for multi-devices
by predefined device types. So, device_type_is_avail_multi_device() is
removed from tizen-device-def.c.

[Version] 11.1.49
[Issue type] Improvement

Change-Id: I3d9532b80dd02adda9fc9f5b75d8e1ab68276624
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agodevice-manager: Refactor functions 51/207851/1
Sangchul Lee [Thu, 13 Jun 2019 08:08:37 +0000 (17:08 +0900)]
device-manager: Refactor functions

Ambiguous function names are also revised.
 : build_params_to_load_device() => build_params_to_load_module()
 : load_device() => load_module()
 : unload_device() => unload_module()

[Version] 11.1.48
[Issue type] Refactoring

Change-Id: Ied85b3e847e5496308fa5a836d562d81c0b5a48a
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agoacm: Request drain when sink state is changed to IDLE from RUNNING 59/207559/4
Sangchul Lee [Fri, 7 Jun 2019 06:46:56 +0000 (15:46 +0900)]
acm: Request drain when sink state is changed to IDLE from RUNNING

[Version] 11.1.47
[Issue type] Improvement

Change-Id: I15affa5362992c325afb01ca589ab31f29afbe85
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agofixup! acm-sink: Add new sink module for ACM service 59/207659/1 accepted/tizen/unified/20190611.050207 submit/tizen/20190611.014748
Sangchul Lee [Tue, 11 Jun 2019 01:14:19 +0000 (10:14 +0900)]
fixup! acm-sink: Add new sink module for ACM service

Change-Id: I3ad1af3fac13640fa176518c5dd538b09801d449
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
4 years agoacm-sink: Add new sink module for ACM service 37/206937/7 accepted/tizen/unified/20190610.082555 submit/tizen/20190606.233237
Sangchul Lee [Tue, 14 May 2019 05:13:50 +0000 (14:13 +0900)]
acm-sink: Add new sink module for ACM service

It is for Tizen speaker profile.
pulseaudio-module-acm.rpm is newly added.

[Version] 11.1.46
[Issue type] New feature

Change-Id: If3ef8993014f61e61ed65ba8dc658418e08af169
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
5 years agomodule-tizenaudio-policy: Fix crash when manual device is not set 95/206295/2
jungsup lee [Thu, 16 May 2019 04:46:52 +0000 (13:46 +0900)]
module-tizenaudio-policy: Fix crash when manual device is not set

Skip route_change_hook_cb when manual device is null even if route type is manual series

[Version] 11.1.45
[Issue type] Bug fix

Change-Id: Icc1a00eb2fe9dedfc6592f6f49cc840fe5b2095c
Signed-off-by: jungsup lee <jungsup4.lee@samsung.com>
5 years agofixup! stream-manager-dbus: Rename methods and fix bug 98/206198/1
Sangchul Lee [Wed, 15 May 2019 05:32:37 +0000 (14:32 +0900)]
fixup! stream-manager-dbus: Rename methods and fix bug

Change-Id: I7c48fd3cc9e591b2b77b1acbd86666b3854791b3
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
5 years agotizenaudio-policy: Add missing unsuspend sink/source due to INTERNAL cause 92/205792/3 submit/tizen/20190509.090025
Sangchul Lee [Thu, 9 May 2019 03:23:52 +0000 (12:23 +0900)]
tizenaudio-policy: Add missing unsuspend sink/source due to INTERNAL cause

Tizen specific logic regarding to unsuspending automatically
in case of PA_SUSPEND_INTERNAL cause has been removed, so it
has to be added for valid behavior when starting a stream
later on.

[Version] 11.1.44
[Issue type] Bug fix

Change-Id: Ie0c48b7990a2499cad31669e4c4f5c1caea1f1ed
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
5 years agostream-manager-volume: fix svace defect (UNINIT.LOCAL_VAR.EX) 46/205646/2 accepted/tizen/unified/20190508.234057 submit/tizen/20190508.075429
Seungbae Shin [Wed, 8 May 2019 07:08:02 +0000 (16:08 +0900)]
stream-manager-volume: fix svace defect (UNINIT.LOCAL_VAR.EX)

[Version] 11.1.43
[Issue type] SVACE

Change-Id: I7e170c4af028d113d8007abea4cdeed3e25ff7e9

5 years agostream-manager-dbus: Rename methods and fix bug 58/204158/2 accepted/tizen/unified/20190425.014628 submit/tizen/20190422.044155 submit/tizen/20190423.020435
Sangchul Lee [Sun, 21 Apr 2019 23:48:25 +0000 (08:48 +0900)]
stream-manager-dbus: Rename methods and fix bug

set[get]_volume_rate() are changed to set[get]_volume_ratio().
invalid parameter to dbus_message_append_args() is fixed.

[Version] 11.1.42
[Issue type] Revision

Change-Id: I4f4da6a0730621144f374e8a99bd75b9b76ad0fc
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
5 years agohal-interface, stream-manager: Add support for setting volume ratio to HAL 20/203720/4
Sangchul Lee [Wed, 17 Apr 2019 04:39:27 +0000 (13:39 +0900)]
hal-interface, stream-manager: Add support for setting volume ratio to HAL

It is an extension of the previous patches regarding the
individual volume feature.

The 'ratio' parameter of the new HAL API is calculated
considering master volume ratio, group volume ratio and
individual volume ratio. The two former factors are
affected only when the volume type of the target stream
is not the HAL volume type defined in stream-map.json.

[Version] 11.1.41
[Issue type] New feature

Change-Id: I912a0f6eb1edc3fe33e058ef6290f4aba1267ed0
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>