1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Aidan MacDonald 2022-12-03 15:33:15 +00:00
parent 34a092a997
commit 6e794c9a2d
10 changed files with 62 additions and 35 deletions

View file

@ -56,17 +56,18 @@ struct sample_io_data
uint8_t output_version; /* Format version of src buffer at output */
};
void dsp_sample_input_init(struct sample_io_data *this, unsigned int dsp_id);
void dsp_sample_input_init(struct sample_io_data *this, unsigned int dsp_id) INIT_ATTR;
void dsp_sample_input_flush(struct sample_io_data *this);
void dsp_sample_input_format_change(struct sample_io_data *this,
struct sample_format *format);
void dsp_sample_output_init(struct sample_io_data *this);
void dsp_sample_output_init(struct sample_io_data *this) INIT_ATTR;
void dsp_sample_output_flush(struct sample_io_data *this);
void dsp_sample_output_format_change(struct sample_io_data *this,
struct sample_format *format);
/* Sample IO watches the format setting from the codec */
void dsp_sample_io_init(struct sample_io_data *this, unsigned int dsp_id) INIT_ATTR;
bool dsp_sample_io_configure(struct sample_io_data *this,
unsigned int setting,
intptr_t *value_p);