Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
audio_stream: Fix uninitialized data in alignment_constants
Audio stream objects are generally allocated out of zero'd heap memory, but the computed alignment fields need non-zero values to have correct behavior. These were being left as garbage. Set them to a byte and frame alignmnt of 1, as this corresponds to pervasive convention in the tree. But note that a byte alignment of 1 is actually technically incorrect, as all existing DSP targets are on architectures which don't allow misaligned loads. But existing component code is universally coded correctly anyway. (It's worth pointing out that "set_alignment_constants()" is now exposed as an API call on abstracted source/sink objects. But the only current implementation is on audio_stream. Future implementations will need to correctly initialize themselves.) This is a partial fix for Issue thesofproject#8639 Signed-off-by: Andy Ross <andyross@google.com>
- Loading branch information