Name: pulseaudio-modules-tizen
Summary: Pulseaudio modules for Tizen
-Version: 11.1.66
+Version: 11.1.67
Release: 0
Group: Multimedia/Audio
License: LGPL-2.1+
h->intf.get_volume_mute = dlsym(h->dl_handle, "audio_get_volume_mute");
h->intf.set_volume_mute = dlsym(h->dl_handle, "audio_set_volume_mute");
h->intf.set_volume_ratio = dlsym(h->dl_handle, "audio_set_volume_ratio");
+ h->intf.notify_ducking_activation_changed = dlsym(h->dl_handle, "audio_notify_ducking_activation_changed");
h->intf.update_route = dlsym(h->dl_handle, "audio_update_route");
h->intf.update_route_option = dlsym(h->dl_handle, "audio_update_route_option");
h->intf.notify_stream_connection_changed = dlsym(h->dl_handle, "audio_notify_stream_connection_changed");
return ret;
}
+int32_t pa_hal_interface_notify_ducking_activation_changed(pa_hal_interface *h, hal_ducking_activation_info *info) {
+ audio_return_t hal_ret = AUDIO_RET_OK;
+ audio_ducking_info_t hal_info;
+
+ pa_assert(h);
+ pa_assert(info);
+
+ if (!h->intf.notify_ducking_activation_changed) {
+ pa_log_warn("not implemented");
+ return -2;
+ }
+
+ hal_info.target_role = info->target_role;
+ hal_info.duration = info->duration;
+ hal_info.ratio = info->ratio;
+
+ if (AUDIO_RET_OK != (hal_ret = h->intf.notify_ducking_activation_changed(h->ah_handle, &hal_info, (uint32_t)info->is_activated))) {
+ pa_log_error("notify_ducking_activation_changed returns error:0x%x", hal_ret);
+ return -1;
+ }
+
+ return 0;
+}
+
int32_t pa_hal_interface_update_route(pa_hal_interface *h, hal_route_info *info) {
int32_t ret = 0;
audio_return_t hal_ret = AUDIO_RET_OK;
pa_sample_spec *sample_spec;
} hal_stream_info;
+typedef struct _hal_ducking_activation_info {
+ const char *target_role;
+ uint32_t duration;
+ double ratio;
+ bool is_activated;
+} hal_ducking_activation_info;
+
typedef void* pcm_handle;
#define UPDATE_HAL_ROUTE_OPTION(x_hal_intf, x_role, x_name, x_value) \
int32_t pa_hal_interface_get_volume_mute(pa_hal_interface *h, const char *volume_type, io_direction_t direction, uint32_t *mute);
int32_t pa_hal_interface_set_volume_mute(pa_hal_interface *h, const char *volume_type, io_direction_t direction, uint32_t mute);
int32_t pa_hal_interface_set_volume_ratio(pa_hal_interface *h, const char *stream_role, io_direction_t direction, uint32_t idx, double ratio);
+int32_t pa_hal_interface_notify_ducking_activation_changed(pa_hal_interface *h, hal_ducking_activation_info *info);
int32_t pa_hal_interface_update_route(pa_hal_interface *h, hal_route_info *info);
int32_t pa_hal_interface_update_route_option(pa_hal_interface *h, hal_route_option *option);
int32_t pa_hal_interface_notify_stream_connection_changed(pa_hal_interface *h, hal_stream_connection_info *info);
pa_stream_manager *m = (pa_stream_manager*)userdata;
stream_ducking *sd = NULL;
bool target_matched = false;
+ hal_ducking_activation_info ducking_activation_info;
pa_assert(conn);
pa_assert(msg);
pa_assert_se(dbus_connection_send(conn, reply, NULL));
dbus_message_unref(reply);
+ /* notify ducking activation */
+ ducking_activation_info.target_role = target_stream;
+ ducking_activation_info.duration = duration;
+ ducking_activation_info.ratio = ratio;
+ ducking_activation_info.is_activated = enable;
+
+ pa_hal_interface_notify_ducking_activation_changed(m->hal, &ducking_activation_info);
+
if (target_matched == false) {
/* change ducking state and send signal here,
because ramp_finish_cb could not be called in this case */