Skip to content

Commit c07023d

Browse files
committed
Audio: Multiband DRC: Change emphasis filter to iir_df1_4th()
This patch changes in multiband DRC component the emphasis and de-emphasis IIR filters to use the optimized 4th order IIR code. The patch for crossover already covered the bands filter bank. This change saves additional 2 MCPS in a HiFi5 build of the component. From 85.17 MCPS to 83.44 MCPS. The change is not restricting configuration. The existing filters are hard-coded to 4th order (SOF_EMP_DEEMP_BIQUADS). Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
1 parent 6389eff commit c07023d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/audio/multiband_drc/multiband_drc.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ static int multiband_drc_eq_init_coef_ch(struct sof_eq_iir_biquad *coef,
6666
{
6767
int ret;
6868

69+
/* Ensure the LR4 can be processed with the simplified 4th order IIR */
70+
if (SOF_EMP_DEEMP_BIQUADS != SOF_IIR_DF1_4TH_NUM_BIQUADS)
71+
return -EINVAL;
72+
6973
eq->coef = rzalloc(SOF_MEM_ZONE_RUNTIME, 0, SOF_MEM_CAPS_RAM,
7074
sizeof(struct sof_eq_iir_biquad) * SOF_EMP_DEEMP_BIQUADS);
7175
if (!eq->coef)

src/audio/multiband_drc/multiband_drc_generic.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ static void multiband_drc_process_emp_crossover(struct multiband_drc_state *stat
3939
crossover_s = &state->crossover[ch];
4040

4141
if (enable_emp)
42-
emp_out = iir_df1(emp_s, *buf_src);
42+
emp_out = iir_df1_4th(emp_s, *buf_src);
4343
else
4444
emp_out = *buf_src;
4545

@@ -178,7 +178,7 @@ static void multiband_drc_process_deemp(struct multiband_drc_state *state,
178178
}
179179

180180
if (enable_deemp)
181-
*buf_sink = iir_df1(deemp_s, mix_out);
181+
*buf_sink = iir_df1_4th(deemp_s, mix_out);
182182
else
183183
*buf_sink = mix_out;
184184

0 commit comments

Comments
 (0)