RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    Volume control while in a game?

    Scheduled Pinned Locked Moved General Discussion and Gaming
    gpio volume
    19 Posts 3 Posters 6.5k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • josephchrzempiecJ
      josephchrzempiec
      last edited by

      Hello and you are correct that is my fault not explaining what i would like to do. I'm also working on a game system. Pwm audio using the Pi zero board. Problem is the audio amp does not have a volume control. There are 2 speakers left and right channel each one has it's own amp. But these amp's does not have a volume control. I did notice that i can go into the settings and raise and lower the volume that way. But sense I'm playing the game i don't want to exit the same just to Lower the volume down. So I'm asking If it is possible to do the volume controls using the GPIO Pins using push buttons? One for Volume up one for Volume Down and one For mute.

      monstermadeofmanM 1 Reply Last reply Reply Quote 0
      • monstermadeofmanM
        monstermadeofman @josephchrzempiec
        last edited by

        @josephchrzempiec

        Ok not sure why you are using 2 individual amps for the speakers when you can use 1 for both, unless you only want mono sound?

        Check out Sudomod.com the guys there are pretty focused on Gameboy Zero projects but alot of the stuff is transferable.

        What are you building your handheld into?

        Not all those who wander are lost

        1 Reply Last reply Reply Quote 0
        • josephchrzempiecJ
          josephchrzempiec
          last edited by josephchrzempiec

          The amps are mono. Single input, Single output. Was trying to do Stereo for left and right. Yes into a handeld the wii u case.

          1 Reply Last reply Reply Quote 0
          • monstermadeofmanM
            monstermadeofman
            last edited by

            They should only be mono if you mad them that way. Even though the Gameboy zero build outputs mono on the speaker (literally cause the left and right channels are wired to the same line. The headphone jack has stereo sound.

            alt text

            This should help you build a new amp that does left and right channel for stereo.

            The ones you've build will put put mono even with 2 speakers.

            Not all those who wander are lost

            1 Reply Last reply Reply Quote 0
            • josephchrzempiecJ
              josephchrzempiec
              last edited by

              You are correct i have a left and right channel speakers but each channel has it's own amp. It is in Stereo. Not mono. But the audio is not the problem. The problem is controlling the volume while in the game sense there is no volume controls on the amp.

              1 Reply Last reply Reply Quote 0
              • monstermadeofmanM
                monstermadeofman
                last edited by

                What I'm saying is you don't need individual amps for Left and Right. If you follow this guide it will give you a single filter/amp for both channels and enable you to put a volume control pot on this that will allow to control the volume in analog as apposed to digital. Meaning you have volume control whenever.

                Not all those who wander are lost

                1 Reply Last reply Reply Quote 0
                • josephchrzempiecJ
                  josephchrzempiec
                  last edited by

                  Oh I'm totally sorry i didn't understand. Now i get what you meant thank you. I do have one pot a left and right i got from radioshack a while back i never used Click here

                  cyperghostC 1 Reply Last reply Reply Quote 0
                  • monstermadeofmanM
                    monstermadeofman
                    last edited by

                    It's fine dude no problem. Those pots are fine I've used them in my GBZ build

                    Not all those who wander are lost

                    1 Reply Last reply Reply Quote 0
                    • cyperghostC
                      cyperghost @josephchrzempiec
                      last edited by cyperghost

                      @josephchrzempiec At least and as I always say ... use I2S rather then PWM. The PWM sound lacks of clearness and it always brittles with hisses and pops. And you don't need two speakers because the Adafruit I2S mixes stereo channels down to own speaker output. So you have left and right audio channel together in one speaker.

                      I made good experince with my little foldable Popeye Pie.

                      monstermadeofmanM 1 Reply Last reply Reply Quote 0
                      • monstermadeofmanM
                        monstermadeofman @cyperghost
                        last edited by

                        @cyperghost I was under the impression that Pi zero doesn't have I2S that you can access without using the USB.

                        I've gone for PWN audio as I'm using the USB to wire the controls in.

                        Not all those who wander are lost

                        cyperghostC 1 Reply Last reply Reply Quote 0
                        • cyperghostC
                          cyperghost @monstermadeofman
                          last edited by cyperghost

                          @monstermadeofman You can use I2S even on a Pi Zero :) You just have to use the Hifiberry overlay and you are ready to go. The sound is more powerfull and 100% clear. You just hear one pop if the AMP is gonna activated and deactivated. In idle (in the ES game selection menu) is 100% NO noise! Follow the link to my build I made for month. In the last posting is a picture of the wired I2S DAC.

                          1 Reply Last reply Reply Quote 0
                          • monstermadeofmanM
                            monstermadeofman
                            last edited by

                            Ahh i see. I'm doing a GBZ build and there is no room in there for that haha.

                            I'm PWM audio and to take out the hissing the board I'm waiting on has the filtering plus some nice little ferrite beads to take away a lot of noise

                            Not all those who wander are lost

                            cyperghostC 1 Reply Last reply Reply Quote 0
                            • cyperghostC
                              cyperghost @monstermadeofman
                              last edited by

                              @monstermadeofman Sorry I didn't get you. The I2S device from adafruit got the same size as the common PWM amps :)

                              monstermadeofmanM 1 Reply Last reply Reply Quote 0
                              • monstermadeofmanM
                                monstermadeofman @cyperghost
                                last edited by

                                @cyperghost

                                I'm waiting on this little beauty for my controls, sound and power distribution :)

                                alt text

                                Not all those who wander are lost

                                cyperghostC 1 Reply Last reply Reply Quote 1
                                • cyperghostC
                                  cyperghost @monstermadeofman
                                  last edited by

                                  @monstermadeofman Haha ... Okay :) Size matters. Were did you get this? Looks awesome!

                                  monstermadeofmanM 1 Reply Last reply Reply Quote 0
                                  • monstermadeofmanM
                                    monstermadeofman @cyperghost
                                    last edited by

                                    @cyperghost Audi mod forum. I haven't got mine yet but a guy called helder over there designs them and sells them.

                                    Not all those who wander are lost

                                    1 Reply Last reply Reply Quote 0
                                    • First post
                                      Last post

                                    Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                                    Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.