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

    Sound Settings / Audio Card Not Selecting ALSA default or sysdefault Hardware Device

    Scheduled Pinned Locked Moved Help and Support
    sound settingsalsahifiberry dacaudioaudio issue
    4 Posts 2 Posters 777 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.
    • H
      hooknc
      last edited by hooknc

      Good day,

      Here is my system information:
      Pi 4 (8 gig ram)
      CanaKit 3.5A USB-C Power Supply with Noise Filter
      Retropie Version 4.8.2 - Last Commit: 3 weeks ago (f271ce9d)
      Image downloaded from retropie website
      HiFiBerry DAC2 HD installed

      I have been just having a terrible time getting my HiFiBerry DAC to work properly.

      I have read numerous examples of how to properly setup ALSA.

      For now, I have settled on the following setup in my /etc/asound.conf file:

      # Works for hifiberry
      pcm.!default {
        type plug
        slave.pcm "dmix:sndrpihifiberry,0"
      }
      # Works for hdmi, plug works with hw but not dmix
      pcm.!sysdefault {
        type plug
        slave.pcm "hw:b1,0"
      }
      

      My goal is to be able to select using my hifi berry or hdmi via the sound settings in retropie.

      However, I am unable to get switching back and forth between the two devices/audio cards to work...

      Here is what I am expecting to work.

      When I go to Sound Settings -> Audio Card when I select default, the sound should come through the hifi berry (see the asound.conf above). This actually works and is expected behavior.

      However, I don't always want the sound to go through my receiver and speakers.

      So, I have hdmi setup as sysdefault in ALSA and when I go to Sound Settings -> Audio Card and select sysdefault, I would expect the sound to start coming though the hdmi (see the asound.conf above).

      However, the sound still comes though the receiver/speakers (the default device) and not the hdmi (sysdefault).

      What am I doing wrong and how can I achieve my goal of being able to select which device plays sound?

      Does Sound Settings -> Audio Device have to be set to a different specific value for this plan/idea to work?

      Any friendly advice would be greatly appreciated.

      BTW, I am able to play sounds through both the hdmi and hifiberry using omxplayer.

      Here are the two different commands:

      # Plays through the hifi berry -> receiver -> speakers
      $ omxplayer -o alsa:default -g --pos 00:00:15 "Banco De Gaia - Last Train To Lhasa (cd 1).mp3"
      
      # Plays though the hdmi -> tv
      $ omxplayer -o alsa:sysdefault -g --pos 00:00:15 "Banco De Gaia - Last Train To Lhasa (cd 1).mp3"
      ~~~
      1 Reply Last reply Reply Quote 0
      • mituM
        mitu Global Moderator
        last edited by mitu

        Seems like a bug limitation of EmulationStation's audio manager, it's not using the audio card/mixer set through the settings.

        H 1 Reply Last reply Reply Quote 0
        • H
          hooknc @mitu
          last edited by

          @mitu thank you for the reply.

          Should I open a bug report with the EmulationStation fork?

          https://github.com/RetroPie/EmulationStation/issues

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

            @hooknc Sure, let it be logged there.

            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.