mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-31 22:25:33 -04:00
alsa-mixer: Implement support for setting element specific upper limits for volume.
This feature is mainly useful in embedded systems that have built-in speakers. In such situations the full audio path is known beforehand, so it's possible to know what is the maximum sensible volume, and any higher volume can be disabled. The volume limit is set in path configuration files in the [Element] section, using option "volume-limit". The value is the desired maximum volume step of the volume element.
This commit is contained in:
parent
68e6340394
commit
064780d9de
3 changed files with 69 additions and 1 deletions
|
|
@ -142,6 +142,7 @@ struct pa_alsa_element {
|
|||
|
||||
pa_bool_t has_dB:1;
|
||||
long min_volume, max_volume;
|
||||
long volume_limit; /* -1 for no configured limit */
|
||||
double min_dB, max_dB;
|
||||
|
||||
pa_channel_position_mask_t masks[SND_MIXER_SCHN_LAST][2];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue