• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
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 audio output when using PCM5102 on Pi Zero

Scheduled Pinned Locked Moved Help and Support
pcm5102pi zerohifiberry dacno sound
7 Posts 2 Posters 993 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.
  • A
    Affect
    last edited by Affect 2 Feb 2023, 17:57 2 Feb 2023, 17:53

    I purchased a PCM5102 sound card and am attempting to use it as an onboard sound device in my handheld game console project. I have soldered the pads on the back of the device and grounded the SCK pin as required for it to operate.

    I connected the card to a Pi 3A running a clean installation of Raspbian and enabled it in /boot/config.txt and /etc/asound.conf as described in this guide.

    The card works as intended and there is no issue with audio output from the Pi 3A.

    Next, I used a fresh install of Raspbian on the Pi Zero and followed the same steps as above and successfully tested audio output. Audio output does work on the Pi Zero

    However...

    Following this test, using a fresh install of RetroPie on the Pi Zero, I connected the sound card to my Pi Zero in the same exact way and configured the files again in the same way that the guide linked above described.

    My /config/boot.txt is as follows:

    #hdmi_safe=1
    #disable_overscan=1
    #overscan_left=16
    #overscan_right=16
    #overscan_top=16
    #overscan_bottom=16
    #framebuffer_width=320
    #framebuffer_height=240
    #hdmi_force_hotplug=1
    #hdmi_drive=2
    #config_hdmi_boost=4
    #sdtv_mode=2
    #arm_freq=800
    #dtparam=i2c_arm=on
    
    #modified
    dtparam=i2s=on
    
    dtparam=spi=on
    #dtoverlay=gpio-ir,gpio_pin=17
    #dtoverlay=gpio-ir-tx,gpio_pin=18
    
    #modified
    #dtparam=audio=on
    
    [all]
    gpu_mem_256=128
    gpu_mem_512=256
    gpu_mem_1024=256
    overscan_scale=1
    
    #added
    dtoverlay=hifiberry-dac
    

    I verified when running the command:

    aplay -l
    

    the device does show up:

    pi@retropie:~ $ aplay -l
    **** List of PLAYBACK Hardware Devices ****
    card 0: sndrpihifiberry [snd_rpi_hifiberry_dac], device 0: HifiBerry DAC HiFi pcm5102a-hifi-0 [HifiBerry DAC HiFi pcm5102a-hifi-0]
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    

    My /etc/asound.conf file contains:

    pcm.!default {
            type hw
            card 0
    }
    
    ctl.!default {
            type hw
            card 0
    }
    

    I performed the following test:

    aplay <wav file I have>
    speaker-test -D default -c 2 -twav
    mplayer <wave file I have>
    

    In this case, there was no audio output from the device despite no errors being thrown in the console. The file modifications I made to the Pi Zero running RetroPie were the same in all three cases. I also used the same power supply, cables, and headphones. I have also messed with /usr/share/alsa/alsa.conf and ~/.emulationstation/es_settings.cfg and changing /boot/config.txt With no effect.

    Of course, I have also tested to see if the device appears in the Audio settings of emulationstation and the RetroPie settings and it did not.

    I have exhausted all my options and would like to know if anyone has any ideas.
    Thanks

    M 1 Reply Last reply 2 Feb 2023, 18:43 Reply Quote 0
    • M
      mitu Global Moderator @Affect
      last edited by 2 Feb 2023, 18:43

      @Affect said in No audio output when using PCM5102 on Pi Zero:

      Of course, I have also tested to see if the device appears in the Audio settings of emulationstation and the RetroPie settings and it did not.

      That's normal, the Audio menu in RetroPie only covers the on-board audio, but not external ones.

      Stupid question, did you check the volume/mute settings with alsamixer ?

      A 1 Reply Last reply 2 Feb 2023, 18:48 Reply Quote 0
      • A
        Affect @mitu
        last edited by 2 Feb 2023, 18:48

        @mitu I just checked and the volume is at 100 When the Default card is selected. When press f6 to select the other card, it displays "This sound device does not have any controls" but that is expected since it does not.

        1 Reply Last reply Reply Quote 0
        • M
          mitu Global Moderator
          last edited by 2 Feb 2023, 18:52

          And the card is not muted ?
          You can add a software mixer to control the volume if you wish.

          A 1 Reply Last reply 2 Feb 2023, 18:57 Reply Quote 0
          • A
            Affect @mitu
            last edited by 2 Feb 2023, 18:57

            @mitu Could you point me to a resource for that please?

            M 1 Reply Last reply 2 Feb 2023, 19:02 Reply Quote 0
            • M
              mitu Global Moderator @Affect
              last edited by 2 Feb 2023, 19:02

              • https://alsa.opensrc.org/How_to_use_softvol_to_control_the_master_volume
              • https://forums.raspberrypi.com/viewtopic.php?p=1128700#p1128700
              1 Reply Last reply Reply Quote 0
              • A
                Affect
                last edited by 3 Feb 2023, 01:50

                I want to add that I have narrowed down my issue. The sound stops working due to my spi display. interfering with it. I suppose this topic is no longer relevant to this forum.

                1 Reply Last reply Reply Quote 0
                7 out of 7
                • First post
                  7/7
                  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.

                  This community forum collects and processes your personal information.
                  consent.not_received