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

    No sound retroflag gpi case with pi zero w 2 (Solved)

    Scheduled Pinned Locked Moved Help and Support
    retroflag gpipi zero w 2 pla
    53 Posts 14 Posters 13.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.
    • mituM
      mitu Global Moderator @Philcomm
      last edited by mitu

      @philcomm said in No sound retroflag gpi case with pi zero w 2:

      It's probable that the splashscreen package uses pulseaudio while everything RetroArch related doesn't.

      No, it's not the splashscreen. The errors come from ES, which is not related to the splashscreen at all.

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

        @retropieuser555 said in No sound retroflag gpi case with pi zero w 2:

        aplay: device_list:272: no soundcards found...

        Do you have an $HOME/.asoundrc or /etc/asound.confg file ?

        retropieuser555R 1 Reply Last reply Reply Quote 0
        • retropieuser555R
          retropieuser555 @Philcomm
          last edited by

          @philcomm okay that's interesting, I didn't notice that. I just tested a splashscreen with audio and it did play the sound for me too, no errors.

          I tested out the beta of the recalbox image they have and it played audio as well, so it does seem workable somehow, there config file is quite different though, I always thought the config.txt is universal to the raspberry pi itself, rather than the OS etc?

          Pi 5 4GB

          Retroflag GPI with raspberry pi zero 2 w/ wifi

          Retroachievements:- lovelessrapture

          PhilcommP 1 Reply Last reply Reply Quote 0
          • retropieuser555R
            retropieuser555 @mitu
            last edited by

            @mitu the files aren't there. I guess need to install something?

            pi@retropie:~ $ cd ..
            pi@retropie:/home $ ls
            pi
            pi@retropie:/home $ cd /etc
            pi@retropie:/etc $ ls
            adduser.conf            group            modprobe.d        rpc
            alternatives            group-           modules           rpi-issue
            apparmor.d              gshadow          modules.bak       rsyslog.conf
            apt                     gshadow-         modules-load.d    rsyslog.d
            avahi                   gss              motd              samba
            bash.bashrc             host.conf        mtab              securetty
            bash_completion         hostname         nanorc            security
            bash_completion.d       hosts            netconfig         selinux
            bindresvport.blacklist  hosts.allow      network           sensors3.conf
            binfmt.d                hosts.deny       networks          sensors.d
            bluetooth               idmapd.conf      nsswitch.conf     services
            ca-certificates         ifplugd          openal            shadow
            ca-certificates.conf    init             opt               shadow-
            calendar                init.d           os-release        shells
            cifs-utils              initramfs-tools  pam.conf          skel
            console-setup           inputrc          pam.d             splashscreen.list
            cowpoke.conf            insserv          passwd            ssh
            cron.d                  insserv.conf     passwd-           ssl
            cron.daily              insserv.conf.d   paxctld.conf      subgid
            cron.hourly             iproute2         perl              subuid
            cron.monthly            issue            pmount.allow      subversion
            crontab                 issue.net        polkit-1          sudoers
            cron.weekly             kernel           ppp               sudoers.d
            dbus-1                  ldap             profile           sysctl.conf
            debconf.conf            ld.so.cache      profile.d         sysctl.d
            debian_version          ld.so.conf       protocols         systemd
            default                 ld.so.conf.d     pulse             terminfo
            deluser.conf            ld.so.preload    python            timezone
            devscripts.conf         libaudit.conf    python2.7         tmpfiles.d
            dhcp                    libnl-3          python3           triggerhappy
            dhcpcd.conf             locale.alias     python3.7         ucf.conf
            dkms                    locale.gen       rc0.d             udev
            dphys-swapfile          localtime        rc1.d             ufw
            dpkg                    logcheck         rc2.d             update-motd.d
            emacs                   login.defs       rc3.d             usb_modeswitch.conf
            emulationstation        logrotate.conf   rc4.d             usb_modeswitch.d
            environment             logrotate.d      rc5.d             usbmount
            fake-hwclock.data       machine-id       rc6.d             vdpau_wrapper.cfg
            fb.modes                magic            rc.local          vim
            fonts                   magic.mime       rcS.d             vulkan
            fstab                   mailcap          request-key.conf  wgetrc
            fuse.conf               mailcap.order    request-key.d     wpa_supplicant
            gai.conf                manpath.config   resolv.conf       X11
            gdb                     mc               resolv.conf.bak   xattr.conf
            glvnd                   mime.types       resolvconf.conf   xdg
            groff                   mke2fs.conf      rmt
            
            

            Pi 5 4GB

            Retroflag GPI with raspberry pi zero 2 w/ wifi

            Retroachievements:- lovelessrapture

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

              @retropieuser555 Is this before adding the RetroFlag's drivers/scripts or after ?
              Normally, on a clean install, none of the files are present. Since aplay doesn't list any sound cards, the error you get in ES is normal, but I'm wondering if the GPIO connection on the RetroFlag case don't need additional configuration.

              The splashscreen uses omxplayer to play sound, which bypasses any ALSA configuration, but EmulationStation (and most of the emulators) need a working ALSA config.

              I always thought the config.txt is universal to the raspberry pi itself, rather than the OS etc?

              No, it's specific to the RPI bootloader, but there are other boot methods (U-Boot perhaps) that don't use the file.

              retropieuser555R 1 Reply Last reply Reply Quote 0
              • retropieuser555R
                retropieuser555 @mitu
                last edited by

                @mitu This is after adding the config.txt and overlays that the retroflag gpi. I can test it with the stock config.txt and original dpi24 overlay if that helps?

                Pi 5 4GB

                Retroflag GPI with raspberry pi zero 2 w/ wifi

                Retroachievements:- lovelessrapture

                mituM 1 Reply Last reply Reply Quote 0
                • PhilcommP
                  Philcomm
                  last edited by

                  After further testing, I can't get either alsa nor pulse to work as sound drivers.
                  alsa doesn't find any sound card, thus is not able to play.
                  pulse can find the virtual sound card, but cannot output sound for some reason.

                  @mitu you are right, sound plays just fine with omxplayer.

                  I don't think it's the GPi cases' fault, but rather the drivers not able to play over GPIOs?

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

                    @retropieuser555 said in No sound retroflag gpi case with pi zero w 2:

                    I can test it with the stock config.txt and original dpi24 overlay if that helps?

                    You can do that, but - at best - you'll get sound only on the HDMI port, which is not what you want. But this configuration should get rid of the ALSA error and you'd have at least one card listed by aplay.

                    1 Reply Last reply Reply Quote 0
                    • PhilcommP
                      Philcomm
                      last edited by

                      @mitu you think it's worth a shot trying to manually create the asound.conf file?

                      1 Reply Last reply Reply Quote 0
                      • PhilcommP
                        Philcomm @retropieuser555
                        last edited by

                        @retropieuser555 said in No sound retroflag gpi case with pi zero w 2:

                        @philcomm okay that's interesting, I didn't notice that. I just tested a splashscreen with audio and it did play the sound for me too, no errors.

                        I tested out the beta of the recalbox image they have and it played audio as well, so it does seem workable somehow, there config file is quite different though, I always thought the config.txt is universal to the raspberry pi itself, rather than the OS etc?

                        Do you still have that image? My download is super slow, it takes another two hours to finish (around 60kb/s)

                        retropieuser555R 1 Reply Last reply Reply Quote 0
                        • retropieuser555R
                          retropieuser555 @Philcomm
                          last edited by

                          @philcomm the recalbox beta? Yeah I've got it here, should I post their config or something from it?

                          Pi 5 4GB

                          Retroflag GPI with raspberry pi zero 2 w/ wifi

                          Retroachievements:- lovelessrapture

                          PhilcommP 1 Reply Last reply Reply Quote 0
                          • PhilcommP
                            Philcomm @retropieuser555
                            last edited by

                            @retropieuser555 I wonder if there is any difference in the /boot/config.txt file compared to RetroPie. Also, is the md5 hash of /boot/overlays/pwm-audio-pi-zero.dtbo the same?

                            retropieuser555R 1 Reply Last reply Reply Quote 0
                            • retropieuser555R
                              retropieuser555 @Philcomm
                              last edited by

                              @philcomm Here's there config file:-

                              ############################################################################
                              # Boot loader configuration                                                #
                              # Warning: do not edit this file as it will be overwritten when upgrading! #
                              ############################################################################
                              
                              # Using /etc/modules is deprecated and no longer supported on 4.4 kernel
                              # So manually enable audio
                              dtparam=audio=on
                              
                              # if you plug your tv at the same time as your rpi and that the rpi switches from the hdmi or
                              # give a low resolution because tv had no enough time to initialize it
                              boot_delay=3
                              
                              # disable boot rainbow
                              disable_splash=1
                              
                              # default CEC name
                              cec_osd_name=recalbox
                              
                              avoid_safe_mode=1
                              
                              kernel=boot/linux
                              initramfs boot/initrd.gz
                              
                              # force hdmi while the tv can take time before sending the signal on the hdmi output
                              hdmi_force_hotplug=1
                              
                              # total amount of GPU memory
                              gpu_mem_256=128
                              gpu_mem_512=128
                              gpu_mem_1024=448
                              
                              # your settings can be set in /boot/recalbox-user-config.txt
                              include recalbox-user-config.txt
                              
                              # overclocking settings are automatically managed in this file
                              # do not remove this line, nor edit the file
                              include recalbox-oc-config.txt
                              
                              # Raise the first security limit up to 70° instead of 60° for pi3 and pi4
                              [pi3]
                              temp_soft_limit=70
                              dtoverlay=vc4-kms-v3d
                              include recalbox-crt-config.txt
                              
                              [pi4]
                              temp_soft_limit=70
                              dtoverlay=vc4-kms-v3d
                              include recalbox-crt-config.txt
                              
                              # disable 4k resolution
                              hdmi_pixel_freq_limit:0=200000000
                              hdmi_pixel_freq_limit:1=200000000
                              
                              [board-type=0x12]
                              dtoverlay=vc4-kms-v3d
                              
                              # custom config
                              [all]
                              
                              

                              They don't seem to be using the pwm-audio-pi-zero.dtbo overlay in the config and it isn't in the overlay folders at all. Any ideas how they got this working? Guess can go onto their forum and ask them

                              Pi 5 4GB

                              Retroflag GPI with raspberry pi zero 2 w/ wifi

                              Retroachievements:- lovelessrapture

                              PhilcommP 1 Reply Last reply Reply Quote 0
                              • PhilcommP
                                Philcomm @retropieuser555
                                last edited by Philcomm

                                @retropieuser555 Does the /etc/asound.conf file exists? If yes, what's the content?

                                retropieuser555R 1 Reply Last reply Reply Quote 0
                                • retropieuser555R
                                  retropieuser555 @Philcomm
                                  last edited by retropieuser555

                                  @philcomm

                                  pcm.monocard{
                                  	slave.pcm "hw:0"
                                  	slave.channels 2
                                  	type route
                                  	ttable {
                                  		# Copy both input channels to output channel 1 (Right).
                                  		0.1 1
                                  		1.1 1
                                  		# Copy both input channels to output channel 0 (Left).
                                  		0.0 1
                                  		1.0 1
                                  		}
                                  }
                                  
                                  pcm.!default monocard
                                  
                                  

                                  Thing is though, I don't know a great deal about recalbox, but it's not built on raspbian? Think if I used this in the retropie build it'll work?

                                  Pi 5 4GB

                                  Retroflag GPI with raspberry pi zero 2 w/ wifi

                                  Retroachievements:- lovelessrapture

                                  PhilcommP 1 Reply Last reply Reply Quote 0
                                  • PhilcommP
                                    Philcomm @retropieuser555
                                    last edited by

                                    @retropieuser555 said in No sound retroflag gpi case with pi zero w 2:

                                    @philcomm

                                    pcm.monocard{
                                    	slave.pcm "hw:0"
                                    	slave.channels 2
                                    	type route
                                    	ttable {
                                    		# Copy both input channels to output channel 1 (Right).
                                    		0.1 1
                                    		1.1 1
                                    		# Copy both input channels to output channel 0 (Left).
                                    		0.0 1
                                    		1.0 1
                                    		}
                                    }
                                    
                                    pcm.!default monocard
                                    
                                    

                                    Thing is though, I don't know a great deal about recalbox, but it's not built on raspbian? Think if I used this in the retropie build it'll work?

                                    I will have to try later if that works

                                    1 Reply Last reply Reply Quote 0
                                    • S
                                      Slime1982
                                      last edited by

                                      Hi, I have been struggling with the same issue, and have managed to solve it.

                                      The issue is that by default the latest version of Raspbian disables the audio if nothing is connected to HDMI.

                                      Use this one line entry in config.txt to fix it:

                                      dtoverlay=audremap,pins_18_19,enable_jack=on
                                      

                                      You don't need the pwm-audio-pi-zero.dtbo file and you can remove all the custom audio entries from Retroflag's config.txt and use this one line instead. (leave all the entries for the LCD in obviously).

                                      The custom asound.conf file in recalbox is used to downmix stereo audio to mono, as the built in speaker on the GPi only outputs the right channel.

                                      retropieuser555R 1 Reply Last reply Reply Quote 5
                                      • retropieuser555R
                                        retropieuser555 @Slime1982
                                        last edited by

                                        @slime1982 Hey that's great news can you post your config.txt file please? I think I'm deleting the wrong lines out

                                        Pi 5 4GB

                                        Retroflag GPI with raspberry pi zero 2 w/ wifi

                                        Retroachievements:- lovelessrapture

                                        S 1 Reply Last reply Reply Quote 0
                                        • S
                                          Slime1982 @retropieuser555
                                          last edited by Slime1982

                                          @retropieuser555

                                          Start with the stock config.txt and add this at the end:

                                          #Pi Zero 2 W GPi Config
                                          dtoverlay=audremap,pins_18_19,enable_jack=on
                                          display_rotate=1
                                          dtoverlay=dpi24
                                          overscan_left=0
                                          overscan_right=0
                                          overscan_top=0
                                          overscan_bottom=0
                                          framebuffer_width=320
                                          framebuffer_height=240
                                          enable_dpi_lcd=1
                                          display_default_lcd=1
                                          dpi_group=2
                                          dpi_mode=87
                                          dpi_output_format=0x6016
                                          #hdmi_timings=320 0 28 18 28 480 0 2 2 4 0 0 0 60 0 32000000 6
                                          hdmi_timings=240 1 38 10 20 320 1 20 4 4 0 0 0 60 0 6400000 1
                                          

                                          you still need Retroflag's dpi24.dtbo, but you don't need to copy the pwm audio overlay file.

                                          The custom asound.conf file doesn't work, I suspect because the sound device is now referred to as headphones instead of pcm, but I'm working on it now.

                                          Also, go into raspi-config, system options and in audio select 'headphones'. it should be the only option, but select it to ensure it is the default device.

                                          PhilcommP S J 3 Replies Last reply Reply Quote 4
                                          • PhilcommP
                                            Philcomm @Slime1982
                                            last edited by

                                            @slime1982 Are you an angel? insert Anakin Star Wars GIF

                                            S 1 Reply Last reply Reply Quote 1
                                            • 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.