summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/sink.h
Commit message (Collapse)AuthorAgeFilesLines
* core: Add infrastructure for synchronizing HW and SW volume changesJyri Sarha2010-10-161-14/+83
| | | | | | | | | | | | | | | | 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>
* core: initialize sink/source priorities automatically based on their proplistsLennart Poettering2009-08-291-0/+1
|
* core: add priority field to pa_sink/pa_sourceLennart Poettering2009-08-281-0/+2
|
* 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: volume handling rework, new flat volume logicLennart Poettering2009-08-191-7/+5
| | | | | | | | | | | | | | | | | | | | | | | - 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: introduce pa_{sink|source}_update_flags()Lennart Poettering2009-08-151-0/+2
|
* core: make fixed latency dynamically changeableLennart Poettering2009-08-151-3/+15
| | | | | | | | | | | | | 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-1/+2
|
* core: add assert macros for verifying calling contextLennart Poettering2009-08-131-0/+7
| | | | | | | 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)
* core: save volume/mute changes coming from the hardware automaticallyLennart Poettering2009-08-071-2/+2
| | | | | Volume changes coming from the lower layers are most likely changes triggered by the user, so let's save them automatically.
* alsa: rework mixer logicLennart Poettering2009-06-171-5/+41
| | | | | | | | | | | | 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/+1
|
* core: add a suspend cause flags fieldLennart Poettering2009-06-051-2/+3
|
* core: introduce pa_{sink,source}_set_fixed_latency()Lennart Poettering2009-05-081-0/+1
| | | | | This allows us to forward the fixed latency directly from the sink to the monitor source withut having to wait for pa_sink_put().
* core: introduce new 'reference' volume for sinksLennart Poettering2009-04-131-4/+7
| | | | | | | | | | | | | | | The reference volume is to be used as reference volume for stored stream volumes. Previously if a new stream was created the relative volume was taken relatively to the virtual device volume. Due to the flat volume logic this could then be fed back to the virtual device volume. Repeating the whole story over and over would result in a device volume that would go lower, and lower and lower. This patch introduces a 'reference' volume for each sink which stays unmodified by stream volume changes even if flat volumes are used. It is only modified if the sink volumes are modified directly by the user. For further explanations see http://pulseaudio.org/wiki/InternalVolumes
* core: add a seperate fixed_latency field for sinks/sources with fixed latencyLennart Poettering2009-04-101-0/+2
|
* introduce relative_volume field in sink_input and make use of it on sink ↵Lennart Poettering2009-04-081-2/+3
| | | | flat volume change
* after propagating a sink volume change to the sink inputs recalculate their ↵Lennart Poettering2009-04-071-0/+1
| | | | soft volumes
* introduce pa_{sink|source}_get_latency_within_thread()Lennart Poettering2009-04-051-0/+2
|
* get rid of 'default' min/max latencies, simplify things by just having ↵Lennart Poettering2009-03-251-1/+1
| | | | absolute boundaries
* set request/rewind sizes only via accessor functionsLennart Poettering2009-03-241-2/+6
|
* simplify latency range by not allowing stored 'wildcard' ranges anymoreLennart Poettering2009-03-241-1/+1
|
* add functions that modules can call whenever they now the volume changedLennart Poettering2009-03-211-0/+2
|
* Use LGPL 2.1 on all files previously using LGPL 2Colin Guthrie2009-03-031-1/+1
|
* add logic for initializing a useful icon nameLennart Poettering2009-03-011-0/+3
|
* when changing volume, store whether it is worth remembering or noLennart Poettering2009-01-271-1/+1
|
* move flat volume logic into the core. while doing so add n_volume_steps ↵Lennart Poettering2009-01-271-21/+20
| | | | field to sinks/sources
* add functions to move all inputs of a sink away/similar for source outputsLennart Poettering2009-01-231-0/+6
|
* pulse: share private enum values with client sideMarc-André Lureau2009-01-201-9/+0
|
* pulse: introspect sink stateMarc-André Lureau2009-01-201-10/+9
|
* Merge commit 'e0f8ffe41f99789fafac575e944acf02e940bbf7'Lennart Poettering2009-01-151-0/+2
|\
| * sink: add a virtual_volume to sinkMarc-André Lureau2009-01-141-0/+2
| |
* | add new pa_card object as a way to logically combine multiple sinks and sourcesLennart Poettering2009-01-151-0/+3
|/
* core: add pa_sink_update_proplistMarc-André Lureau2009-01-131-0/+2
|
* Add "base volume" field to sinks/sourcesLennart Poettering2008-12-241-0/+2
|
* Implement new flags DONT_INHIBIT_AUTO_SUSPEND and START_UNMUTEDLennart Poettering2008-10-261-0/+1
|
* volume hooksMarc-Andre Lureau2008-10-071-0/+5
| | | | Signed-off-by: Lennart Poettering <lennart@poettering.net>
* save a bit of memoryLennart Poettering2008-08-181-7/+8
|
* rework volume/mute APIs: split out pa_xx_set_soft_volume() and add ↵Lennart Poettering2008-08-131-2/+3
| | | | force_refresh argument to read functions
* make sure to call process_rewind() under all circumstances before we do the ↵Lennart Poettering2008-06-261-0/+1
| | | | next loop iteration
* Rework module-combine to work with glitch-free core; add new max_request ↵Lennart Poettering2008-06-201-12/+30
| | | | field to pa_sink
* get rid of svn $ keywordsLennart Poettering2008-06-181-2/+0
|
* link latency of monitor source to sinkLennart Poettering2008-05-171-0/+2
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2457 fefdeb5f-60dc-0310-8127-8f9354f1896f
* merge glitch-free branch back into trunkLennart Poettering2008-05-151-27/+97
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2445 fefdeb5f-60dc-0310-8127-8f9354f1896f
* merge 'lennart' branch back into trunk.Lennart Poettering2007-10-281-42/+119
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1971 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Add copyright notices to all relevant files. (based on svn log)Pierre Ossman2007-02-131-0/+3
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1426 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Huge trailing whitespace cleanup. Let's keep the tree pure from here on,Pierre Ossman2007-01-041-6/+6
| | | | | | | mmmkay? git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1418 fefdeb5f-60dc-0310-8127-8f9354f1896f
* add pa_sink_used_by()/pa_source_used_by()Lennart Poettering2006-08-121-0/+2
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1226 fefdeb5f-60dc-0310-8127-8f9354f1896f
* comment which values in pa_{sink,source,sink_input,source_output} structures ↵Lennart Poettering2006-08-111-11/+12
| | | | | | may be NULL git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1204 fefdeb5f-60dc-0310-8127-8f9354f1896f
* * introduce new functions pa_sink_set_description() and ↵Lennart Poettering2006-08-111-0/+2
| | | | | | | | | pa_source_set_description() for changing the description of a sink/source * allow sinks without monitor sources attached git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1203 fefdeb5f-60dc-0310-8127-8f9354f1896f