-
Notifications
You must be signed in to change notification settings - Fork 270
Add support for I2S on GPIO 28-31 for use with RPi V1 Model B P5 header #267
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
Comments
No problem, I will implement your suggestion this week. I think, we do not need a configuration option here, but simply can request the board model from
Question: Do these boards have the P5 header too?
|
Ah, even better! Fantastic :) I'm trying to decipher the Raspberry Pi revisions(!) I think it is the V1 Model B revision 2 that includes the P5 header. The V1 Model B revision 1 doesn't have it, so has no I2S at all as far as I can see; the V1 Model B+ onwards has the 40-pin header, so will use the 18-21 mapping on the main GPIO header. As far as I can see, any V1 "revision 2" based board has the P5 header - so that includes the original model A too I think (the A+ moved to the smaller board and 40-pin header I believe). I'm largely going on the graphics for the connectors on the wikipedia page (https://en.wikipedia.org/wiki/Raspberry_Pi), but also from the RPI hardware history page (https://elinux.org/RPi_HardwareHistory). I'm not quite sure what that means in terms of your circle definitions, but I /think/ it might apply to anything between 0x04 and 0x0F, that would mean the following are all P5 boards that could support I2S:
It looks like it won't apply to MachineModelBRelease1MB256 as that is the V1 model B revision 1 board with no P5 header so no I2S capability at all if I'm interpreting everything correctly! Many Thanks, |
If the revisions 0x04 to 0x0F have the P5 header, the three model values, you have noted, are the right one. Thanks for figuring this out. I already applied the needed modifications to the develop branch. Can you please test it? Thanks. Rene |
Yep - that seems to work. Building 29-miniorgan with I2S enabled for a circle configuration where RASPPI = 1 means I have a kernel.img that works with my PCM5102 over I2S both with a 40-way GPIO Raspberry Pi Zero V1 (non-wireless) and with a 26-way GPIO + P5 Raspberry Pi V1 model B revision 2. Brilliant! Many thanks :) |
Great! Thank you for testing. |
For info, also seems to work with RASPPI = 2 on my V3 Pi. I was going to try on a V2 Pi, but I think mine might be dead! |
Thanks for info. I tested sample/29-miniorgan with I2S on a RPi 2B again and it worked. So maybe there is really a problem with your hardware. :( |
The I2S support for early Raspberry Pi models on the P5 header is part of the new release Circle 44.3, so this can be closed. |
It would be really neat to be able to add support for the I2S interface on the original Raspberry Pi V1 Model B. This is available via GPIO 28-31 via the "ALT 2" alternative functions on the extra P5 header near the original 26-way header.
I've added it to my own environment by adding a conditional compilation option (based on a new setting in circle/include/sysconfig.h) for i2ssoundbasedevice in the function CI2SSoundBaseDevice::RunI2S to use GPIO 28-31 and ALT 2 rather than GPIO 18-21 and ALT 0. This works for me, but I wonder if it would be better to add a cmdline option to make it a boot-time configuration setting.
I've not really looked into the boot-time configuration options, otherwise I'd have a go myself. If this is something you'd be interested in adding that would be great. If it is something you are interested in, but unlikely to get around to then let me know and I'll see if I can create a PR to do it myself (although I'm still a bit of a GitHub newbie at the moment, but I'm happy to have a go).
Many thanks,
Kevin
The text was updated successfully, but these errors were encountered: