struct pulse_device_prop {
/* roles related to (device_type + device_file)*/
pa_idxset *roles;
- /* For save that this devie_type is activated or not on sink/source */
+ /* For save that this device_type is activated or not on sink/source */
int status;
};
else
pa_log_warn("this device [%s] does not use internal codec, skip it", type);
} else {
- pa_log_warn("cound not find a device of [%s]", type);
+ pa_log_warn("could not find a device of [%s]", type);
}
}
/*
Handle device connection detected through dbus.
First, update device-status hashmap.
- And if correnspondent sink/sources for device_type exist, should make device and notify it.
+ And if correspondent sink/sources for device_type exist, should make device and notify it.
Use [device_type->roles] mappings in sink/source for find proper sink/source.
*/
void handle_device_connected(pa_device_manager *dm, const char *type, const char *name,
pa_log_info("- Role '%s' -> '%s'", device_role, params);
if (device_role_is_valid(device_role)) {
if (pa_hashmap_put(roles, (void *)device_role, (void *)params)) {
- pa_log_error("put new role to hashmap faild");
+ pa_log_error("put new role to hashmap failed");
goto fail;
}
} else {
pa_log_info("- Role '%s' -> '%s'", device_role, device_string);
if (device_role_is_valid(device_role)) {
if (pa_hashmap_put(roles, (void *)device_role, (void *)device_string)) {
- pa_log_error("put new role to hashmap faild");
+ pa_log_error("put new role to hashmap failed");
goto fail;
}
} else {
device_type_status_init(dm);
if (load_builtin_devices(dm) != 0) {
- pa_log_error("Load Builtin Devices faled");
+ pa_log_error("Load Builtin Devices failed");
return NULL;
}
device_type = pa_tz_device_get_type(device);
if (stream_route_type == STREAM_ROUTE_TYPE_AUTO || stream_route_type == STREAM_ROUTE_TYPE_AUTO_LAST_CONNECTED) {
- pa_log_debug("[SM][UPDATE_SINK_SOURCE][AUTO] route_type(%d), deivce_type(%s), is_connected(%d))",
+ pa_log_debug("[SM][UPDATE_SINK_SOURCE][AUTO] route_type(%d), device_type(%s), is_connected(%d))",
stream_route_type, device_type, is_connected);
if (stream_type == STREAM_SINK_INPUT)
sink = pa_tz_device_get_sink(device, NULL);
}
} else if (stream_route_type == STREAM_ROUTE_TYPE_MANUAL_EXT) {
- pa_log_debug("[SM][UPDATE_SINK_SOURCE][EXT] deivce_type(%s), is_connected(%d))", device_type, is_connected);
+ pa_log_debug("[SM][UPDATE_SINK_SOURCE][EXT] device_type(%s), is_connected(%d))", device_type, is_connected);
if (!is_connected) {
PA_IDXSET_FOREACH(s, streams, s_idx) { /* streams: source->outputs/sink->inputs */
if (!get_route_type(s, stream_type, false, &route_type) && route_type == stream_route_type) {
pa_assert(m);
pa_assert(data);
- /* Update streams belong to this external device that have MAUAL_EXT route type */
+ /* Update streams belong to this external device that have MANUAL_EXT route type */
if (!use_internal_codec) {
if ((device_direction & DM_DEVICE_DIRECTION_IN) &&
(source = pa_tz_device_get_source(data->device, NULL)))
device_id = pa_tz_device_get_id(data->device);
use_internal_codec = pa_tz_device_is_use_internal_codec(data->device);
- pa_log_info("[SM][CONN] evend_id(%u), is_connected(%d), device(%p, %s, %u), direction(0x%x), use_internal_codec(%d)",
+ pa_log_info("[SM][CONN] event_id(%u), is_connected(%d), device(%p, %s, %u), direction(0x%x), use_internal_codec(%d)",
data->event_id, data->is_connected, data->device, device_type, device_id, device_direction, use_internal_codec);
/* mute all the streams belong to this device, those will be un-muted in event_fully_handled_hook_cb */