fn->private_data = pcd;
fn->min_iqs = 2; /* 16 bit audio */
pcd->current_gain = 1U << inertia;
- pcd->max_gain = 1U << (inertia + aggressiveness);
+ pcd->max_gain = (1U << inertia) * (1.0 + 3.0 * aggressiveness / 10.0);
}
static void *compress_setup(const struct lls_parse_result *lpr)
exit(EXIT_FAILURE);
}
val = U32_OPTVAL(AGGRESSIVENESS, lpr);
- if (val == 0 || val > 15) {
+ if (val > 10) {
PARA_EMERG_LOG("aggressiveness (%u) out of range\n", val);
exit(EXIT_FAILURE);
}
val = U32_OPTVAL(INERTIA, lpr);
- if (val == 0 || val > 15) {
+ if (val == 0 || val > 14) {
PARA_EMERG_LOG("inertia (%u) out of range\n", val);
exit(EXIT_FAILURE);
}
- val = U32_OPTVAL(AGGRESSIVENESS, lpr) + U32_OPTVAL(INERTIA, lpr);
- if (val > 16) {
- PARA_EMERG_LOG("inertia + aggressiveness (%u) > 16\n", val);
- exit(EXIT_FAILURE);
- }
val = U32_OPTVAL(TARGET_LEVEL, lpr);
if (val > 32767) {
PARA_EMERG_LOG("target-level (%u) out of range\n", val);
[/help]
[option aggressiveness]
short_opt = a
- summary = controls the maximum amount to amplify by (1-15)
+ summary = controls the maximum amount to amplify by (0-10)
typestr = bits
arg_info = required_arg
arg_type = uint32
default_val = 4
[help]
- This caps the maximal gain factor to 2**bits. The sum of the arguments
- to --aggressiveness and --inertia (see below) must not exceed 16.
+ This controls the maximal gain factor. Zero means to not amplify
+ at all while the value 10 corresponds to maximal gain factor which
+ results in a 4-fold increase in volume.
[/help]
[option inertia]
short_opt = i
- summary = how much inertia ramping has (1-15)
+ summary = how much inertia ramping has (1-14)
typestr = bits
arg_info = required_arg
arg_type = uint32
default_val = 6
[help]
- Larger values cause smaller volume adjustments. See --aggressiveness
- above.
+ Larger values cause smaller volume adjustments.
[/help]
[option target-level]
short_opt = t