Skip to content

audio stream: Implement XRUN-permitted behaviour - #2745

Merged
lgirdwood merged 2 commits into
thesofproject:masterfrom
akloniex:xrun-permitted
Apr 10, 2020
Merged

lgirdwood merged 2 commits into
thesofproject:masterfrom
akloniex:xrun-permitted

Conversation

@akloniex

@akloniex akloniex commented Apr 8, 2020

Copy link
Copy Markdown
Member

This is follow-up to recently merged PR #2580

underrun_permitted and overrun_permitted fields have been added to audio_stream structure and initialized during buffer instantiation.
audio_stream_get_<free/avail>_<bytes/samples/frames> functions have been added to audio stream interface, and all occurrences of old API usage have been replaced with the new one.

@monocodus monocodus Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This is autogenerated code-style review, all good, approving

@monocodus monocodus Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This is autogenerated code-style review, all good, approving

Comment thread src/include/sof/audio/audio_stream.h Outdated

@monocodus monocodus Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This is autogenerated code-style review, all good, approving

@akloniex

akloniex commented Apr 8, 2020

Copy link
Copy Markdown
Member Author

Travis fails on doxygen due to error in dcblock.h, unrelated to this PR.

Comment thread src/include/sof/audio/audio_stream.h Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

inline comment here

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would also deal with the underrun permitted here (next to it's conditional logic) than as the default return case.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

done

Comment thread src/include/sof/audio/audio_stream.h Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

and here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

done

Comment thread src/include/sof/audio/audio_stream.h Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would also deal with the overrun permitted here (next to it's conditional logic) than as the default return case. Needs comment too

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

done

@monocodus monocodus Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This is autogenerated code-style review, all good, approving

akloniex added 2 commits April 9, 2020 23:04
Add underrun_permitted and overrun_permitted fields to audio_stream
structure and initialize them with regard to associated buffer config.
Add audio_stream_get_avail/free functions, which take above-mentioned
fields into account and use them in getter functions within audio_stream.h
instead of avail/free fields directly.

Signed-off-by: Artur Kloniecki <arturx.kloniecki@linux.intel.com>
Some components used stream.free/avail fields directly. With introduction
of audio_stream_get_free/avail getter functions, such usage should be
removed.

Signed-off-by: Artur Kloniecki <arturx.kloniecki@linux.intel.com>

@monocodus monocodus Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This is autogenerated code-style review, all good, approving

@lgirdwood

Copy link
Copy Markdown
Member

Known CI issues.

@lgirdwood
lgirdwood merged commit 101364d into thesofproject:master Apr 10, 2020
@akloniex
akloniex deleted the xrun-permitted branch May 27, 2020 08:10
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.

5 participants