From 4ffb100f58b6881e451ddbacee543daab6c8ae64 Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Wed, 11 Dec 2024 15:44:55 +0200 Subject: [PATCH 1/6] llext: add support for read-only data in DRAM With this data can be assigned to a separate read-only section, which then will be kept in DRAM without copying it to SRAM on module instantiation. Signed-off-by: Guennadi Liakhovetski --- scripts/llext_link_helper.py | 42 ++++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/scripts/llext_link_helper.py b/scripts/llext_link_helper.py index c745b388cd03..194068321878 100755 --- a/scripts/llext_link_helper.py +++ b/scripts/llext_link_helper.py @@ -76,6 +76,7 @@ def main(): executable = [] writable = [] readonly = [] + readonly_dram = [] text_found = False @@ -101,10 +102,7 @@ def main(): if (s_flags & (SH_FLAGS.SHF_ALLOC | SH_FLAGS.SHF_EXECINSTR) == SH_FLAGS.SHF_ALLOC | SH_FLAGS.SHF_EXECINSTR and s_type == 'SHT_PROGBITS'): - # An executable section, currently only a single .text is supported. - # In general additional executable sections are possible, e.g. - # .init. In the future support for arbitrary such sections can be - # added, similar to writable and read-only data below. + # An executable section. if s_name == '.text': text_found = True text_addr = max_alignment(text_addr, 0x1000, s_alignment) @@ -123,7 +121,10 @@ def main(): if s_type == 'SHT_PROGBITS' and s_flags & SH_FLAGS.SHF_ALLOC: # .rodata or other read-only sections - readonly.append(section) + if s_name == '.coldrodata': + readonly_dram.append(section) + else: + readonly.append(section) if not text_found: raise RuntimeError('No .text section found in the object file') @@ -136,24 +137,37 @@ def main(): # run at arbitrary memory locations. One of the use-cases is running # parts of the module directly in DRAM - sacrificing performance but # saving scarce SRAM. We achieve this by placing non-performance - # critical functions in a .cold ELF section. When compiling and linking - # such functions, an additional .cold.literal section is automatically - # created. Note, that for some reason the compiler also marks that - # section as executable. + # critical functions in a .cold ELF section, read-only data in a + # .coldrodata ELF section, etc. When compiling and linking such + # functions, an additional .cold.literal section is automatically + # created. Note, that for some reason the compiler also marks .cold as + # executable. # This script links those sections at address 0. We could hard-code # section names, but so far we choose to only link .text the "original" - # way and all other executable sections we link at 0. - exe_addr = 0 + # way and all other executable sections we link at 0. For data sections + # we accept only the .coldrodata name for now. + + dram_addr = 0 for section in executable: s_alignment = section.header['sh_addralign'] s_name = section.name - exe_addr = align_up(exe_addr, s_alignment) + dram_addr = align_up(dram_addr, s_alignment) + + command.append(f'-Wl,--section-start={s_name}=0x{dram_addr:x}') + + dram_addr += section.header['sh_size'] + + for section in readonly_dram: + s_alignment = section.header['sh_addralign'] + s_name = section.name + + dram_addr = align_up(dram_addr, s_alignment) - command.append(f'-Wl,--section-start={s_name}=0x{exe_addr:x}') + command.append(f'-Wl,--section-start={s_name}=0x{dram_addr:x}') - exe_addr += section.header['sh_size'] + dram_addr += section.header['sh_size'] start_addr = align_up(text_addr + text_size, 0x1000) From 089aa19194acd091de9fdded0dc43a9303902637 Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Wed, 11 Dec 2024 15:40:40 +0200 Subject: [PATCH 2/6] audio: src: move all coefficients and 2 functions to DRAM src coefficients take a lot of space, keep them in DRAM to only copy used sets in SRAM. Also move src_init() and src_free() to DRAM since they aren't performance-critical. Signed-off-by: Guennadi Liakhovetski --- src/audio/src/coef/src_ipc4_int32_10_21_2500_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_10_21_3455_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_10_21_4535_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_10_9_4535_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_16_21_4319_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_16_21_4535_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_16_7_4082_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_1_2_2268_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_1_2_2500_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_1_2_2721_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_1_2_3401_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_1_2_3887_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_1_2_4535_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_1_3_2268_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_1_3_4535_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_1_4_1512_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_1_4_2268_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_1_4_4535_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_1_6_1134_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_20_21_1250_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_20_21_2500_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_20_21_3125_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_20_21_4167_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_20_21_4535_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_20_7_2976_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_21_10_2500_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_21_10_3455_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_21_10_4535_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_21_16_4319_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_21_16_4535_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_21_20_1250_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_21_20_2500_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_21_20_3125_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_21_20_4167_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_21_20_4535_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_21_2_3239_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_21_32_4535_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_21_40_2381_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_21_40_3968_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_21_4_1080_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_21_4_3239_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_21_5_1728_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_21_5_4535_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_21_80_3968_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_21_8_2160_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_21_8_3239_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_21_8_4535_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_2_1_2268_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_2_1_2500_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_2_1_2721_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_2_1_3401_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_2_1_4535_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_2_3_4535_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_32_21_4535_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_3_1_2268_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_3_1_4535_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_3_2_4535_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_3_4_4535_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_40_21_2381_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_40_21_2976_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_40_21_3968_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_40_7_2976_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_4_1_1134_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_4_1_1512_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_4_1_2268_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_4_1_4535_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_4_21_1080_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_4_21_3239_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_4_3_4535_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_5_21_1728_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_5_21_4535_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_5_7_4535_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_6_1_1134_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_7_3_4535_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_7_5_4535_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_7_8_1361_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_7_8_2468_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_7_8_2721_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_7_8_4535_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_8_21_2160_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_8_21_3239_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_8_21_4535_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_8_7_1361_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_8_7_2468_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_8_7_2721_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_8_7_4082_5000.h | 2 +- src/audio/src/coef/src_ipc4_int32_8_7_4535_5000.h | 2 +- src/audio/src/coef/src_lite_int32_10_21_3455_5000.h | 2 +- src/audio/src/coef/src_lite_int32_16_21_4535_5000.h | 2 +- src/audio/src/coef/src_lite_int32_1_2_4535_5000.h | 2 +- src/audio/src/coef/src_lite_int32_1_3_4535_5000.h | 2 +- src/audio/src/coef/src_lite_int32_20_21_4167_5000.h | 2 +- src/audio/src/coef/src_lite_int32_3_2_4535_5000.h | 2 +- src/audio/src/coef/src_lite_int32_8_7_4535_5000.h | 2 +- src/audio/src/coef/src_small_int32_1_2_2268_5000.h | 2 +- src/audio/src/coef/src_small_int32_1_2_4535_5000.h | 2 +- src/audio/src/coef/src_small_int32_1_3_2268_5000.h | 2 +- src/audio/src/coef/src_small_int32_1_3_4535_5000.h | 2 +- src/audio/src/coef/src_small_int32_20_21_4167_5000.h | 2 +- src/audio/src/coef/src_small_int32_21_20_4167_5000.h | 2 +- src/audio/src/coef/src_small_int32_2_1_2268_5000.h | 2 +- src/audio/src/coef/src_small_int32_2_1_4535_5000.h | 2 +- src/audio/src/coef/src_small_int32_2_3_4535_5000.h | 2 +- src/audio/src/coef/src_small_int32_3_1_2268_5000.h | 2 +- src/audio/src/coef/src_small_int32_3_1_4535_5000.h | 2 +- src/audio/src/coef/src_small_int32_3_2_4535_5000.h | 2 +- src/audio/src/coef/src_small_int32_3_4_4535_5000.h | 2 +- src/audio/src/coef/src_small_int32_4_3_4535_5000.h | 2 +- src/audio/src/coef/src_small_int32_4_5_4535_5000.h | 2 +- src/audio/src/coef/src_small_int32_5_4_4535_5000.h | 2 +- src/audio/src/coef/src_small_int32_5_6_4354_5000.h | 2 +- src/audio/src/coef/src_small_int32_6_5_4354_5000.h | 2 +- src/audio/src/coef/src_small_int32_7_8_4535_5000.h | 2 +- src/audio/src/coef/src_small_int32_8_7_4535_5000.h | 2 +- src/audio/src/coef/src_std_int32_10_21_4535_5000.h | 2 +- src/audio/src/coef/src_std_int32_1_2_2268_5000.h | 2 +- src/audio/src/coef/src_std_int32_1_2_4535_5000.h | 2 +- src/audio/src/coef/src_std_int32_1_3_2268_5000.h | 2 +- src/audio/src/coef/src_std_int32_1_3_4535_5000.h | 2 +- src/audio/src/coef/src_std_int32_20_21_4167_5000.h | 2 +- src/audio/src/coef/src_std_int32_20_7_2976_5000.h | 2 +- src/audio/src/coef/src_std_int32_21_20_4167_5000.h | 2 +- src/audio/src/coef/src_std_int32_21_40_3968_5000.h | 2 +- src/audio/src/coef/src_std_int32_21_80_3968_5000.h | 2 +- src/audio/src/coef/src_std_int32_2_1_2268_5000.h | 2 +- src/audio/src/coef/src_std_int32_2_1_4535_5000.h | 2 +- src/audio/src/coef/src_std_int32_2_3_4535_5000.h | 2 +- src/audio/src/coef/src_std_int32_32_21_4535_5000.h | 2 +- src/audio/src/coef/src_std_int32_3_1_2268_5000.h | 2 +- src/audio/src/coef/src_std_int32_3_1_4535_5000.h | 2 +- src/audio/src/coef/src_std_int32_3_2_4535_5000.h | 2 +- src/audio/src/coef/src_std_int32_3_4_4535_5000.h | 2 +- src/audio/src/coef/src_std_int32_40_21_3968_5000.h | 2 +- src/audio/src/coef/src_std_int32_4_3_4535_5000.h | 2 +- src/audio/src/coef/src_std_int32_4_5_4535_5000.h | 2 +- src/audio/src/coef/src_std_int32_5_4_4535_5000.h | 2 +- src/audio/src/coef/src_std_int32_5_6_4354_5000.h | 2 +- src/audio/src/coef/src_std_int32_5_7_4535_5000.h | 2 +- src/audio/src/coef/src_std_int32_6_5_4354_5000.h | 2 +- src/audio/src/coef/src_std_int32_7_8_4535_5000.h | 2 +- src/audio/src/coef/src_std_int32_8_21_3239_5000.h | 2 +- src/audio/src/coef/src_std_int32_8_7_2468_5000.h | 2 +- src/audio/src/coef/src_std_int32_8_7_4535_5000.h | 2 +- src/audio/src/coef/src_tiny_int16_1_2_1814_5000.h | 2 +- src/audio/src/coef/src_tiny_int16_1_3_1814_5000.h | 2 +- src/audio/src/coef/src_tiny_int16_1_6_1814_5000.h | 2 +- src/audio/src/coef/src_tiny_int16_20_21_1667_5000.h | 2 +- src/audio/src/coef/src_tiny_int16_21_20_1667_5000.h | 2 +- src/audio/src/coef/src_tiny_int16_24_25_1814_5000.h | 2 +- src/audio/src/coef/src_tiny_int16_25_24_1814_5000.h | 2 +- src/audio/src/coef/src_tiny_int16_2_1_1814_5000.h | 2 +- src/audio/src/coef/src_tiny_int16_2_3_1814_5000.h | 2 +- src/audio/src/coef/src_tiny_int16_3_1_1814_5000.h | 2 +- src/audio/src/coef/src_tiny_int16_3_2_1814_5000.h | 2 +- src/audio/src/coef/src_tiny_int16_6_1_1814_5000.h | 2 +- src/audio/src/coef/src_tiny_int16_7_8_1814_5000.h | 2 +- src/audio/src/coef/src_tiny_int16_8_7_1814_5000.h | 2 +- src/audio/src/src.c | 1 + src/audio/src/src_common.c | 2 +- src/audio/src/src_ipc4.c | 2 +- 160 files changed, 160 insertions(+), 159 deletions(-) diff --git a/src/audio/src/coef/src_ipc4_int32_10_21_2500_5000.h b/src/audio/src/coef/src_ipc4_int32_10_21_2500_5000.h index ce545706e446..074af07daf32 100644 --- a/src/audio/src/coef/src_ipc4_int32_10_21_2500_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_10_21_2500_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_10_21_2500_5000_fir[480] = { +__cold_rodata static const int32_t src_int32_10_21_2500_5000_fir[480] = { 176197, 283398, -489527, diff --git a/src/audio/src/coef/src_ipc4_int32_10_21_3455_5000.h b/src/audio/src/coef/src_ipc4_int32_10_21_3455_5000.h index 97d276a98791..38678a2a6353 100644 --- a/src/audio/src/coef/src_ipc4_int32_10_21_3455_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_10_21_3455_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_10_21_3455_5000_fir[640] = { +__cold_rodata static const int32_t src_int32_10_21_3455_5000_fir[640] = { 110400, 517669, 162088, diff --git a/src/audio/src/coef/src_ipc4_int32_10_21_4535_5000.h b/src/audio/src/coef/src_ipc4_int32_10_21_4535_5000.h index 4380004274a1..96a242482b97 100644 --- a/src/audio/src/coef/src_ipc4_int32_10_21_4535_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_10_21_4535_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_10_21_4535_5000_fir[2320] = { +__cold_rodata static const int32_t src_int32_10_21_4535_5000_fir[2320] = { 26554, 22041, -35569, diff --git a/src/audio/src/coef/src_ipc4_int32_10_9_4535_5000.h b/src/audio/src/coef/src_ipc4_int32_10_9_4535_5000.h index 944eb78028a2..83ca193c21a0 100644 --- a/src/audio/src/coef/src_ipc4_int32_10_9_4535_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_10_9_4535_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_10_9_4535_5000_fir[1080] = { +__cold_rodata static const int32_t src_int32_10_9_4535_5000_fir[1080] = { -35695, 60551, -91611, diff --git a/src/audio/src/coef/src_ipc4_int32_16_21_4319_5000.h b/src/audio/src/coef/src_ipc4_int32_16_21_4319_5000.h index 6c277f298c79..3fec8272839d 100644 --- a/src/audio/src/coef/src_ipc4_int32_16_21_4319_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_16_21_4319_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_16_21_4319_5000_fir[1472] = { +__cold_rodata static const int32_t src_int32_16_21_4319_5000_fir[1472] = { 69743, -28255, -123867, diff --git a/src/audio/src/coef/src_ipc4_int32_16_21_4535_5000.h b/src/audio/src/coef/src_ipc4_int32_16_21_4535_5000.h index 6c9764cbadf3..816a41276149 100644 --- a/src/audio/src/coef/src_ipc4_int32_16_21_4535_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_16_21_4535_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_16_21_4535_5000_fir[2048] = { +__cold_rodata static const int32_t src_int32_16_21_4535_5000_fir[2048] = { 66387, -68365, -7975, diff --git a/src/audio/src/coef/src_ipc4_int32_16_7_4082_5000.h b/src/audio/src/coef/src_ipc4_int32_16_7_4082_5000.h index d3c468bc50f1..b4b00eb4d21e 100644 --- a/src/audio/src/coef/src_ipc4_int32_16_7_4082_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_16_7_4082_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_16_7_4082_5000_fir[896] = { +__cold_rodata static const int32_t src_int32_16_7_4082_5000_fir[896] = { -71000, 181977, -339747, diff --git a/src/audio/src/coef/src_ipc4_int32_1_2_2268_5000.h b/src/audio/src/coef/src_ipc4_int32_1_2_2268_5000.h index ff326eeda32f..8ac49de99916 100644 --- a/src/audio/src/coef/src_ipc4_int32_1_2_2268_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_1_2_2268_5000.h @@ -7,7 +7,7 @@ /** \cond GENERATED_BY_TOOLS_TUNE_SRC */ #include -static const int32_t src_int32_1_2_2268_5000_fir[36] = { +__cold_rodata static const int32_t src_int32_1_2_2268_5000_fir[36] = { 1065827, -37924, -4976218, diff --git a/src/audio/src/coef/src_ipc4_int32_1_2_2500_5000.h b/src/audio/src/coef/src_ipc4_int32_1_2_2500_5000.h index 4c7a24273cd7..99ac5b22e7f4 100644 --- a/src/audio/src/coef/src_ipc4_int32_1_2_2500_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_1_2_2500_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_1_2_2500_5000_fir[40] = { +__cold_rodata static const int32_t src_int32_1_2_2500_5000_fir[40] = { -879692, 460291, 4237437, diff --git a/src/audio/src/coef/src_ipc4_int32_1_2_2721_5000.h b/src/audio/src/coef/src_ipc4_int32_1_2_2721_5000.h index 0ee1fe85270d..cbaa50a52342 100644 --- a/src/audio/src/coef/src_ipc4_int32_1_2_2721_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_1_2_2721_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_1_2_2721_5000_fir[44] = { +__cold_rodata static const int32_t src_int32_1_2_2721_5000_fir[44] = { 776925, -535235, -3522824, diff --git a/src/audio/src/coef/src_ipc4_int32_1_2_3401_5000.h b/src/audio/src/coef/src_ipc4_int32_1_2_3401_5000.h index ba97ad2fb9f7..147fdc0258b8 100644 --- a/src/audio/src/coef/src_ipc4_int32_1_2_3401_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_1_2_3401_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_1_2_3401_5000_fir[60] = { +__cold_rodata static const int32_t src_int32_1_2_3401_5000_fir[60] = { 483288, -83413, -1522435, diff --git a/src/audio/src/coef/src_ipc4_int32_1_2_3887_5000.h b/src/audio/src/coef/src_ipc4_int32_1_2_3887_5000.h index b1ca37835159..5e3fb20738a0 100644 --- a/src/audio/src/coef/src_ipc4_int32_1_2_3887_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_1_2_3887_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_1_2_3887_5000_fir[84] = { +__cold_rodata static const int32_t src_int32_1_2_3887_5000_fir[84] = { 488732, -7737, -1049640, diff --git a/src/audio/src/coef/src_ipc4_int32_1_2_4535_5000.h b/src/audio/src/coef/src_ipc4_int32_1_2_4535_5000.h index 5d2f5750ef3a..f9a2d9e1ed55 100644 --- a/src/audio/src/coef/src_ipc4_int32_1_2_4535_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_1_2_4535_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_1_2_4535_5000_fir[192] = { +__cold_rodata static const int32_t src_int32_1_2_4535_5000_fir[192] = { -215107, -43725, 301513, diff --git a/src/audio/src/coef/src_ipc4_int32_1_3_2268_5000.h b/src/audio/src/coef/src_ipc4_int32_1_3_2268_5000.h index 400311d50d4f..8c088177f4f0 100644 --- a/src/audio/src/coef/src_ipc4_int32_1_3_2268_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_1_3_2268_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_1_3_2268_5000_fir[52] = { +__cold_rodata static const int32_t src_int32_1_3_2268_5000_fir[52] = { 856478, -618891, -4156030, diff --git a/src/audio/src/coef/src_ipc4_int32_1_3_4535_5000.h b/src/audio/src/coef/src_ipc4_int32_1_3_4535_5000.h index b668f710a423..d13e60802e5a 100644 --- a/src/audio/src/coef/src_ipc4_int32_1_3_4535_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_1_3_4535_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_1_3_4535_5000_fir[260] = { +__cold_rodata static const int32_t src_int32_1_3_4535_5000_fir[260] = { -76785, 87265, 208768, diff --git a/src/audio/src/coef/src_ipc4_int32_1_4_1512_5000.h b/src/audio/src/coef/src_ipc4_int32_1_4_1512_5000.h index f39d4d866277..fa07fd026a7d 100644 --- a/src/audio/src/coef/src_ipc4_int32_1_4_1512_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_1_4_1512_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_1_4_1512_5000_fir[52] = { +__cold_rodata static const int32_t src_int32_1_4_1512_5000_fir[52] = { 740488, -111252, -2633435, diff --git a/src/audio/src/coef/src_ipc4_int32_1_4_2268_5000.h b/src/audio/src/coef/src_ipc4_int32_1_4_2268_5000.h index 7de054371d04..b65fec0b639b 100644 --- a/src/audio/src/coef/src_ipc4_int32_1_4_2268_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_1_4_2268_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_1_4_2268_5000_fir[60] = { +__cold_rodata static const int32_t src_int32_1_4_2268_5000_fir[60] = { -1265010, -1300023, 42822, diff --git a/src/audio/src/coef/src_ipc4_int32_1_4_4535_5000.h b/src/audio/src/coef/src_ipc4_int32_1_4_4535_5000.h index 59f3c464e2e3..07aae148bd91 100644 --- a/src/audio/src/coef/src_ipc4_int32_1_4_4535_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_1_4_4535_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_1_4_4535_5000_fir[332] = { +__cold_rodata static const int32_t src_int32_1_4_4535_5000_fir[332] = { -246503, -173077, 24381, diff --git a/src/audio/src/coef/src_ipc4_int32_1_6_1134_5000.h b/src/audio/src/coef/src_ipc4_int32_1_6_1134_5000.h index 77293237d64a..9e20a2f4ffed 100644 --- a/src/audio/src/coef/src_ipc4_int32_1_6_1134_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_1_6_1134_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_1_6_1134_5000_fir[68] = { +__cold_rodata static const int32_t src_int32_1_6_1134_5000_fir[68] = { -2393808, -3445469, -3907601, diff --git a/src/audio/src/coef/src_ipc4_int32_20_21_1250_5000.h b/src/audio/src/coef/src_ipc4_int32_20_21_1250_5000.h index cb9898d01873..83409ba4cda2 100644 --- a/src/audio/src/coef/src_ipc4_int32_20_21_1250_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_20_21_1250_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_20_21_1250_5000_fir[320] = { +__cold_rodata static const int32_t src_int32_20_21_1250_5000_fir[320] = { 134710, 1035873, -9174506, diff --git a/src/audio/src/coef/src_ipc4_int32_20_21_2500_5000.h b/src/audio/src/coef/src_ipc4_int32_20_21_2500_5000.h index bbecd688b192..d2f606331586 100644 --- a/src/audio/src/coef/src_ipc4_int32_20_21_2500_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_20_21_2500_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_20_21_2500_5000_fir[560] = { +__cold_rodata static const int32_t src_int32_20_21_2500_5000_fir[560] = { -5217, -381011, 1487277, diff --git a/src/audio/src/coef/src_ipc4_int32_20_21_3125_5000.h b/src/audio/src/coef/src_ipc4_int32_20_21_3125_5000.h index 8727d574fd7c..8465b979b4ce 100644 --- a/src/audio/src/coef/src_ipc4_int32_20_21_3125_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_20_21_3125_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_20_21_3125_5000_fir[640] = { +__cold_rodata static const int32_t src_int32_20_21_3125_5000_fir[640] = { 81905, -392860, 605436, diff --git a/src/audio/src/coef/src_ipc4_int32_20_21_4167_5000.h b/src/audio/src/coef/src_ipc4_int32_20_21_4167_5000.h index c1cb209a0235..efd2acc0b5d3 100644 --- a/src/audio/src/coef/src_ipc4_int32_20_21_4167_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_20_21_4167_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_20_21_4167_5000_fir[1200] = { +__cold_rodata static const int32_t src_int32_20_21_4167_5000_fir[1200] = { 54594, -184742, 399571, diff --git a/src/audio/src/coef/src_ipc4_int32_20_21_4535_5000.h b/src/audio/src/coef/src_ipc4_int32_20_21_4535_5000.h index 4ed3c222a10d..243140a639c8 100644 --- a/src/audio/src/coef/src_ipc4_int32_20_21_4535_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_20_21_4535_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_20_21_4535_5000_fir[2080] = { +__cold_rodata static const int32_t src_int32_20_21_4535_5000_fir[2080] = { -39854, 85177, -146854, diff --git a/src/audio/src/coef/src_ipc4_int32_20_7_2976_5000.h b/src/audio/src/coef/src_ipc4_int32_20_7_2976_5000.h index 4e543c4fdca4..86c446340c58 100644 --- a/src/audio/src/coef/src_ipc4_int32_20_7_2976_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_20_7_2976_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_20_7_2976_5000_fir[560] = { +__cold_rodata static const int32_t src_int32_20_7_2976_5000_fir[560] = { -33375, 393038, -1331352, diff --git a/src/audio/src/coef/src_ipc4_int32_21_10_2500_5000.h b/src/audio/src/coef/src_ipc4_int32_21_10_2500_5000.h index 624fca1bf2ad..43a6b47e3354 100644 --- a/src/audio/src/coef/src_ipc4_int32_21_10_2500_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_21_10_2500_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_21_10_2500_5000_fir[504] = { +__cold_rodata static const int32_t src_int32_21_10_2500_5000_fir[504] = { 7704, 568453, -2657822, diff --git a/src/audio/src/coef/src_ipc4_int32_21_10_3455_5000.h b/src/audio/src/coef/src_ipc4_int32_21_10_3455_5000.h index eb39b94a3648..d0188db84fca 100644 --- a/src/audio/src/coef/src_ipc4_int32_21_10_3455_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_21_10_3455_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_21_10_3455_5000_fir[756] = { +__cold_rodata static const int32_t src_int32_21_10_3455_5000_fir[756] = { -37222, 240677, -698458, diff --git a/src/audio/src/coef/src_ipc4_int32_21_10_4535_5000.h b/src/audio/src/coef/src_ipc4_int32_21_10_4535_5000.h index 7766a5163142..ae0134902654 100644 --- a/src/audio/src/coef/src_ipc4_int32_21_10_4535_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_21_10_4535_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_21_10_4535_5000_fir[2520] = { +__cold_rodata static const int32_t src_int32_21_10_4535_5000_fir[2520] = { -9118, 18975, -33943, diff --git a/src/audio/src/coef/src_ipc4_int32_21_16_4319_5000.h b/src/audio/src/coef/src_ipc4_int32_21_16_4319_5000.h index bb7c44e00392..fd8d48b9b1ef 100644 --- a/src/audio/src/coef/src_ipc4_int32_21_16_4319_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_21_16_4319_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_21_16_4319_5000_fir[1596] = { +__cold_rodata static const int32_t src_int32_21_16_4319_5000_fir[1596] = { -50136, 105527, -181643, diff --git a/src/audio/src/coef/src_ipc4_int32_21_16_4535_5000.h b/src/audio/src/coef/src_ipc4_int32_21_16_4535_5000.h index 0c2def816397..7308ab4368ae 100644 --- a/src/audio/src/coef/src_ipc4_int32_21_16_4535_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_21_16_4535_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_21_16_4535_5000_fir[2436] = { +__cold_rodata static const int32_t src_int32_21_16_4535_5000_fir[2436] = { -15208, 29050, -48628, diff --git a/src/audio/src/coef/src_ipc4_int32_21_20_1250_5000.h b/src/audio/src/coef/src_ipc4_int32_21_20_1250_5000.h index db43622d1c84..4ce048243ecc 100644 --- a/src/audio/src/coef/src_ipc4_int32_21_20_1250_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_21_20_1250_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_21_20_1250_5000_fir[420] = { +__cold_rodata static const int32_t src_int32_21_20_1250_5000_fir[420] = { 94664, -1133291, 202774, diff --git a/src/audio/src/coef/src_ipc4_int32_21_20_2500_5000.h b/src/audio/src/coef/src_ipc4_int32_21_20_2500_5000.h index ce4da411ce8f..acdf97328a05 100644 --- a/src/audio/src/coef/src_ipc4_int32_21_20_2500_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_21_20_2500_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_21_20_2500_5000_fir[504] = { +__cold_rodata static const int32_t src_int32_21_20_2500_5000_fir[504] = { 8116, 587965, -2725209, diff --git a/src/audio/src/coef/src_ipc4_int32_21_20_3125_5000.h b/src/audio/src/coef/src_ipc4_int32_21_20_3125_5000.h index 66edd652830e..c37db1770a28 100644 --- a/src/audio/src/coef/src_ipc4_int32_21_20_3125_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_21_20_3125_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_21_20_3125_5000_fir[672] = { +__cold_rodata static const int32_t src_int32_21_20_3125_5000_fir[672] = { 4928, 190845, -929522, diff --git a/src/audio/src/coef/src_ipc4_int32_21_20_4167_5000.h b/src/audio/src/coef/src_ipc4_int32_21_20_4167_5000.h index 737cf8968eb0..31c0a15809d3 100644 --- a/src/audio/src/coef/src_ipc4_int32_21_20_4167_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_21_20_4167_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_21_20_4167_5000_fir[1260] = { +__cold_rodata static const int32_t src_int32_21_20_4167_5000_fir[1260] = { -79259, 176349, -298364, diff --git a/src/audio/src/coef/src_ipc4_int32_21_20_4535_5000.h b/src/audio/src/coef/src_ipc4_int32_21_20_4535_5000.h index f49e48439c7d..c6a76782842e 100644 --- a/src/audio/src/coef/src_ipc4_int32_21_20_4535_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_21_20_4535_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_21_20_4535_5000_fir[2268] = { +__cold_rodata static const int32_t src_int32_21_20_4535_5000_fir[2268] = { -37260, 62223, -92794, diff --git a/src/audio/src/coef/src_ipc4_int32_21_2_3239_5000.h b/src/audio/src/coef/src_ipc4_int32_21_2_3239_5000.h index 111cf33bdf6c..3798885c991c 100644 --- a/src/audio/src/coef/src_ipc4_int32_21_2_3239_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_21_2_3239_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_21_2_3239_5000_fir[672] = { +__cold_rodata static const int32_t src_int32_21_2_3239_5000_fir[672] = { -35882, 307961, -974587, diff --git a/src/audio/src/coef/src_ipc4_int32_21_32_4535_5000.h b/src/audio/src/coef/src_ipc4_int32_21_32_4535_5000.h index 0d7cf6c46d53..4b2c8db312d0 100644 --- a/src/audio/src/coef/src_ipc4_int32_21_32_4535_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_21_32_4535_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_21_32_4535_5000_fir[3612] = { +__cold_rodata static const int32_t src_int32_21_32_4535_5000_fir[3612] = { -8897, -11309, 29648, diff --git a/src/audio/src/coef/src_ipc4_int32_21_40_2381_5000.h b/src/audio/src/coef/src_ipc4_int32_21_40_2381_5000.h index 3c9e9af6c834..c465a9ce6b14 100644 --- a/src/audio/src/coef/src_ipc4_int32_21_40_2381_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_21_40_2381_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_21_40_2381_5000_fir[924] = { +__cold_rodata static const int32_t src_int32_21_40_2381_5000_fir[924] = { 139084, 174433, -727541, diff --git a/src/audio/src/coef/src_ipc4_int32_21_40_3968_5000.h b/src/audio/src/coef/src_ipc4_int32_21_40_3968_5000.h index c5e7d514e40b..2073c0097bf7 100644 --- a/src/audio/src/coef/src_ipc4_int32_21_40_3968_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_21_40_3968_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_21_40_3968_5000_fir[1680] = { +__cold_rodata static const int32_t src_int32_21_40_3968_5000_fir[1680] = { 150373, 421455, -262792, diff --git a/src/audio/src/coef/src_ipc4_int32_21_4_1080_5000.h b/src/audio/src/coef/src_ipc4_int32_21_4_1080_5000.h index a4011678f867..e3c84132ecb0 100644 --- a/src/audio/src/coef/src_ipc4_int32_21_4_1080_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_21_4_1080_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_21_4_1080_5000_fir[336] = { +__cold_rodata static const int32_t src_int32_21_4_1080_5000_fir[336] = { 139978, 2034094, -10158575, diff --git a/src/audio/src/coef/src_ipc4_int32_21_4_3239_5000.h b/src/audio/src/coef/src_ipc4_int32_21_4_3239_5000.h index d73ebbd2afed..c950787ac76e 100644 --- a/src/audio/src/coef/src_ipc4_int32_21_4_3239_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_21_4_3239_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_21_4_3239_5000_fir[672] = { +__cold_rodata static const int32_t src_int32_21_4_3239_5000_fir[672] = { -35812, 307539, -973534, diff --git a/src/audio/src/coef/src_ipc4_int32_21_5_1728_5000.h b/src/audio/src/coef/src_ipc4_int32_21_5_1728_5000.h index 4a7e1c132eee..2afa32a460e6 100644 --- a/src/audio/src/coef/src_ipc4_int32_21_5_1728_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_21_5_1728_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_21_5_1728_5000_fir[420] = { +__cold_rodata static const int32_t src_int32_21_5_1728_5000_fir[420] = { 99153, 137369, -3779111, diff --git a/src/audio/src/coef/src_ipc4_int32_21_5_4535_5000.h b/src/audio/src/coef/src_ipc4_int32_21_5_4535_5000.h index 84d603013e34..16d3af828ad9 100644 --- a/src/audio/src/coef/src_ipc4_int32_21_5_4535_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_21_5_4535_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_21_5_4535_5000_fir[2184] = { +__cold_rodata static const int32_t src_int32_21_5_4535_5000_fir[2184] = { -46288, 73523, -104226, diff --git a/src/audio/src/coef/src_ipc4_int32_21_80_3968_5000.h b/src/audio/src/coef/src_ipc4_int32_21_80_3968_5000.h index b98729cef63c..ae1c817282d6 100644 --- a/src/audio/src/coef/src_ipc4_int32_21_80_3968_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_21_80_3968_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_21_80_3968_5000_fir[3360] = { +__cold_rodata static const int32_t src_int32_21_80_3968_5000_fir[3360] = { 146819, 357423, 426811, diff --git a/src/audio/src/coef/src_ipc4_int32_21_8_2160_5000.h b/src/audio/src/coef/src_ipc4_int32_21_8_2160_5000.h index 214eefcfe2d8..4ef8945f6c8c 100644 --- a/src/audio/src/coef/src_ipc4_int32_21_8_2160_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_21_8_2160_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_21_8_2160_5000_fir[420] = { +__cold_rodata static const int32_t src_int32_21_8_2160_5000_fir[420] = { -42589, 944576, -2937872, diff --git a/src/audio/src/coef/src_ipc4_int32_21_8_3239_5000.h b/src/audio/src/coef/src_ipc4_int32_21_8_3239_5000.h index 95f58c308284..789b2b69d84c 100644 --- a/src/audio/src/coef/src_ipc4_int32_21_8_3239_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_21_8_3239_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_21_8_3239_5000_fir[672] = { +__cold_rodata static const int32_t src_int32_21_8_3239_5000_fir[672] = { -35144, 303498, -963439, diff --git a/src/audio/src/coef/src_ipc4_int32_21_8_4535_5000.h b/src/audio/src/coef/src_ipc4_int32_21_8_4535_5000.h index d699e2e11073..5855a0713328 100644 --- a/src/audio/src/coef/src_ipc4_int32_21_8_4535_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_21_8_4535_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_21_8_4535_5000_fir[2436] = { +__cold_rodata static const int32_t src_int32_21_8_4535_5000_fir[2436] = { -16754, 31637, -52542, diff --git a/src/audio/src/coef/src_ipc4_int32_2_1_2268_5000.h b/src/audio/src/coef/src_ipc4_int32_2_1_2268_5000.h index 51e672306fb2..9353a547baee 100644 --- a/src/audio/src/coef/src_ipc4_int32_2_1_2268_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_2_1_2268_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_2_1_2268_5000_fir[48] = { +__cold_rodata static const int32_t src_int32_2_1_2268_5000_fir[48] = { 179901, -585106, -849108, diff --git a/src/audio/src/coef/src_ipc4_int32_2_1_2500_5000.h b/src/audio/src/coef/src_ipc4_int32_2_1_2500_5000.h index cbdac272866a..22fa881e337b 100644 --- a/src/audio/src/coef/src_ipc4_int32_2_1_2500_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_2_1_2500_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_2_1_2500_5000_fir[40] = { +__cold_rodata static const int32_t src_int32_2_1_2500_5000_fir[40] = { -879692, 4237437, -6093558, diff --git a/src/audio/src/coef/src_ipc4_int32_2_1_2721_5000.h b/src/audio/src/coef/src_ipc4_int32_2_1_2721_5000.h index 43bf0c26a0e6..1eae05ae0bad 100644 --- a/src/audio/src/coef/src_ipc4_int32_2_1_2721_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_2_1_2721_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_2_1_2721_5000_fir[48] = { +__cold_rodata static const int32_t src_int32_2_1_2721_5000_fir[48] = { -197638, 2396223, -6798383, diff --git a/src/audio/src/coef/src_ipc4_int32_2_1_3401_5000.h b/src/audio/src/coef/src_ipc4_int32_2_1_3401_5000.h index a992e4c2ec1d..503925d74262 100644 --- a/src/audio/src/coef/src_ipc4_int32_2_1_3401_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_2_1_3401_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_2_1_3401_5000_fir[72] = { +__cold_rodata static const int32_t src_int32_2_1_3401_5000_fir[72] = { 32352, 96988, -688904, diff --git a/src/audio/src/coef/src_ipc4_int32_2_1_4535_5000.h b/src/audio/src/coef/src_ipc4_int32_2_1_4535_5000.h index 73d53d77fd9f..418db95d9c0d 100644 --- a/src/audio/src/coef/src_ipc4_int32_2_1_4535_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_2_1_4535_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_2_1_4535_5000_fir[240] = { +__cold_rodata static const int32_t src_int32_2_1_4535_5000_fir[240] = { 2667, 2962, -15029, diff --git a/src/audio/src/coef/src_ipc4_int32_2_3_4535_5000.h b/src/audio/src/coef/src_ipc4_int32_2_3_4535_5000.h index 6110ceffd8e6..b4bcc5e5da9b 100644 --- a/src/audio/src/coef/src_ipc4_int32_2_3_4535_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_2_3_4535_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_2_3_4535_5000_fir[264] = { +__cold_rodata static const int32_t src_int32_2_3_4535_5000_fir[264] = { -93938, -98991, 260253, diff --git a/src/audio/src/coef/src_ipc4_int32_32_21_4535_5000.h b/src/audio/src/coef/src_ipc4_int32_32_21_4535_5000.h index 33c00bc23a5c..6e20c5d23123 100644 --- a/src/audio/src/coef/src_ipc4_int32_32_21_4535_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_32_21_4535_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_32_21_4535_5000_fir[3840] = { +__cold_rodata static const int32_t src_int32_32_21_4535_5000_fir[3840] = { -9755, 20037, -35510, diff --git a/src/audio/src/coef/src_ipc4_int32_3_1_2268_5000.h b/src/audio/src/coef/src_ipc4_int32_3_1_2268_5000.h index 87ba29c6518a..734e68049ada 100644 --- a/src/audio/src/coef/src_ipc4_int32_3_1_2268_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_3_1_2268_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_3_1_2268_5000_fir[72] = { +__cold_rodata static const int32_t src_int32_3_1_2268_5000_fir[72] = { 148487, -366788, -1294441, diff --git a/src/audio/src/coef/src_ipc4_int32_3_1_4535_5000.h b/src/audio/src/coef/src_ipc4_int32_3_1_4535_5000.h index 4074dfcfe90d..fa1e6bb57859 100644 --- a/src/audio/src/coef/src_ipc4_int32_3_1_4535_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_3_1_4535_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_3_1_4535_5000_fir[336] = { +__cold_rodata static const int32_t src_int32_3_1_4535_5000_fir[336] = { -19074, 36914, -62611, diff --git a/src/audio/src/coef/src_ipc4_int32_3_2_4535_5000.h b/src/audio/src/coef/src_ipc4_int32_3_2_4535_5000.h index 3338fc161956..e7b06f3442ac 100644 --- a/src/audio/src/coef/src_ipc4_int32_3_2_4535_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_3_2_4535_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_3_2_4535_5000_fir[324] = { +__cold_rodata static const int32_t src_int32_3_2_4535_5000_fir[324] = { -40556, 70616, -110283, diff --git a/src/audio/src/coef/src_ipc4_int32_3_4_4535_5000.h b/src/audio/src/coef/src_ipc4_int32_3_4_4535_5000.h index 31f656c1f7a8..9bcef1518a93 100644 --- a/src/audio/src/coef/src_ipc4_int32_3_4_4535_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_3_4_4535_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_3_4_4535_5000_fir[360] = { +__cold_rodata static const int32_t src_int32_3_4_4535_5000_fir[360] = { 77760, 40171, -209346, diff --git a/src/audio/src/coef/src_ipc4_int32_40_21_2381_5000.h b/src/audio/src/coef/src_ipc4_int32_40_21_2381_5000.h index a864814eff3d..b207869f84f8 100644 --- a/src/audio/src/coef/src_ipc4_int32_40_21_2381_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_40_21_2381_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_40_21_2381_5000_fir[960] = { +__cold_rodata static const int32_t src_int32_40_21_2381_5000_fir[960] = { 50137, 248031, -2186295, diff --git a/src/audio/src/coef/src_ipc4_int32_40_21_2976_5000.h b/src/audio/src/coef/src_ipc4_int32_40_21_2976_5000.h index 97bf13152ebc..514a6e4988fa 100644 --- a/src/audio/src/coef/src_ipc4_int32_40_21_2976_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_40_21_2976_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_40_21_2976_5000_fir[1120] = { +__cold_rodata static const int32_t src_int32_40_21_2976_5000_fir[1120] = { -34235, 389198, -1297100, diff --git a/src/audio/src/coef/src_ipc4_int32_40_21_3968_5000.h b/src/audio/src/coef/src_ipc4_int32_40_21_3968_5000.h index 1b184cd4c2ca..a37477890e24 100644 --- a/src/audio/src/coef/src_ipc4_int32_40_21_3968_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_40_21_3968_5000.h @@ -7,7 +7,7 @@ /** \cond GENERATED_BY_TOOLS_TUNE_SRC */ #include -static const int32_t src_int32_40_21_3968_5000_fir[2080] = { +__cold_rodata static const int32_t src_int32_40_21_3968_5000_fir[2080] = { -48704, 156750, -338114, diff --git a/src/audio/src/coef/src_ipc4_int32_40_7_2976_5000.h b/src/audio/src/coef/src_ipc4_int32_40_7_2976_5000.h index 3fb772e824d2..1a103403383a 100644 --- a/src/audio/src/coef/src_ipc4_int32_40_7_2976_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_40_7_2976_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_40_7_2976_5000_fir[1120] = { +__cold_rodata static const int32_t src_int32_40_7_2976_5000_fir[1120] = { -39160, 426217, -1390884, diff --git a/src/audio/src/coef/src_ipc4_int32_4_1_1134_5000.h b/src/audio/src/coef/src_ipc4_int32_4_1_1134_5000.h index 56e0b902bff8..417b633382a2 100644 --- a/src/audio/src/coef/src_ipc4_int32_4_1_1134_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_4_1_1134_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_4_1_1134_5000_fir[64] = { +__cold_rodata static const int32_t src_int32_4_1_1134_5000_fir[64] = { 165628, 1977250, -11171259, diff --git a/src/audio/src/coef/src_ipc4_int32_4_1_1512_5000.h b/src/audio/src/coef/src_ipc4_int32_4_1_1512_5000.h index 62a7e9b84f60..081ecf7c2738 100644 --- a/src/audio/src/coef/src_ipc4_int32_4_1_1512_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_4_1_1512_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_4_1_1512_5000_fir[64] = { +__cold_rodata static const int32_t src_int32_4_1_1512_5000_fir[64] = { -77852, 2381370, -5140518, diff --git a/src/audio/src/coef/src_ipc4_int32_4_1_2268_5000.h b/src/audio/src/coef/src_ipc4_int32_4_1_2268_5000.h index 395b0ca93b9d..2f6e13a07f73 100644 --- a/src/audio/src/coef/src_ipc4_int32_4_1_2268_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_4_1_2268_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_4_1_2268_5000_fir[80] = { +__cold_rodata static const int32_t src_int32_4_1_2268_5000_fir[80] = { -87628, 1342863, -3662077, diff --git a/src/audio/src/coef/src_ipc4_int32_4_1_4535_5000.h b/src/audio/src/coef/src_ipc4_int32_4_1_4535_5000.h index 3d53542f1d4b..b422972b5d13 100644 --- a/src/audio/src/coef/src_ipc4_int32_4_1_4535_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_4_1_4535_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_4_1_4535_5000_fir[416] = { +__cold_rodata static const int32_t src_int32_4_1_4535_5000_fir[416] = { -49159, 81297, -120482, diff --git a/src/audio/src/coef/src_ipc4_int32_4_21_1080_5000.h b/src/audio/src/coef/src_ipc4_int32_4_21_1080_5000.h index 91eb1bdd173e..b175e8efba70 100644 --- a/src/audio/src/coef/src_ipc4_int32_4_21_1080_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_4_21_1080_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_4_21_1080_5000_fir[224] = { +__cold_rodata static const int32_t src_int32_4_21_1080_5000_fir[224] = { -1944411, -1843091, 94714, diff --git a/src/audio/src/coef/src_ipc4_int32_4_21_3239_5000.h b/src/audio/src/coef/src_ipc4_int32_4_21_3239_5000.h index c97905046e66..3085264b8bc6 100644 --- a/src/audio/src/coef/src_ipc4_int32_4_21_3239_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_4_21_3239_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_4_21_3239_5000_fir[512] = { +__cold_rodata static const int32_t src_int32_4_21_3239_5000_fir[512] = { 27727, -202088, -526392, diff --git a/src/audio/src/coef/src_ipc4_int32_4_3_4535_5000.h b/src/audio/src/coef/src_ipc4_int32_4_3_4535_5000.h index cffc6982be38..752e2a801180 100644 --- a/src/audio/src/coef/src_ipc4_int32_4_3_4535_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_4_3_4535_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_4_3_4535_5000_fir[432] = { +__cold_rodata static const int32_t src_int32_4_3_4535_5000_fir[432] = { -38206, 66050, -102182, diff --git a/src/audio/src/coef/src_ipc4_int32_5_21_1728_5000.h b/src/audio/src/coef/src_ipc4_int32_5_21_1728_5000.h index c0ec2a704e62..ad1d42e2dec3 100644 --- a/src/audio/src/coef/src_ipc4_int32_5_21_1728_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_5_21_1728_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_5_21_1728_5000_fir[320] = { +__cold_rodata static const int32_t src_int32_5_21_1728_5000_fir[320] = { -201787, 180377, 1173676, diff --git a/src/audio/src/coef/src_ipc4_int32_5_21_4535_5000.h b/src/audio/src/coef/src_ipc4_int32_5_21_4535_5000.h index dd4c46f9643f..b81b50a4dbf2 100644 --- a/src/audio/src/coef/src_ipc4_int32_5_21_4535_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_5_21_4535_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_5_21_4535_5000_fir[1740] = { +__cold_rodata static const int32_t src_int32_5_21_4535_5000_fir[1740] = { -236856, -188323, -23805, diff --git a/src/audio/src/coef/src_ipc4_int32_5_7_4535_5000.h b/src/audio/src/coef/src_ipc4_int32_5_7_4535_5000.h index 9fe2321b17c8..59869dfb8c70 100644 --- a/src/audio/src/coef/src_ipc4_int32_5_7_4535_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_5_7_4535_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_5_7_4535_5000_fir[680] = { +__cold_rodata static const int32_t src_int32_5_7_4535_5000_fir[680] = { 42053, -83399, 41109, diff --git a/src/audio/src/coef/src_ipc4_int32_6_1_1134_5000.h b/src/audio/src/coef/src_ipc4_int32_6_1_1134_5000.h index ea5f80c10b6d..24afbc0c515b 100644 --- a/src/audio/src/coef/src_ipc4_int32_6_1_1134_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_6_1_1134_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_6_1_1134_5000_fir[96] = { +__cold_rodata static const int32_t src_int32_6_1_1134_5000_fir[96] = { 141841, 2137064, -10649573, diff --git a/src/audio/src/coef/src_ipc4_int32_7_3_4535_5000.h b/src/audio/src/coef/src_ipc4_int32_7_3_4535_5000.h index ec23514f712f..90b79d1c5e5f 100644 --- a/src/audio/src/coef/src_ipc4_int32_7_3_4535_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_7_3_4535_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_7_3_4535_5000_fir[728] = { +__cold_rodata static const int32_t src_int32_7_3_4535_5000_fir[728] = { -46837, 76113, -110550, diff --git a/src/audio/src/coef/src_ipc4_int32_7_5_4535_5000.h b/src/audio/src/coef/src_ipc4_int32_7_5_4535_5000.h index b7a428c009e0..b4a29de3be84 100644 --- a/src/audio/src/coef/src_ipc4_int32_7_5_4535_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_7_5_4535_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_7_5_4535_5000_fir[812] = { +__cold_rodata static const int32_t src_int32_7_5_4535_5000_fir[812] = { -13317, 26352, -45392, diff --git a/src/audio/src/coef/src_ipc4_int32_7_8_1361_5000.h b/src/audio/src/coef/src_ipc4_int32_7_8_1361_5000.h index abf0b81aee66..69fb97e904be 100644 --- a/src/audio/src/coef/src_ipc4_int32_7_8_1361_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_7_8_1361_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_7_8_1361_5000_fir[140] = { +__cold_rodata static const int32_t src_int32_7_8_1361_5000_fir[140] = { -165190, 129875, 4540182, diff --git a/src/audio/src/coef/src_ipc4_int32_7_8_2468_5000.h b/src/audio/src/coef/src_ipc4_int32_7_8_2468_5000.h index 481a61c818ff..3ddeeb8c5fd7 100644 --- a/src/audio/src/coef/src_ipc4_int32_7_8_2468_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_7_8_2468_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_7_8_2468_5000_fir[196] = { +__cold_rodata static const int32_t src_int32_7_8_2468_5000_fir[196] = { -49360, 723320, -1199972, diff --git a/src/audio/src/coef/src_ipc4_int32_7_8_2721_5000.h b/src/audio/src/coef/src_ipc4_int32_7_8_2721_5000.h index 38608a77d797..4fbb3bb9491a 100644 --- a/src/audio/src/coef/src_ipc4_int32_7_8_2721_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_7_8_2721_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_7_8_2721_5000_fir[224] = { +__cold_rodata static const int32_t src_int32_7_8_2721_5000_fir[224] = { 65478, 113869, -1097521, diff --git a/src/audio/src/coef/src_ipc4_int32_7_8_4535_5000.h b/src/audio/src/coef/src_ipc4_int32_7_8_4535_5000.h index a5c3fa7a75de..0f0724ddba80 100644 --- a/src/audio/src/coef/src_ipc4_int32_7_8_4535_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_7_8_4535_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_7_8_4535_5000_fir[840] = { +__cold_rodata static const int32_t src_int32_7_8_4535_5000_fir[840] = { -9, -30815, 77572, diff --git a/src/audio/src/coef/src_ipc4_int32_8_21_2160_5000.h b/src/audio/src/coef/src_ipc4_int32_8_21_2160_5000.h index 15c2e7623a99..c82054dd4455 100644 --- a/src/audio/src/coef/src_ipc4_int32_8_21_2160_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_8_21_2160_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_8_21_2160_5000_fir[384] = { +__cold_rodata static const int32_t src_int32_8_21_2160_5000_fir[384] = { 401690, 667023, -90063, diff --git a/src/audio/src/coef/src_ipc4_int32_8_21_3239_5000.h b/src/audio/src/coef/src_ipc4_int32_8_21_3239_5000.h index 6eefe17a67f1..c58c41ad824e 100644 --- a/src/audio/src/coef/src_ipc4_int32_8_21_3239_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_8_21_3239_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_8_21_3239_5000_fir[544] = { +__cold_rodata static const int32_t src_int32_8_21_3239_5000_fir[544] = { 214310, 401153, 58758, diff --git a/src/audio/src/coef/src_ipc4_int32_8_21_4535_5000.h b/src/audio/src/coef/src_ipc4_int32_8_21_4535_5000.h index 478d4f6ef50c..2090c8a2e429 100644 --- a/src/audio/src/coef/src_ipc4_int32_8_21_4535_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_8_21_4535_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_8_21_4535_5000_fir[1984] = { +__cold_rodata static const int32_t src_int32_8_21_4535_5000_fir[1984] = { -4705, 81658, 87540, diff --git a/src/audio/src/coef/src_ipc4_int32_8_7_1361_5000.h b/src/audio/src/coef/src_ipc4_int32_8_7_1361_5000.h index a1bb0e857e1a..01c66f61480a 100644 --- a/src/audio/src/coef/src_ipc4_int32_8_7_1361_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_8_7_1361_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_8_7_1361_5000_fir[160] = { +__cold_rodata static const int32_t src_int32_8_7_1361_5000_fir[160] = { 128091, -1061856, -689775, diff --git a/src/audio/src/coef/src_ipc4_int32_8_7_2468_5000.h b/src/audio/src/coef/src_ipc4_int32_8_7_2468_5000.h index 4ca99d9d85f8..63bb75d74877 100644 --- a/src/audio/src/coef/src_ipc4_int32_8_7_2468_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_8_7_2468_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_8_7_2468_5000_fir[192] = { +__cold_rodata static const int32_t src_int32_8_7_2468_5000_fir[192] = { 38025, 446289, -2663076, diff --git a/src/audio/src/coef/src_ipc4_int32_8_7_2721_5000.h b/src/audio/src/coef/src_ipc4_int32_8_7_2721_5000.h index e064904224ee..9529c59e8c45 100644 --- a/src/audio/src/coef/src_ipc4_int32_8_7_2721_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_8_7_2721_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_8_7_2721_5000_fir[192] = { +__cold_rodata static const int32_t src_int32_8_7_2721_5000_fir[192] = { -68651, 727228, -2055563, diff --git a/src/audio/src/coef/src_ipc4_int32_8_7_4082_5000.h b/src/audio/src/coef/src_ipc4_int32_8_7_4082_5000.h index 2092a7395e88..e4ad44917004 100644 --- a/src/audio/src/coef/src_ipc4_int32_8_7_4082_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_8_7_4082_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_8_7_4082_5000_fir[480] = { +__cold_rodata static const int32_t src_int32_8_7_4082_5000_fir[480] = { -48290, 148731, -325260, diff --git a/src/audio/src/coef/src_ipc4_int32_8_7_4535_5000.h b/src/audio/src/coef/src_ipc4_int32_8_7_4535_5000.h index 855dacb2ad9c..020e1a0df119 100644 --- a/src/audio/src/coef/src_ipc4_int32_8_7_4535_5000.h +++ b/src/audio/src/coef/src_ipc4_int32_8_7_4535_5000.h @@ -8,7 +8,7 @@ #include -static const int32_t src_int32_8_7_4535_5000_fir[896] = { +__cold_rodata static const int32_t src_int32_8_7_4535_5000_fir[896] = { -24053, 43532, -69787, diff --git a/src/audio/src/coef/src_lite_int32_10_21_3455_5000.h b/src/audio/src/coef/src_lite_int32_10_21_3455_5000.h index fbbd636a9cf7..10572f91d375 100755 --- a/src/audio/src/coef/src_lite_int32_10_21_3455_5000.h +++ b/src/audio/src/coef/src_lite_int32_10_21_3455_5000.h @@ -7,7 +7,7 @@ /** \cond GENERATED_BY_TOOLS_TUNE_SRC */ #include -const int32_t src_int32_10_21_3455_5000_fir[560] = { +__cold_rodata static const int32_t src_int32_10_21_3455_5000_fir[560] = { -656, 634708, 716335, diff --git a/src/audio/src/coef/src_lite_int32_16_21_4535_5000.h b/src/audio/src/coef/src_lite_int32_16_21_4535_5000.h index cfac60bf4581..501428a0123c 100755 --- a/src/audio/src/coef/src_lite_int32_16_21_4535_5000.h +++ b/src/audio/src/coef/src_lite_int32_16_21_4535_5000.h @@ -7,7 +7,7 @@ /** \cond GENERATED_BY_TOOLS_TUNE_SRC */ #include -const int32_t src_int32_16_21_4535_5000_fir[1728] = { +__cold_rodata static const int32_t src_int32_16_21_4535_5000_fir[1728] = { 799, 132548, -237458, diff --git a/src/audio/src/coef/src_lite_int32_1_2_4535_5000.h b/src/audio/src/coef/src_lite_int32_1_2_4535_5000.h index ca1de1ca9818..6665e93d8581 100755 --- a/src/audio/src/coef/src_lite_int32_1_2_4535_5000.h +++ b/src/audio/src/coef/src_lite_int32_1_2_4535_5000.h @@ -7,7 +7,7 @@ /** \cond GENERATED_BY_TOOLS_TUNE_SRC */ #include -const int32_t src_int32_1_2_4535_5000_fir[184] = { +__cold_rodata static const int32_t src_int32_1_2_4535_5000_fir[184] = { -224121, -49304, 317798, diff --git a/src/audio/src/coef/src_lite_int32_1_3_4535_5000.h b/src/audio/src/coef/src_lite_int32_1_3_4535_5000.h index 52e0af45edbd..7fa0f336b35b 100755 --- a/src/audio/src/coef/src_lite_int32_1_3_4535_5000.h +++ b/src/audio/src/coef/src_lite_int32_1_3_4535_5000.h @@ -7,7 +7,7 @@ /** \cond GENERATED_BY_TOOLS_TUNE_SRC */ #include -const int32_t src_int32_1_3_4535_5000_fir[236] = { +__cold_rodata static const int32_t src_int32_1_3_4535_5000_fir[236] = { -114015, 51823, 219093, diff --git a/src/audio/src/coef/src_lite_int32_20_21_4167_5000.h b/src/audio/src/coef/src_lite_int32_20_21_4167_5000.h index 2622d4bd4275..7e93144ee13e 100755 --- a/src/audio/src/coef/src_lite_int32_20_21_4167_5000.h +++ b/src/audio/src/coef/src_lite_int32_20_21_4167_5000.h @@ -7,7 +7,7 @@ /** \cond GENERATED_BY_TOOLS_TUNE_SRC */ #include -const int32_t src_int32_20_21_4167_5000_fir[1200] = { +__cold_rodata static const int32_t src_int32_20_21_4167_5000_fir[1200] = { 5356, -86589, 268036, diff --git a/src/audio/src/coef/src_lite_int32_3_2_4535_5000.h b/src/audio/src/coef/src_lite_int32_3_2_4535_5000.h index 2431175f626d..3f64214097ac 100755 --- a/src/audio/src/coef/src_lite_int32_3_2_4535_5000.h +++ b/src/audio/src/coef/src_lite_int32_3_2_4535_5000.h @@ -7,7 +7,7 @@ /** \cond GENERATED_BY_TOOLS_TUNE_SRC */ #include -const int32_t src_int32_3_2_4535_5000_fir[276] = { +__cold_rodata static const int32_t src_int32_3_2_4535_5000_fir[276] = { -98079, 150065, -205969, diff --git a/src/audio/src/coef/src_lite_int32_8_7_4535_5000.h b/src/audio/src/coef/src_lite_int32_8_7_4535_5000.h index f6596591bea9..ec4acffbd34d 100755 --- a/src/audio/src/coef/src_lite_int32_8_7_4535_5000.h +++ b/src/audio/src/coef/src_lite_int32_8_7_4535_5000.h @@ -7,7 +7,7 @@ /** \cond GENERATED_BY_TOOLS_TUNE_SRC */ #include -const int32_t src_int32_8_7_4535_5000_fir[768] = { +__cold_rodata static const int32_t src_int32_8_7_4535_5000_fir[768] = { -58861, 107730, -172832, diff --git a/src/audio/src/coef/src_small_int32_1_2_2268_5000.h b/src/audio/src/coef/src_small_int32_1_2_2268_5000.h index cb4096c449b1..c76d8df21cac 100644 --- a/src/audio/src/coef/src_small_int32_1_2_2268_5000.h +++ b/src/audio/src/coef/src_small_int32_1_2_2268_5000.h @@ -6,7 +6,7 @@ #include -static const int32_t src_int32_1_2_2268_5000_fir[40] = { +__cold_rodata static const int32_t src_int32_1_2_2268_5000_fir[40] = { -102613, 1042618, 2316615, diff --git a/src/audio/src/coef/src_small_int32_1_2_4535_5000.h b/src/audio/src/coef/src_small_int32_1_2_4535_5000.h index c6f089dc2788..73627721fb9d 100644 --- a/src/audio/src/coef/src_small_int32_1_2_4535_5000.h +++ b/src/audio/src/coef/src_small_int32_1_2_4535_5000.h @@ -6,7 +6,7 @@ #include -static const int32_t src_int32_1_2_4535_5000_fir[200] = { +__cold_rodata static const int32_t src_int32_1_2_4535_5000_fir[200] = { -79638, 47425, 131437, diff --git a/src/audio/src/coef/src_small_int32_1_3_2268_5000.h b/src/audio/src/coef/src_small_int32_1_3_2268_5000.h index 8e877cdefb91..8896da331987 100644 --- a/src/audio/src/coef/src_small_int32_1_3_2268_5000.h +++ b/src/audio/src/coef/src_small_int32_1_3_2268_5000.h @@ -6,7 +6,7 @@ #include -static const int32_t src_int32_1_3_2268_5000_fir[56] = { +__cold_rodata static const int32_t src_int32_1_3_2268_5000_fir[56] = { 636662, 1367445, 1168433, diff --git a/src/audio/src/coef/src_small_int32_1_3_4535_5000.h b/src/audio/src/coef/src_small_int32_1_3_4535_5000.h index 7f4d3d1cec38..35e64f1e36a0 100644 --- a/src/audio/src/coef/src_small_int32_1_3_4535_5000.h +++ b/src/audio/src/coef/src_small_int32_1_3_4535_5000.h @@ -6,7 +6,7 @@ #include -static const int32_t src_int32_1_3_4535_5000_fir[268] = { +__cold_rodata static const int32_t src_int32_1_3_4535_5000_fir[268] = { 53316, -3193, -78263, diff --git a/src/audio/src/coef/src_small_int32_20_21_4167_5000.h b/src/audio/src/coef/src_small_int32_20_21_4167_5000.h index 6dd79a502a30..9459d265b612 100644 --- a/src/audio/src/coef/src_small_int32_20_21_4167_5000.h +++ b/src/audio/src/coef/src_small_int32_20_21_4167_5000.h @@ -6,7 +6,7 @@ #include -static const int32_t src_int32_20_21_4167_5000_fir[1120] = { +__cold_rodata static const int32_t src_int32_20_21_4167_5000_fir[1120] = { 125886, -321269, 574508, diff --git a/src/audio/src/coef/src_small_int32_21_20_4167_5000.h b/src/audio/src/coef/src_small_int32_21_20_4167_5000.h index 5258d2df097e..0d9fd93b03c4 100644 --- a/src/audio/src/coef/src_small_int32_21_20_4167_5000.h +++ b/src/audio/src/coef/src_small_int32_21_20_4167_5000.h @@ -6,7 +6,7 @@ #include -static const int32_t src_int32_21_20_4167_5000_fir[1092] = { +__cold_rodata static const int32_t src_int32_21_20_4167_5000_fir[1092] = { -148365, 253251, -300044, diff --git a/src/audio/src/coef/src_small_int32_2_1_2268_5000.h b/src/audio/src/coef/src_small_int32_2_1_2268_5000.h index 3be189ef34f1..fd6ac5d56a52 100644 --- a/src/audio/src/coef/src_small_int32_2_1_2268_5000.h +++ b/src/audio/src/coef/src_small_int32_2_1_2268_5000.h @@ -6,7 +6,7 @@ #include -static const int32_t src_int32_2_1_2268_5000_fir[40] = { +__cold_rodata static const int32_t src_int32_2_1_2268_5000_fir[40] = { -96873, 2187025, -6715592, diff --git a/src/audio/src/coef/src_small_int32_2_1_4535_5000.h b/src/audio/src/coef/src_small_int32_2_1_4535_5000.h index cda9b6305c50..f5864de8e02c 100644 --- a/src/audio/src/coef/src_small_int32_2_1_4535_5000.h +++ b/src/audio/src/coef/src_small_int32_2_1_4535_5000.h @@ -6,7 +6,7 @@ #include -static const int32_t src_int32_2_1_4535_5000_fir[200] = { +__cold_rodata static const int32_t src_int32_2_1_4535_5000_fir[200] = { -79638, 131437, -197166, diff --git a/src/audio/src/coef/src_small_int32_2_3_4535_5000.h b/src/audio/src/coef/src_small_int32_2_3_4535_5000.h index 5047c6230b35..3775e45474e1 100644 --- a/src/audio/src/coef/src_small_int32_2_3_4535_5000.h +++ b/src/audio/src/coef/src_small_int32_2_3_4535_5000.h @@ -6,7 +6,7 @@ #include -static const int32_t src_int32_2_3_4535_5000_fir[272] = { +__cold_rodata static const int32_t src_int32_2_3_4535_5000_fir[272] = { 12509, 72682, -101869, diff --git a/src/audio/src/coef/src_small_int32_3_1_2268_5000.h b/src/audio/src/coef/src_small_int32_3_1_2268_5000.h index c570c7347d77..8bc858ad0e2a 100644 --- a/src/audio/src/coef/src_small_int32_3_1_2268_5000.h +++ b/src/audio/src/coef/src_small_int32_3_1_2268_5000.h @@ -6,7 +6,7 @@ #include -static const int32_t src_int32_3_1_2268_5000_fir[60] = { +__cold_rodata static const int32_t src_int32_3_1_2268_5000_fir[60] = { -166536, 2306339, -6050784, diff --git a/src/audio/src/coef/src_small_int32_3_1_4535_5000.h b/src/audio/src/coef/src_small_int32_3_1_4535_5000.h index 40849153f431..66f81808a02c 100644 --- a/src/audio/src/coef/src_small_int32_3_1_4535_5000.h +++ b/src/audio/src/coef/src_small_int32_3_1_4535_5000.h @@ -6,7 +6,7 @@ #include -static const int32_t src_int32_3_1_4535_5000_fir[276] = { +__cold_rodata static const int32_t src_int32_3_1_4535_5000_fir[276] = { -92545, 140559, -191923, diff --git a/src/audio/src/coef/src_small_int32_3_2_4535_5000.h b/src/audio/src/coef/src_small_int32_3_2_4535_5000.h index 0c593352a8dc..9e4f9e0915d5 100644 --- a/src/audio/src/coef/src_small_int32_3_2_4535_5000.h +++ b/src/audio/src/coef/src_small_int32_3_2_4535_5000.h @@ -6,7 +6,7 @@ #include -static const int32_t src_int32_3_2_4535_5000_fir[276] = { +__cold_rodata static const int32_t src_int32_3_2_4535_5000_fir[276] = { -92545, 140559, -191923, diff --git a/src/audio/src/coef/src_small_int32_3_4_4535_5000.h b/src/audio/src/coef/src_small_int32_3_4_4535_5000.h index 43ca5ba54e7d..6ea52fbabd3a 100644 --- a/src/audio/src/coef/src_small_int32_3_4_4535_5000.h +++ b/src/audio/src/coef/src_small_int32_3_4_4535_5000.h @@ -6,7 +6,7 @@ #include -static const int32_t src_int32_3_4_4535_5000_fir[348] = { +__cold_rodata static const int32_t src_int32_3_4_4535_5000_fir[348] = { -44332, 116220, -109098, diff --git a/src/audio/src/coef/src_small_int32_4_3_4535_5000.h b/src/audio/src/coef/src_small_int32_4_3_4535_5000.h index ebd010e2b8f4..dd81b252e4b4 100644 --- a/src/audio/src/coef/src_small_int32_4_3_4535_5000.h +++ b/src/audio/src/coef/src_small_int32_4_3_4535_5000.h @@ -6,7 +6,7 @@ #include -static const int32_t src_int32_4_3_4535_5000_fir[352] = { +__cold_rodata static const int32_t src_int32_4_3_4535_5000_fir[352] = { -92406, 134596, -172955, diff --git a/src/audio/src/coef/src_small_int32_4_5_4535_5000.h b/src/audio/src/coef/src_small_int32_4_5_4535_5000.h index cc2457a81bec..aa7e35768a9f 100644 --- a/src/audio/src/coef/src_small_int32_4_5_4535_5000.h +++ b/src/audio/src/coef/src_small_int32_4_5_4535_5000.h @@ -6,7 +6,7 @@ #include -static const int32_t src_int32_4_5_4535_5000_fir[448] = { +__cold_rodata static const int32_t src_int32_4_5_4535_5000_fir[448] = { 71197, -96779, 49471, diff --git a/src/audio/src/coef/src_small_int32_5_4_4535_5000.h b/src/audio/src/coef/src_small_int32_5_4_4535_5000.h index 74987ab7c557..afbbec4122be 100644 --- a/src/audio/src/coef/src_small_int32_5_4_4535_5000.h +++ b/src/audio/src/coef/src_small_int32_5_4_4535_5000.h @@ -6,7 +6,7 @@ #include -static const int32_t src_int32_5_4_4535_5000_fir[440] = { +__cold_rodata static const int32_t src_int32_5_4_4535_5000_fir[440] = { -83573, 123255, -160503, diff --git a/src/audio/src/coef/src_small_int32_5_6_4354_5000.h b/src/audio/src/coef/src_small_int32_5_6_4354_5000.h index 4a712463e601..414fddc38515 100644 --- a/src/audio/src/coef/src_small_int32_5_6_4354_5000.h +++ b/src/audio/src/coef/src_small_int32_5_6_4354_5000.h @@ -6,7 +6,7 @@ #include -static const int32_t src_int32_5_6_4354_5000_fir[380] = { +__cold_rodata static const int32_t src_int32_5_6_4354_5000_fir[380] = { -110765, 202615, -181213, diff --git a/src/audio/src/coef/src_small_int32_6_5_4354_5000.h b/src/audio/src/coef/src_small_int32_6_5_4354_5000.h index 8a2f6054f76c..6738c05b884e 100644 --- a/src/audio/src/coef/src_small_int32_6_5_4354_5000.h +++ b/src/audio/src/coef/src_small_int32_6_5_4354_5000.h @@ -6,7 +6,7 @@ #include -static const int32_t src_int32_6_5_4354_5000_fir[384] = { +__cold_rodata static const int32_t src_int32_6_5_4354_5000_fir[384] = { -122729, 196634, -249782, diff --git a/src/audio/src/coef/src_small_int32_7_8_4535_5000.h b/src/audio/src/coef/src_small_int32_7_8_4535_5000.h index 58a71bc48718..528da1cbe98b 100644 --- a/src/audio/src/coef/src_small_int32_7_8_4535_5000.h +++ b/src/audio/src/coef/src_small_int32_7_8_4535_5000.h @@ -6,7 +6,7 @@ #include -static const int32_t src_int32_7_8_4535_5000_fir[644] = { +__cold_rodata static const int32_t src_int32_7_8_4535_5000_fir[644] = { -1007, -96094, 242640, diff --git a/src/audio/src/coef/src_small_int32_8_7_4535_5000.h b/src/audio/src/coef/src_small_int32_8_7_4535_5000.h index 4d33f547c081..e20488b0aa6e 100644 --- a/src/audio/src/coef/src_small_int32_8_7_4535_5000.h +++ b/src/audio/src/coef/src_small_int32_8_7_4535_5000.h @@ -6,7 +6,7 @@ #include -static const int32_t src_int32_8_7_4535_5000_fir[640] = { +__cold_rodata static const int32_t src_int32_8_7_4535_5000_fir[640] = { -93442, 125750, -138530, diff --git a/src/audio/src/coef/src_std_int32_10_21_4535_5000.h b/src/audio/src/coef/src_std_int32_10_21_4535_5000.h index 44a207ef5ecd..1fe75ffcfc60 100644 --- a/src/audio/src/coef/src_std_int32_10_21_4535_5000.h +++ b/src/audio/src/coef/src_std_int32_10_21_4535_5000.h @@ -7,7 +7,7 @@ #include -static const int32_t src_int32_10_21_4535_5000_fir[1720] = { +__cold_rodata static const int32_t src_int32_10_21_4535_5000_fir[1720] = { 64820, 140936, -51986, diff --git a/src/audio/src/coef/src_std_int32_1_2_2268_5000.h b/src/audio/src/coef/src_std_int32_1_2_2268_5000.h index c27402466cff..6da68b7325d3 100644 --- a/src/audio/src/coef/src_std_int32_1_2_2268_5000.h +++ b/src/audio/src/coef/src_std_int32_1_2_2268_5000.h @@ -7,7 +7,7 @@ #include -static const int32_t src_int32_1_2_2268_5000_fir[40] = { +__cold_rodata static const int32_t src_int32_1_2_2268_5000_fir[40] = { -102613, 1042618, 2316615, diff --git a/src/audio/src/coef/src_std_int32_1_2_4535_5000.h b/src/audio/src/coef/src_std_int32_1_2_4535_5000.h index 64d3f1641c7e..83fcad96732e 100644 --- a/src/audio/src/coef/src_std_int32_1_2_4535_5000.h +++ b/src/audio/src/coef/src_std_int32_1_2_4535_5000.h @@ -7,7 +7,7 @@ #include -static const int32_t src_int32_1_2_4535_5000_fir[200] = { +__cold_rodata static const int32_t src_int32_1_2_4535_5000_fir[200] = { -84357, 50235, 139225, diff --git a/src/audio/src/coef/src_std_int32_1_3_2268_5000.h b/src/audio/src/coef/src_std_int32_1_3_2268_5000.h index 41f416116967..0119326d60d4 100644 --- a/src/audio/src/coef/src_std_int32_1_3_2268_5000.h +++ b/src/audio/src/coef/src_std_int32_1_3_2268_5000.h @@ -7,7 +7,7 @@ #include -static const int32_t src_int32_1_3_2268_5000_fir[56] = { +__cold_rodata static const int32_t src_int32_1_3_2268_5000_fir[56] = { 636662, 1367445, 1168433, diff --git a/src/audio/src/coef/src_std_int32_1_3_4535_5000.h b/src/audio/src/coef/src_std_int32_1_3_4535_5000.h index 580ddebacddd..4f432a4c48a6 100644 --- a/src/audio/src/coef/src_std_int32_1_3_4535_5000.h +++ b/src/audio/src/coef/src_std_int32_1_3_4535_5000.h @@ -7,7 +7,7 @@ #include -static const int32_t src_int32_1_3_4535_5000_fir[268] = { +__cold_rodata static const int32_t src_int32_1_3_4535_5000_fir[268] = { 53316, -3193, -78263, diff --git a/src/audio/src/coef/src_std_int32_20_21_4167_5000.h b/src/audio/src/coef/src_std_int32_20_21_4167_5000.h index a26101ddd7bc..a0dae03d0d09 100644 --- a/src/audio/src/coef/src_std_int32_20_21_4167_5000.h +++ b/src/audio/src/coef/src_std_int32_20_21_4167_5000.h @@ -7,7 +7,7 @@ #include -static const int32_t src_int32_20_21_4167_5000_fir[1120] = { +__cold_rodata static const int32_t src_int32_20_21_4167_5000_fir[1120] = { 125886, -321269, 574508, diff --git a/src/audio/src/coef/src_std_int32_20_7_2976_5000.h b/src/audio/src/coef/src_std_int32_20_7_2976_5000.h index 9bb8d4879e69..85b8be57e692 100644 --- a/src/audio/src/coef/src_std_int32_20_7_2976_5000.h +++ b/src/audio/src/coef/src_std_int32_20_7_2976_5000.h @@ -7,7 +7,7 @@ #include -static const int32_t src_int32_20_7_2976_5000_fir[480] = { +__cold_rodata static const int32_t src_int32_20_7_2976_5000_fir[480] = { -256723, 1344746, -2486660, diff --git a/src/audio/src/coef/src_std_int32_21_20_4167_5000.h b/src/audio/src/coef/src_std_int32_21_20_4167_5000.h index 18aca9ba361d..4f72a75d68a2 100644 --- a/src/audio/src/coef/src_std_int32_21_20_4167_5000.h +++ b/src/audio/src/coef/src_std_int32_21_20_4167_5000.h @@ -7,7 +7,7 @@ #include -static const int32_t src_int32_21_20_4167_5000_fir[1092] = { +__cold_rodata static const int32_t src_int32_21_20_4167_5000_fir[1092] = { -148365, 253251, -300044, diff --git a/src/audio/src/coef/src_std_int32_21_40_3968_5000.h b/src/audio/src/coef/src_std_int32_21_40_3968_5000.h index 388d4216ce90..ac453af42104 100644 --- a/src/audio/src/coef/src_std_int32_21_40_3968_5000.h +++ b/src/audio/src/coef/src_std_int32_21_40_3968_5000.h @@ -7,7 +7,7 @@ #include -static const int32_t src_int32_21_40_3968_5000_fir[1596] = { +__cold_rodata static const int32_t src_int32_21_40_3968_5000_fir[1596] = { -210430, -287852, 472564, diff --git a/src/audio/src/coef/src_std_int32_21_80_3968_5000.h b/src/audio/src/coef/src_std_int32_21_80_3968_5000.h index fea250e377c6..d42d08134595 100644 --- a/src/audio/src/coef/src_std_int32_21_80_3968_5000.h +++ b/src/audio/src/coef/src_std_int32_21_80_3968_5000.h @@ -7,7 +7,7 @@ #include -static const int32_t src_int32_21_80_3968_5000_fir[3108] = { +__cold_rodata static const int32_t src_int32_21_80_3968_5000_fir[3108] = { -174020, 2072, 309190, diff --git a/src/audio/src/coef/src_std_int32_2_1_2268_5000.h b/src/audio/src/coef/src_std_int32_2_1_2268_5000.h index 953e65c155ae..f2fda6e7a712 100644 --- a/src/audio/src/coef/src_std_int32_2_1_2268_5000.h +++ b/src/audio/src/coef/src_std_int32_2_1_2268_5000.h @@ -7,7 +7,7 @@ #include -static const int32_t src_int32_2_1_2268_5000_fir[40] = { +__cold_rodata static const int32_t src_int32_2_1_2268_5000_fir[40] = { -96873, 2187025, -6715592, diff --git a/src/audio/src/coef/src_std_int32_2_1_4535_5000.h b/src/audio/src/coef/src_std_int32_2_1_4535_5000.h index 333d603e97bb..5ba7f5d860dd 100644 --- a/src/audio/src/coef/src_std_int32_2_1_4535_5000.h +++ b/src/audio/src/coef/src_std_int32_2_1_4535_5000.h @@ -7,7 +7,7 @@ #include -static const int32_t src_int32_2_1_4535_5000_fir[200] = { +__cold_rodata static const int32_t src_int32_2_1_4535_5000_fir[200] = { -79638, 131437, -197166, diff --git a/src/audio/src/coef/src_std_int32_2_3_4535_5000.h b/src/audio/src/coef/src_std_int32_2_3_4535_5000.h index 7863ebe826cf..1a5af78d38fe 100644 --- a/src/audio/src/coef/src_std_int32_2_3_4535_5000.h +++ b/src/audio/src/coef/src_std_int32_2_3_4535_5000.h @@ -7,7 +7,7 @@ #include -static const int32_t src_int32_2_3_4535_5000_fir[272] = { +__cold_rodata static const int32_t src_int32_2_3_4535_5000_fir[272] = { 12509, 72682, -101869, diff --git a/src/audio/src/coef/src_std_int32_32_21_4535_5000.h b/src/audio/src/coef/src_std_int32_32_21_4535_5000.h index b20976b16dea..8bd7522a8320 100644 --- a/src/audio/src/coef/src_std_int32_32_21_4535_5000.h +++ b/src/audio/src/coef/src_std_int32_32_21_4535_5000.h @@ -7,7 +7,7 @@ #include -static const int32_t src_int32_32_21_4535_5000_fir[2816] = { +__cold_rodata static const int32_t src_int32_32_21_4535_5000_fir[2816] = { -70924, 93303, -103450, diff --git a/src/audio/src/coef/src_std_int32_3_1_2268_5000.h b/src/audio/src/coef/src_std_int32_3_1_2268_5000.h index bb4ef7d82f07..34e0e2bd2253 100644 --- a/src/audio/src/coef/src_std_int32_3_1_2268_5000.h +++ b/src/audio/src/coef/src_std_int32_3_1_2268_5000.h @@ -7,7 +7,7 @@ #include -static const int32_t src_int32_3_1_2268_5000_fir[60] = { +__cold_rodata static const int32_t src_int32_3_1_2268_5000_fir[60] = { -166536, 2306339, -6050784, diff --git a/src/audio/src/coef/src_std_int32_3_1_4535_5000.h b/src/audio/src/coef/src_std_int32_3_1_4535_5000.h index db312c9c80ae..e212da23624b 100644 --- a/src/audio/src/coef/src_std_int32_3_1_4535_5000.h +++ b/src/audio/src/coef/src_std_int32_3_1_4535_5000.h @@ -7,7 +7,7 @@ #include -static const int32_t src_int32_3_1_4535_5000_fir[276] = { +__cold_rodata static const int32_t src_int32_3_1_4535_5000_fir[276] = { -92545, 140559, -191923, diff --git a/src/audio/src/coef/src_std_int32_3_2_4535_5000.h b/src/audio/src/coef/src_std_int32_3_2_4535_5000.h index 8d30cb8efb77..69e7978b6af0 100644 --- a/src/audio/src/coef/src_std_int32_3_2_4535_5000.h +++ b/src/audio/src/coef/src_std_int32_3_2_4535_5000.h @@ -7,7 +7,7 @@ #include -static const int32_t src_int32_3_2_4535_5000_fir[276] = { +__cold_rodata static const int32_t src_int32_3_2_4535_5000_fir[276] = { -92545, 140559, -191923, diff --git a/src/audio/src/coef/src_std_int32_3_4_4535_5000.h b/src/audio/src/coef/src_std_int32_3_4_4535_5000.h index c679a1f2fe5b..685fdfd7c706 100644 --- a/src/audio/src/coef/src_std_int32_3_4_4535_5000.h +++ b/src/audio/src/coef/src_std_int32_3_4_4535_5000.h @@ -7,7 +7,7 @@ #include -static const int32_t src_int32_3_4_4535_5000_fir[348] = { +__cold_rodata static const int32_t src_int32_3_4_4535_5000_fir[348] = { -44332, 116220, -109098, diff --git a/src/audio/src/coef/src_std_int32_40_21_3968_5000.h b/src/audio/src/coef/src_std_int32_40_21_3968_5000.h index 6a2da0181623..46a7dbb012a1 100644 --- a/src/audio/src/coef/src_std_int32_40_21_3968_5000.h +++ b/src/audio/src/coef/src_std_int32_40_21_3968_5000.h @@ -7,7 +7,7 @@ #include -static const int32_t src_int32_40_21_3968_5000_fir[1600] = { +__cold_rodata static const int32_t src_int32_40_21_3968_5000_fir[1600] = { -168855, 272170, -146895, diff --git a/src/audio/src/coef/src_std_int32_4_3_4535_5000.h b/src/audio/src/coef/src_std_int32_4_3_4535_5000.h index ccef7fc03ad8..8476fccf5982 100644 --- a/src/audio/src/coef/src_std_int32_4_3_4535_5000.h +++ b/src/audio/src/coef/src_std_int32_4_3_4535_5000.h @@ -7,7 +7,7 @@ #include -static const int32_t src_int32_4_3_4535_5000_fir[352] = { +__cold_rodata static const int32_t src_int32_4_3_4535_5000_fir[352] = { -92406, 134596, -172955, diff --git a/src/audio/src/coef/src_std_int32_4_5_4535_5000.h b/src/audio/src/coef/src_std_int32_4_5_4535_5000.h index 4bafe75c987f..148660ded07b 100644 --- a/src/audio/src/coef/src_std_int32_4_5_4535_5000.h +++ b/src/audio/src/coef/src_std_int32_4_5_4535_5000.h @@ -7,7 +7,7 @@ #include -static const int32_t src_int32_4_5_4535_5000_fir[448] = { +__cold_rodata static const int32_t src_int32_4_5_4535_5000_fir[448] = { 71197, -96779, 49471, diff --git a/src/audio/src/coef/src_std_int32_5_4_4535_5000.h b/src/audio/src/coef/src_std_int32_5_4_4535_5000.h index 4e381a8d69c9..b3416487732b 100644 --- a/src/audio/src/coef/src_std_int32_5_4_4535_5000.h +++ b/src/audio/src/coef/src_std_int32_5_4_4535_5000.h @@ -7,7 +7,7 @@ #include -static const int32_t src_int32_5_4_4535_5000_fir[440] = { +__cold_rodata static const int32_t src_int32_5_4_4535_5000_fir[440] = { -83573, 123255, -160503, diff --git a/src/audio/src/coef/src_std_int32_5_6_4354_5000.h b/src/audio/src/coef/src_std_int32_5_6_4354_5000.h index 2b103cae3e0c..b861063c4671 100644 --- a/src/audio/src/coef/src_std_int32_5_6_4354_5000.h +++ b/src/audio/src/coef/src_std_int32_5_6_4354_5000.h @@ -7,7 +7,7 @@ #include -static const int32_t src_int32_5_6_4354_5000_fir[380] = { +__cold_rodata static const int32_t src_int32_5_6_4354_5000_fir[380] = { -110765, 202615, -181213, diff --git a/src/audio/src/coef/src_std_int32_5_7_4535_5000.h b/src/audio/src/coef/src_std_int32_5_7_4535_5000.h index 23c470dc595f..44cfdaf8cf42 100644 --- a/src/audio/src/coef/src_std_int32_5_7_4535_5000.h +++ b/src/audio/src/coef/src_std_int32_5_7_4535_5000.h @@ -7,7 +7,7 @@ #include -static const int32_t src_int32_5_7_4535_5000_fir[580] = { +__cold_rodata static const int32_t src_int32_5_7_4535_5000_fir[580] = { -38462, 102037, -72148, diff --git a/src/audio/src/coef/src_std_int32_6_5_4354_5000.h b/src/audio/src/coef/src_std_int32_6_5_4354_5000.h index 6ebcb24f63fa..4d61ac9e77c1 100644 --- a/src/audio/src/coef/src_std_int32_6_5_4354_5000.h +++ b/src/audio/src/coef/src_std_int32_6_5_4354_5000.h @@ -7,7 +7,7 @@ #include -static const int32_t src_int32_6_5_4354_5000_fir[384] = { +__cold_rodata static const int32_t src_int32_6_5_4354_5000_fir[384] = { -122729, 196634, -249782, diff --git a/src/audio/src/coef/src_std_int32_7_8_4535_5000.h b/src/audio/src/coef/src_std_int32_7_8_4535_5000.h index 174e6125864e..01f3b2b2325e 100644 --- a/src/audio/src/coef/src_std_int32_7_8_4535_5000.h +++ b/src/audio/src/coef/src_std_int32_7_8_4535_5000.h @@ -7,7 +7,7 @@ #include -static const int32_t src_int32_7_8_4535_5000_fir[644] = { +__cold_rodata static const int32_t src_int32_7_8_4535_5000_fir[644] = { -1007, -96094, 242640, diff --git a/src/audio/src/coef/src_std_int32_8_21_3239_5000.h b/src/audio/src/coef/src_std_int32_8_21_3239_5000.h index aaa085d2ae54..4441d148cc71 100644 --- a/src/audio/src/coef/src_std_int32_8_21_3239_5000.h +++ b/src/audio/src/coef/src_std_int32_8_21_3239_5000.h @@ -7,7 +7,7 @@ #include -static const int32_t src_int32_8_21_3239_5000_fir[480] = { +__cold_rodata static const int32_t src_int32_8_21_3239_5000_fir[480] = { -149226, 295321, 1071448, diff --git a/src/audio/src/coef/src_std_int32_8_7_2468_5000.h b/src/audio/src/coef/src_std_int32_8_7_2468_5000.h index f8d5dc57c3eb..e4dcf0f08514 100644 --- a/src/audio/src/coef/src_std_int32_8_7_2468_5000.h +++ b/src/audio/src/coef/src_std_int32_8_7_2468_5000.h @@ -7,7 +7,7 @@ #include -static const int32_t src_int32_8_7_2468_5000_fir[160] = { +__cold_rodata static const int32_t src_int32_8_7_2468_5000_fir[160] = { -422312, 2368615, -2932237, diff --git a/src/audio/src/coef/src_std_int32_8_7_4535_5000.h b/src/audio/src/coef/src_std_int32_8_7_4535_5000.h index 8bb33c1bccd8..f6ddb96c7a0a 100644 --- a/src/audio/src/coef/src_std_int32_8_7_4535_5000.h +++ b/src/audio/src/coef/src_std_int32_8_7_4535_5000.h @@ -7,7 +7,7 @@ #include -static const int32_t src_int32_8_7_4535_5000_fir[640] = { +__cold_rodata static const int32_t src_int32_8_7_4535_5000_fir[640] = { -93442, 125750, -138530, diff --git a/src/audio/src/coef/src_tiny_int16_1_2_1814_5000.h b/src/audio/src/coef/src_tiny_int16_1_2_1814_5000.h index b9b2402ab243..a8fde1f7561a 100644 --- a/src/audio/src/coef/src_tiny_int16_1_2_1814_5000.h +++ b/src/audio/src/coef/src_tiny_int16_1_2_1814_5000.h @@ -6,7 +6,7 @@ #include -static const int16_t src_int16_1_2_1814_5000_fir[32] = { +__cold_rodata static const int16_t src_int16_1_2_1814_5000_fir[32] = { -7, 7, 63, diff --git a/src/audio/src/coef/src_tiny_int16_1_3_1814_5000.h b/src/audio/src/coef/src_tiny_int16_1_3_1814_5000.h index 76634b12c1d6..ef70aaa690d5 100644 --- a/src/audio/src/coef/src_tiny_int16_1_3_1814_5000.h +++ b/src/audio/src/coef/src_tiny_int16_1_3_1814_5000.h @@ -7,7 +7,7 @@ #include -static const int16_t src_int16_1_3_1814_5000_fir[48] = { +__cold_rodata static const int16_t src_int16_1_3_1814_5000_fir[48] = { -9, -7, 22, diff --git a/src/audio/src/coef/src_tiny_int16_1_6_1814_5000.h b/src/audio/src/coef/src_tiny_int16_1_6_1814_5000.h index 96dbf415df45..672c44a75c27 100644 --- a/src/audio/src/coef/src_tiny_int16_1_6_1814_5000.h +++ b/src/audio/src/coef/src_tiny_int16_1_6_1814_5000.h @@ -7,7 +7,7 @@ #include -static const int16_t src_int16_1_6_1814_5000_fir[92] = { +__cold_rodata static const int16_t src_int16_1_6_1814_5000_fir[92] = { -4, 0, 10, diff --git a/src/audio/src/coef/src_tiny_int16_20_21_1667_5000.h b/src/audio/src/coef/src_tiny_int16_20_21_1667_5000.h index 473fd0736638..923612f9d120 100644 --- a/src/audio/src/coef/src_tiny_int16_20_21_1667_5000.h +++ b/src/audio/src/coef/src_tiny_int16_20_21_1667_5000.h @@ -7,7 +7,7 @@ #include -static const int16_t src_int16_20_21_1667_5000_fir[320] = { +__cold_rodata static const int16_t src_int16_20_21_1667_5000_fir[320] = { 3, 49, -174, diff --git a/src/audio/src/coef/src_tiny_int16_21_20_1667_5000.h b/src/audio/src/coef/src_tiny_int16_21_20_1667_5000.h index dc0a32fc4388..21a83348dddc 100644 --- a/src/audio/src/coef/src_tiny_int16_21_20_1667_5000.h +++ b/src/audio/src/coef/src_tiny_int16_21_20_1667_5000.h @@ -7,7 +7,7 @@ #include -static const int16_t src_int16_21_20_1667_5000_fir[336] = { +__cold_rodata static const int16_t src_int16_21_20_1667_5000_fir[336] = { -4, 61, -87, diff --git a/src/audio/src/coef/src_tiny_int16_24_25_1814_5000.h b/src/audio/src/coef/src_tiny_int16_24_25_1814_5000.h index ec618ce32b0d..e68f37e9376c 100644 --- a/src/audio/src/coef/src_tiny_int16_24_25_1814_5000.h +++ b/src/audio/src/coef/src_tiny_int16_24_25_1814_5000.h @@ -7,7 +7,7 @@ #include -static const int16_t src_int16_24_25_1814_5000_fir[480] = { +__cold_rodata static const int16_t src_int16_24_25_1814_5000_fir[480] = { 5, -32, -12, diff --git a/src/audio/src/coef/src_tiny_int16_25_24_1814_5000.h b/src/audio/src/coef/src_tiny_int16_25_24_1814_5000.h index 3d2774f423f7..fab00bf21661 100644 --- a/src/audio/src/coef/src_tiny_int16_25_24_1814_5000.h +++ b/src/audio/src/coef/src_tiny_int16_25_24_1814_5000.h @@ -7,7 +7,7 @@ #include -static const int16_t src_int16_25_24_1814_5000_fir[400] = { +__cold_rodata static const int16_t src_int16_25_24_1814_5000_fir[400] = { -6, 60, -44, diff --git a/src/audio/src/coef/src_tiny_int16_2_1_1814_5000.h b/src/audio/src/coef/src_tiny_int16_2_1_1814_5000.h index 73aca616e212..79838f8bd89d 100644 --- a/src/audio/src/coef/src_tiny_int16_2_1_1814_5000.h +++ b/src/audio/src/coef/src_tiny_int16_2_1_1814_5000.h @@ -6,7 +6,7 @@ #include -static const int16_t src_int16_2_1_1814_5000_fir[32] = { +__cold_rodata static const int16_t src_int16_2_1_1814_5000_fir[32] = { -7, 63, -62, diff --git a/src/audio/src/coef/src_tiny_int16_2_3_1814_5000.h b/src/audio/src/coef/src_tiny_int16_2_3_1814_5000.h index eaf5c779b880..c38daaf5f46b 100644 --- a/src/audio/src/coef/src_tiny_int16_2_3_1814_5000.h +++ b/src/audio/src/coef/src_tiny_int16_2_3_1814_5000.h @@ -7,7 +7,7 @@ #include -static const int16_t src_int16_2_3_1814_5000_fir[48] = { +__cold_rodata static const int16_t src_int16_2_3_1814_5000_fir[48] = { -9, 21, 126, diff --git a/src/audio/src/coef/src_tiny_int16_3_1_1814_5000.h b/src/audio/src/coef/src_tiny_int16_3_1_1814_5000.h index 2dac6f53cff0..abf1a6cd7126 100644 --- a/src/audio/src/coef/src_tiny_int16_3_1_1814_5000.h +++ b/src/audio/src/coef/src_tiny_int16_3_1_1814_5000.h @@ -7,7 +7,7 @@ #include -static const int16_t src_int16_3_1_1814_5000_fir[48] = { +__cold_rodata static const int16_t src_int16_3_1_1814_5000_fir[48] = { -7, 58, -28, diff --git a/src/audio/src/coef/src_tiny_int16_3_2_1814_5000.h b/src/audio/src/coef/src_tiny_int16_3_2_1814_5000.h index e46edb8d7f31..41bc4fd41cf7 100644 --- a/src/audio/src/coef/src_tiny_int16_3_2_1814_5000.h +++ b/src/audio/src/coef/src_tiny_int16_3_2_1814_5000.h @@ -7,7 +7,7 @@ #include -static const int16_t src_int16_3_2_1814_5000_fir[48] = { +__cold_rodata static const int16_t src_int16_3_2_1814_5000_fir[48] = { -6, 58, -28, diff --git a/src/audio/src/coef/src_tiny_int16_6_1_1814_5000.h b/src/audio/src/coef/src_tiny_int16_6_1_1814_5000.h index b19982f98dca..204c4b05c338 100644 --- a/src/audio/src/coef/src_tiny_int16_6_1_1814_5000.h +++ b/src/audio/src/coef/src_tiny_int16_6_1_1814_5000.h @@ -7,7 +7,7 @@ #include -static const int16_t src_int16_6_1_1814_5000_fir[96] = { +__cold_rodata static const int16_t src_int16_6_1_1814_5000_fir[96] = { -7, 53, -2, diff --git a/src/audio/src/coef/src_tiny_int16_7_8_1814_5000.h b/src/audio/src/coef/src_tiny_int16_7_8_1814_5000.h index b1ed9c100f9b..9193c1005088 100644 --- a/src/audio/src/coef/src_tiny_int16_7_8_1814_5000.h +++ b/src/audio/src/coef/src_tiny_int16_7_8_1814_5000.h @@ -7,7 +7,7 @@ #include -static const int16_t src_int16_7_8_1814_5000_fir[140] = { +__cold_rodata static const int16_t src_int16_7_8_1814_5000_fir[140] = { -3, -28, 94, diff --git a/src/audio/src/coef/src_tiny_int16_8_7_1814_5000.h b/src/audio/src/coef/src_tiny_int16_8_7_1814_5000.h index 4c6dba28deda..c7d2c94d67dd 100644 --- a/src/audio/src/coef/src_tiny_int16_8_7_1814_5000.h +++ b/src/audio/src/coef/src_tiny_int16_8_7_1814_5000.h @@ -7,7 +7,7 @@ #include -static const int16_t src_int16_8_7_1814_5000_fir[128] = { +__cold_rodata static const int16_t src_int16_8_7_1814_5000_fir[128] = { -7, 55, -1, diff --git a/src/audio/src/src.c b/src/audio/src/src.c index d75b1eb53822..ce3d00ba2399 100644 --- a/src/audio/src/src.c +++ b/src/audio/src/src.c @@ -10,6 +10,7 @@ */ #include +#include #include "src_common.h" #include "src_config.h" diff --git a/src/audio/src/src_common.c b/src/audio/src/src_common.c index 3a8fa8541bfa..a798a4cf59e8 100644 --- a/src/audio/src/src_common.c +++ b/src/audio/src/src_common.c @@ -644,7 +644,7 @@ int src_reset(struct processing_module *mod) return 0; } -int src_free(struct processing_module *mod) +__cold int src_free(struct processing_module *mod) { struct comp_data *cd = module_get_private_data(mod); diff --git a/src/audio/src/src_ipc4.c b/src/audio/src/src_ipc4.c index c1244801d1c1..25be394a6d49 100644 --- a/src/audio/src/src_ipc4.c +++ b/src/audio/src/src_ipc4.c @@ -179,7 +179,7 @@ int src_prepare_general(struct processing_module *mod, return ret; } -int src_init(struct processing_module *mod) +__cold int src_init(struct processing_module *mod) { struct module_data *md = &mod->priv; struct module_config *cfg = &md->cfg; From 2e6ea6292c09f2aa6a03e646a7e6fcee03db1957 Mon Sep 17 00:00:00 2001 From: Jyri Sarha Date: Fri, 13 Dec 2024 00:56:33 +0200 Subject: [PATCH 3/6] lib: fast-get: Implement fast_get() and fast_put() functions Implement fast_get() and fast_put() functions. The purpose of these functions is to maintain shared SRAM copies of data stored in DRAM. fast_get() First checks if there is already an SRAM copy of the same DRAM chunk. If there isn't reserve an SRAM chunk of the same size and copy the contents there, store the both pointers, size and reference count to in an internal data structure, and return the SRAM pointer. If there is, return the pointer to the existing SRAM copy and increase the reference count. fast_put() Look up the internal data record based on the SRAM address and decrement reference count. Free the SRAM chunk and the data record if reference count reaches zero, Signed-off-by: Jyri Sarha --- Kconfig.sof | 11 +++ src/include/sof/lib/fast-get.h | 16 +++ zephyr/CMakeLists.txt | 2 + zephyr/lib/fast-get.c | 171 +++++++++++++++++++++++++++++++++ 4 files changed, 200 insertions(+) create mode 100644 src/include/sof/lib/fast-get.h create mode 100644 zephyr/lib/fast-get.c diff --git a/Kconfig.sof b/Kconfig.sof index 77dbe3de34fe..be5bdc2f35b0 100644 --- a/Kconfig.sof +++ b/Kconfig.sof @@ -130,6 +130,17 @@ config COLD_STORE_EXECUTE_DRAM option to enable this feature to save SRAM and to speed up SRAM copying of performance-critical data and code. +config FAST_GET + bool "Enable simple refcounting DRAM data copier" + default n + help + Enable simple refcounting DRAM data copier for copying processing + module data from DRAM to SRAM when the data is needed and freeing + the SRAM when the data is not needed anymore. If multiple module + instances need the same chunk the same copy is used with reference + counting. Source is src/lib/fast-get.c. The option should be selected + on platforms, where __cold_rodata is supported. + rsource "src/Kconfig" # See zephyr/modules/Kconfig diff --git a/src/include/sof/lib/fast-get.h b/src/include/sof/lib/fast-get.h new file mode 100644 index 000000000000..ffbac19cf1b8 --- /dev/null +++ b/src/include/sof/lib/fast-get.h @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * + * Copyright(c) 2024 Intel Corporation. All rights reserved. + * + * Author: Jyri Sarha + */ + +#ifndef __SOF_LIB_FAST_GET_H__ +#define __SOF_LIB_FAST_GET_H__ + +#include + +const void *fast_get(const void * const dram_ptr, size_t size); +void fast_put(const void *sram_ptr); + +#endif /* __SOF_LIB_FAST_GET_H__ */ diff --git a/zephyr/CMakeLists.txt b/zephyr/CMakeLists.txt index e3e6534bcb88..ed4f7e904d2e 100644 --- a/zephyr/CMakeLists.txt +++ b/zephyr/CMakeLists.txt @@ -637,6 +637,8 @@ zephyr_library_sources_ifdef(CONFIG_TRACE zephyr_library_sources_ifdef(CONFIG_LOG_BACKEND_SOF_PROBE ${SOF_SRC_PATH}/logging/log_backend_probe.c) +zephyr_library_sources_ifdef(CONFIG_FAST_GET lib/fast-get.c) + # Optional SOF sources - depends on Kconfig - WIP if(CONFIG_IPC_MAJOR_3) diff --git a/zephyr/lib/fast-get.c b/zephyr/lib/fast-get.c new file mode 100644 index 000000000000..245e078ac77a --- /dev/null +++ b/zephyr/lib/fast-get.c @@ -0,0 +1,171 @@ +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright(c) 2024 Intel Corporation. All rights reserved. +// +// Author: Jyri Sarha + +#include +#include +#include + +#include +#include +#include +#include +#include + +struct sof_fast_get_entry { + const void *dram_ptr; + void *sram_ptr; + size_t size; + unsigned int refcount; +}; + +struct sof_fast_get_data { + struct k_spinlock lock; + size_t num_entries; + struct sof_fast_get_entry *entries; +}; + +static struct sof_fast_get_data fast_get_data = { + .num_entries = 0, + .entries = NULL, +}; + +LOG_MODULE_REGISTER(fast_get, CONFIG_SOF_LOG_LEVEL); + +static int fast_get_realloc(struct sof_fast_get_data *data) +{ + struct sof_fast_get_entry *entries; + + if (!data->num_entries) { + /* + * Allocate 8 entries for the beginning. Currently we only use + * 2 entries at most, so this should provide a reasonable first + * allocation. + */ + const unsigned int n_entries = 8; + + data->entries = rzalloc(SOF_MEM_ZONE_RUNTIME, 0, SOF_MEM_CAPS_RAM, + n_entries * sizeof(*entries)); + if (!data->entries) + return -ENOMEM; + data->num_entries = n_entries; + return 0; + } + + entries = rzalloc(SOF_MEM_ZONE_RUNTIME, 0, SOF_MEM_CAPS_RAM, + 2 * data->num_entries * sizeof(*entries)); + if (!entries) + return -ENOMEM; + + memcpy_s(entries, 2 * data->num_entries * sizeof(*entries), data->entries, + data->num_entries * sizeof(*entries)); + rfree(data->entries); + data->entries = entries; + data->num_entries = 2 * data->num_entries; + return 0; +} + +static struct sof_fast_get_entry *fast_get_find_entry(struct sof_fast_get_data *data, + const void *dram_ptr) +{ + int i; + + for (i = 0; i < data->num_entries; i++) { + if (data->entries[i].dram_ptr == dram_ptr) + return &data->entries[i]; + } + + for (i = 0; i < data->num_entries; i++) { + if (data->entries[i].dram_ptr == NULL) + return &data->entries[i]; + } + + return NULL; +} + +const void *fast_get(const void *dram_ptr, size_t size) +{ + struct sof_fast_get_data *data = &fast_get_data; + struct sof_fast_get_entry *entry; + k_spinlock_key_t key; + void *ret; + + key = k_spin_lock(&data->lock); + do { + entry = fast_get_find_entry(data, dram_ptr); + if (!entry) { + if (fast_get_realloc(data)) { + ret = NULL; + goto out; + } + } + } while (!entry); + + if (entry->sram_ptr) { + if (entry->size != size || entry->dram_ptr != dram_ptr) { + tr_err(fast_get, "size %u != %u or ptr %p != %p mismatch", + entry->size, size, entry->dram_ptr, dram_ptr); + ret = NULL; + goto out; + } + + ret = entry->sram_ptr; + entry->refcount++; + goto out; + } + + ret = rmalloc(SOF_MEM_ZONE_RUNTIME, 0, SOF_MEM_CAPS_RAM, size); + if (!ret) + goto out; + entry->size = size; + entry->sram_ptr = ret; + memcpy_s(entry->sram_ptr, entry->size, dram_ptr, size); + entry->dram_ptr = dram_ptr; + entry->refcount = 1; +out: + k_spin_unlock(&data->lock, key); + tr_dbg(fast_get, "get %p, %p, size %u, refcnt %u", dram_ptr, ret, size, + entry ? entry->refcount : 0); + + return ret; +} +EXPORT_SYMBOL(fast_get); + +static struct sof_fast_get_entry *fast_put_find_entry(struct sof_fast_get_data *data, + const void *sram_ptr) +{ + int i; + + for (i = 0; i < data->num_entries; i++) { + if (data->entries[i].sram_ptr == sram_ptr) + return &data->entries[i]; + } + + return NULL; +} + +void fast_put(const void *sram_ptr) +{ + struct sof_fast_get_data *data = &fast_get_data; + struct sof_fast_get_entry *entry; + k_spinlock_key_t key; + + key = k_spin_lock(&fast_get_data.lock); + entry = fast_put_find_entry(data, sram_ptr); + if (!entry) { + tr_err(fast_get, "Put called to unknown address %p", sram_ptr); + goto out; + } + entry->refcount--; + if (entry->refcount > 0) + goto out; + rfree(entry->sram_ptr); + memset(entry, 0, sizeof(*entry)); +out: + tr_dbg(fast_get, "put %p, DRAM %p size %u refcnt %u", sram_ptr, entry ? entry->dram_ptr : 0, + entry ? entry->size : 0, entry ? entry->refcount : 0); + k_spin_unlock(&data->lock, key); +} +EXPORT_SYMBOL(fast_put); From 0108aa862fa109520247d7fa5e0bde08480f1f23 Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Wed, 29 Jan 2025 09:13:30 +0100 Subject: [PATCH 4/6] dram: enable fast_get() / fast_put() on ACE platforms Enable fast_get() and fast_put() on supporting ACE platforms. Signed-off-by: Guennadi Liakhovetski --- app/boards/intel_adsp_ace15_mtpm.conf | 1 + app/boards/intel_adsp_ace20_lnl.conf | 1 + app/boards/intel_adsp_ace30_ptl.conf | 1 + 3 files changed, 3 insertions(+) diff --git a/app/boards/intel_adsp_ace15_mtpm.conf b/app/boards/intel_adsp_ace15_mtpm.conf index 9044699a1519..f1c83746a9a4 100644 --- a/app/boards/intel_adsp_ace15_mtpm.conf +++ b/app/boards/intel_adsp_ace15_mtpm.conf @@ -26,6 +26,7 @@ CONFIG_PCM_CONVERTER_FORMAT_S24_C32_AND_S24_C24=y CONFIG_PCM_CONVERTER_FORMAT_S16_C32_AND_S16_C32=y CONFIG_PIPELINE_2_0=y CONFIG_SAMPLE_KEYPHRASE=y +CONFIG_FAST_GET=y # SOF / audio modules / mocks # This mock is part of official sof-bin releases because the CI that diff --git a/app/boards/intel_adsp_ace20_lnl.conf b/app/boards/intel_adsp_ace20_lnl.conf index 022a3a9a40b6..89950bd29c3a 100644 --- a/app/boards/intel_adsp_ace20_lnl.conf +++ b/app/boards/intel_adsp_ace20_lnl.conf @@ -22,6 +22,7 @@ CONFIG_PCM_CONVERTER_FORMAT_S24_C32_AND_S24_C24=y CONFIG_PCM_CONVERTER_FORMAT_S16_C32_AND_S16_C32=y CONFIG_PIPELINE_2_0=y CONFIG_SAMPLE_KEYPHRASE=y +CONFIG_FAST_GET=y # SOF / infrastructure CONFIG_AMS=y diff --git a/app/boards/intel_adsp_ace30_ptl.conf b/app/boards/intel_adsp_ace30_ptl.conf index 62106d05e02e..2d7e521c66d1 100644 --- a/app/boards/intel_adsp_ace30_ptl.conf +++ b/app/boards/intel_adsp_ace30_ptl.conf @@ -25,6 +25,7 @@ CONFIG_PCM_CONVERTER_FORMAT_S24_C32_AND_S24_C24=y CONFIG_PCM_CONVERTER_FORMAT_S16_C32_AND_S16_C32=y CONFIG_PCM_CONVERTER_FORMAT_U8=y CONFIG_PIPELINE_2_0=y +CONFIG_FAST_GET=y # SOF / infrastructure CONFIG_KCPS_DYNAMIC_CLOCK_CONTROL=n From 4876a3738909bc8a3b696f9f06329dc66112a81b Mon Sep 17 00:00:00 2001 From: Jyri Sarha Date: Sun, 22 Dec 2024 23:41:53 +0200 Subject: [PATCH 5/6] test: cmocka: Add module tests for fast_get() and fast_put() And simple module tests for fast_get and fast_put() implemented in src/lib/fast-get/fast-get.c. Signed-off-by: Jyri Sarha --- test/cmocka/src/lib/CMakeLists.txt | 1 + test/cmocka/src/lib/fast-get/CMakeLists.txt | 11 + test/cmocka/src/lib/fast-get/fast-get-tests.c | 196 ++++++++++++++++++ 3 files changed, 208 insertions(+) create mode 100644 test/cmocka/src/lib/fast-get/CMakeLists.txt create mode 100644 test/cmocka/src/lib/fast-get/fast-get-tests.c diff --git a/test/cmocka/src/lib/CMakeLists.txt b/test/cmocka/src/lib/CMakeLists.txt index 3059c9de9068..ad3788bc98f0 100644 --- a/test/cmocka/src/lib/CMakeLists.txt +++ b/test/cmocka/src/lib/CMakeLists.txt @@ -2,3 +2,4 @@ add_subdirectory(alloc) add_subdirectory(lib) +add_subdirectory(fast-get) diff --git a/test/cmocka/src/lib/fast-get/CMakeLists.txt b/test/cmocka/src/lib/fast-get/CMakeLists.txt new file mode 100644 index 000000000000..0ca1a6c2f86f --- /dev/null +++ b/test/cmocka/src/lib/fast-get/CMakeLists.txt @@ -0,0 +1,11 @@ +# SPDX-License-Identifier: BSD-3-Clause + +cmocka_test(fast-get-tests + fast-get-tests.c + ${PROJECT_SOURCE_DIR}/zephyr/lib/fast-get.c + ${PROJECT_SOURCE_DIR}/src/lib/alloc.c + ${PROJECT_SOURCE_DIR}/src/platform/library/lib/memory.c + ${PROJECT_SOURCE_DIR}/src/spinlock.c +) + +target_link_libraries(fast-get-tests PRIVATE "-Wl,--wrap=rzalloc,--wrap=rmalloc,--wrap=rfree") diff --git a/test/cmocka/src/lib/fast-get/fast-get-tests.c b/test/cmocka/src/lib/fast-get/fast-get-tests.c new file mode 100644 index 000000000000..d78bfae4744d --- /dev/null +++ b/test/cmocka/src/lib/fast-get/fast-get-tests.c @@ -0,0 +1,196 @@ +// SPDX-License-Identifier: BSD-3-Clause +// +// Copyright(c) 2024 Intel Corporation. All rights reserved. +// +// Author: Jyri Sarha + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +static const int testdata[33][100] = { + { + 1, 2, 3, 4, 5, 6, 7, 9, 0, + 1, 2, 3, 4, 5, 6, 7, 9, 0, + 1, 2, 3, 4, 5, 6, 7, 9, 0, + 1, 2, 3, 4, 5, 6, 7, 9, 0, + 1, 2, 3, 4, 5, 6, 7, 9, 0, + 1, 2, 3, 4, 5, 6, 7, 9, 0, + 1, 2, 3, 4, 5, 6, 7, 9, 0, + 1, 2, 3, 4, 5, 6, 7, 9, 0, + 1, 2, 3, 4, 5, 6, 7, 9, 0, + 1, 2, 3, 4, 5, 6, 7, 9, 0, + }, + { 2 }, + { 3 }, + { 4 }, + { 5 }, + { 6 }, + { 7 }, + { 8 }, + { 9 }, + { 10 }, + { 11 }, + { 12 }, + { 13 }, + { 14 }, + { 15 }, + { 16 }, + { 17 }, + { 18 }, + { 19 }, + { 20 }, + { 21 }, + { 23 }, + { 24 }, + { 25 }, + { 26 }, + { 27 }, + { 28 }, + { 29 }, + { 30 }, + { 31 }, + { 32 }, + { 33 }, +}; + +static void test_simple_fast_get_put(void **state) +{ + const void *ret; + + (void)state; /* unused */ + + ret = fast_get(testdata[0], sizeof(testdata[0])); + + assert(ret); + assert(!memcmp(ret, testdata[0], sizeof(testdata[0]))); + + fast_put(ret); +} + +static void test_fast_get_size_missmatch_test(void **state) +{ + const void *ret[2]; + + (void)state; /* unused */ + + ret[0] = fast_get(testdata[0], sizeof(testdata[0])); + + assert(ret[0]); + assert(!memcmp(ret[0], testdata[0], sizeof(testdata[0]))); + + ret[1] = fast_get(testdata[0], sizeof(testdata[0]) + 1); + assert(!ret[1]); + + fast_put(ret); +} + +static void test_over_32_fast_gets_and_puts(void **state) +{ + const void *copy[ARRAY_SIZE(testdata)]; + int i; + + (void)state; /* unused */ + + for (i = 0; i < ARRAY_SIZE(copy); i++) + copy[i] = fast_get(testdata[i], sizeof(testdata[0])); + + for (i = 0; i < ARRAY_SIZE(copy); i++) + assert(!memcmp(copy[i], testdata[i], sizeof(testdata[0]))); + + for (i = 0; i < ARRAY_SIZE(copy); i++) + fast_put(copy[i]); +} + +static void test_fast_get_refcounting(void **state) +{ + const void *copy[2][ARRAY_SIZE(testdata)]; + int i; + (void)state; /* unused */ + + for (i = 0; i < ARRAY_SIZE(copy[0]); i++) + copy[0][i] = fast_get(testdata[i], sizeof(testdata[0])); + + for (i = 0; i < ARRAY_SIZE(copy[0]); i++) + copy[1][i] = fast_get(testdata[i], sizeof(testdata[0])); + + for (i = 0; i < ARRAY_SIZE(copy[0]); i++) + assert(copy[0][i] == copy[1][i]); + + for (i = 0; i < ARRAY_SIZE(copy[0]); i++) + assert(!memcmp(copy[0][i], testdata[i], sizeof(testdata[0]))); + + for (i = 0; i < ARRAY_SIZE(copy[0]); i++) + fast_put(copy[0][i]); + + for (i = 0; i < ARRAY_SIZE(copy[0]); i++) + assert(!memcmp(copy[1][i], testdata[i], sizeof(testdata[0]))); + + for (i = 0; i < ARRAY_SIZE(copy[0]); i++) + fast_put(copy[1][i]); +} + +int main(void) +{ + const struct CMUnitTest tests[] = { + cmocka_unit_test(test_simple_fast_get_put), + cmocka_unit_test(test_fast_get_size_missmatch_test), + cmocka_unit_test(test_over_32_fast_gets_and_puts), + cmocka_unit_test(test_fast_get_refcounting), + }; + + cmocka_set_message_output(CM_OUTPUT_TAP); + + return cmocka_run_group_tests(tests, NULL, NULL); +} + +void *__wrap_rzalloc(enum mem_zone zone, uint32_t flags, uint32_t caps, size_t bytes); +void *__wrap_rmalloc(enum mem_zone zone, uint32_t flags, uint32_t caps, size_t bytes); +void __wrap_rfree(void *ptr); + +void *__wrap_rzalloc(enum mem_zone zone, uint32_t flags, uint32_t caps, size_t bytes) +{ + void *ret; + (void)zone; + (void)flags; + (void)caps; + + ret = malloc(bytes); + + assert(ret); + + memset(ret, 0, bytes); + + return ret; +} + +void *__wrap_rmalloc(enum mem_zone zone, uint32_t flags, uint32_t caps, size_t bytes) +{ + void *ret; + (void)zone; + (void)flags; + (void)caps; + + ret = malloc(bytes); + + assert(ret); + + return ret; +} + +void __wrap_rfree(void *ptr) +{ + free(ptr); +} From 7402277f3a672a228d2e2efc33cf3f2871f20527 Mon Sep 17 00:00:00 2001 From: Jyri Sarha Date: Tue, 10 Dec 2024 21:22:50 +0200 Subject: [PATCH 6/6] Audio: SRC: Coefficients in prepare() to fast SRAM with fast_get() The SRC coefficients are loaded to DRAM and commit copies the coefficients to SRAM when they are needed. The copying is done using fast_get() and the copy is released with fast_put() when its not needed anymore. Signed-off-by: Jyri Sarha --- src/audio/src/src.c | 7 +++-- src/audio/src/src_common.c | 56 +++++++++++++++++++++++++++++++++++++- src/audio/src/src_common.h | 21 ++++++++------ src/audio/src/src_lite.c | 7 +++-- 4 files changed, 77 insertions(+), 14 deletions(-) diff --git a/src/audio/src/src.c b/src/audio/src/src.c index ce3d00ba2399..57c957eb5f78 100644 --- a/src/audio/src/src.c +++ b/src/audio/src/src.c @@ -59,8 +59,11 @@ static int src_prepare(struct processing_module *mod, if (ret < 0) return ret; - a->stage1 = src_table1[a->idx_out][a->idx_in]; - a->stage2 = src_table2[a->idx_out][a->idx_in]; + ret = src_allocate_copy_stages(mod->dev, a, + src_table1[a->idx_out][a->idx_in], + src_table2[a->idx_out][a->idx_in]); + if (ret < 0) + return ret; ret = src_params_general(mod, sources[0], sinks[0]); if (ret < 0) diff --git a/src/audio/src/src_common.c b/src/audio/src/src_common.c index a798a4cf59e8..5b8bb3e00913 100644 --- a/src/audio/src/src_common.c +++ b/src/audio/src/src_common.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -592,6 +593,53 @@ int src_param_set(struct comp_dev *dev, struct comp_data *cd) return 0; } +int src_allocate_copy_stages(struct comp_dev *dev, struct src_param *prm, + const struct src_stage *stage_src1, + const struct src_stage *stage_src2) +{ +#if CONFIG_FAST_GET + struct src_stage *stage_dst; + size_t coef_size[2]; +#if SRC_SHORT + size_t tap_size = sizeof(int16_t); +#else + size_t tap_size = sizeof(int32_t); +#endif + + stage_dst = rmalloc(SOF_MEM_ZONE_RUNTIME, 0, SOF_MEM_CAPS_RAM, + 2 * sizeof(*stage_dst)); + if (!stage_dst) { + comp_err(dev, "failed to allocate stages"); + return -ENOMEM; + } + + /* Make local copies of the src_stages */ + stage_dst[0] = *stage_src1; + stage_dst[1] = *stage_src2; + + coef_size[0] = tap_size * stage_src1->filter_length; + coef_size[1] = tap_size * stage_src2->filter_length; + + stage_dst[0].coefs = fast_get(stage_src1->coefs, coef_size[0]); + stage_dst[1].coefs = fast_get(stage_src2->coefs, coef_size[1]); + + if (!stage_dst[0].coefs || !stage_dst[1].coefs) { + comp_err(dev, "failed to allocate coefficients"); + fast_put(stage_dst[0].coefs); + rfree(stage_dst); + return -ENOMEM; + } + + prm->stage1 = stage_dst; + prm->stage2 = stage_dst + 1; +#else + prm->stage1 = stage_src1; + prm->stage2 = stage_src2; +#endif + + return 0; +} + bool src_is_ready_to_process(struct processing_module *mod, struct sof_source **sources, int num_of_sources, struct sof_sink **sinks, int num_of_sinks) @@ -652,7 +700,13 @@ __cold int src_free(struct processing_module *mod) /* Free dynamically reserved buffers for SRC algorithm */ rfree(cd->delay_lines); - +#if CONFIG_FAST_GET + if (cd->param.stage1) { + fast_put(cd->param.stage1->coefs); + fast_put(cd->param.stage2->coefs); + } + rfree((void *)cd->param.stage1); +#endif rfree(cd); return 0; } diff --git a/src/audio/src/src_common.h b/src/audio/src/src_common.h index d3ed218016db..56b07a0b03a2 100644 --- a/src/audio/src/src_common.h +++ b/src/audio/src/src_common.h @@ -18,15 +18,15 @@ #include "src_ipc.h" struct src_stage { - const int idm; - const int odm; - const int num_of_subfilters; - const int subfilter_length; - const int filter_length; - const int blk_in; - const int blk_out; - const int halfband; - const int shift; + int idm; + int odm; + int num_of_subfilters; + int subfilter_length; + int filter_length; + int blk_in; + int blk_out; + int halfband; + int shift; const void *coefs; /* Can be int16_t or int32_t depending on config */ }; @@ -215,6 +215,9 @@ static inline int src_fallback(struct comp_data *cd, return 0; } +int src_allocate_copy_stages(struct comp_dev *dev, struct src_param *prm, + const struct src_stage *stage_src1, + const struct src_stage *stage_src2); int src_rate_check(const void *spec); int src_set_params(struct processing_module *mod, struct sof_sink *sink); diff --git a/src/audio/src/src_lite.c b/src/audio/src/src_lite.c index 35423dad9225..b1bf87b8ddfd 100644 --- a/src/audio/src/src_lite.c +++ b/src/audio/src/src_lite.c @@ -43,8 +43,11 @@ static int src_lite_prepare(struct processing_module *mod, if (ret < 0) return ret; - a->stage1 = src_table1[a->idx_out][a->idx_in]; - a->stage2 = src_table2[a->idx_out][a->idx_in]; + ret = src_allocate_copy_stages(mod->dev, a, + src_table1[a->idx_out][a->idx_in], + src_table2[a->idx_out][a->idx_in]); + if (ret < 0) + return ret; ret = src_params_general(mod, sources[0], sinks[0]); if (ret < 0)