-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Reported bugs in nrf i2s audio implementation #2255
Comments
I reproduced a crash using a frequency of 727.
Somehow, rather than copying 22 bytes and stopping, the copy runs past the end of memory and hard crashes:
.. did you spot the error? whoops. |
@rdagger can you provide an example wav file which played incorrectly for you? |
MAX98357A requires samples be 16, 24, or 32 bits. A sample of 8 bits won't work properly; due to a bug they are currently played at double the frequency and sound is produced by the breakout; after fixing the bug the waveform is correct, but no sound is produced. Besides that, even common 22050Hz and 44100Hz samples are technically out of spec, but do seem to work (only 8, 16, 48, and 96kHz +- 5% sample rates are permitted per the datasheet) |
On the other hand, the UDA1334 I2S DAC can play 8-bit samples properly |
Here's a sample WAV that produced nothing but noise. I tried again today with the latest build and it was intelligible but the speed was too fast. |
I haven't done much testing but here is what works and does not work for me: Not Working: Working: |
@rdagger Unfortunately, it's a hardware limitation that MAX98357A doesn't support 8-bit samples like the one in mi-destruct.zip. We might address this in software in the future (#2323), but for now it is not going to work. A tool like audacity can convert wave files, though obviously the flash storage usage is higher for 16 bits. I'm going to close this up for now, but please feel free to open fresh issues if there are problems I haven't covered yet. Thanks for working with us on this! |
An error message defining the hardware limitations would be helpful. Thanks. |
we can't know theres an error because the hardware limitation is with the i2s chip NOT the circuitpython core! other i2s chips may work :) |
In #2127 (comment) Github user @rdagger reports the following problems:
Look into these reported issues and fix them as necessary.
Note: I am self-assigning this so it stays on my radar, but other obligations will likely prevent me from doing more than the smallest amount of investigative work until at least the week of November 11.
The text was updated successfully, but these errors were encountered: