summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/sink.c
Commit message (Collapse)AuthorAgeFilesLines
* ratelimit: fix log levels of log suppression messagesLennart Poettering2011-01-311-1/+1
| | | | | | | | | When logging a suppression message do so on the same log level as the suppressed messages. Cherry picked by Colin Guthrie from ec5a7857127a1b3b9c5517c4a70a9b2c8aab35ca with a couple of additional changes due to extra limiting in master that was not present in stable-queue.
* core: Use pa_sink_get_latency_within_thread() in sync-volume codeJyri Sarha2011-01-151-9/+2
|
* core: Use volume_change_safety_margin when rewinding sync-volume eventsJyri Sarha2011-01-151-6/+16
| | | | | After this patch the volume changes are applied immediately after sink rewind before processing streams and monitor source.
* intended-roles: Mark devices with a form factor of 'headset' as being ↵Colin Guthrie2010-10-161-1/+2
| | | | | | | appropriate for 'phone' streams This was a result a report by Patrick Ben Koetter relating to his Logitech Wireless Headset.
* daemon-conf: Add sync volume parameters to daemon-confJyri Sarha2010-10-161-4/+2
| | | | | | Signed-off-by: Jyri Sarha <jyri.sarha@nokia.com> Reviewed-by: Tanu Kaskinen <tanu.kaskinen@digia.com> Reviewd-by: Colin Guthrie <cguthrie@mandriva.org>
* core: Add infrastructure for synchronizing HW and SW volume changesJyri Sarha2010-10-161-16/+280
| | | | | | | | | | | | | | | | To make concurrent use of SW and HW volume glitchles their application needs to be synchronized. For accurate synchronization the HW volume needs to be applied in IO thread. This patch adds infrastructure to delay the applying of HW volume to match with SW volume timing. To avoid synchronization problems this patch moves many of the volume and mute related functions from main thread to IO thread. All these changes become active only if the sync volume flag for a sink has been set. So, for this patch to have any effect it needs to be taken into use by sink implementor. Signed-off-by: Jyri Sarha <jyri.sarha@nokia.com> Reviewed-by: Tanu Kaskinen <tanu.kaskinen@digia.com> Reviewd-by: Colin Guthrie <cguthrie@mandriva.org>
* suspend: Do not assert when checking for device suspended status and a ↵Colin Guthrie2010-10-011-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | stream is not linked. When looping through the streams on a given device checking to see if the stream is 'active' there should be no assert if the stream is not linked, it should simply be ignored. This assert can be hit if a sink and a sink input are both created and setup but the final put calls are left to the end as is done in module-ladspa-sink. While the order of the calls in module-ladspa-sink could be altered, we should deal gracefully with the way it is now and not complain about ending up in this state. A trigger case was trivial: 1. Load a ladspa-sink. 2. Play a stream and move it to it. 3. Unload the module, then reload it. 4. Due to module-stream-restore and module-suspend-on-idle, the hook callbacks will ultimately hit this assert. Thanks to Kim Therkelsen for highlighting this issue.
* AC3 passthrough supportPierre-Louis Bossart2010-08-121-0/+18
| | | | | | | | | | | | Second version after Tanu's feedback TODO: - notify client that volume control is disabled - change sink rate in passthrough mode if needed - automatic detection of passthrough mode instead of hard coded profile names Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@intel.com>
* core: rework how stream volumes affect sink volumesLennart Poettering2010-02-231-1/+41
|
* Merge remote branch 'origin/merge-queue'Lennart Poettering2009-11-051-1/+5
|\ | | | | | | | | | | Conflicts: src/pulsecore/sink-input.c src/pulsecore/sink.c
| * Add volume ramping feature - sink modificationmerge-queuezbt2009-08-051-1/+5
| |
* | sink: simplify silence checksWim Taymans2009-10-301-12/+10
| |
* | use cloexec wrappers wherever applicableLennart Poettering2009-10-301-2/+2
| |
* | core: drop unnecessary variable initializationLennart Poettering2009-09-031-1/+1
| |
* | sink: simplify pa_sink_render_full() by replacing it by a pa_sink_render() ↵Lennart Poettering2009-09-021-76/+14
| | | | | | | | plus a couple of pa_sink_render_full()
* | core: fill up memblock with pa_sink_render_into_full() in ↵Lennart Poettering2009-09-011-11/+5
| | | | | | | | pa_sink_render_full() instead of doing our own loop
* | core: handle suspended state in pa_sink_render_full() similar to the other ↵Lennart Poettering2009-09-011-1/+10
| | | | | | | | render functions
* | core: add missing sink_unref()Lennart Poettering2009-09-011-0/+3
| |
* | core: always allow volume setting with single-channel pa_cvolumeLennart Poettering2009-08-311-2/+8
| |
* | core: initialize sink/source priorities automatically based on their proplistsLennart Poettering2009-08-291-0/+47
| |
* | core: add priority field to pa_sink/pa_sourceLennart Poettering2009-08-281-0/+1
| |
* | object: speed up type verification by not relying on strcmp()Lennart Poettering2009-08-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Instead of using string contents for type identification use the address of a constant string array. This should speed up type verifications a little sind we only need to compare one machine word instead of a full string. Also, this saves a few strings. To make clear that types must be compared via address and not string contents 'type_name' is now called 'type_id'. This also simplifies the macros for declaring and defining public and private subclasses.
* | sink-input: add callbacks that are called whenever the mute/volume changesLennart Poettering2009-08-211-3/+13
| |
* | sink: volume handling rework, new flat volume logicLennart Poettering2009-08-191-139/+242
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - We now implement a logic where the sink maintains two distinct volumes: the 'reference' volume which is shown to the users, and the 'real' volume, which is configured to the hardware. The latter is configured to the max of all streams. Volume changes on sinks are propagated back to the streams proportional to the reference volume change. Volume changes on sink inputs are forwarded to the sink by 'pushing' the volume if necessary. This renames the old 'virtual_volume' to 'real_volume'. The 'reference_volume' is now the one exposed to users. By this logic the sink volume visible to the user, will always be the "upper" boundary for everything that is played. Saved/restored stream volumes are measured relative to this boundary, the factor here is always < 1.0. - introduce accuracy for sink volumes, similar to the accuracy we already have for source volumes. - other cleanups.
* | core: add to FIXMEsLennart Poettering2009-08-161-0/+1
| |
* | core: introduce pa_{sink|source}_update_flags()Lennart Poettering2009-08-151-1/+21
| |
* | core: document difference between IO and main thread view on requested latencyLennart Poettering2009-08-151-0/+3
| |
* | core: don't update latency range if not changedLennart Poettering2009-08-151-2/+5
| |
* | core: call pa_sink_get_latency_within_thread() instead of going directly via ↵Lennart Poettering2009-08-151-8/+2
| | | | | | | | process_msg()
* | core: make fixed latency dynamically changeableLennart Poettering2009-08-151-17/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | This of course makes the name 'fixed' a bit of a misnomer. However the definitions are now like this: fixed latency: the latency may change during runtime, but is solely controlled by the backend, the client has no influence. dynamic latency: the latency may change during runtime, influenced by the requests of the clients. i.e. fixed vs. dynamic is from the perspective of the client.
* | core: move rtpoll to thread_info sub structureLennart Poettering2009-08-151-6/+5
| |
* | core: split of FAIL_ON_SUSPEND into KILL_ON_SUSPEND and NO_CREATE_ON_SUSPENDLennart Poettering2009-08-151-2/+2
| |
* | core: introduce pa_{sink_input|source_output}_fail_move()Lennart Poettering2009-08-151-5/+3
| |
* | core: add assert macros for verifying calling contextLennart Poettering2009-08-131-15/+74
| | | | | | | | | | | | | | This adds pa_assert_io_context() and pa_assert_ctl_context() in addition to a few related macros. When called they will fail when the current execution context is not IO resp. not control context. (aka 'thread' context vs. 'main' context)
* | ladspa/remap: make sure we process all requested rewinds unconditionallyLennart Poettering2009-08-071-2/+5
| | | | | | | | | | | | | | In some situations a rewind request travelling downstream might be optimized away on its way and an upstream rewind processing might never come back. Hence, call _process_rewind() before each _render()just to make sure we processed them all.
* | core: save volume/mute changes coming from the hardware automaticallyLennart Poettering2009-08-071-10/+15
|/ | | | | Volume changes coming from the lower layers are most likely changes triggered by the user, so let's save them automatically.
* alsa,core: include mapping name in description stringsLennart Poettering2009-06-181-15/+20
|
* core: be a bit more verbose when registering a sink/source failsLennart Poettering2009-06-181-0/+1
|
* alsa: rework mixer logicLennart Poettering2009-06-171-12/+132
| | | | | | | | | | | | Completely rework mixer logic. This now allows controlling a full set of elements from a single sink's volume slider/mute button. This also introduces sink and source "ports" that can be used to choose different input or output ports with the UI. (i.e. "mic"/"line-in" or "speaker"/"headphones". The mixer paths and device maps are now configered in external configuration files and can be tweaked as necessary.
* prop: introduce new PA_PROP_DEVICE_INTENDED_ROLES propertyLennart Poettering2009-06-081-0/+17
|
* core: replace tabs by spacesLennart Poettering2009-06-081-31/+31
|
* core: make sure soft mute status stays in sync with hw mute statusLennart Poettering2009-06-081-1/+5
| | | | | | This should close rhbz #494851, mandriva bz #51234. Probably the same as our own #572, launchpad #352732.
* optimization: Optimized pa_sink_render_full.Jyri Sarha2009-06-071-3/+2
| | | | This is finally the latest version of the patch.
* core: monitor sources need to inherit the suspend cause from their sinksLennart Poettering2009-06-061-2/+5
|
* core: suppress suspending/resume when we are already in the right stateLennart Poettering2009-06-061-0/+3
|
* core: add a suspend cause flags fieldLennart Poettering2009-06-051-3/+13
|
* core: automatically add icons for headsets/headphones/speakers for devicesLennart Poettering2009-05-131-0/+15
|
* core: Take samples from silence cache rather than write zerosJyri Sarha2009-05-091-10/+22
| | | | | | If the only stream to render from is muted take samples from the silence cache. This should shrink memory/cache bandwidth. Again the gain was not what I hoped for.
* core: optimize pa_sink_render_full()Jyri Sarha2009-05-081-5/+73
| | | | | I have used this fix for quite a while and I am pretty confident about it. However, the performance gain was not what I expected.
* core: liberalize 99a6a4 a bitLennart Poettering2009-05-081-6/+10
| | | | | | While flags should generally be initialized by passing them to pa_{sink|source}_new() we make an exception for the volume related flags which may be initilized afterwards, but before _put().