summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSangchul Lee <sc11.lee@samsung.com>2019-04-17 11:37:13 +0900
committerSangchul Lee <sc11.lee@samsung.com>2019-04-18 08:00:16 +0900
commit0786984f147fa2c41c6c55e7f9edc0339d634aaf (patch)
treef7ad6e113d49aeffb639a783bc0bb458fe471284
parent45d19b200968587aac853e9af30f370009e7d6cb (diff)
downloadaudio-hal-sc7727-0786984f147fa2c41c6c55e7f9edc0339d634aaf.tar.gz
audio-hal-sc7727-0786984f147fa2c41c6c55e7f9edc0339d634aaf.tar.bz2
audio-hal-sc7727-0786984f147fa2c41c6c55e7f9edc0339d634aaf.zip
This new API is to set the individual volume ratio of each stream. The parameters of this API consist of stream role, direction, index and its ratio. Because the stream role can differ among the streams which have same volume type, this new API could be used where the H/W volume has to be set for a specific stream role with distinguishing it from others. [Version] 0.1.29 [Issue Type] New API Change-Id: Id2d35aaef4a6db489e8fb27cb6c4affe10b81dd4 Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
-rw-r--r--packaging/audio-hal-sc7727.spec2
-rw-r--r--tizen-audio-volume.c13
-rw-r--r--tizen-audio.h1
3 files changed, 15 insertions, 1 deletions
diff --git a/packaging/audio-hal-sc7727.spec b/packaging/audio-hal-sc7727.spec
index 8fc978a..3eaddec 100644
--- a/packaging/audio-hal-sc7727.spec
+++ b/packaging/audio-hal-sc7727.spec
@@ -1,6 +1,6 @@
Name: audio-hal-sc7727
Summary: TIZEN Audio HAL for SC7727
-Version: 0.1.28
+Version: 0.1.29
Release: 0
Group: System/Libraries
License: Apache-2.0
diff --git a/tizen-audio-volume.c b/tizen-audio-volume.c
index 12492c7..9fca5cc 100644
--- a/tizen-audio-volume.c
+++ b/tizen-audio-volume.c
@@ -562,3 +562,16 @@ audio_return_t audio_set_volume_mute(void *audio_handle, audio_volume_info_t *in
return audio_ret;
}
+
+audio_return_t audio_set_volume_ratio(void *audio_handle, audio_stream_info_t *info, double ratio)
+{
+ audio_return_t audio_ret = AUDIO_RET_OK;
+ audio_hal_t *ah = (audio_hal_t *)audio_handle;
+
+ AUDIO_RETURN_VAL_IF_FAIL(ah, AUDIO_ERR_PARAMETER);
+ AUDIO_RETURN_VAL_IF_FAIL(info, AUDIO_ERR_PARAMETER);
+
+ AUDIO_LOG_INFO("set [%s] volume_ratio: %f, direction(%u), index(%u)", info->role, ratio, info->direction, info->idx);
+
+ return audio_ret;
+} \ No newline at end of file
diff --git a/tizen-audio.h b/tizen-audio.h
index 94efa03..f18afa4 100644
--- a/tizen-audio.h
+++ b/tizen-audio.h
@@ -131,6 +131,7 @@ typedef struct audio_interface {
audio_return_t (*get_volume_value)(void *audio_handle, audio_volume_info_t *info, uint32_t level, double *value);
audio_return_t (*get_volume_mute)(void *audio_handle, audio_volume_info_t *info, uint32_t *mute);
audio_return_t (*set_volume_mute)(void *audio_handle, audio_volume_info_t *info, uint32_t mute);
+ audio_return_t (*set_volume_ratio)(void *audio_handle, audio_stream_info_t *info, double ratio);
/* Routing */
audio_return_t (*update_route)(void *audio_handle, audio_route_info_t *info);
audio_return_t (*update_route_option)(void *audio_handle, audio_route_option_t *option);