[Sound-open-firmware] [PATCH 2/4] SRC: Bug fix for SRC_SHORT 16 bit coefficients usage
Seppo Ingalsuo
seppo.ingalsuo at linux.intel.com
Fri Sep 22 15:08:45 CEST 2017
This patch fixes the circular dependency of defines that prevented the
16 bit coefficients to be applied correctly.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo at linux.intel.com>
---
src/audio/src_core.c | 14 --------------
src/audio/src_core.h | 6 +-----
2 files changed, 1 insertion(+), 19 deletions(-)
diff --git a/src/audio/src_core.c b/src/audio/src_core.c
index 342e8a7..1577e14 100644
--- a/src/audio/src_core.c
+++ b/src/audio/src_core.c
@@ -628,13 +628,6 @@ void src_print_info(struct polyphase_src *src)
printf("SRC1 input blk %d\n", src->stage1->blk_in);
printf("SRC1 output blk %d\n", src->stage1->blk_out);
printf("SRC1 halfband %d\n", src->stage1->halfband);
- printf("SRC1 coef[0] %d\n", src->stage1->coefs[0]);
- if (n1 > 3) {
- printf("SRC1 coef[1] %d\n", src->stage1->coefs[1]);
- printf("SRC1 coef[2] %d\n", src->stage1->coefs[2]);
- printf("SRC1 coef[%d] %d\n",
- n1 - 1, src->stage1->coefs[n1 - 1]);
- }
printf("SRC1 FIR delay %d\n", src->state1.fir_delay_size);
printf("SRC1 out delay %d\n", src->state1.out_delay_size);
@@ -647,13 +640,6 @@ void src_print_info(struct polyphase_src *src)
printf("SRC2 input blk %d\n", src->stage2->blk_in);
printf("SRC2 output blk %d\n", src->stage2->blk_out);
printf("SRC2 halfband %d\n", src->stage2->halfband);
- printf("SRC2 coef[0] %d\n", src->stage2->coefs[0]);
- if (n2 > 3) {
- printf("SRC2 coef[1] %d\n", src->stage2->coefs[1]);
- printf("SRC2 coef[2] %d\n", src->stage2->coefs[2]);
- printf("SRC2 coef[%d] %d\n",
- n1 - 1, src->stage2->coefs[n2 - 1]);
- }
printf("SRC2 FIR delay %d\n", src->state2.fir_delay_size);
printf("SRC2 out delay %d\n", src->state2.out_delay_size);
}
diff --git a/src/audio/src_core.h b/src/audio/src_core.h
index 886cc23..2965c7d 100644
--- a/src/audio/src_core.h
+++ b/src/audio/src_core.h
@@ -62,11 +62,7 @@ struct src_stage {
const int blk_out;
const int halfband;
const int shift;
-#if SRC_SHORT == 1
- const int16_t *coefs;
-#else
- const int32_t *coefs;
-#endif
+ const void *coefs; /* Can be int16_t or int32_t depending on config */
};
struct src_state {
--
2.11.0
More information about the Sound-open-firmware
mailing list