Page 1 of 1

No audio from GPIO18. Please help me troubleshoot!

Posted: Sat Dec 30, 2017 2:43 pm
by WandererGen
I'm trying to get the audio working on my GBZ and am having issues.

I'm running sound from GPIO18 through a LPF build as suggested, then into the Adafruit 2.5W Amp, through the original Game Boy headphone jack and finally to a new speaker (picture below). When I boot up the Pi, I don't get any game sounds but can hear that subtle electronic white noise produced by an active speaker. This leads me to believe that some signal is getting to the speaker, but not sound. Can I rule out the connection based on that, though?

As far as changes on the Pi itself, I've only made the changes to config.txt for mono sound. Is there something I need to check in RetroPie?

I have a history of posting an immediately solving my own problem, but would appreciate some feedback nonetheless. And since a picture is worth a thousand words, let me know if you see any obvious flaws (noting that my LPF is a black box as show):

Image

Re: No audio from GPIO18. Please help me troubleshoot!

Posted: Sat Dec 30, 2017 4:36 pm
by rodocop
Do you have pics of the filter? Also note the adafruit amp has a small screw pot on it that may need to be adjusted. Also you can increase the volume from the audio mixer in the retropie menu as well.

And what was the exact code you added to the config.txt?

It's hard to tell. But I also assume your red signal wire from gpio 18 is going to a+ and ground to a-?

I suggest skipping the filter too. See if it's causing the issue.

Re: No audio from GPIO18. Please help me troubleshoot!

Posted: Sat Dec 30, 2017 5:53 pm
by tinkerBOY
I don't see any wire connected tothe amp's Input A-. What about the headphone jack, are you getting any sound? I suggest you put the headphone jack before the amplifier.

Re: No audio from GPIO18. Please help me troubleshoot!

Posted: Sun Dec 31, 2017 12:26 pm
by WandererGen
Thanks for the responses. I've removed the LPF and headphone jack, but neither produced any change. I've also manipulated the screw on the amp, but still no change other than some static as I turn and a little bleed over from radio frequencies. I'm tempted to just move over to USB audio, but I feel a need to understand what is going wrong here.

Should I see some sort of power light on the amp? Currently none of the LEDs light up when I power up the Pi.

Here is a pic of the code in config.txt:
Image

Here is an image of the underside of the amp, showing the bridge I made from the A- terminal to the ground wire:
Image

Re: No audio from GPIO18. Please help me troubleshoot!

Posted: Sun Dec 31, 2017 1:05 pm
by rodocop
Yeah. That wiring looks fine. And I don't think there are any leds that's light up on the amp.

You can always switch to gpio 13 (pwm1). See if it's a gpio issue. Do you have another speaker to test? Or maybe try on a fresh image?

Re: No audio from GPIO18. Please help me troubleshoot!

Posted: Sun Dec 31, 2017 6:49 pm
by tinkerBOY
You can directly solder the speaker to the Pi's pwm pin. Play any game or audio and you should hear a low volume sound from the speaker. Otherwise, there's something wrong with either the pi or some software setting.

Re: No audio from GPIO18. Please help me troubleshoot!

Posted: Wed Jan 03, 2018 9:03 am
by duskchaser
I ran into a similar issue with not getting PWM audio out, and resolved it by changing a setting in Retropie. I forget the setting exactly, but I think it was Audio Options, and there were few to choose from. Once I switched, I had PWM audio out of GPIO 18 (and 13).

I'd recommend changing the settings in Retropie for that. If you have more trouble, I could look at the setting I changed for more details.

Re: No audio from GPIO18. Please help me troubleshoot!

Posted: Wed Jan 03, 2018 4:16 pm
by jakejm79
Have you tested with the HDMI cable disconnected?

Re: No audio from GPIO18. Please help me troubleshoot!

Posted: Wed Jan 03, 2018 5:23 pm
by rodocop
jakejm79 wrote:
Wed Jan 03, 2018 4:16 pm
Have you tested with the HDMI cable disconnected?
Ah. Didn't think of that. With the HDMI connected it likely defaults to HDMI audio....worth a try.

Re: No audio from GPIO18. Please help me troubleshoot!

Posted: Sun Jan 07, 2018 3:09 pm
by WandererGen
Thanks for the continued support, everyone. After I had enough of fooling around with the GPIO option, I went with USB audio. I've been fiddling with it this weekend and finally have my full audio solution wired and working, including the potentiometer and headphone jack!

I did try removing the HDMI, but it didn't fix the issue. I guess I'll never know what was the cause, but the important thing is I can finally move on to final assembly!