Skip to content

Commit

Permalink
Tools: Tune: DRC: Add calculation of blob for speaker processing
Browse files Browse the repository at this point in the history
This patch adds generation of a blob that applies about
10 dB gain with compression and additional post gain of
3 dB for strong loudness boost effect.

The drc_gen_coefs.m script is changed to display
the master linear gain as decibels to help achieve
suitable gain when setting parameters.

Signed-off-by: Seppo Ingalsuo <[email protected]>
  • Loading branch information
singalsu authored and lgirdwood committed Dec 19, 2023
1 parent 18f1703 commit 3d083e7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions tools/tune/drc/drc_gen_coefs.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
% Calculate makeup gain coefficients
full_range_makeup_gain = (1 / coefs.ratio_base) ^ 0.6; % Empirical/perceptual tuning
coefs.master_linear_gain = db2mag(params.post_gain) * full_range_makeup_gain;
coefs.master_linear_gain_db = 20*log10(coefs.master_linear_gain);

% Calculate attack time coefficients
attack_time = max(0.001, params.attack);
Expand Down
8 changes: 8 additions & 0 deletions tools/tune/drc/example_drc.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ function example_drc()
params.enabled = 1;
drc_coefs_and_config_export(params, 'enabled');

% Export experimental configuration for a small speaker
params.enabled = 1;
params.threshold = -25;
params.knee = 15;
params.ratio = 10;
params.post_gain = 3;
drc_coefs_and_config_export(params, 'generic_notebook_speaker');

rmpath ../common

end
Expand Down

0 comments on commit 3d083e7

Please sign in to comment.