Enum Sadmod
#[repr(u8)]pub enum Sadmod {
ThresholdEstimatedAmbientNoise = 0,
ThresholdMinimumNoiselevel = 1,
ThresholdMinimumNoiselevelx4 = 2,
_RESERVED_3 = 3,
}Expand description
SAD working mode. This bitfield is set and cleared by software. It is used to define the way the SAD works
Variants§
ThresholdEstimatedAmbientNoise = 0
Threshold value computed according to the estimated ambient noise. The SAD triggers when the sound level (SDLVL) is bigger than the defined threshold. In this mode, the SAD works like a voice activity detector.
ThresholdMinimumNoiselevel = 1
Threshold value equal to ANMIN[12:0], multiplied by the gain selected by SNTHR[3:0] The SAD triggers when the sound level (SDLVL) is bigger than the defined threshold. In this mode, the SAD works like a sound detector.
ThresholdMinimumNoiselevelx4 = 2
Threshold value given by 4 x ANMIN[12:0]. The SAD triggers when the estimated ambient noise (ANLVL), multiplied by the gain selected by SNTHR[3:0] is bigger than the defined threshold. In this mode, the SAD is working like an ambient noise estimator. Hysteresis function cannot be used in this mode.