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

    USB Audio almost working – what am I missing?

    Scheduled Pinned Locked Moved Help and Support
    usb audiobuster2021pi 3bno sound
    9 Posts 2 Posters 1.5k 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.
    • V
      viragored
      last edited by viragored

      Raspberry Pi 3B with "Official" power supply, no overclocking
      Installed Retropie 4.7.1 (RPI2/3) direct from Raspberry Pi Imager
      Linux Kernel vn = 5.4.72-v7+

      Connected USB devices are

      • Keyboard (when needed)
      • SoundBlaster “Digital Music LX” external sound device (USB powered, plays through stereo amplifier)
      • Joystick game controller (homemade based on “Dragonrise Inc. Generic USB Joystick” encoder)
      • Video output is HDMI into VGA converter, no headphone plugged in to the Pi

      I followed https://retropie.org.uk/docs/Sound-Issues/#using-a-usb-audio-device

      • Step 1: Edited config.txt to include dtparam=audio=off and rebooted
      • Step 2: Chose "Audio Card" 'default' in emulationstation
      • Step 3: Chose "Audio Device" (ie "mixer")
        Starting any game shows a list of alsa lib error messages, and no sound

      I couldn't work out the steps (at the end of the "Sound Issues" page) to add a custom audio card to es_systems.cfg, I don't know enough to work out what "the name of the audio card" actually is nor which .cfg file to edit.
      One link from near the bottom of the “Sound Issues” page says to use this command to find the “index number” of my USB output device:

      #code block 
      pi@retropie:~ $ cat /proc/asound/modules
       1 snd_usb_audio
      

      It looks to me like I need the usb index to be 0
      This page had some clues: https://retropie.org.uk/forum/topic/26434/usb-audio-broke-after-latest-updates/2?_=1625115045266
      I found this page which addresses index numbers - https://www.raspberrypi-spy.co.uk/2019/06/using-a-usb-audio-device-with-the-raspberry-pi/

      I edited /usr/share/alsa/alsa.conf to change these two lines from 0 to 1:

      #edit
      	defaults.ctl.card 1
      	defaults.pcm.card 1
      

      Almost there! Now I’ve got some sound! – EmulationStation menu makes clicks, and a sample game makes the right noises.
      BUT: some things are missing which I guess are related to disabling the on-board audio. Can anyone point me to the best way to make the rest work? The configuration controls are not working, here are the details.

      # Main Menu - Sound Settings
      	System Volume always shows 0% (but can be adjusted before being forgotten again)
      	Audio Card - Default
      	Audio Device - PCM
      	Navigation Sounds - On
      	Enable video audio - On
      	OMX player device – I’ve tried them all!
      
      # RetroPie Configuration - Audio:
      	Error message "Iv10 (etc...) failed to find mixer elements"
      	Pop-up window shows "On-board audio disabled or not present" "OK" is the only choice
      

      Here are the relevant system outputs from Linux

      # code block
      pi@retropie:~ lsusb
      Bus 001 Device 004: ID 0079:0006 DragonRise Inc. PC TWIN SHOCK Gamepad
      Bus 001 Device 005: ID 041e:3015 Creative Technology, Ltd Sound Blaster Digital Music LX
      Bus 001 Device 007: ID 0c45:7300 Microdia *(my keyboard)*
      Bus 001 Device 006: ID 0424:7800 Standard Microsystems Corp.
      Bus 001 Device 003: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
      Bus 001 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
      Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
      
      # code block
      pi@retropie:~ $ aplay -l
      **** List of PLAYBACK Hardware Devices ****
      card 1: Audio [USB Audio], device 0: USB Audio [USB Audio]
        Subdevices: 1/1
        Subdevice #0: subdevice #0
      
      # code block
      pi@retropie:~ $ aplay -L
      null
          Discard all samples (playback) or generate zero samples (capture)
      default:CARD=Audio
          USB Audio, USB Audio
          Default Audio Device
      sysdefault:CARD=Audio
          USB Audio, USB Audio
          Default Audio Device
      front:CARD=Audio,DEV=0
          USB Audio, USB Audio
          Front speakers
      surround21:CARD=Audio,DEV=0
          USB Audio, USB Audio
          2.1 Surround output to Front and Subwoofer speakers
      surround40:CARD=Audio,DEV=0
          USB Audio, USB Audio
          4.0 Surround output to Front and Rear speakers
      surround41:CARD=Audio,DEV=0
          USB Audio, USB Audio
          4.1 Surround output to Front, Rear and Subwoofer speakers
      surround50:CARD=Audio,DEV=0
          USB Audio, USB Audio
          5.0 Surround output to Front, Center and Rear speakers
      surround51:CARD=Audio,DEV=0
          USB Audio, USB Audio
          5.1 Surround output to Front, Center, Rear and Subwoofer speakers
      surround71:CARD=Audio,DEV=0
          USB Audio, USB Audio
          7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
      iec958:CARD=Audio,DEV=0
          USB Audio, USB Audio
          IEC958 (S/PDIF) Digital Audio Output
      dmix:CARD=Audio,DEV=0
          USB Audio, USB Audio
          Direct sample mixing device
      dsnoop:CARD=Audio,DEV=0
          USB Audio, USB Audio
          Direct sample snooping device
      hw:CARD=Audio,DEV=0
          USB Audio, USB Audio
          Direct hardware device without any conversions
      plughw:CARD=Audio,DEV=0
          USB Audio, USB Audio
          Hardware device with all software conversions
      

      Any help will be most welcome!
      PS: I'm sorry I don't know how to control the colours in the "code blocks", it's the first time I've ever come across such things.

      V 1 Reply Last reply Reply Quote 0
      • V
        viragored @viragored
        last edited by

        @viragored Update:
        alsamixer is opening from the command line, showing the volume setting for the USB card, which is the only available device.
        But I can't reach alsamixer from the RetroPie configuration menu - details in the first post.

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

          @viragored What's the name of the mixer, shown in alsamixer's screen (top-left) ? This is what you should set as 'AudioDevice' in EmulationStation.

          V 1 Reply Last reply Reply Quote 0
          • V
            viragored @mitu
            last edited by

            @mitu Thanks a lot for your reply.
            Alsamixer shows this at the top left of its screen:

            #Clip from Alsamixer
            Card: USB Audio  
            Chip: USB Mixer 
            View: F3:[Playback] F4: Capture  F5: All  
            Item: Speaker [dB gain: -3.81, -3.81] 
            

            The options that EmulationStation offers for Audio Device are:

            • PCM (my current selection)
            • HDMI
            • Headphones
            • Speaker
            • Master
            • Digital
            • Analogue
              ("USB Audio" is not there!)

            The options that alsamixer offers with f6 are:

            # alsamixer options
            - (default)
            1 USB Audio
              enter device name...
            

            Any further suggestions will be most helpful :-)

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

              @viragored said in USB Audio almost working – what am I missing?:

              Chip: USB Mixer

              The mixer name for your device is not in the list that ES shows. You'll need to add it manually to the configuration file - as detailed here.

              1 Reply Last reply Reply Quote 0
              • V
                viragored
                last edited by

                @mitu Thanks once more! Sadly I'm still fairly confused and haven't made any actual progress. I'm not skilled in Linux and hope I've done the right things. Games are making the right sounds, and the ES menu clicks are audible.
                Here's what I've tried after spending a lot of time on the page you linked:

                First: edit es_settings .cfg to include "USB Mixer", as you'd highlighted that. Then I tried "USB Audio" instead, both gave the same result.

                pi@retropie:~ $ sudo nano /opt/retropie/configs/all/emulationstation/es_settings.cfg
                <string name="AudioCard" value="default" />
                <string name="AudioDevice" value="USB Mixer" />
                # I also tried "USB Audio" in the AudioDevice line
                

                Then I tried following the steps on the same page to "Add a Custom Audio Device (Audio Mixer)"
                This is the output from the amixer command:

                pi@retropie:~ $ amixer scontrols -D default
                Simple mixer control 'Speaker',0
                Simple mixer control 'PCM Capture Source',0
                Simple mixer control 'Line',0
                Simple mixer control 'Mic',0
                Simple mixer control 'IEC958 In',0
                Simple mixer control 'Auto Gain Control',0
                

                I tried "Speaker" as an option in es_settings.cfg
                Still no improvement or change - game sounds and menu clicks are working, the "main menu" always shows System Volume to be 0%, and there's no access to alsamixer from the RetroPie configuration menu.

                When opening either a game or the configuration menu, an error message appears briefly - it's something like <date/time> Iv10: VolumeControl ::init() failed to find mixer elements.
                In the RetroPie configuration menu / Audio a window box pops up saying

                "On-board audio disabled or not present"
                < OK >
                

                That's consistent with my edit to config.txt to turn off the on-board audio, as recommended on the "Sound Issues" page

                dtparam=audio=off
                

                Would my best option actually be to turn the on-board audio on again, and then find out how to make the USB audio work alongside that? Or is that even more complex and likely to be beyond me?
                Sorry if this is all obvious stuff to people who are at home with Raspberry Pi and Linux - I'm trying to learn and appreciate any help I get!

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

                  Try with:

                  <string name="AudioCard" value="default" />
                  <string name="AudioDevice" value="Speaker" />
                  
                  V 1 Reply Last reply Reply Quote 0
                  • V
                    viragored @mitu
                    last edited by

                    @mitu Many thanks for such a quick reply! Some progress...
                    I've edited es_settings.cfg as you suggested.
                    Game sounds and menu clicks both are working and now games open without any error message.
                    In "Main Menu" / "Sound Settings" the System Volume shows a true value, is adjustable and the setting is retained.

                    #Current Main Menu Audio settings are:
                    Audio Card = default
                    Audio Device = Speaker
                    OMX = Speaker
                    

                    The RetroPie configuration menu / Audio also opens without an error message.
                    The pop-up window box still reports "On-board audio disabled etc..." but basically it's all working :-)

                    Thanks once again!!

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

                      @viragored said in USB Audio almost working – what am I missing?:

                      The pop-up window box still reports "On-board audio disabled etc..." but basically it's all working :-)

                      That's ok, the Audio menu is meant to configure only the on-board audio, hence the message. External (USB/GPIO) sound cards are not supported.

                      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.