mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-08 13:29:59 -05:00
core: Add infrastructure for synchronizing HW and SW volume changes
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>
This commit is contained in:
parent
179b291b18
commit
5391daf8df
3 changed files with 369 additions and 31 deletions
|
|
@ -740,11 +740,15 @@ typedef enum pa_sink_flags {
|
|||
/**< The latency can be adjusted dynamically depending on the
|
||||
* needs of the connected streams. \since 0.9.15 */
|
||||
|
||||
PA_SINK_PASSTHROUGH = 0x0100U
|
||||
PA_SINK_PASSTHROUGH = 0x0100U,
|
||||
/**< This sink has support for passthrough mode. The data will be left
|
||||
* as is and not reformatted, resampled, mixed.
|
||||
* \since 0.9.22*/
|
||||
|
||||
PA_SINK_SYNC_VOLUME = 0x0200U,
|
||||
/**< The HW volume changes are syncronized with SW volume.
|
||||
* \since 0.9.22 */
|
||||
|
||||
} pa_sink_flags_t;
|
||||
|
||||
/** \cond fulldocs */
|
||||
|
|
@ -757,6 +761,7 @@ typedef enum pa_sink_flags {
|
|||
#define PA_SINK_FLAT_VOLUME PA_SINK_FLAT_VOLUME
|
||||
#define PA_SINK_DYNAMIC_LATENCY PA_SINK_DYNAMIC_LATENCY
|
||||
#define PA_SINK_PASSTHROUGH PA_SINK_PASSTHROUGH
|
||||
#define PA_SINK_SYNC_VOLUME PA_SINK_SYNC_VOLUME
|
||||
|
||||
/** \endcond */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue