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 15.4k 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.
    • retropieuser555R
      retropieuser555 @mitu
      last edited by

      @mitu here's the config for the patch:-

      # For more options and information see
      # http://www.raspberrypi.org/documentation/configuration/config-txt.md
      # Some settings may impact device functionality. See link above for details
      
      # uncomment if you get no picture on HDMI for a default "safe" mode
      #hdmi_safe=1
      
      # uncomment this if your display has a black border of unused pixels visible
      # and your display can output without overscan
      #disable_overscan=1
      
      # uncomment the following to adjust overscan. Use positive numbers if console
      # goes off screen, and negative if there is too much border
      #overscan_left=16
      #overscan_right=16
      #overscan_top=16
      #overscan_bottom=16
      
      # uncomment to force a console size. By default it will be display's size minus
      # overscan.
      #framebuffer_width=1280
      #framebuffer_height=720
      
      # uncomment if hdmi display is not detected and composite is being output
      #hdmi_force_hotplug=1
      
      # uncomment to force a specific HDMI mode (this will force VGA)
      #hdmi_group=1
      #hdmi_mode=1
      
      # uncomment to force a HDMI mode rather than DVI. This can make audio work in
      # DMT (computer monitor) modes
      #hdmi_drive=2
      
      # uncomment to increase signal to HDMI, if you have interference, blanking, or
      # no display
      #config_hdmi_boost=4
      
      # uncomment for composite PAL
      #sdtv_mode=2
      
      #uncomment to overclock the arm. 700 MHz is the default.
      #arm_freq=800
      
      # Uncomment some or all of these to enable the optional hardware interfaces
      #dtparam=i2c_arm=on
      #dtparam=i2s=on
      #dtparam=spi=on
      
      # Uncomment this to enable the lirc-rpi module
      #dtoverlay=lirc-rpi
      
      # Additional overlays and parameters are documented /boot/overlays/README
      
      # Enable audio (loads snd_bcm2835)
      dtparam=audio=on
      
      #config_hdmi_boost=0
      
      # force hdmi while the tv can take time before sending the signal on the hdmi output
      #hdmi_force_hotplug=1
      
      # uncomment for composite PAL
      #sdtv_mode=2
      
      # uncomment for lirc-rpi
      #dtoverlay=lirc-rpi
      
      # 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
      
      # uncomment if you don't want the rainbow at startup
      disable_splash=1
      
      # default CEC name
      cec_osd_name=recalbox
      
      # Overclock
      gpu_mem_256=128
      gpu_mem_512=256
      gpu_mem_1024=512
      
      avoid_safe_mode=1
      
      kernel=zImage
      
      #dtparam=audio=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
      dtoverlay=pwm-2chan,pin=18,func=2,pin2=19,func2=2
      disable_pvt=1
      disable_audio_dither=1
      dtoverlay=pwm-audio-pi-zero
      
      

      I've just tested with the regular stock config file that comes with the weekly retropie 2-3 image. Obviously doesn't give any video or audio as the pi isn't connected by hdmi but through the gpio pins. But ssh into the pi is giving me the same audio error as above.

      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

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

        But ssh into the pi is giving me the same audio error as above

        What's the output of:

        aplay -l
        amixer
        

        I see in the config that the on-board audio is not disabled, but the audio is also configured over the GPIO pins with the pwm-2chan and pwm-audio-pi-zero overlays, which might not work 100% on the new model.

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

          @mitu We get:-

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

          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

            I spent a good amount of time now on trying to figure out what is the problem. I don't think it's the overlays, since when you use a video splash screen, it gives out sound. It's probable that the splashscreen package uses pulseaudio while everything RetroArch related doesn't.

            mituM retropieuser555R 2 Replies Last reply Reply Quote 1
            • 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
                                            • 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.