diff options
author | Jeongho Mok <jho.mok@samsung.com> | 2017-01-06 21:07:46 +0900 |
---|---|---|
committer | Jeongho Mok <jho.mok@samsung.com> | 2017-01-06 21:08:05 +0900 |
commit | 6c0c5c652ae7afa486cdf42c17c787595e607fdb (patch) | |
tree | 743c6fe852b32cec7e26b479c229086b927dcca9 | |
parent | 62c42b6a0dc5c0f1f98e48277f7fc6f93589f99c (diff) | |
download | audio-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 |
Fix bug, get master volume correctlysubmit/tizen_3.0/20170106.062231accepted/tizen/3.0/wearable/20170109.003412accepted/tizen/3.0/tv/20170109.003402accepted/tizen/3.0/mobile/20170109.003343accepted/tizen/3.0/ivi/20170109.003428accepted/tizen/3.0/common/20170109.195813tizen_3.0_tvtizen_3.0accepted/tizen_3.0_wearableaccepted/tizen_3.0_tvaccepted/tizen_3.0_mobileaccepted/tizen_3.0_iviaccepted/tizen_3.0_common
[Version] 0.1.11
[Profile] Common
[Issue Type] Code Enhancement
Change-Id: Ib16cf693e96a4b4db9edf7fa86a23152a337eb43
-rw-r--r-- | packaging/audio-hal-wm1831.spec | 2 | ||||
-rw-r--r-- | tizen-audio-volume.c | 10 |
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); |