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

audio: dai-zephyr: put no-data checks behind a build option #8649

Merged
merged 2 commits into from
Dec 19, 2023

Conversation

kv2019i
Copy link
Collaborator

@kv2019i kv2019i commented Dec 19, 2023

Triggered by

#4672

and

#8621

... let's put the warnings behind a build option.

Put the data availability checks behind a build option (new option
CONFIG_DAI_VERBOSE_GLITCH_WARNINGS). In normal conditions, the DAI copy
should never be called in a condition when there is no data to be
copied. The audio interface is running and needs a constant stream of
audio samples, so there is no remedy for not having data. In practise,
most of the DAIs have a small buffer and can survive transient small
gaps in data flow.

The existing code has warning level logs for this condition. This is
very useful for debug, as many common problems in firmware (and DSP
topologies) show up as delays observed in the DAI copy logic. For
product use, printing the warnings may make the situation worse by
increasing the DSP load at a time when it has just missed a deadline.

To allow for both debug and to avoid these checks in product
builds, move the related checks behind a separate build option.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Enable the DAI verbose glitch warnings in the debug builds.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Copy link
Contributor

@marcinszkudlinski marcinszkudlinski left a comment

Choose a reason for hiding this comment

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

good idea!

@lgirdwood lgirdwood merged commit 725c7d9 into thesofproject:main Dec 19, 2023
43 of 44 checks passed
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.

3 participants