Lines Matching defs:sink
61 PA_MODULE_DESCRIPTION("BlueZ 5 Bluetooth audio sink and source");
126 pa_sink *sink;
372 pa_assert(u->sink);
380 pa_sink_render_full(u->sink, u->write_block_size, &u->write_memchunk);
675 pa_sink_set_max_request_within_thread(u->sink, u->write_block_size);
676 pa_sink_set_fixed_latency_within_thread(u->sink,
698 if (!pa_frame_aligned(u->write_block_size, &u->sink->sample_spec)) {
700 u->write_block_size = pa_frame_align(u->write_block_size, &u->sink->sample_spec);
713 if (u->sink)
803 * sent by the hardware callback (if the peer supports it and the sink
808 if (u->sink == call_data) {
809 new_volume = pa_sink_get_volume(u->sink, false);
891 /* Stop the device if the sink is suspended as well */
892 if (!u->sink || u->sink->state == PA_SINK_SUSPENDED)
908 /* Resume the device if the sink was suspended as well */
909 if (!u->sink || !PA_SINK_IS_OPENED(u->sink->thread_info.state))
1072 pa_assert(u->sink == PA_SINK(o));
1097 *((int64_t*) data) = u->sink->thread_info.fixed_latency + delay;
1111 pa_log_debug("Skip sink stream setup while closing");
1175 pa_assert(u->sink == s);
1195 pa_assert(u->sink == s);
1202 * otherwise this sink should continue performing attenuation in software
1292 u->sink = pa_sink_new(u->core, &data, PA_SINK_HARDWARE|PA_SINK_LATENCY);
1294 if (!u->sink) {
1295 pa_log_error("Failed to create sink");
1299 u->sink->userdata = u;
1300 u->sink->parent.process_msg = sink_process_msg;
1301 u->sink->set_state_in_io_thread = sink_set_state_in_io_thread_cb;
1303 sink_setup_volume_callback(u->sink);
1377 transport_acquire(u, true); /* In case of error, the sink/sources will be created suspended */
1457 bool have_sink = u->sink ? PA_SINK_IS_LINKED(u->sink->thread_info.state) : false;
1501 * If source and sink sample specifications are not equal,
1514 /* Handle sink if present */
1518 if (PA_UNLIKELY(u->sink->thread_info.rewind_requested))
1519 pa_sink_process_rewind(u->sink, 0);
1526 * for the sink */
1602 pa_sink_render_full(u->sink, bytes_to_render, &tmp);
1730 if (u->sink) {
1731 pa_sink_set_asyncmsgq(u->sink, u->thread_mq.inq);
1732 pa_sink_set_rtpoll(u->sink, u->rtpoll);
1734 /* If we are in the headset role, the sink should not become default
1737 u->sink->priority = 1500;
1739 pa_sink_put(u->sink);
1741 if (u->sink->set_volume)
1742 u->sink->set_volume(u->sink);
1761 if (u->sink || u->source)
1766 * Sometimes its initial "change" notification arrives too early when the sink
1768 * our sink peer supports Absolute Volume; in that case we should not perform
1778 if (u->transport && u->sink)
1788 if (u->sink || u->source)
1791 if (u->sink)
1792 pa_sink_unlink(u->sink);
1829 if (u->sink) {
1830 pa_sink_unref(u->sink);
1831 u->sink = NULL;
2159 if (u->sink || u->source)
2321 /* When the ofono backend resumes source or sink when in the audio gateway role, the
2322 * state of source or sink may already be RUNNING before the transport is acquired via
2339 if (u->sink) {
2340 pa_log_debug("Resuming sink %s because its transport state changed to playing", u->sink->name);
2343 if (PA_SINK_IS_OPENED(u->sink->state))
2344 pa_asyncmsgq_send(u->sink->asyncmsgq, PA_MSGOBJECT(u->sink), PA_SINK_MESSAGE_SETUP_STREAM, NULL, 0, NULL);
2347 pa_sink_suspend(u->sink, false, PA_SUSPEND_IDLE|PA_SUSPEND_USER);
2363 if (u->sink) {
2364 pa_log_debug("Suspending sink %s because the remote end closed the stream", u->sink->name);
2365 pa_sink_suspend(u->sink, true, PA_SUSPEND_USER);
2429 if (!u->sink) {
2430 pa_log_warn("Received peer transport volume change without connected sink");
2434 sink_setup_volume_callback(u->sink);
2438 pa_sink_set_volume(u->sink, &v, true, true);
2440 pa_sink_volume_changed(u->sink, &v);
2492 if (u->sink || u->source)
2606 pa_log_info("Switching codecs only allowed for A2DP sink or source");
2641 * We need to check if we have valid sink or source endpoints which
2827 if (u->sink || u->source)
2918 return (u->sink ? pa_sink_linked_by(u->sink) : 0) + (u->source ? pa_source_linked_by(u->source) : 0);