RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Audio Settings w/ PulseAudio

    Scheduled Pinned Locked Moved Help and Support
    audiopulseaudio
    10 Posts 2 Posters 2.9k 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.
    • B
      bluestang
      last edited by bluestang

      @mitu I think there may be an issue with the PulseAudio settings in audiosettings.sh?

      I have a fully updated, stock RetroPie image on an RPi4 4GB and I installed/enabled PulseAudio.

      However, when I go to the Audio menu in EmulationStation I do not get any options to choose the output - HDMI 1 and/or Headphones...

      All I get is the 3 options - Mixer, Reset to default, and Disable PulseAudio.

      pacmd output below:

      pacmd list-sinks | grep -e 'alsa.name =' -e 'index:'
          index: 0
      		alsa.name = "bcm2835 HDMI 1"
        * index: 1
      		alsa.name = "bcm2835 Headphones"
      
      
      1 Reply Last reply Reply Quote 0
      • mituM
        mitu Global Moderator
        last edited by

        I'll take a look - does the Audio menu shows that PulseAudio in the title ?

        B 1 Reply Last reply Reply Quote 0
        • B
          bluestang @mitu
          last edited by

          @mitu said in Audio Settings w/ PulseAudio:

          I'll take a look - does the Audio menu shows that PulseAudio in the title ?

          Yes, the title reads Set audio output (PulseAudio).

          I can also confirm that removing PulseAudio via apt will once again allow me to choose the output - HDMI 1 or Headphones.

          The title in that cofing reads Set audio output (ALSA).

          1 Reply Last reply Reply Quote 0
          • mituM
            mitu Global Moderator
            last edited by

            Sadly, can't reproduce the error.
            Can you run

            sudo __debug=1 $HOME/RetroPie-Setup/retropie_packages.sh audiosettings gui 2> audio.log
            

            and post the resulting audio.log on pastebin.com ?

            B 2 Replies Last reply Reply Quote 1
            • B
              bluestang @mitu
              last edited by bluestang

              @mitu said in Audio Settings w/ PulseAudio:

              Sadly, can't reproduce the error.
              Can you run

              sudo __debug=1 $HOME/RetroPie-Setup/retropie_packages.sh audiosettings gui 2> audio.log
              

              and post the resulting audio.log on pastebin.com ?

              hmmm this seems like the error:

              ++ sudo -u pi XDG_RUNTIME_DIR=/run/user/1000 pacmd list-sinks
              ++ awk -F '[:=]' '/index/ { idx=$2;
                                       do {getline} while($0 !~ "alsa.name");
                                       print idx,gensub(/"|bcm2835\s+/,"","g", $2) }'
              awk: line 4: function gensub never defined
              

              The full log is here. (I had to reduce the log because it exceeded the max size for a free user)

              FWIW, I don't have the desktop installed, so not sure if that is contributing to the issue.

              1 Reply Last reply Reply Quote 0
              • B
                bluestang @mitu
                last edited by

                @mitu I just ran it down to not having gawk installed via apt. Looks like this needs to be a dependency added since evidently this is not installed on the stock RetroPie image?

                mituM 1 Reply Last reply Reply Quote 0
                • mituM
                  mitu Global Moderator @bluestang
                  last edited by

                  @bluestang I see, forgot that Debian defaults to mawk instead. Thanks for reporting it, will have to figure out how to solve it either by installing gawk or use mawk instead (preferred).

                  B 1 Reply Last reply Reply Quote 1
                  • B
                    bluestang @mitu
                    last edited by

                    @mitu said in Audio Settings w/ PulseAudio:

                    @bluestang I see, forgot that Debian defaults to mawk instead. Thanks for reporting it, will have to figure out how to solve it either by installing gawk or use mawk instead (preferred).

                    No problem, I stumbled onto the issue trying to reproduce an error from another thread.

                    IIRC, installing PulseAudio for the first time defaults to the Headphones sink output. This is evident even on the Full RPiOS images, where I would manually set the output device to HDMI via the sound control applet on the desktop.

                    On a separate thumb drive that I have the stock RetroPie image on, I manually set the sink output to HDMI (index 0). Once this issue is resolved users should be able to select either one depending on their setup.

                    mituM 1 Reply Last reply Reply Quote 0
                    • mituM
                      mitu Global Moderator @bluestang
                      last edited by

                      @bluestang It should be fixed now in latest RetroPie-Setup, make sure you update if you wan to test it again.

                      B 1 Reply Last reply Reply Quote 1
                      • B
                        bluestang @mitu
                        last edited by

                        @mitu said in Audio Settings w/ PulseAudio:

                        @bluestang It should be fixed now in latest RetroPie-Setup, make sure you update if you wan to test it again.

                        Thanks, works as expected.

                        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.