Lines Matching defs:sink

39 #include <pulsecore/sink-input.h>
51 #include "sink.h"
224 * the sink volume is allowed to be set, like there is for sink inputs. */
366 pa_log_info("Created sink %u \"%s\" with sample spec %s and channel map %s\n %s",
435 * resuming the sink fails? The old suspend cause will be incorrect, so we
437 * case currently), then it looks strange to have a sink suspended without
548 /* The sink implementor is responsible for setting decibel volume support */
671 * of the sink. */
677 * sharing. When the master sink supports decibel volume, it would be good
678 * to have the flag also in the filter sink, but currently we don't do that
679 * so that the flags of the filter sink never change when it's moved from
680 * a master sink to another. One solution for this problem would be to
684 * the sink implementor to set this flag as needed.
686 * Note: This flag can also change over the life time of the sink. */
692 /* If the sink implementor support DB volumes by itself, we should always
708 /* We assume that if the sink implementor changed the default
739 /* It's good to fire the SINK_PUT hook before updating the default sink,
740 * because module-switch-on-connect will set the new sink as the default
741 * sink, and if we were to call pa_core_update_default_sink() before that,
742 * the default sink might change twice, causing unnecessary stream moving. */
789 /* Unlink monitor source before unlinking the sink */
795 * because if we remove the SESSION suspend cause here, the alsa sink
819 pa_log_info("Freeing sink %u \"%s\"", s->index, s->name);
1019 /* The combine sink sets i->origin sink but has a different threading model
1022 * context of the origin sink.
1024 * for the combine sink. */
1025 if (!i->module || !pa_safe_streq(i->module->name, "module-combine-sink")) {
1027 /* The recursive call works in the origin sink domain ... */
1028 left_to_play_origin = pa_convert_size(left_to_play, &i->sink->sample_spec, &i->origin_sink->sample_spec);
1035 /* ... and convert it back to the master sink domain */
1036 filter_result = pa_convert_size(filter_result, &i->origin_sink->sample_spec, &i->sink->sample_spec);
1048 /* The sink has possibly consumed all the data the sink input provided */
1522 /* We have to try to use the sink input format and rate */
1527 /* We just try to set the sink input's sample rate if it's not too low */
1561 pa_log_debug("Suspending sink %s due to changing format, desired format = %s rate = %u",
1659 * When a sink uses volume sharing, it never has the PA_SINK_FLAT_VOLUME flag
1660 * set. Instead, flat volume mode is detected by checking whether the root sink
1673 /* Check if the sink has a virtual sink attached.
1703 s = s->input_to_master->sink;
1738 /* The sink implementation is reconfigured for passthrough in
1744 pa_log_debug("Suspending monitor source %s, because the sink is entering the passthrough mode.", s->monitor_source->name);
1755 pa_log_debug("Suspending/Restarting sink %s to enter passthrough mode", s->name);
1762 pa_log_debug("Resuming monitor source %s, because the sink is leaving the passthrough mode.", s->monitor_source->name);
1766 /* Restore sink volume to what it was before we entered passthrough mode */
1781 pa_assert(pa_sink_flat_volume_enabled(i->sink));
1784 * Calculates the reference ratio from the sink's reference
1787 * i->reference_ratio = i->volume / i->sink->reference_volume
1790 remapped = i->sink->reference_volume;
1791 pa_cvolume_remap(&remapped, &i->sink->channel_map, &i->channel_map);
1797 /* We don't update when the sink volume is 0 anyway */
1815 /* Called from main context. Only called for the root sink in volume sharing
1835 /* Called from main context. Only called for the root sink in volume sharing
1851 /* The origin sink uses volume sharing, so this input's real ratio
1919 * mapping from sink input to sink volumes:
1925 * the sink to ensure that changing a volume on one stream has no
1927 * does not have the same channel map as the sink. */
1942 /* Called from main thread. Only called for the root sink in volume sharing
1960 /* Ignore this input. The origin sink uses volume sharing, so this
1961 * input's volume will be set to be equal to the root sink's real
1963 * affect what the root sink's real volume will be. */
1973 /* Called from main thread. Only called for the root sink in volume sharing
1989 /* Called from main thread. Only called for the root sink in volume sharing
2007 /* Follow the root sink's real volume. */
2020 /* Called from main thread. Only called for the root sink in shared volume
2033 /* In the special case that we have no sink inputs we leave the
2042 * connected to this sink */
2047 * connected to this sink */
2051 /* Called from main thread. Only called for the root sink in shared volume
2062 /* This is called whenever the sink volume changes that is not
2063 * caused by a sink input volume change. We need to fix up the
2064 * sink input volumes accordingly */
2073 /* Since the origin sink uses volume sharing, this input's volume
2074 * needs to be updated to match the root sink's real volume, but
2090 /* Called from main thread. Only called for the root sink in volume sharing
2114 /* If the root sink's volume doesn't change, then there can't be any
2115 * changes in the other sinks in the sink tree either.
2117 * It's probably theoretically possible that even if the root sink's
2118 * volume changes slightly, some filter sink doesn't change its volume
2120 * the changed root sink volume to the sinks connected to the
2121 * intermediate sink that didn't change its volume. This theoretical
2161 /* In case of volume sharing, the volume is set for the root sink first,
2193 /* If volume is NULL we synchronize the sink's real and
2203 /* If the sink and its root don't have the same number of channels, we need to remap */
2227 /* This tells the sink that soft volume and/or real volume changed */
2233 * Only to be called by sink implementor */
2255 /* Called from the main thread. Only called for the root sink in volume sharing
2284 /* 2. Since the sink's reference and real volumes are equal
2289 * reference ratio and the sink's reference volume.
2347 /* Called from main thread. In volume sharing cases, only the root sink may
2357 /* The sink implementor may call this if the volume changed to make sure everyone is notified */
2390 pa_log_debug("The mute of sink %s changed from %s to %s.", s->name, pa_yes_no(old_muted), pa_yes_no(mute));
2541 /* We do not assert here. It is perfectly valid for a sink input to
2594 /* Called from the IO thread. Only called for the root sink in volume sharing
2610 /* Called from IO thread. Gets max_rewind limit from sink inputs.
2612 * virtual sink to the master sink. The get_max_rewind_limit()
2613 * callback is implemented by sink inputs connecting a virtual
2614 * sink to its master. */
2622 /* Get rewind limit in sink sample spec from sink inputs */
2655 * sink input handling a few lines down at
2665 pa_assert(i->sink == i->thread_info.sync_prev->sink);
2671 pa_assert(i->sink == i->thread_info.sync_next->sink);
2680 /* The requested latency of the sink input needs to be fixed up and
2681 * then configured on the sink. If this causes the sink latency to
2682 * go down, the sink implementor is responsible for doing a rewind
2684 * sink buffer doesn't contain more data than what the new latency
2688 * the sink implementors? Wouldn't it be better to do it once in
2698 * sink input implementor because some sink inputs need a
2703 * the sink implementors? Wouldn't it be better to do it once in
2715 * sink input handling a few lines down at
2759 /* The old sink probably has some audio from this
2761 * much as possible and play it to the new sink. We
2762 * don't know at this point how much the old sink can
2777 /* Let's remove the sink input ...*/
2781 * the max_rewind value of the sink may change before the rewind. */
2809 /* In the ideal case the new sink would start playing
2810 * the stream immediately. That requires the sink to
2816 * latency of the sink from the stream. With option 1
2823 * latency of the new sink from the moved stream and
2824 * hope that the sink will undo most of that in the
2827 /* Get the latency of the sink */
2838 /* max_rewind must be updated for the sink input because otherwise
2849 /* Updating the requested sink latency has to be done
2850 * after the sink rewind request, not before, because
2851 * otherwise the sink may limit the rewind amount
2906 /* In case sink implementor reset SW volume. */
3057 pa_sink *sink;
3065 PA_IDXSET_FOREACH(sink, c->sinks, idx) {
3068 if ((r = pa_sink_suspend(sink, suspend, cause)) < 0)
3492 pa_log_debug("set_port() operation not implemented for sink %u \"%s\"", s->index, s->name);
3514 pa_log_info("Changed port of sink %u \"%s\" to %s", s->index, s->name, port->name);
3521 /* The active port affects the default sink selection. */
3660 * module-jackdbus-detect creates the jack sink and source. */
3891 /* Gets the list of formats supported by the sink. The members and idxset must
3914 /* Allows an external source to set what formats a sink supports if the sink
3929 /* Checks if the sink can accept this format */
3957 /* Calculates the intersection between formats supported by the sink and
3958 * in_formats, and returns these, in the order of the sink's formats. */
4037 pa_log_debug("The reference volume of sink %s changed from %s to %s.", s->name,
4067 if (!i->sink)
4070 /* Don't move sink-inputs which connect filter sinks to their target sinks */
4074 /* If default_sink_changed is false, the old sink became unavailable, so all streams must be moved. */
4082 pa_log_info("The sink input %u \"%s\" is moving to %s due to change of the default sink.",
4085 pa_log_info("The sink input %u \"%s\" is moving to %s, because the old sink became unavailable.",