• 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

Couldn't configure X5500 audio card

Scheduled Pinned Locked Moved Help and Support
audio sound
8 Posts 2 Posters 590 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.
  • S
    stiakooo
    last edited by 9 Jan 2021, 21:02

    Re: Volume control not working HiFiBerry MINI-AMP + Retropi 4.4 + RaspberryPi 3B - lvl0: Volume control::inint() - Failed to find mixer elements

    Hello!

    I am building my own arcade machine. I decided that I want a hardware potentiometer to control the volume. After a quick research I found that Geekworm X5500 should do the job. So I purchased that device and put it on top of my Raspberry Pi 4B. Unfortunately I couldn't properly configure the sound in Emulation station. I don't have sound in the games. I also don't have navigation sounds. I've read the retropie documentation related to sound issues but I couldn't find a solution.

    First I tried all the possible combinations in ES Sound settings.

    Then I made the following changes in config.txt:

    #dtparam=audio=on
    dtparam=audio=off
    dtoverlay=hifiberry-dac
    

    Based on the manufacturer wiki I should use hifiberry-dac for dtoverlay. More info here:
    https://raspberrypiwiki.com/X450/X5500_Software_Configuration

    If I run aplay -L I have the following list:

    null
         Discard all samples (playback) or generate zero samples (capture)
    default
    output
    sysdefault:CARD=sndrpihifiberry
         snd_rpi_hifiberry_dac, HifiBerry DAC HiFi pcm5102a-hifi-0
         Default Audio Device
    dmix:CARD=sndrpihifiberry,DEV=0
         snd_rpi_hifiberry_dac, HifiBerry DAC HiFi pcm5102a-hifi-0
         Direct sample mixing device
    dsnoop:CARD=sndrpihifiberry,DEV=0
         snd_rpi_hifiberry_dac, HifiBerry DAC HiFi pcm5102a-hifi-0
         Direct sample snooping device
    hw:CARD=sndrpihifiberry,DEV=0
         snd_rpi_hifiberry_dac, HifiBerry DAC HiFi pcm5102a-hifi-0
         Direct hardware device without any conversions
    plughw:CARD=sndrpihifiberry,DEV=0
         snd_rpi_hifiberry_dac, HifiBerry DAC HiFi pcm5102a-hifi-0
         Hardware device with all software conversions
    

    As you can see above, I don't have a default card. However It seems I have sysdefault.

    And If I run amixer scontrols -D default I receive:

    amixer: Mixer attach default error: No such file or directory
    

    And here is something interesting. If I run amixer scontrols -D sysdefault It doesn't return anything! No error this time but also no list of devices (mixers). So it seems there is a sound card but there aren't any audio devices (mixers) on it.

    Then I decided to go back in ES and I selected sysdefault in ES sound settings and I tried with all of the listed possibilities for Audio Device without any success.

    Additionally I tried aplay -l and it gives me the following:

    **** 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
    

    If I run amixer scontrols -D sndrpihifiberry I receive the following error:

    ALSA lib control.c:1375:(snd_ctl_open_noupdate) Invalid CTL sndrpihifiberry
    amixer: Mixer attach sndrpihifiberry error: No such file or directory
    

    And finally i made the speaker-test. if run speaker-test -D sndrpihifiberry -t wav -l 20 & I receive:

    Playback open error: -2,No such file or directory
    

    But if I run speaker-test -D sysdefault -t wav -l 20 & the test is successful and I can hear a voice calling "Front Left" 20 times with the corresponding logs in the terminal. Which means the audio card itself is working correctly but I can not properly configure it in EmulationStation!

    Sorry for the very long description but I wanted to mention everything I tried.
    Thank you in advance!

    M 1 Reply Last reply 9 Jan 2021, 22:05 Reply Quote 0
    • M
      mitu Global Moderator @stiakooo
      last edited by 9 Jan 2021, 22:05

      @stiakooo said in Couldn't configure X5500 audio card:

      If I run amixer scontrols -D sndrpihifiberry I receive the following error:

      What does

      amixer -c 0 scontrols
      

      or just

      amixer scontrols
      

      show ? It should be the name of the (simple) mixer attached to the card.

      S 1 Reply Last reply 10 Jan 2021, 08:47 Reply Quote 0
      • S
        stiakooo @mitu
        last edited by 10 Jan 2021, 08:47

        @mitu Thank you for your post!
        The first command returns nothing:

        amixer -c 0 scontrols
        

        And just amixer scontrols returns an error:

        amixer scontrols
        amixer: Mixer attach default error: No such file or directory
        
        M 1 Reply Last reply 10 Jan 2021, 08:52 Reply Quote 0
        • M
          mitu Global Moderator @stiakooo
          last edited by 10 Jan 2021, 08:52

          @stiakooo Do you have anything in $HOME/.asoundrc ?
          Is alsamixer working ?

          S 1 Reply Last reply 10 Jan 2021, 09:47 Reply Quote 0
          • S
            stiakooo @mitu
            last edited by 10 Jan 2021, 09:47

            @mitu

            cat $HOME/.asoundrc
            pcm.!default {
            type asym
            playback.pcm {
            type plug
            slave.pcm "output"
            }
            capture.pcm {
            type plug
            slave.pcm "input"
            }
            }
            pcm.output {
            type hw
            card 1
            }
            ctl.!default {
            type hw
            card 1
            }

            Runnung alsamixer without any parameters it returns error:

            alsamixer
            cannot open mixer: No such file or directory
            

            If I try with sysdefault

            alsamixer -D sysdefault
            

            I have the alsamixer UI but there is only the message "This sound device does not have any controls." in the center of the screen.

            M 1 Reply Last reply 10 Jan 2021, 12:44 Reply Quote 0
            • M
              mitu Global Moderator @stiakooo
              last edited by 10 Jan 2021, 12:44

              @stiakooo Remove your $HOME/.asoundrc and try again to see if you still get an error with alsamixer.

              S 1 Reply Last reply 10 Jan 2021, 19:39 Reply Quote 0
              • S
                stiakooo @mitu
                last edited by 10 Jan 2021, 19:39

                @mitu Thanks a lot for all the advices! I finally found a solution that is working for me.

                Just deleting .asoundrc wasn't enough. What is important in my case is to enable the softvol ALSA plugin.

                To summarise what I needed in order to have sound in the games and also in the EmulationStation menu for my Geekworm X5500 ( I guess it should be the same also for X450).

                1. /boot/config.txt
                # dtparam=audio=on
                dtparam=audio=off
                dtoverlay=hifiberry-dac
                
                1. /home/pi/.asoundrc
                  You need to enable softvol ALSA plugin. For more info visit https://alsa.opensrc.org/Softvol
                  Delete everything and put the following:
                pcm.newdevice {
                type softvol
                slave.pcm "default"
                control.name "Softmaster"
                control.card 0
                }
                1. /home/pi/.emulationstation/es_settings.cfg
                <string name="AudioCard" value="default" />
                <string name="AudioDevice" value="Softmaster" />
                

                Note: The volume control inside EmulationStation is useless after those changes. The only way to control the volume is using the hardware potentiometer (which is exactly what I need).

                Thanks again!

                1 Reply Last reply Reply Quote 0
                • M
                  mitu Global Moderator
                  last edited by mitu 1 Oct 2021, 20:01 10 Jan 2021, 20:01

                  So, in other words, the card doesn't have a software volume control and you had to add a fake one to keep ES (or other ALSA based mixers) happy. That doesn't seem too practical if your Pi is not easily accessible.

                  Glad you got this sorted out, it's a good use case to have in mind.

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