Skip to content

Audio: Volume: Fix the ramping and ZC mode align#10704

Draft
singalsu wants to merge 2 commits intothesofproject:mainfrom
singalsu:volume_ramp_align_fix
Draft

Audio: Volume: Fix the ramping and ZC mode align#10704
singalsu wants to merge 2 commits intothesofproject:mainfrom
singalsu:volume_ramp_align_fix

Conversation

@singalsu
Copy link
Copy Markdown
Collaborator

No description provided.

This patch adds to audio_stream.h inline functions:

- audio_stream_align_frames_round_down()
- audio_stream_align_frames_round_up()

They are useful when an algorithm needs to process a number of
frames that is smaller then data size than offered by module
API. E.g. when volume component ramps the volume, the block with
same gain is smaller than a normal processing period.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch fixes an issue where processing smaller parts of
the period can break the data align constraints. The frames
count value from zc_get() function or from cd->vol_ramp_frames
is rounded up to next align compatible frames count.

The failure with align constraints appeared as glitches in
audio with some 44.1 kHz family sample rates.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant