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

    Mono sound from a USB sound card

    Scheduled Pinned Locked Moved Help and Support
    usbaudioaudiomono
    2 Posts 1 Posters 595 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.
    • ChimpsInTiesC
      ChimpsInTies
      last edited by

      Please can someone help me because I've been at this all day and still not got it to work.

      I've got a Pi3B running RetroPie
      It's got a USB soundblaster 2 card.

      I can get sound out of the USB card but it comes out in stereo and my cab only has one speaker in it which runs from a little mono amplifier. I seem to either get background menu music OR emulator sound but not both. Can anyone help me with the config so it works. I get the common mixer error people tend to get when using USB soundcards when a game is run:

      "lv10: Volumecontrol Init() - failed to find mixer elements!"
      

      if i do the following commands in console I get:

      pi@retropie:~ $ cat /dev/urandom | aplay -D hw:1,0
      aplay: main:788: audio open error: Device or resource busy
      
      pi@retropie:~ $ pi@retropie:~ $ cat /dev/urandom | aplay -D hw:0,0
      -bash: pi@retropie:~: command not found
      ALSA lib pcm_hw.c:1713:(_snd_pcm_hw_open) Invalid value for card
      aplay: main:788: audio open error: No such file or directory
      
      pi@retropie:~ $ aplay -L
      null
          Discard all samples (playback) or generate zero samples (capture)
      card1
      monocard
      sysdefault:CARD=S2
          Sound Blaster Play! 2, USB Audio
          Default Audio Device
      front:CARD=S2,DEV=0
          Sound Blaster Play! 2, USB Audio
          Front speakers
      surround21:CARD=S2,DEV=0
          Sound Blaster Play! 2, USB Audio
          2.1 Surround output to Front and Subwoofer speakers
      surround40:CARD=S2,DEV=0
          Sound Blaster Play! 2, USB Audio
          4.0 Surround output to Front and Rear speakers
      surround41:CARD=S2,DEV=0
          Sound Blaster Play! 2, USB Audio
          4.1 Surround output to Front, Rear and Subwoofer speakers
      surround50:CARD=S2,DEV=0
          Sound Blaster Play! 2, USB Audio
          5.0 Surround output to Front, Center and Rear speakers
      surround51:CARD=S2,DEV=0
          Sound Blaster Play! 2, USB Audio
          5.1 Surround output to Front, Center, Rear and Subwoofer speakers
      surround71:CARD=S2,DEV=0
          Sound Blaster Play! 2, USB Audio
          7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
      iec958:CARD=S2,DEV=0
          Sound Blaster Play! 2, USB Audio
          IEC958 (S/PDIF) Digital Audio Output
      dmix:CARD=S2,DEV=0
          Sound Blaster Play! 2, USB Audio
          Direct sample mixing device
      dsnoop:CARD=S2,DEV=0
          Sound Blaster Play! 2, USB Audio
          Direct sample snooping device
      hw:CARD=S2,DEV=0
          Sound Blaster Play! 2, USB Audio
          Direct hardware device without any conversions
      plughw:CARD=S2,DEV=0
          Sound Blaster Play! 2, USB Audio
          Hardware device with all software conversions
      
      pi@retropie:~ $ aplay -l
      **** List of PLAYBACK Hardware Devices ****
      card 1: S2 [Sound Blaster Play! 2], device 0: USB Audio [USB Audio]
        Subdevices: 0/1
        Subdevice #0: subdevice #0
      
      pi@retropie:~ $ amixer
      Simple mixer control 'Speaker',0
        Capabilities: pvolume pswitch pswitch-joined
        Playback channels: Front Left - Front Right
        Limits: Playback 0 - 52
        Mono:
        Front Left: Playback 32 [62%] [-20.00dB] [on]
        Front Right: Playback 32 [62%] [-20.00dB] [on]
      Simple mixer control 'Mic',0
        Capabilities: cvolume cvolume-joined cswitch cswitch-joined
        Capture channels: Mono
        Limits: Capture 0 - 40
        Mono: Capture 20 [50%] [0.00dB] [on]
      

      If I have anything in /etc/asound.conf like the below I don't get sound in when running my games.
      /etc/asound.conf

      pcm.card1 {
        type hw
        card 1
      }
      
      ctl.card1 {
        type hw
        card 1
      }
      
      pcm.monocard {
        slave.pcm card1
        slave.channels 2
      #  type plug
        type route
        ttable {
          # Copy both input channels to output channel 0 (Left).
          0.0 0.5
          1.0 0.5
          # Send nothing to output channel 1 (Right).
          0.1 0
          1.1 0
        }
      }
      
      ctl.monocard {
        type hw
        card 1
      }
      
      pcm.!default monocard
      

      In Emulation station if I got press Start | Sound Settings I have it set as
      Audio Device: Speaker
      OMX Player Audio: ALSA: hw:0,0

      strangely, if I have nothing in etc/asound.conf I get sound in both games and in the menus but in the games it's stereo so I'm missing the right channel.

      Please help me. It's driving me bonkers and I've read so much I think I'm going around in circles.

      1 Reply Last reply Reply Quote 0
      • ChimpsInTiesC
        ChimpsInTies
        last edited by

        Just in case anyone else comes across this I got it working. It wasn't easy and took some trial and error, there isn't very much documentation out there about the inner workings of the asound.conf file but I must have read it all.

        The asound.conf file needs to look like this. Obviously if your usb sound card is a different number or you didn't disable the default sound output of the pi yours might be a little differnt bit this should mean you get no errors about mixers and both game sound and background music on ES play ok all through the left channel only.

        pcm.custom {
          type plug
          slave
          {
            pcm "dmix:1,0"
          }
          ttable {
            # Copy both input channels to output channel 0 (Left).
            0.0 1
            1.0 1
            # Send nothing to output channel 1 (Right).
            0.1 0
            1.1 0
          }
        }
        
        ctl.custom {
          type hw
          card S2
        }
        
        pcm.!default pcm.custom
        ctl.!default ctl.custom
        
        1 Reply Last reply Reply Quote 1
        • 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.