Skip to content

Commit

Permalink
llext: export symbols, required for eq_fir
Browse files Browse the repository at this point in the history
When built as an llext module, eq_fir requires several base-firmware
provided symbols, export them.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
  • Loading branch information
lyakh committed Jun 19, 2024
1 parent 52968d0 commit bac3c32
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/audio/data_blob.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 5 additions & 0 deletions src/math/fir_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <sof/audio/format.h>
#include <sof/math/fir_generic.h>
#include <user/fir.h>
#include <rtos/symbol.h>
#include <errno.h>
#include <stddef.h>
#include <stdint.h>
Expand All @@ -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)
{
Expand All @@ -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)
Expand All @@ -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)
{
Expand Down
6 changes: 6 additions & 0 deletions src/math/fir_hifi2ep.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <user/fir.h>
#include <xtensa/config/defs.h>
#include <xtensa/tie/xt_hifi2.h>
#include <rtos/symbol.h>
#include <errno.h>
#include <stddef.h>
#include <stdint.h>
Expand All @@ -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)
{
Expand All @@ -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)
Expand All @@ -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)
{
Expand All @@ -70,13 +74,15 @@ 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)
{
*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
Expand Down
6 changes: 6 additions & 0 deletions src/math/fir_hifi3.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <user/fir.h>
#include <xtensa/config/defs.h>
#include <xtensa/tie/xt_hifi3.h>
#include <rtos/symbol.h>
#include <errno.h>
#include <stddef.h>
#include <stdint.h>
Expand All @@ -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)
{
Expand All @@ -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)
Expand All @@ -71,13 +74,15 @@ 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)
{
*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
Expand Down Expand Up @@ -245,5 +250,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

0 comments on commit bac3c32

Please sign in to comment.