Page 1 of 1

Audio Help!

Posted: Sun Apr 26, 2020 3:24 pm
by gamer.welshnut
Hey guys,

I am pretty far into my first GBZ build. Got everything working, roms, gamepad buttons etc.

But I cannot get any audio from my speaker at all... I am using the PAM8302 Amplifier and have wired it up to a DMG speaker, power supply and a 5 pin volume controller.

I am guessing my wiring is wrong or something as the Amplifier is definitely getting power but I've got nothing coming out of the speaker?

I have this coding in my config.txt file, is it right?

Code: Select all

# Enable audio (loads snd_bcm2835)
dtparam=audio=on
gpu_mem_256=128
gpu_mem_512=256
gpu_mem_1024=256
overscan_scale=1
disable_audio_dither=1

# 2 channel audio
dtoverlay=pwm-2chan,pin=12,func=2,pin2=13,func2=4

# 1 channel audio
# dtoverlay=pwm,pin=12,func=2
I have also attached images of my wiring. And a picture of my audio jack. I did have the jack wired but then took it off to just have the speaker connected to test but still don't get anything from it...

I also attached the wiring diagram I used to wire it up, I think it has come from a guy named "Rodocop" on here. Seems like a well known person around here lol I got it from this topic viewtopic.php?t=5031 after finding it through google.

I have wired the jack, amp and speaker exactly as that wiring diagram but still no sound!

Any help is much appreciated! Thanks all!

Re: Audio Help!

Posted: Mon Apr 27, 2020 7:57 am
by gamer.welshnut
Also, another question...

Do you need a Power Boost board to power the Amplifier?

Re: Audio Help!

Posted: Mon Apr 27, 2020 8:55 am
by infinitLoop
gamer.welshnut wrote:
Mon Apr 27, 2020 7:57 am
Also, another question...

Do you need a Power Boost board to power the Amplifier?
what are you powering from if you don't have a boost? what's wired to the power strip? those amp should get 5v, so if you don't have a boost, you can wire to 5v on the pi probably.

as for your issue... i'd recommend first simplifying, and working up from there. if you wire just through the amp to the speaker, you can tell if those work, then add in the volume pot, and then the headphone jack. that way you can check each one individually.

also, i don't think that the stock gameboy speaker is going to work well with that amp, and they are easily damaged when soldering to them. you might want to order some cheap 8ohm/2watt ones that you can try with.


.

Re: Audio Help!

Posted: Mon Apr 27, 2020 9:02 am
by infinitLoop
gamer.welshnut wrote:
Sun Apr 26, 2020 3:24 pm
I have this coding in my config.txt file, is it right?

Code: Select all

# Enable audio (loads snd_bcm2835)
dtparam=audio=on
gpu_mem_256=128
gpu_mem_512=256
gpu_mem_1024=256
overscan_scale=1
disable_audio_dither=1

# 2 channel audio
dtoverlay=pwm-2chan,pin=12,func=2,pin2=13,func2=4

# 1 channel audio
# dtoverlay=pwm,pin=12,func=2
oh, some more issues...

in your config, it looks like you are trying to enable the 2-wire stereo output, but have only wired the mono way:

Code: Select all

# 2 channel audio
dtoverlay=pwm-2chan,pin=12,func=2,pin2=13,func2=4

# 1 channel audio
# dtoverlay=pwm,pin=12,func=2

you are telling it to look to pins 12 and 13, but you it appears that you actually wired to pin 18 (check pinout.xyz for how you can connect, and what the pin numbering is that corresponds to it)

you probably want:

Code: Select all

dtoverlay=pwm,pin=18,func=2


.

Re: Audio Help!

Posted: Mon Apr 27, 2020 10:16 am
by gamer.welshnut
infinitLoop wrote:
Mon Apr 27, 2020 9:02 am
gamer.welshnut wrote:
Sun Apr 26, 2020 3:24 pm
I have this coding in my config.txt file, is it right?

Code: Select all

# Enable audio (loads snd_bcm2835)
dtparam=audio=on
gpu_mem_256=128
gpu_mem_512=256
gpu_mem_1024=256
overscan_scale=1
disable_audio_dither=1

# 2 channel audio
dtoverlay=pwm-2chan,pin=12,func=2,pin2=13,func2=4

# 1 channel audio
# dtoverlay=pwm,pin=12,func=2
oh, some more issues...

in your config, it looks like you are trying to enable the 2-wire stereo output, but have only wired the mono way:

Code: Select all

# 2 channel audio
dtoverlay=pwm-2chan,pin=12,func=2,pin2=13,func2=4

# 1 channel audio
# dtoverlay=pwm,pin=12,func=2

you are telling it to look to pins 12 and 13, but you it appears that you actually wired to pin 18 (check pinout.xyz for how you can connect, and what the pin numbering is that corresponds to it)

you probably want:

Code: Select all

dtoverlay=pwm,pin=18,func=2


.
Awesome, thank you mate. I have actually wired the audio wire to Pin 13 lol and have now amended the config.txt file.

I also went back to just the speaker and wired that in directly to the PI and then on the amp... still no sound. So I tested the DMG Speaker and blew it... :roll: :lol:

So I will definitely be ordering a new speaker! :mrgreen: