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

Question: Support for GPIO audio PWM module #264

Open
aytekns opened this issue Apr 9, 2024 · 3 comments
Open

Question: Support for GPIO audio PWM module #264

aytekns opened this issue Apr 9, 2024 · 3 comments

Comments

@aytekns
Copy link

aytekns commented Apr 9, 2024

Hi,

I've been using the BMC64 for a few months now and I'm enjoying every moment. Great project.
I'm also planing to build, using 3D printer a Commodore 128D case for it and attach a small LCD screeen
also mounted in a 3D printed retro screen case.

I bought a GPIO audio PWM expansion module
but I do not know if BMC64 supports it and if so what are the configuration changes I need to apply to the
different setting files for it to work.

Is it supported?
If so, can you help me configure it?

Thanks, and again, great project,

@mcgurk
Copy link

mcgurk commented Apr 9, 2024

In some cases dtoverlay setting can be used to get PWM audio from GPIO:
https://wiki.batocera.org/audio_via_gpio_rpi_only

BMC64 uses Circle, so if Circle doesn't support it, BMC64 cannot support it. I'm pretty sure that Circle doesn't support audio from PWM-GPIO. Here is documentation about Circle GPIO-support:
https://circle-rpi.readthedocs.io/en/46.0/basic-system-services/gpio-access.html

Investigate if Circle supports that module and after that we can continue discussion here. If Circle doesn't support, create issue to Circle:
https://github.com/rsta2/circle

One option is to rewire that module to Raspberry Pi audio PWM-output pins, but that can be little unpractical.
With Raspberry Pi Zero you need PWM0_OUT and PWM1_OUT, which are on GPIO 40 and 45 and are not brought out on the Pi Zero.

@mcgurk
Copy link

mcgurk commented Apr 9, 2024

Hmm, here it says that PWM0_OUT and PWM1_OUT could be redirected to other GPIO pins:
https://learn.adafruit.com/introducing-the-raspberry-pi-zero/audio-outputs

"You can get to PWM0 on GPIO 18 (ALT5) and PWM1 on GPIO 13 (ALT0) or GPIO 19 (ALT5)"

If it needs only GPIO alternate function, then it could be possible with Circle:
https://circle-rpi.readthedocs.io/en/46.0/basic-system-services/gpio-access.html#initialization

@aytekns
Copy link
Author

aytekns commented Apr 10, 2024

Hi,
First, thank you @mcgurk for your reply.
Before I investigate further I want to mention that I'm using Raspberry Pi 3B+ and not Zero.
Would that make any difference?

I know I can use the RPi 3 audio jack (that's my backup plan) but I wanted to see if I can make
use of the module I already bought.

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

No branches or pull requests

2 participants