From 064780d9dea6a79c4c3adb07f530e2e6d5c68c0f Mon Sep 17 00:00:00 2001 From: Tanu Kaskinen Date: Fri, 11 Mar 2011 13:40:51 +0200 Subject: 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. --- src/modules/alsa/alsa-mixer.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/modules/alsa/alsa-mixer.h') diff --git a/src/modules/alsa/alsa-mixer.h b/src/modules/alsa/alsa-mixer.h index 8ec5dca1..c24a8965 100644 --- a/src/modules/alsa/alsa-mixer.h +++ b/src/modules/alsa/alsa-mixer.h @@ -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]; -- cgit