Skip to content

Commit c9be8cb

Browse files
lrgirdwokv2019i
authored andcommitted
up_down_mixer: hifi3: 8-byte align downmix coefficient array
downmix16bit_4ch_mono() loads its coeffs[] array with AE_L16X4_X, an aligned 64-bit HiFi load that requires 8-byte alignment. The uint16_t stack array is only 2-byte aligned, so the compiler may place it on a 4-byte boundary and trigger a misaligned access. Force 8-byte alignment to match the intrinsic's requirement. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
1 parent 3e72906 commit c9be8cb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/audio/up_down_mixer/up_down_mixer_hifi3.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1247,7 +1247,7 @@ void downmix16bit_4ch_mono(struct up_down_mixer_data *cd, const uint8_t * const
12471247
uint32_t idx3 = get_channel_index(cd->in_channel_map, 2);
12481248
uint32_t idx4 = get_channel_index(cd->in_channel_map, 3);
12491249

1250-
uint16_t coeffs[4] = {cd->downmix_coefficients[idx1],
1250+
uint16_t coeffs[4] __attribute__((aligned(8))) = {cd->downmix_coefficients[idx1],
12511251
cd->downmix_coefficients[idx2],
12521252
cd->downmix_coefficients[idx3],
12531253
cd->downmix_coefficients[idx4]

0 commit comments

Comments
 (0)