From 87cd5badce5c6827e4b7a91f5194ecec3bb63d04 Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Wed, 19 Jun 2024 08:09:43 +0200 Subject: [PATCH] llext: export symbols, required for eq_fir When built as an llext module, eq_fir requires several base-firmware provided symbols, export them. Signed-off-by: Guennadi Liakhovetski --- src/audio/data_blob.c | 1 + src/audio/sink_source_utils.c | 2 ++ src/audio/source_api_helper.c | 3 +++ src/math/fir_generic.c | 5 +++++ src/math/fir_hifi2ep.c | 6 ++++++ src/math/fir_hifi3.c | 7 +++++++ src/module/audio/sink_api.c | 4 ++++ 7 files changed, 28 insertions(+) diff --git a/src/audio/data_blob.c b/src/audio/data_blob.c index 3e6415d5d22e..7e1bc11f1f17 100644 --- a/src/audio/data_blob.c +++ b/src/audio/data_blob.c @@ -58,6 +58,7 @@ void comp_data_blob_set_validator(struct comp_data_blob_handler *blob_handler, blob_handler->validator = validator; } +EXPORT_SYMBOL(comp_data_blob_set_validator); void *comp_get_data_blob(struct comp_data_blob_handler *blob_handler, size_t *size, uint32_t *crc) diff --git a/src/audio/sink_source_utils.c b/src/audio/sink_source_utils.c index 3b79c8c2d5e1..cc75c3b848d3 100644 --- a/src/audio/sink_source_utils.c +++ b/src/audio/sink_source_utils.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include @@ -71,3 +72,4 @@ int source_to_sink_copy(struct sof_source *source, sink_commit_buffer(sink, INT_MAX); return 0; } +EXPORT_SYMBOL(source_to_sink_copy); diff --git a/src/audio/source_api_helper.c b/src/audio/source_api_helper.c index c7ca28c71720..0e742694508a 100644 --- a/src/audio/source_api_helper.c +++ b/src/audio/source_api_helper.c @@ -3,6 +3,8 @@ * Copyright(c) 2023 Intel Corporation. All rights reserved. */ +#include + #include #include @@ -96,6 +98,7 @@ int source_set_alignment_constants(struct sof_source *source, return source->ops->set_alignment_constants(source, byte_align, frame_align_req); return 0; } +EXPORT_SYMBOL(source_set_alignment_constants); void source_set_min_available(struct sof_source *source, size_t min_available) { diff --git a/src/math/fir_generic.c b/src/math/fir_generic.c index 0b19c6e14da1..24fbdc665988 100644 --- a/src/math/fir_generic.c +++ b/src/math/fir_generic.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -33,6 +34,7 @@ void fir_reset(struct fir_state_32x16 *fir) * reset so omitting setting also fir->delay to NULL. */ } +EXPORT_SYMBOL(fir_reset); int fir_delay_size(struct sof_fir_coef_data *config) { @@ -49,6 +51,7 @@ int fir_delay_size(struct sof_fir_coef_data *config) */ return (config->length + 4) * sizeof(int32_t); } +EXPORT_SYMBOL(fir_delay_size); int fir_init_coef(struct fir_state_32x16 *fir, struct sof_fir_coef_data *config) @@ -60,12 +63,14 @@ int fir_init_coef(struct fir_state_32x16 *fir, fir->coef = ASSUME_ALIGNED(&config->coef[0], 4); return 0; } +EXPORT_SYMBOL(fir_init_coef); void fir_init_delay(struct fir_state_32x16 *fir, int32_t **data) { fir->delay = *data; *data += fir->length; /* Point to next delay line start */ } +EXPORT_SYMBOL(fir_init_delay); int32_t fir_32x16(struct fir_state_32x16 *fir, int32_t x) { diff --git a/src/math/fir_hifi2ep.c b/src/math/fir_hifi2ep.c index f95b039a15fa..7f3a2d42a829 100644 --- a/src/math/fir_hifi2ep.c +++ b/src/math/fir_hifi2ep.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -32,6 +33,7 @@ void fir_reset(struct fir_state_32x16 *fir) * reset so omitting setting also fir->delay to NULL. */ } +EXPORT_SYMBOL(fir_reset); int fir_delay_size(struct sof_fir_coef_data *config) { @@ -47,6 +49,7 @@ int fir_delay_size(struct sof_fir_coef_data *config) */ return (config->length + 2) * sizeof(int32_t); } +EXPORT_SYMBOL(fir_delay_size); int fir_init_coef(struct fir_state_32x16 *fir, struct sof_fir_coef_data *config) @@ -62,6 +65,7 @@ int fir_init_coef(struct fir_state_32x16 *fir, fir->coef = (ae_p16x2s *)&config->coef[0]; return 0; } +EXPORT_SYMBOL(fir_init_coef); void fir_init_delay(struct fir_state_32x16 *fir, int32_t **data) { @@ -70,6 +74,7 @@ void fir_init_delay(struct fir_state_32x16 *fir, int32_t **data) fir->rwp = (ae_p24x2f *)(fir->delay + fir->length - 1); *data += fir->length; /* Point to next delay line start */ } +EXPORT_SYMBOL(fir_init_delay); void fir_get_lrshifts(struct fir_state_32x16 *fir, int *lshift, int *rshift) @@ -77,6 +82,7 @@ void fir_get_lrshifts(struct fir_state_32x16 *fir, int *lshift, *lshift = (fir->out_shift < 0) ? -fir->out_shift : 0; *rshift = (fir->out_shift > 0) ? fir->out_shift : 0; } +EXPORT_SYMBOL(fir_get_lrshifts); /* HiFi EP has the follow number of reqisters that should not be exceeded * 4x 56 bit registers in register file Q diff --git a/src/math/fir_hifi3.c b/src/math/fir_hifi3.c index 30be6b8196cc..a9cb19e3072f 100644 --- a/src/math/fir_hifi3.c +++ b/src/math/fir_hifi3.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -32,6 +33,7 @@ void fir_reset(struct fir_state_32x16 *fir) * reset so omitting setting also fir->delay to NULL. */ } +EXPORT_SYMBOL(fir_reset); int fir_delay_size(struct sof_fir_coef_data *config) { @@ -48,6 +50,7 @@ int fir_delay_size(struct sof_fir_coef_data *config) */ return (config->length + 2) * sizeof(int32_t); } +EXPORT_SYMBOL(fir_delay_size); int fir_init_coef(struct fir_state_32x16 *fir, struct sof_fir_coef_data *config) @@ -63,6 +66,7 @@ int fir_init_coef(struct fir_state_32x16 *fir, fir->coef = (ae_f16x4 *)&config->coef[0]; return 0; } +EXPORT_SYMBOL(fir_init_coef); void fir_init_delay(struct fir_state_32x16 *fir, int32_t **data) { @@ -71,6 +75,7 @@ void fir_init_delay(struct fir_state_32x16 *fir, int32_t **data) fir->rwp = (ae_int32 *)(fir->delay + fir->length - 1); *data += fir->length; /* Point to next delay line start */ } +EXPORT_SYMBOL(fir_init_delay); void fir_get_lrshifts(struct fir_state_32x16 *fir, int *lshift, int *rshift) @@ -78,6 +83,7 @@ void fir_get_lrshifts(struct fir_state_32x16 *fir, int *lshift, *lshift = (fir->out_shift < 0) ? -fir->out_shift : 0; *rshift = (fir->out_shift > 0) ? fir->out_shift : 0; } +EXPORT_SYMBOL(fir_get_lrshifts); /* HiFi EP has the follow number of reqisters that should not be exceeded * 4x 56 bit registers in register file Q @@ -245,5 +251,6 @@ void fir_32x16_2x_hifi3(struct fir_state_32x16 *fir, ae_int32 x0, ae_int32 x1, AE_S32_L_I(AE_ROUND32F48SSYM(b), (ae_int32 *)y1, 0); AE_S32_L_I(AE_ROUND32F48SSYM(a), (ae_int32 *)y0, 0); } +EXPORT_SYMBOL(fir_32x16_2x_hifi3); #endif diff --git a/src/module/audio/sink_api.c b/src/module/audio/sink_api.c index 856a6bb5689e..5ec904d61b2f 100644 --- a/src/module/audio/sink_api.c +++ b/src/module/audio/sink_api.c @@ -97,6 +97,7 @@ int sink_set_rate(struct sof_sink *sink, unsigned int rate) return sink->ops->on_audio_format_set(sink); return 0; } +EXPORT_SYMBOL(sink_set_rate); int sink_set_channels(struct sof_sink *sink, unsigned int channels) { @@ -114,6 +115,7 @@ int sink_set_buffer_fmt(struct sof_sink *sink, uint32_t buffer_fmt) return sink->ops->on_audio_format_set(sink); return 0; } +EXPORT_SYMBOL(sink_set_buffer_fmt); int sink_set_overrun(struct sof_sink *sink, bool overrun_permitted) { @@ -129,6 +131,7 @@ int sink_set_params(struct sof_sink *sink, struct sof_ipc_stream_params *params, return sink->ops->audio_set_ipc_params(sink, params, force_update); return 0; } +EXPORT_SYMBOL(sink_set_params); int sink_set_alignment_constants(struct sof_sink *sink, const uint32_t byte_align, const uint32_t frame_align_req) @@ -137,3 +140,4 @@ int sink_set_alignment_constants(struct sof_sink *sink, const uint32_t byte_alig return sink->ops->set_alignment_constants(sink, byte_align, frame_align_req); return 0; } +EXPORT_SYMBOL(sink_set_alignment_constants);