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
audiobusio.I2S main clock not implemented #9176
Comments
I'm also trying to understand what could throw this exception and I suspect it might be a bug. https://github.com/adafruit/circuitpython/blob/main/shared-bindings/audiobusio/I2SOut.c |
I think |
Thanks, that explains it.
Not sure where to find this. Basically, the rest of the questions are relevant. |
It's embedded in the C code for I2SOut.c that you linked. I found that surprising too. |
Yeah, I noticed that too. I can't quite work out what's wrong. How cool would it be if I could generate main_clock and use the synthio functionality on the rp2040 on my 4 channel board! For example, my board has 4 inputs! I want to try and implement a reverb or delay. The main problem is that it's never been done before - that's my hypothesis. Maybe we can have a look at the source code and I can try to recompile it? |
On RP2040, I2SOut is implemented with a PIO program: https://github.com/adafruit/circuitpython/blob/main/ports/raspberrypi/common-hal/audiobusio/I2SOut.c. So the main clock functionality would probably be added to that. This might be such an implementation: https://github.com/malacalypse/rp2040_i2s_example |
For anyone who might be interested. I feed in a 220 hertz sine wave and see a frequency spread of about 3.5 hertz on the oscilloscope. This is probably just due to frequency irregularities on the main clock. I can also see that the sine wave is not very smooth and is prone to aliasing. The conclusion is obvious - if you are designing a board with a codec, make sure you get the main clock from an external source. But it may be useful for tests. |
Hello everyone.
I'm trying to bring the WM8988 audio codec to life on my own development board.
It's a bit old, but there's still a lot of it around.
My main goal is to get some sound out of it. Now that I've tinkered with the I2C registers, I've got some clicking noises on reboot - I'm definitely on the right track.
But! I noticed that the WM8988 codec should be driven by the main clock, which should be around 12 MHz. Nice, I thought it would be easy to get this, as I saw this clock in the I2S circuitpython driver.
I tried setting the main_clock parameter and got:
NotImplementedError: main_clock
So I have a few questions:
bit_clock at 48000 sample rate gives 1.53MHz on the oscilloscope.
I tried to make a PWM signal on an arbitrary pin, but I assume that this can't work because the signal has to be synchronous. Or am I wrong?
I am using an RP2040-Zero board with 9.1 beta circuitpython.
The text was updated successfully, but these errors were encountered: