Skip to content

topology: buffer: Add XRUN flags field to struct sof_ipc_buffer. - #2580

Merged
lgirdwood merged 1 commit into
thesofproject:masterfrom
akloniex:buffer-xrun-no-xrun
Apr 2, 2020
Merged

lgirdwood merged 1 commit into
thesofproject:masterfrom
akloniex:buffer-xrun-no-xrun

Conversation

@akloniex

@akloniex akloniex commented Mar 18, 2020 •

Copy link
Copy Markdown
Member

2 flags have been added for use during buffer instantiation:
SOF_BUF_OVERRUN_PERMITTED and SOF_BUF_UNDERRUN_PERMITTED,
along with struct sof_ipc_buffer member fields flags and reserved.
Flags field is supposed to hold the above-mentioned flags to allow
some control over XRUN behaviour, i.e. prevent XRUN on buffers which
are allowed to under/overrun by design.
Also added reserved field to the structure in case it comes in handy
some time in the future.

Relates to #2478

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

@akloniex akloniex added the ABI ABI change involved label Mar 18, 2020
@akloniex
akloniex requested a review from a team as a code owner March 18, 2020 22:04

@lgirdwood lgirdwood left a comment

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.

Do you have a similar kernel PR ?

@akloniex
akloniex force-pushed the buffer-xrun-no-xrun branch from 775e8af to 4d9f784 Compare March 19, 2020 16:57
Comment thread src/include/ipc/topology.h Outdated

@lgirdwood lgirdwood left a comment

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.

Question on any packing.

@akloniex

Copy link
Copy Markdown
Member Author

@lgirdwood Kernel PR added: thesofproject/linux#1920

@akloniex akloniex changed the title [RFC] topology: buffer: Add XRUN flags field to struct sof_ipc_buffer. topology: buffer: Add XRUN flags field to struct sof_ipc_buffer. Mar 23, 2020
@lgirdwood

Copy link
Copy Markdown
Member

@akloniex we need some logic in the IPC handler to deal with old and new version of this structure sent by kernel.

@akloniex

Copy link
Copy Markdown
Member Author

@lgirdwood Since we follow rules of updating ABI as defined near the top of src/ipc/handler.c, the IPC_COPY_CMD() macro handles this for us automagically, no additional actions required.

@akloniex
akloniex force-pushed the buffer-xrun-no-xrun branch 2 times, most recently from 3a36b8f to 41b42f9 Compare March 24, 2020 21:43
@akloniex

Copy link
Copy Markdown
Member Author

Minor ABI updated to 15.
Checkpatch fixed.

@lgirdwood

Copy link
Copy Markdown
Member

Thanks @akloniex , sorry can you put it to ABI 14, there is an unrelated ABI mismatch causing a delay atm so safer to merge into 14 for merge today.

@kv2019i kv2019i left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Folks, the naming is secret inside language, please change. See comment in kernel:
thesofproject/linux#1920 (review)

@lgirdwood

Copy link
Copy Markdown
Member

The naming is quite FW specific, so it can be changed. @kv2019i it's not meant to be a secret language :-)

SOF_BUF_OVERRUN_PERMITTED
SOF_BUF_UNDERRUN_PERMITTED

@akloniex the above should be fine.

@akloniex
akloniex force-pushed the buffer-xrun-no-xrun branch from 41b42f9 to 04c8b51 Compare March 25, 2020 21:48
@akloniex

Copy link
Copy Markdown
Member Author

@lgirdwood ABI changed back to 3.14
@kv2019i Naming changed to the one proposed by @lgirdwood

@kv2019i kv2019i left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks a lot @akloniex and @lgirdwood !

FW and kernel patches (thesofproject/linux#1920) are now ABI 14 but classifier is still marking this change as ABI 16 (https://github.com/orgs/thesofproject/projects/2), so we need to either reclassify or change the patches.

@akloniex

Copy link
Copy Markdown
Member Author

@xiulipan @lgirdwood @kv2019i Can we stop shuffling ABI version reqired for this PR?
Current Minor ABI in kernel is 13, so it would take like 3 months to wind it up all the way to 16, for this PR to come through, as Xiuli has set it up as earlier today.

@tlauda

tlauda commented Mar 26, 2020

Copy link
Copy Markdown
Contributor

@akloniex @lgirdwood Do we already know how exactly these flags will be used? Currently buffers are not responsible for reporting XRUNs, so are we planning to change that also?

@lgirdwood

Copy link
Copy Markdown
Member

@xiulipan @lgirdwood @kv2019i Can we stop shuffling ABI version reqired for this PR?
Current Minor ABI in kernel is 13, so it would take like 3 months to wind it up all the way to 16, for this PR to come through, as Xiuli has set it up as earlier today.

Please hold on - there has been some ABI breakage that @xiulipan has a plan to fix. This will be a matter of a day or two.

@tlauda yep, we will need some logic to check this prior to initiating the XRUN.

@akloniex
akloniex force-pushed the buffer-xrun-no-xrun branch from 04c8b51 to c09e7af Compare March 26, 2020 17:43
@akloniex
akloniex requested a review from kv2019i March 26, 2020 20:22
Comment thread src/include/ipc/topology.h Outdated

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pls use the following dox format for longer descriptions:

/**
 * Overrun will cause ....
 */
#define ....

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.

revised

Comment thread src/include/kernel/abi.h Outdated
2 flags have been added for use during buffer instantiation:
SOF_BUF_OVERRUN_PERMITTED and SOF_BUF_UNDERRUN_PERMITTED,
along with struct sof_ipc_buffer member fields flags and reserved.
Flags field is supposed to hold the above-mentioned flags to allow
some control over XRUN behaviour, i.e. prevent XRUN on buffers which
are allowed to under/overrun by design.
Also added reserved field to the structure in case it comes in handy
some time in the future.

Signed-off-by: Artur Kloniecki <arturx.kloniecki@linux.intel.com>
@akloniex
akloniex force-pushed the buffer-xrun-no-xrun branch from c09e7af to 47a02f5 Compare March 31, 2020 19:34
@lgirdwood

Copy link
Copy Markdown
Member

@kv2019i I've moved both to 15, is kernel side good for you ? If so we can merge.

@kv2019i

kv2019i commented Apr 1, 2020

Copy link
Copy Markdown
Collaborator

@lgirdwood wrote:

@kv2019i I've moved both to 15, is kernel side good for you ? If so we can merge.

Ack, this looks good, I re-requested reviews for the kernel PR but based on previous round, we should be now good.

@lgirdwood

Copy link
Copy Markdown
Member

@kv2019i ok great - will merge once you give us the all clear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ABI ABI change involved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants