Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

format: add align up/down macros #188

Merged
merged 1 commit into from Aug 3, 2018

Conversation

kakulesza
Copy link
Collaborator

ALGIN_UP/ALIGN_DOWN macros allows to align the number to the nearest alignment
value. E.g. upward value aligment is required for DGMBS register.

Signed-off-by: Kamil Kulesza kamil.kulesza@linux.intel.com

ALGIN_UP/ALIGN_DOWN macros allows to align the number to the nearest alignment
value. E.g. upward value aligment is required for DGMBS register.

Signed-off-by: Kamil Kulesza <kamil.kulesza@linux.intel.com>
Copy link
Collaborator

@singalsu singalsu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and useful to me. I'd assume this is used in initialization code e.g. to allocate buffers that go to desired 2^N size boundary.

@kakulesza
Copy link
Collaborator Author

@singalsu Yes, I want use it for align period bytes value for DGMBS to 32 bits (in hda dma configuration). Without this we've glitches in playback with 8kHz 16bits 1 channel and 24kHz 16bits 1 channels configurations.

@lgirdwood lgirdwood merged commit 0375c21 into thesofproject:master Aug 3, 2018
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.

None yet

3 participants