-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
tud_audio_read() doesn't return the right value after merge #2739 #2755
Comments
with latest commits the value is correct. But it is non constant like before the rework. |
thank @ra1nb0w and @HiFiPhile, sorry I indeeded didn't tested the ISO since I am still not familliar with audio yet. I mostly tested other examples running hil_test.py locally (also added an g0 (32-bit 2048 KB), f0 (1KB), ch32 (512B) to my hil pool to make sure my rework does not break things. which example you are testing with ? I can use analyzer to capture but can you help a bit to write a python the script to read its payload count, that would make thing easier/faster. Will try to fix this asap. |
@hathach
It's the There is another tricky issue on older device, I'm trying to figure it out on L0. |
@HiFiPhile got it, running that script is good enough. No worries, I also have G0 and H5 which has 32-bit bus (2K USB SRAM). I will do some testing, bi-set and backtrack. It is probably the buffer toggle issue. |
False alarm for L0, I just forgot disable DEBUG so the timing was all wrong... @hathach since you are working on it you can integrate the changes if you want. |
thank you @HiFiPhile , it seems to fix the issue, it is easy to miss epreg bit manipulation :). Though on Linux, the plot does not look as good as your screenshot, but that is no problem, I will find a way to verify these value with a script later so that we could include them in the hil test. |
fixed. Thank you very much guys! the plot is probably the same, the issue is the (horizontal) time scale. |
Operating System
Linux
Board
STM32H563
Firmware
custom build
What happened ?
after c60934e tud_audio_read() returns only half of the requested bytes.
reverting the merge it returns the right bytes.
I read the commits but nothing obvious to me was found.
How to reproduce ?
uint16_t audio_read_bytes = tud_audio_read(&audio_buffer[0U], AUDIO_BLOCK_SIZE * sizeof(int16_t));
Debug Log as txt file (LOG/CFG_TUSB_DEBUG=2)
tinyusb.log.txt
Screenshots
No response
I have checked existing issues, dicussion and documentation
The text was updated successfully, but these errors were encountered: