diff options
author | Seungbae Shin <seungbae.shin@samsung.com> | 2021-02-10 11:40:17 +0900 |
---|---|---|
committer | Seungbae Shin <seungbae.shin@samsung.com> | 2021-02-18 11:18:53 +0900 |
commit | fd3c76fcb29164793a0257935ade8a3f567ee968 (patch) | |
tree | 7eedf121f3badf6348f3976e56b2bfaab1cb4045 | |
parent | 6cf3cf50105430750e3912d3c21cc2918551c907 (diff) | |
download | audio-hal-sc7727-fd3c76fcb29164793a0257935ade8a3f567ee968.tar.gz audio-hal-sc7727-fd3c76fcb29164793a0257935ade8a3f567ee968.tar.bz2 audio-hal-sc7727-fd3c76fcb29164793a0257935ade8a3f567ee968.zip |
Add missing implementationssubmit/tizen/20210219.045921submit/tizen/20210218.045157accepted/tizen/unified/20210219.095218
[Version] 0.1.39
[Issue Type] Update
Change-Id: I90fcebd6b14029d57cf147f59cfaa5ecfb5be9bb
-rw-r--r-- | hal-backend-audio.c | 9 | ||||
-rw-r--r-- | packaging/audio-hal-sc7727.spec | 2 | ||||
-rw-r--r-- | tizen-audio-comm.c | 5 | ||||
-rw-r--r-- | tizen-audio-impl-ctrl.c | 3 | ||||
-rw-r--r-- | tizen-audio-routing.c | 1 | ||||
-rw-r--r-- | tizen-audio-volume.c | 16 | ||||
-rw-r--r-- | tizen-audio.h | 15 |
7 files changed, 44 insertions, 7 deletions
diff --git a/hal-backend-audio.c b/hal-backend-audio.c index 1fc2071..351d5bb 100644 --- a/hal-backend-audio.c +++ b/hal-backend-audio.c @@ -34,15 +34,21 @@ static int audio_sc7727_init(void **data) funcs->init = audio_init; funcs->deinit = audio_deinit; + funcs->get_volume_level_max = audio_get_volume_level_max; + funcs->get_volume_level = audio_get_volume_level; funcs->set_volume_level = audio_set_volume_level; funcs->get_volume_value = audio_get_volume_value; funcs->get_volume_mute = audio_get_volume_mute; funcs->set_volume_mute = audio_set_volume_mute; funcs->set_volume_ratio = audio_set_volume_ratio; + funcs->notify_ducking_activation_changed = audio_notify_ducking_activation_changed; + funcs->update_route = audio_update_route; funcs->update_route_option = audio_update_route_option; + funcs->notify_stream_connection_changed = audio_notify_stream_connection_changed; + funcs->pcm_open = audio_pcm_open; funcs->pcm_start = audio_pcm_start; funcs->pcm_stop = audio_pcm_stop; @@ -55,6 +61,9 @@ static int audio_sc7727_init(void **data) funcs->pcm_get_params = audio_pcm_get_params; funcs->pcm_set_params = audio_pcm_set_params; + funcs->add_message_cb = audio_add_message_cb; + funcs->remove_message_cb = audio_remove_message_cb; + *data = (void *)funcs; return 0; diff --git a/packaging/audio-hal-sc7727.spec b/packaging/audio-hal-sc7727.spec index 7f66991..0c5e80f 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.38 +Version: 0.1.39 Release: 0 Group: System/Libraries License: Apache-2.0 diff --git a/tizen-audio-comm.c b/tizen-audio-comm.c index ed71126..aa3d6bc 100644 --- a/tizen-audio-comm.c +++ b/tizen-audio-comm.c @@ -83,9 +83,8 @@ audio_return_e _audio_comm_send_message(audio_hal_s *ah, const char *name, int v AUDIO_RETURN_VAL_IF_FAIL(name, AUDIO_ERR_PARAMETER); AUDIO_LOG_DEBUG("send message : name(%s), value(%d)", name, value); - if (ah->comm.msg_cb) { + if (ah->comm.msg_cb) ah->comm.msg_cb(name, value, ah->comm.user_data); - } return audio_ret; } @@ -114,4 +113,4 @@ audio_return_e audio_remove_message_cb(void *audio_handle, message_cb callback) ret = __unset_message_callback((audio_hal_s *)audio_handle); return ret; -}
\ No newline at end of file +} diff --git a/tizen-audio-impl-ctrl.c b/tizen-audio-impl-ctrl.c index 07a81a2..49f6373 100644 --- a/tizen-audio-impl-ctrl.c +++ b/tizen-audio-impl-ctrl.c @@ -37,9 +37,8 @@ static void __dump_mixer_param(char *dump, long *param, int size) len = sprintf(dump, "%ld", *param); if (len > 0) dump += len; - if (i != size -1) { + if (i != size -1) *dump++ = ','; - } param++; } diff --git a/tizen-audio-routing.c b/tizen-audio-routing.c index 6b279e6..81b0bb5 100644 --- a/tizen-audio-routing.c +++ b/tizen-audio-routing.c @@ -24,7 +24,6 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <stdbool.h> #include "tizen-audio-internal.h" #include "tizen-audio-impl.h" diff --git a/tizen-audio-volume.c b/tizen-audio-volume.c index b1dcc60..5e363d0 100644 --- a/tizen-audio-volume.c +++ b/tizen-audio-volume.c @@ -603,3 +603,19 @@ audio_return_e audio_set_volume_ratio(void *audio_handle, audio_stream_info_s *i return audio_ret; } + +audio_return_e audio_notify_ducking_activation_changed(void *audio_handle, audio_ducking_info_s *info, uint32_t is_activated) +{ + audio_return_e audio_ret = AUDIO_RET_OK; + audio_hal_s *ah = (audio_hal_s *)audio_handle; + + AUDIO_RETURN_VAL_IF_FAIL(ah, AUDIO_ERR_PARAMETER); + AUDIO_RETURN_VAL_IF_FAIL(info, AUDIO_ERR_PARAMETER); + AUDIO_RETURN_VAL_IF_FAIL(info->target_role, AUDIO_ERR_PARAMETER); + + AUDIO_LOG_INFO("role:%s, duration:%u, ratio:%lf, is_activated:%u", info->target_role, info->duration, info->ratio, is_activated); + + /* TODO. Not implemented */ + + return audio_ret; +} diff --git a/tizen-audio.h b/tizen-audio.h index 5c662c4..52ed4cb 100644 --- a/tizen-audio.h +++ b/tizen-audio.h @@ -164,6 +164,21 @@ audio_return_e audio_set_volume_mute(void *audio_handle, audio_volume_info_s *in audio_return_e audio_set_volume_ratio(void *audio_handle, audio_stream_info_s *info, double ratio); /** + * @brief Gets notified when a ducking is activated and deactivated. + * @since_tizen 5.5 + * @param[in] audio_handle The audio hal handle + * @param[in] info The ducking information including target role, duration and ratio + * @param[in] is_activated The activation state (@c true = activated, @c false = deactivated) + * + * @remarks This information can be used for volume controls. + * + * @return @c 0 on success, + * otherwise a negative error value + * @retval #AUDIO_RET_OK Success + */ +audio_return_e audio_notify_ducking_activation_changed(void *audio_handle, audio_ducking_info_s *info, uint32_t is_activated); + +/** * @brief Updates the audio routing according to audio route information. * @since_tizen 3.0 * @param[in] audio_handle The audio hal handle |