Skip to content

Commit b873c82

Browse files
author
Jyri Sarha
committed
audio: volume: Align volume vector correctly
Some of the HIFI optimized versions of the volume processing callbacks require the volume vector to be suitably aligned. SOF_FRAME_BYTE_ALIGN is created exactly for this purpose. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
1 parent 0bd5581 commit b873c82

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/audio/volume/volume_ipc3.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ int volume_init(struct processing_module *mod)
8888
* malloc memory to store current volume 4 times to ensure the address
8989
* is 8-byte aligned for multi-way xtensa intrinsic operations.
9090
*/
91-
cd->vol = mod_alloc(mod, vol_size);
91+
cd->vol = mod_alloc_align(mod, vol_size, SOF_FRAME_BYTE_ALIGN);
9292
if (!cd->vol) {
9393
mod_free(mod, cd);
9494
comp_err(dev, "Failed to allocate %zu", vol_size);

src/audio/volume/volume_ipc4.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ int volume_init(struct processing_module *mod)
135135
* malloc memory to store current volume 4 times to ensure the address
136136
* is 8-byte aligned for multi-way xtensa intrinsic operations.
137137
*/
138-
cd->vol = mod_alloc(mod, vol_size);
138+
cd->vol = mod_alloc_align(mod, vol_size, SOF_FRAME_BYTE_ALIGN);
139139
if (!cd->vol) {
140140
mod_free(mod, cd);
141141
comp_err(dev, "Failed to allocate %d", vol_size);

0 commit comments

Comments
 (0)