-
Couldn't load subscription status.
- Fork 8.1k
drivers: i2s: stm32 sai fix tx callback mem_buff release #95197
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
Conversation
This change fixes a wrong buffer release on tx callback which was not correctly fixed by zephyrproject-rtos#94696. Signed-off-by: Mario Paja <mariopaja@hotmail.com>
Set mem_block to NULL after the STOPPING command in order to exit TX callback at the end of the buffer transmission. Signed-off-by: Mario Paja <mariopaja@hotmail.com>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to create issue about this, but there is already a fix :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, as far as I can tell.
|
@puliceworx can you have a test ? |
|
@schweigstill could you also test it? @evgeniy-paltsev did you have time to test these changes, since you had also noticed this issue? |
|
Can't tests/drivers/i2s materials be used on a loopback mode? |
I think loopback mode does not check the memory buffer if is released or not :/ |
|
Tested a few times. I get the correct (same) log output as in the PR. |
|
Yep, I've tested it (even before approving :) |



While #94696 successfully addressed STOP/START, it failed to fix mem_buffer release.
This PR addresses the mem_buffer release during TX callback.
For debugging purposes add the following:
i2s_stm32_sai.c
prj.conf
DRAIN
LOG Before:
LOG After:
STOP
Add into samples/drivers/i2s/output
LOG Before:
LOG After: