Skip to content

Commit

Permalink
Audio: multiband_drc: refine two static inline functions
Browse files Browse the repository at this point in the history
Move one inlined function to header file, for the second functions,
it was called 4 times in current module and not time critical, no
need inline.

Signed-off-by: Baofeng Tian <[email protected]>
  • Loading branch information
btian1 committed Nov 29, 2023
1 parent 1bd4330 commit 0a2cfd0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
11 changes: 1 addition & 10 deletions src/audio/multiband_drc/multiband_drc.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,7 @@ DECLARE_SOF_RT_UUID("multiband_drc", multiband_drc_uuid, 0x0d9f2256, 0x8e4f, 0x4

DECLARE_TR_CTX(multiband_drc_tr, SOF_UUID(multiband_drc_uuid), LOG_LEVEL_INFO);

static inline void multiband_drc_iir_reset_state_ch(struct iir_state_df2t *iir)
{
rfree(iir->coef);
rfree(iir->delay);

iir->coef = NULL;
iir->delay = NULL;
}

static inline void multiband_drc_reset_state(struct multiband_drc_state *state)
static void multiband_drc_reset_state(struct multiband_drc_state *state)
{
int i;

Expand Down
9 changes: 9 additions & 0 deletions src/audio/multiband_drc/multiband_drc.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,15 @@ static inline multiband_drc_func multiband_drc_find_proc_func_pass(enum sof_ipc_
return NULL;
}

static inline void multiband_drc_iir_reset_state_ch(struct iir_state_df2t *iir)
{
rfree(iir->coef);
rfree(iir->delay);

iir->coef = NULL;
iir->delay = NULL;
}

#ifdef UNIT_TEST
void sys_comp_module_multiband_drc_interface_init(void);
#endif
Expand Down

0 comments on commit 0a2cfd0

Please sign in to comment.