From 6e794c9a2d9e91a926f70d0fcc66e255b0bdc221 Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Sat, 3 Dec 2022 15:33:15 +0000 Subject: rbcodec dsp: Refactor DSP init routines, restore INIT_ATTR Refactor DSP init routines so there is a dedicated init function for the stages that need it. Remove the DSP_INIT configure message. This allows the init code to be safely marked INIT_ATTR, saving a bit of code size, and allowing the linker to verify that there are no unsafe references to the init routines. Change-Id: I1702f0f579bbb300a6fe7d0e67b13aa2e9dd7f8a --- lib/rbcodec/dsp/dsp_misc.c | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'lib/rbcodec/dsp/dsp_misc.c') diff --git a/lib/rbcodec/dsp/dsp_misc.c b/lib/rbcodec/dsp/dsp_misc.c index 8687abc06a..24ec857e3a 100644 --- a/lib/rbcodec/dsp/dsp_misc.c +++ b/lib/rbcodec/dsp/dsp_misc.c @@ -149,13 +149,6 @@ unsigned int dsp_get_output_frequency(struct dsp_config *dsp) return dsp_configure(dsp, DSP_GET_OUT_FREQUENCY, 0); } -static void misc_dsp_init(struct dsp_config *dsp, unsigned int dsp_id) -{ - /* Enable us for the audio DSP at startup */ - if (dsp_id == CODEC_IDX_AUDIO) - dsp_proc_enable(dsp, DSP_PROC_MISC_HANDLER, true); -} - /* This is a null-processing stage that monitors as an enabled stage but never * becomes active in processing samples. It only hooks messages. */ @@ -167,10 +160,6 @@ static intptr_t misc_handler_configure(struct dsp_proc_entry *this, { switch (setting) { - case DSP_INIT: - misc_dsp_init(dsp, value); - break; - case DSP_PROC_CLOSE: /* This stage should be enabled at all times */ DEBUGF("DSP_PROC_MISC_HANDLER - Error: Closing!\n"); -- cgit v1.2.3