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_4_channel_mic on STM32F411 with modified tud_audio_tx_done_post_load_cb #2256

Closed
1 task done
klaus-liebler opened this issue Sep 16, 2023 · 2 comments
Closed
1 task done
Labels

Comments

@klaus-liebler
Copy link

Operating System

Windows 11

Board

BlackPill F411

Firmware

audio_4_channel_mic example (unmodified and modified, see below)

What happened ?

I successfully integrated the audio_4_channel_mic example in a new STM32CubeIDE project and used "plot_audio_samples.py" to test it. When I looked at the plot, I saw that the value 1 remains constant for two samples (see marking in the screenshot below). According to the source code, the value 1 should only be displayed for one sample.
image

I investigated further and changed the "Generate dummy data" code to get unique sample values on all four channels

for(int i=0;i<48;i++){
  i2s_dummy_buffer[0][2*i]   = 100+i;
  i2s_dummy_buffer[0][2*i+1] = 200+i;
  i2s_dummy_buffer[1][2*i]   = 300+i;
  i2s_dummy_buffer[1][2*i+1] = 400+i;
}

Again I started "plot_audio_samples.py".

Expected result: A sawtooth with continuously increasing values from 400->447

Actual result: A sawtooth with the values 400->446 and then a drop to 100 (47 of 48 values of second fifo, second channel, then the first value oder first fifo and first channel).

image

How to reproduce ?

Compile and run example here https://github.com/klaus-liebler/soundcard

Debug Log as txt file (LOG/CFG_TUSB_DEBUG=2)

Not available

Screenshots

See above

I have checked existing issues, dicussion and documentation

  • I confirm I have checked existing issues, dicussion and documentation.
@HiFiPhile
Copy link
Collaborator

Could you try #2259 ?

After fix:
image

@klaus-liebler
Copy link
Author

Thank you so much, @HiFiPhile . I can confirm, that #2259 fixes the problem.

Regards, Klaus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants