summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeongho Mok <jho.mok@samsung.com>2017-01-06 21:07:46 +0900
committerJeongho Mok <jho.mok@samsung.com>2017-01-06 21:08:05 +0900
commit6c0c5c652ae7afa486cdf42c17c787595e607fdb (patch)
tree743c6fe852b32cec7e26b479c229086b927dcca9
parent62c42b6a0dc5c0f1f98e48277f7fc6f93589f99c (diff)
downloadaudio-hal-wm1831-accepted/tizen_3.0_common.tar.gz
audio-hal-wm1831-accepted/tizen_3.0_common.tar.bz2
audio-hal-wm1831-accepted/tizen_3.0_common.zip
[Version] 0.1.11 [Profile] Common [Issue Type] Code Enhancement Change-Id: Ib16cf693e96a4b4db9edf7fa86a23152a337eb43
-rw-r--r--packaging/audio-hal-wm1831.spec2
-rw-r--r--tizen-audio-volume.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/packaging/audio-hal-wm1831.spec b/packaging/audio-hal-wm1831.spec
index b2efb17..dfa161b 100644
--- a/packaging/audio-hal-wm1831.spec
+++ b/packaging/audio-hal-wm1831.spec
@@ -1,6 +1,6 @@
Name: audio-hal-wm1831
Summary: TIZEN Audio HAL for WM1831
-Version: 0.1.10
+Version: 0.1.11
Release: 0
Group: System/Libraries
License: Apache-2.0
diff --git a/tizen-audio-volume.c b/tizen-audio-volume.c
index f072869..227bf22 100644
--- a/tizen-audio-volume.c
+++ b/tizen-audio-volume.c
@@ -312,11 +312,6 @@ audio_return_t audio_get_volume_level_max(void *audio_handle, audio_volume_info_
AUDIO_RETURN_VAL_IF_FAIL(info, AUDIO_ERR_PARAMETER);
AUDIO_RETURN_VAL_IF_FAIL(level, AUDIO_ERR_PARAMETER);
- if (!strncmp(info->type, "master", strlen("master"))) {
- *level = g_master_volume_level;
- return AUDIO_RET_OK;
- }
-
/* Get max volume level by device & type */
*level = ah->volume.volume_level_max[__get_volume_idx_by_string_type(info->type)];
@@ -333,6 +328,11 @@ audio_return_t audio_get_volume_level(void *audio_handle, audio_volume_info_t *i
AUDIO_RETURN_VAL_IF_FAIL(info, AUDIO_ERR_PARAMETER);
AUDIO_RETURN_VAL_IF_FAIL(level, AUDIO_ERR_PARAMETER);
+ if (!strncmp(info->type, "master", strlen("master"))) {
+ *level = g_master_volume_level;
+ return AUDIO_RET_OK;
+ }
+
*level = ah->volume.volume_level[__get_volume_idx_by_string_type(info->type)];
AUDIO_LOG_INFO("get [%s] volume_level: %d, direction(%d)", info->type, *level, info->direction);