Name: pulseaudio-modules-tizen
Summary: Pulseaudio modules for Tizen
-Version: 13.0.75
+Version: 13.0.76
Release: 0
Group: Multimedia/Audio
License: LGPL-2.1+
return;
}
- loopback = pa_hashmap_get(u->loopback_modules, (const void*)parent_id);
+ loopback = pa_hashmap_get(u->loopback_modules, PA_INT_TO_PTR(parent_id));
if (!loopback) {
loopback = pa_xnew0(loopback_module, 1);
- pa_hashmap_put(u->loopback_modules, (void*)parent_id, loopback);
+ pa_hashmap_put(u->loopback_modules, PA_INT_TO_PTR(parent_id), loopback);
}
if (sink)
loopback->sink = sink;
return;
}
- loopback = pa_hashmap_get(u->loopback_modules, (const void*)parent_id);
+ loopback = pa_hashmap_get(u->loopback_modules, PA_INT_TO_PTR(parent_id));
if (!loopback) {
pa_log_error("could not find loopback module for parent_id(%d)", parent_id);
return;
((sink && (loopback->sink == sink)) ||
(source && (loopback->source == source)))) {
pa_log_info(" -- unload module-loopback(%p) for parent_id(%d)", loopback->module, parent_id);
- pa_hashmap_remove_and_free(u->loopback_modules, (const void*)parent_id);
+ pa_hashmap_remove_and_free(u->loopback_modules, PA_INT_TO_PTR(parent_id));
}
}
}
if (!i && !o)
return;
- loopback = pa_hashmap_get(u->loopback_modules, (const void*)parent_id);
+ loopback = pa_hashmap_get(u->loopback_modules, PA_INT_TO_PTR(parent_id));
if (!loopback)
return;
unload:
pa_log_info(" -- unload module-loopback(%p) for parent_id(%d)", loopback->module, parent_id);
- pa_hashmap_remove_and_free(u->loopback_modules, (const void*)parent_id);
+ pa_hashmap_remove_and_free(u->loopback_modules, PA_INT_TO_PTR(parent_id));
}
static pa_sink *load_combine_sink_module(struct userdata *u, const char *combine_sink_name, pa_sink *sink1, pa_sink *sink2, pa_sink_input *stream)
dm_device_direction = pa_tz_device_get_direction(device);
dm_device_id = pa_tz_device_get_id(device);
creation_time = pa_tz_device_get_creation_time(device);
- pa_log_debug(" -- type[%-16s], direction[0x%x], id[%u], creation_time[%llu]",
+ pa_log_debug(" -- type[%-16s], direction[0x%x], id[%u], creation_time[%" PRIu64 "]",
dm_device_type, dm_device_direction, dm_device_id, creation_time);
if (!pa_safe_streq(device_type, dm_device_type) || !IS_AVAILABLE_DIRECTION(data->stream_type, dm_device_direction))
continue;
dm_device_direction = pa_tz_device_get_direction(*device);
dm_device_id = pa_tz_device_get_id(*device);
creation_time = pa_tz_device_get_creation_time(*device);
- pa_log_debug(" -- type[%-16s], direction[0x%x], id[%u], creation_time[%llu]",
+ pa_log_debug(" -- type[%-16s], direction[0x%x], id[%u], creation_time[%" PRIu64 "]",
dm_device_type, dm_device_direction, dm_device_id, creation_time);
if (!pa_safe_streq(device_type, dm_device_type) || !IS_AVAILABLE_DIRECTION(data->stream_type, dm_device_direction))
continue;
pa_hal_interface_pcm_available(u->hal_interface, u->pcm_handle, &avail);
if (frames_to_write > avail) {
- pa_log_debug("not enough avail size. frames_to_write(%d), avail(%d)", frames_to_write, avail);
+ pa_log_debug("not enough avail size. frames_to_write(%zu), avail(%d)", frames_to_write, avail);
return 0;
}
p = pa_memblock_acquire(chunk.memblock);
if (pa_hal_interface_pcm_write(u->hal_interface, u->pcm_handle, (const char*)p + chunk.index, (uint32_t)frames_to_write)) {
- pa_log_error("failed to write pcm. p(%p), size(%d)", p, frames_to_write);
+ pa_log_error("failed to write pcm. p(%p), size(%zu)", p, frames_to_write);
return -1;
}
pa_hal_interface_pcm_available(u->hal_interface, u->pcm_handle, &avail);
if (frames_to_read > avail) {
- pa_log_debug("not enough avail size. frames_to_read(%d), avail(%d)", frames_to_read, avail);
+ pa_log_debug("not enough avail size. frames_to_read(%zu), avail(%d)", frames_to_read, avail);
return 0;
}
p = pa_memblock_acquire(chunk.memblock);
if (pa_hal_interface_pcm_read(u->hal_interface, u->pcm_handle, p, (uint32_t)frames_to_read)) {
- pa_log_error("failed to read pcm. p(%p), size(%d)", p, frames_to_read);
+ pa_log_error("failed to read pcm. p(%p), size(%zu)", p, frames_to_read);
return -1;
}
pa_memblock_release(chunk.memblock);
pa_log_info("id[%u], in_device_list[%p]:length[%u], out_device_list[%p]:length[%u]",
id, in_device_list, list_len_in, out_device_list, list_len_out);
- sp = pa_hashmap_get(m->stream_parents, (const void*)id);
+ sp = pa_hashmap_get(m->stream_parents, PA_UINT_TO_PTR(id));
if (!sp) {
pa_log_error("could not find matching client for this parent_id[%u]", id);
ret = RET_MSG_ERROR_INTERNAL;
DBUS_TYPE_INVALID));
pa_log_info("id[%u], name[%s], value[%d]", id, name, value);
- sp = pa_hashmap_get(m->stream_parents, (const void*)id);
+ sp = pa_hashmap_get(m->stream_parents, PA_UINT_TO_PTR(id));
if (sp) {
if (name) {
route_option.name = name;
DBUS_TYPE_INVALID));
pa_log_info("stream parent id[%u], device direction[%s], device_id[%u]", sp_id, device_direction, device_id);
- if (!(sp = pa_hashmap_get(m->stream_parents, (const void*)sp_id))) {
+ if (!(sp = pa_hashmap_get(m->stream_parents, PA_UINT_TO_PTR(sp_id)))) {
pa_log_error("could not find matching client for this parent_id[%u]", sp_id);
ret = RET_MSG_ERROR_INTERNAL;
goto finish;
pa_assert_se((reply = dbus_message_new_method_return(msg)));
- if (!(sp = pa_hashmap_get(m->stream_parents, (const void*)sp_id))) {
+ if (!(sp = pa_hashmap_get(m->stream_parents, PA_UINT_TO_PTR(sp_id)))) {
pa_log_error("could not find matching client for this parent_id[%u]", sp_id);
ret = RET_MSG_ERROR_INTERNAL;
goto finish;
DBUS_TYPE_INVALID));
pa_log_info("id[%u], acquired_focus_status[0x%x]", id, acquired_focus_status);
- if ((sp = pa_hashmap_get(m->stream_parents, (const void*)id))) {
+ if ((sp = pa_hashmap_get(m->stream_parents, PA_UINT_TO_PTR(id)))) {
if (sp->focus_status != acquired_focus_status) {
/* need to update */
prev_status = sp->focus_status;
id, enable, target_stream, duration, ratio);
/* get stream_ducking */
- sd = pa_hashmap_get(m->stream_duckings, (const void*)id);
+ sd = pa_hashmap_get(m->stream_duckings, PA_UINT_TO_PTR(id));
if (!sd) {
pa_log_error("no matched stream ducking for id[%u]", id);
ret_msg = RET_MSG_ERROR_INTERNAL;
pa_assert_se((reply = dbus_message_new_method_return(msg)));
/* get stream_ducking */
- sd = pa_hashmap_get(m->stream_duckings, (const void *)id);
+ sd = pa_hashmap_get(m->stream_duckings, PA_UINT_TO_PTR(id));
if (!sd) {
pa_log_error("no matched stream ducking for id[%u]", id);
ret_msg = RET_MSG_ERROR_INTERNAL;
return NULL;
}
- return pa_hashmap_get(m->stream_parents, (const void*)parent_id_u);
+ return pa_hashmap_get(m->stream_parents, PA_UINT_TO_PTR(parent_id_u));
}
static pa_idxset* get_route_devices(pa_stream_manager *m, pa_object *stream) {
else
p_idx = pa_proplist_gets(GET_STREAM_PROPLIST(stream, type), PA_PROP_MEDIA_PARENT_ID);
if (p_idx && !pa_atou(p_idx, &parent_idx)) {
- if (!(sp = pa_hashmap_get(m->stream_parents, (const void*)parent_idx))) {
+ if (!(sp = pa_hashmap_get(m->stream_parents, PA_UINT_TO_PTR(parent_idx)))) {
pa_log_error("could not find matching client for this parent_id(%u)", parent_idx);
return false;
}
if (!p_idx_str || pa_atou(p_idx_str, &parent_idx))
return;
- if (!(sp = pa_hashmap_get(m->stream_parents, (const void*)parent_idx))) {
+ if (!(sp = pa_hashmap_get(m->stream_parents, PA_UINT_TO_PTR(parent_idx)))) {
pa_log_error("could not find matching client for this parent_id(%u)", parent_idx);
return;
}
if (!p_idx_str || pa_atou(p_idx_str, &parent_idx)) {
return;
}
- if (!(sp = pa_hashmap_get(m->stream_parents, (const void*)parent_idx))) {
+ if (!(sp = pa_hashmap_get(m->stream_parents, PA_UINT_TO_PTR(parent_idx)))) {
pa_log_warn("could not find matching client for this parent_id(%u)", parent_idx);
return;
}
p_idx = pa_proplist_gets(GET_STREAM_PROPLIST(stream, type), PA_PROP_MEDIA_PARENT_ID);
if (p_idx && !pa_atou(p_idx, &parent_idx)) {
pa_log_debug("p_idx(%s), idx(%u)", p_idx, parent_idx);
- sp = pa_hashmap_get(m->stream_parents, (const void*)parent_idx);
+ sp = pa_hashmap_get(m->stream_parents, PA_UINT_TO_PTR(parent_idx));
if (sp) {
uint32_t idx = GET_STREAM_INDEX(stream, type);
if (command == PROCESS_COMMAND_ADD_STREAM) {
break;
}
/* find parent idx, it's device info. and it's stream idxs */
- if ((sp = pa_hashmap_get(m->stream_parents, (const void*)parent_idx))) {
+ if ((sp = pa_hashmap_get(m->stream_parents, PA_UINT_TO_PTR(parent_idx)))) {
select_data->idx_manual_devices = (type == STREAM_SINK_INPUT) ? (sp->idx_route_out_devices) : (sp->idx_route_in_devices);
break;
}
pa_log_warn(" -- could not get the parent id of this stream, but keep going...");
break;
}
- if (!(sp = pa_hashmap_get(m->stream_parents, (const void*)parent_idx))) {
+ if (!(sp = pa_hashmap_get(m->stream_parents, PA_UINT_TO_PTR(parent_idx)))) {
pa_log_warn(" -- failed to get the stream parent of idx(%u)", parent_idx);
break;
}
}
}
*next_device = latest_device;
- pa_log_debug("found next device[%p], creation_time[%llu]", *next_device, latest_creation_time);
+ pa_log_debug("found next device[%p], creation_time[%" PRIu64 "]", *next_device, latest_creation_time);
}
pa_log_debug("next_device is [%p] for stream_role[%s]/route_type[%d]/stream_type[%d]", *next_device, stream_role, route_type, stream_type);
return;
}
apply_volume_factor_to_streams(streams_of_disconnected_device, &applied_streams);
- pa_hashmap_put(m->muted_streams, (void*)event_id, applied_streams);
+ pa_hashmap_put(m->muted_streams, PA_UINT_TO_PTR(event_id), applied_streams);
/* If PA_COMMUNICATOR_HOOK_EVENT_FULLY_HANDLED is not called for some reason,
* volume factor should be removed forcedly. */
if (!m->time_event_for_unmute)
m->time_event_for_unmute = pa_core_rttime_new(m->core, pa_rtclock_now() + TIMED_UNMUTE_USEC, timed_unmute_cb, m);
} else {
- if (!(applied_streams = pa_hashmap_get(m->muted_streams, (void*)event_id))) {
+ if (!(applied_streams = pa_hashmap_get(m->muted_streams, PA_UINT_TO_PTR(event_id)))) {
pa_log_debug("could not find applied_streams for event_id(%u)", event_id);
return;
}
clear_volume_factor_from_streams(applied_streams);
- pa_hashmap_remove(m->muted_streams, (void*)event_id);
+ pa_hashmap_remove(m->muted_streams, PA_UINT_TO_PTR(event_id));
}
return;
sp->idx_source_outputs = pa_idxset_new(pa_idxset_trivial_hash_func, pa_idxset_trivial_compare_func);
sp->idx_route_in_devices = pa_idxset_new(pa_idxset_string_hash_func, pa_idxset_string_compare_func);
sp->idx_route_out_devices = pa_idxset_new(pa_idxset_string_hash_func, pa_idxset_string_compare_func);
- pa_hashmap_put(m->stream_parents, (void*)idx, sp);
+ pa_hashmap_put(m->stream_parents, PA_UINT_TO_PTR(idx), sp);
pa_log_debug(" - add sp(%p), idx(%u)", sp, idx);
return;
} else if (pa_safe_streq(name, STREAM_MANAGER_CLIENT_DUCKING)) {
sd = pa_xmalloc0(sizeof(stream_ducking));
sd->idx_ducking_streams = pa_idxset_new(pa_idxset_trivial_hash_func, pa_idxset_trivial_compare_func);
sd->trigger_index = idx;
- pa_hashmap_put(m->stream_duckings, (void *)idx, sd);
+ pa_hashmap_put(m->stream_duckings, PA_UINT_TO_PTR(idx), sd);
pa_log_debug(" - add sd(%p), trigger_index(%u)", sd, idx);
return;
}
} else if (t == (PA_SUBSCRIPTION_EVENT_CLIENT|PA_SUBSCRIPTION_EVENT_REMOVE)) {
/* try to find stream parent with idx */
- sp = pa_hashmap_get(m->stream_parents, (const void*)idx);
+ sp = pa_hashmap_get(m->stream_parents, PA_UINT_TO_PTR(idx));
if (sp) {
pa_log_debug(" - remove sp(%p), idx(%u)", sp, idx);
- pa_hashmap_remove(m->stream_parents, (const void*)idx);
+ pa_hashmap_remove(m->stream_parents, PA_UINT_TO_PTR(idx));
pa_idxset_free(sp->idx_sink_inputs, NULL);
pa_idxset_free(sp->idx_source_outputs, NULL);
if (sp->idx_route_in_devices)
}
/* try to find sd with idx */
- sd = pa_hashmap_get(m->stream_duckings, (const void*)idx);
+ sd = pa_hashmap_get(m->stream_duckings, PA_UINT_TO_PTR(idx));
if (sd) {
uint32_t ducking_idx = 0;
pa_sink_input *stream = NULL;
}
pa_idxset_free(sd->idx_ducking_streams, NULL);
- pa_hashmap_remove(m->stream_duckings, (const void*)idx);
+ pa_hashmap_remove(m->stream_duckings, PA_UINT_TO_PTR(idx));
pa_xfree(sd);
return;
}