i2s DeviceModeTXRX on pi zero 1 #518
Replies: 16 comments 12 replies
-
I am testing it with The result is that
This same approach worked well when I was using the PWM output, but using |
Beta Was this translation helpful? Give feedback.
-
Here is where I'm at: https://github.com/marchingband/wm8960-circle-tests |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Ah man thank you.
Reading this, of course C doesn't have s24, does this look correct? Is there a circle utility to create these ints?
|
Beta Was this translation helpful? Give feedback.
-
You are welcome. When you have 32 bits integer (int32_t, int, s32), you only
need to shift it right by 8 bits to get a value, which can be written into the
GetChunk() buffer for I2S:
uint32_t tos24(int32_t in){
return (uint32_t) in >> 8;
}
|
Beta Was this translation helpful? Give feedback.
-
Great thank you.
and reran |
Beta Was this translation helpful? Give feedback.
-
Or am I missing a flag somewhere, or something like that? |
Beta Was this translation helpful? Give feedback.
-
Do you have another I2C device connected with I2C address 0x4C or 0x4D by any
chance? Otherwise this shouldn't happen. You can also explicitly provide the
I2C address of the WM8960 (0x1A) to the constructor of CI2CSoundBaseDevice, if
automatic probing fails. Can you please try this?
|
Beta Was this translation helpful? Give feedback.
-
Nothing else is connected, and I am passing the address to the constructor already. I also retested by uncommenting the code and running makeall, and again it breaks for me. |
Beta Was this translation helpful? Give feedback.
-
I have updated the repo incase you want to inspect https://github.com/marchingband/wm8960-circle-tests |
Beta Was this translation helpful? Give feedback.
-
I am new to C++ (I am a C developer) so it is totally possible that I am doing something dumb. |
Beta Was this translation helpful? Give feedback.
-
The problem has been fixed on the develop branch. |
Beta Was this translation helpful? Give feedback.
-
awesome, thank you so much! |
Beta Was this translation helpful? Give feedback.
-
I have the WM8988 working now. |
Beta Was this translation helpful? Give feedback.
-
I would copy the files wm8960soundcontroller.[h|cpp] to wm8988soundcontroller.
[h|cpp] in the respective directories and rename the classes in the new files
to CWM8988SoundController. Then you can modify the class for the WM8988 as you
like. You have to add the class CWM8988SoundController to the
ControllerFactory() in i2ssoundbasedevice-rp1.cpp and i2ssoundbasedevice-
rp1.cpp at last.
In the method CWM8988SoundController::Probe() read a device register (e.g.
R40), which has a different reset value for WM8960 and WM8988 and check that
value. If it matches the reset value of the WM8988, the device is found and
can be initialized. The same test should be added to the WM8960 driver.
|
Beta Was this translation helpful? Give feedback.
-
Ok that makes sense, thanks. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to use WM8960 with a pi zero 1, I have them all hooked up on a breadboard on my desk, but,
i see here it says not supported, for input and output at the same time.
Do I need to create separate input and output devices?
Or is it just fully impossible currently?
thank you!
Beta Was this translation helpful? Give feedback.
All reactions