Lines Matching defs:sink

32 #define SINK_OBJECT_NAME "sink"
81 pa_sink *sink;
267 idx = (d->type == PA_DEVICE_TYPE_SINK) ? d->sink->index : d->source->index;
280 name = (d->type == PA_DEVICE_TYPE_SINK) ? d->sink->name : d->source->name;
293 driver = (d->type == PA_DEVICE_TYPE_SINK) ? d->sink->driver : d->source->driver;
307 owner_module = (d->type == PA_DEVICE_TYPE_SINK) ? d->sink->module : d->source->module;
312 "Sink %s doesn't have an owner module.", d->sink->name);
333 card = (d->type == PA_DEVICE_TYPE_SINK) ? d->sink->card : d->source->card;
338 "Sink %s doesn't belong to any card.", d->sink->name);
358 sample_format = (d->type == PA_DEVICE_TYPE_SINK) ? d->sink->sample_spec.format : d->source->sample_spec.format;
371 sample_rate = (d->type == PA_DEVICE_TYPE_SINK) ? d->sink->sample_spec.rate : d->source->sample_spec.rate;
386 channel_map = (d->type == PA_DEVICE_TYPE_SINK) ? &d->sink->channel_map : &d->source->channel_map;
423 device_channels = (d->type == PA_DEVICE_TYPE_SINK) ? d->sink->channel_map.channels : d->source->channel_map.channels;
446 pa_sink_set_volume(d->sink, &new_vol, true, true);
461 has_flat_volume = (d->type == PA_DEVICE_TYPE_SINK) ? !!(d->sink->flags & PA_SINK_FLAT_VOLUME) : FALSE;
475 ? !!(d->sink->flags & PA_SINK_DECIBEL_VOLUME)
489 base_volume = (d->type == PA_DEVICE_TYPE_SINK) ? d->sink->base_volume : d->source->base_volume;
502 volume_steps = (d->type == PA_DEVICE_TYPE_SINK) ? d->sink->n_volume_steps : d->source->n_volume_steps;
529 pa_sink_set_mute(d->sink, mute, true);
545 ? !!(d->sink->flags & PA_SINK_HW_VOLUME_CTRL)
560 ? !!(d->sink->flags & PA_SINK_HW_MUTE_CTRL)
575 ? pa_sink_get_requested_latency(d->sink)
590 ? !!(d->sink->flags & PA_SINK_DYNAMIC_LATENCY)
604 if (d->type == PA_DEVICE_TYPE_SINK && !(d->sink->flags & PA_SINK_LATENCY)) {
606 "Sink %s doesn't support latency querying.", d->sink->name);
616 latency = (d->type == PA_DEVICE_TYPE_SINK) ? pa_sink_get_latency(d->sink) : pa_source_get_latency(d->source);
630 ? !!(d->sink->flags & PA_SINK_HARDWARE)
645 ? !!(d->sink->flags & PA_SINK_NETWORK)
716 "The sink %s has no ports, and therefore there's no active port either.", d->sink->name);
746 "The sink %s has no ports, and therefore there's no active port either.", d->sink->name);
768 if ((r = pa_sink_set_port(d->sink, pa_dbusiface_device_port_get_name(new_active), true)) < 0) {
833 idx = d->sink->index;
834 name = d->sink->name;
835 driver = d->sink->driver;
836 owner_module = d->sink->module;
837 card = d->sink->card;
838 sample_format = d->sink->sample_spec.format;
839 sample_rate = d->sink->sample_spec.rate;
840 channel_map = &d->sink->channel_map;
841 has_flat_volume = !!(d->sink->flags & PA_SINK_FLAT_VOLUME);
842 has_convertible_to_decibel_volume = !!(d->sink->flags & PA_SINK_DECIBEL_VOLUME);
843 base_volume = d->sink->base_volume;
844 volume_steps = d->sink->n_volume_steps;
845 has_hardware_volume = !!(d->sink->flags & PA_SINK_HW_VOLUME_CTRL);
846 has_hardware_mute = !!(d->sink->flags & PA_SINK_HW_MUTE_CTRL);
847 configured_latency = pa_sink_get_requested_latency(d->sink);
848 has_dynamic_latency = !!(d->sink->flags & PA_SINK_DYNAMIC_LATENCY);
849 latency = pa_sink_get_latency(d->sink);
850 is_hardware_device = !!(d->sink->flags & PA_SINK_HARDWARE);
851 is_network_device = !!(d->sink->flags & PA_SINK_NETWORK);
852 state = d->sink->state;
948 pa_log_debug("%s sink %s requested by client %" PRIu32 ".", suspend ? "Suspending" : "Resuming", d->sink->name, client->index);
950 if (pa_sink_suspend(d->sink, suspend, PA_SUSPEND_USER) < 0) {
982 "%s: No such port on sink %s.", port_name, d->sink->name);
1003 monitor_source = pa_dbusiface_core_get_source_path(d->core, d->sink->monitor_source);
1020 monitor_source = pa_dbusiface_core_get_source_path(d->core, d->sink->monitor_source);
1091 if ((d->type == PA_DEVICE_TYPE_SINK && d->sink != call_data) ||
1096 ? pa_sink_get_volume(d->sink, false)
1127 if ((d->type == PA_DEVICE_TYPE_SINK && d->sink != call_data) ||
1132 ? pa_sink_get_mute(d->sink, false)
1156 if ((d->type == PA_DEVICE_TYPE_SINK && d->sink != call_data) ||
1161 new_sink_state = d->sink->state;
1193 if ((d->type == PA_DEVICE_TYPE_SINK && d->sink != call_data) ||
1197 new_active_port = (d->type == PA_DEVICE_TYPE_SINK) ? d->sink->active_port : d->source->active_port;
1222 if ((d->type == PA_DEVICE_TYPE_SINK && d->sink != call_data) ||
1226 new_proplist = (d->type == PA_DEVICE_TYPE_SINK) ? d->sink->proplist : d->source->proplist;
1246 pa_dbusiface_device *pa_dbusiface_device_new_sink(pa_dbusiface_core *core, pa_sink *sink) {
1252 pa_assert(sink);
1256 d->sink = pa_sink_ref(sink);
1258 d->path = pa_sprintf_malloc("%s/%s%u", PA_DBUS_CORE_OBJECT_PATH, SINK_OBJECT_NAME, sink->index);
1259 d->volume = *pa_sink_get_volume(sink, false);
1260 d->mute = pa_sink_get_mute(sink, false);
1261 d->sink_state = sink->state;
1264 d->active_port = sink->active_port;
1265 d->proplist = pa_proplist_copy(sink->proplist);
1266 d->dbus_protocol = pa_dbus_protocol_get(sink->core);
1267 d->volume_changed_slot = pa_hook_connect(&sink->core->hooks[PA_CORE_HOOK_SINK_VOLUME_CHANGED],
1269 d->mute_changed_slot = pa_hook_connect(&sink->core->hooks[PA_CORE_HOOK_SINK_MUTE_CHANGED],
1271 d->state_changed_slot = pa_hook_connect(&sink->core->hooks[PA_CORE_HOOK_SINK_STATE_CHANGED],
1273 d->port_changed_slot = pa_hook_connect(&sink->core->hooks[PA_CORE_HOOK_SINK_PORT_CHANGED],
1275 d->proplist_changed_slot = pa_hook_connect(&sink->core->hooks[PA_CORE_HOOK_SINK_PROPLIST_CHANGED],
1278 PA_HASHMAP_FOREACH(port, sink->ports, state) {
1279 pa_dbusiface_device_port *p = pa_dbusiface_device_port_new(d, sink->core, port, d->next_port_index++);
1345 pa_sink_unref(d->sink);
1369 return d->sink;