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 problems on RPI3B

    Scheduled Pinned Locked Moved Help and Support
    hdmi audioraspberry pi 3b
    14 Posts 3 Posters 1.6k 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.
    • Y
      yaksha42
      last edited by

      Pi Model or other hardware: Raspberry Pi 3 Model B
      Power Supply used: Charger 5V 2A 2.5A 3A 3.5A for Raspberry Pi 3 2 B+ Power Supply Adapter
      RetroPie Version Used (eg 3.6, 3.8.1, 4.1 - do not write latest): 4.6
      Built From: Pre made SD Image on RetroPie website
      USB Devices connected: Wireless keyboard, USB game controller
      Controller used: Wired Controller for Nintendo Switch - Chrome Metroid
      Error messages received: lvl10: VolumeControl: :into() - Failed to attach to default card
      Log found in /dev/shm/runcommand.log (if relevant): N/A
      Guide used: https://retropie.org.uk/docs/Sound-Issues/
      File: (File with issue - with FULL path)
      Emulator: NES and SNES
      Attachment of config files: https://pastebin.com/eqipnXbk
      How to replicate the problem: Any time I load a game ROM the audio does not play correctly.

      I originally set up RetroPi with an old monitor and a 3.5mm audio speaker. Worked pretty well. However, I decided I wanted to simplify things and just use the HDMI port for audio and video. I picked up a Roku TV and made the hardware changes, unplugging the speaker and just using the HDMI cable to the TV. The Pi was unplugged when I did this.

      I am getting almost no sound when playing games. There is some, but it's very sporadic. Almost as if music doesn't play but some sound effects do. I have cranked the audio on the TV up to max. I have tried multiple games and multiple emulators.

      I have tried multiple HDMI cables (different brands) and I have tried HDMI1 and HDMI2 connections on the TV. Same result every time.

      When I load a game I get this error:
      ALSA lib control.c:1375:(snd_ctl_open_noupdate) Invalid CTL hdmi
      1v10: VolumeControl::init() - Failed to attach to default card!

      I searched around and made some changes but nothing has changed.

      /boot/config.txt

      # uncomment to force a HDMI mode rather than DVI. This can make audio work in
      # DMT (computer monitor) modes
      hdmi_drive=2
      
      # Setting hdmi_force_hotplug to 1 pretends that the HDMI hotplug signal is asse$
      hdmi_force_hotplug=1
      
      # Pretends all audio formats are supported by display, allowing passthrough of $
      # May not be needed for all HDMI devices
      hdmi_force_edid_audio=1
      

      In EmulationStation I have:
      Sound Settings > Audio Card > HDMI
      Sound Settings > Audio Device > PCM
      Sound Settings > OMX Player Audio Device > HDMI

      I am able to run the following commands from the command line and the sound files play just fine.

      aplay /usr/share/sounds/alsa/Front_Center.wav
      speaker-test -c 2 -s 1 -t wav -W /usr/share/sounds/alsa -w Front_Center.wav
      

      But I can't play any games and correctly hear the audio.

      I got into alsamixer and increased the volume there but that doesn't seem to have done anything.

      mituM 1 Reply Last reply Reply Quote 0
      • quicksilverQ
        quicksilver
        last edited by

        See here https://retropie.org.uk/forum/topic/26521/latest-update-lvl0-volumecontrol-init-failed-to-find-mixer-elements/3?_=1591315347688

        1 Reply Last reply Reply Quote 0
        • Y
          yaksha42
          last edited by

          I added "HDMI" to AudioDevice in /configs/all/emulationstation/es_settings.cfg and rebooted but I am still having the same issue.

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

            The correct settings for EmulationStation would be

            • Sound Settings > Audio Card > Default
            • Sound Settings > Audio Device > HDMI (via configuration file)
            • Sound Settings > OMX Player Audio Device > HDMI

            But EmulationStation settings do not influence how emulator's picked the sound card, so that's another story.

            Use the Audio menu in RetroPie and set the audio to HDMI, then re-try the audio by in emulators/games.

            1 Reply Last reply Reply Quote 0
            • Y
              yaksha42
              last edited by

              I made the changes in EmulationStation to match above. The "Invalid CTL hdmi" error went away but I am still getting the "Failed to attach to default card!" error message and the audio is still not working correctly.

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

                @yaksha42 Did you entered hdmi in the configuration file ? Try to enter it as uppercase - HDMI.

                1 Reply Last reply Reply Quote 0
                • Y
                  yaksha42
                  last edited by

                  I entered it all in caps when I did the initial change.

                  <string name="AudioDevice" value="HDMI" />

                  1 Reply Last reply Reply Quote 0
                  • Y
                    yaksha42
                    last edited by

                    I just tried.

                    sudo apt update
                    sudo apt full-upgrade
                    

                    And now I have no sound at all. I checked all the configs and everything still seems to be set correctly. It's a fairly new install of RetroPie so maybe it's a good idea to just re-image the SD card and start again?

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

                      Can you run

                      aplay -l
                      

                      and post the output ?

                      1 Reply Last reply Reply Quote 0
                      • Y
                        yaksha42
                        last edited by

                        **** List of PLAYBACK Hardware Devices ****
                        card 0: b1 [bcm2835 HDMI 1], device 0: bcm2835 HDMI 1 [bcm2835 HDMI 1]
                        Subdevices: 4/4
                        Subdevice #0: subdevice #0
                        Subdevice #1: subdevice #1
                        Subdevice #2: subdevice #2
                        Subdevice #3: subdevice #3
                        card 1: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
                        Subdevices: 4/4
                        Subdevice #0: subdevice #0
                        Subdevice #1: subdevice #1
                        Subdevice #2: subdevice #2
                        Subdevice #3: subdevice #3

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

                          Ok, so this shows you're using the latest Raspbian updates, which changed the audio setup. If you've chosen HDMI in the Audio menu, then a configuration file should have been created in $HOME/.asoundrc, where HDMI should be set as default audio card. The contents of the file should look like this:

                          pcm.!default {
                            type asym
                            playback.pcm {
                              type plug
                              slave.pcm "output"
                            }
                            capture.pcm {
                              type plug
                              slave.pcm "input"
                            }
                          }
                          pcm.output {
                            type hw
                            card 0
                          }
                          ctl.!default {
                            type hw
                            card 0
                          }
                          

                          If you don't have this file, then update RetroPie-Setup to the latest version and re-configure the Audio menu from in the RetroPie system (not in EmulationStation). Try again and see if your games have sound.

                          1 Reply Last reply Reply Quote 0
                          • Y
                            yaksha42
                            last edited by

                            I didn't have the file so I updated the RetroPie-Setup. I configued the Audio menu in RetroPie to be "HDMI 1". I am still getting no sound in any games.

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

                              Does speaker-test produce any sound ? Make sure the volume is up (use alsamixer to check/modify it). If that doesn't work, then I don't think is a software/configuration issue.

                              1 Reply Last reply Reply Quote 0
                              • Y
                                yaksha42
                                last edited by

                                I couldn't get speaker-test to work, or aplay. alsamixer had volume.

                                I ended up just re-imaging the SD card with a fresh copy of RetroPie. This fixed my issue. All ROMs I've played have had appropriate audio.

                                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.