Fix bug, get master volume correctly 09/109009/1 accepted/tizen_3.0_common accepted/tizen_3.0_ivi accepted/tizen_3.0_mobile accepted/tizen_3.0_tv accepted/tizen_3.0_wearable tizen_3.0 tizen_3.0_tv accepted/tizen/3.0/common/20170109.195813 accepted/tizen/3.0/ivi/20170109.003428 accepted/tizen/3.0/mobile/20170109.003343 accepted/tizen/3.0/tv/20170109.003402 accepted/tizen/3.0/wearable/20170109.003412 submit/tizen_3.0/20170106.062231
authorJeongho Mok <jho.mok@samsung.com>
Fri, 6 Jan 2017 12:07:46 +0000 (21:07 +0900)
committerJeongho Mok <jho.mok@samsung.com>
Fri, 6 Jan 2017 12:08:05 +0000 (21:08 +0900)
[Version] 0.1.11
[Profile] Common
[Issue Type] Code Enhancement

Change-Id: Ib16cf693e96a4b4db9edf7fa86a23152a337eb43

packaging/audio-hal-wm1831.spec
tizen-audio-volume.c

index b2efb17a3d67714d35a96d34b656d86359dd58db..dfa161b86662c9b561c9b389b86272db4f9fd21f 100644 (file)
@@ -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
index f072869076732cb7da04a439ddedcabc13f9a6cc..227bf228ef4312bd928ddfe4f5537714a53d427d 100644 (file)
@@ -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);