summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);