Repository navigation
Audio: Fix the default alignment setting - #8351
Conversation
|
SOFCI TEST |
|
SOFCI TEST |
Set the default alignment value after buffer format is set in audio_stream_set_params instead of in audio_stream_init where the buffer format hasn't been set yet. Signed-off-by: Andrula Song <andrula.song@intel.com>
kv2019i
left a comment
There was a problem hiding this comment.
One comment to clarify (see inline).
| * set byte_align as 1 means no alignment limit on byte. | ||
| * set frame_align as 1 means no alignment limit on frame. | ||
| */ | ||
| audio_stream_init_alignment_constants(1, 1, buffer); |
There was a problem hiding this comment.
Hmm, it's difficult to confirm this is safe to do. audio_stream_init() is only called once but audio_stream_set_params() is called from many places via buffer_set_params().
Have you checked that we are not overriding alignment info?
Not saying old code is correct. It would look we'd at least need to recalculate runtime_stream_params.align_frame_cnt and align_shift_idx if buffer parameters are changed.
There was a problem hiding this comment.
usually, we set alignment info in prepare function(after internal parameter set and verify) for specific component, I checked the src, eq-iir,eq-fir and volume,aria .etc components, they will change the default value to their own setting.
and yes, once the buffer parameters are changed, we do need to recalculate the align info.
|
SOFCI TEST |
Set the default alignment value after buffer format is set in audio_stream_set_params instead of in audio_stream_init where the buffer format hasn't been set yet.