Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: R-Pi 2 model B USB sound issue  (Read 5357 times)

0 Members and 1 Guest are viewing this topic.

Jefferson

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 169
  • Last login:January 14, 2024, 08:50:59 pm
R-Pi 2 model B USB sound issue
« on: March 14, 2016, 02:30:13 pm »
The Pi analog jack sound is crunchy, hissy, terrible.  My supply has the ferrite bead.  So I ordered a cheap USB sound adapter on amazon (http://smile.amazon.com/gp/product/B001MSS6CS?psc=1&redirect=true&ref_=oh_aui_detailpage_o00_s00)

...and it sounds much better right out of the gate, HOWEVER, it only works on the Attract Mode frontend menu.  The games themselves (mame4all) are now silent.  I've mixed and matched various techniques, the only other result I can get is where the front end has sound, but the games will not launch.  I see the desktop for a split second, then I'm back in the frontend.  Strange.

I am able to detect it via LSUSB
I'm unable to select it for sound output in the LXDE task bar
I am able to find it and affect levels using alsamixer

In /etc/modprobe.d/alsa-base.conf, I've commented this line
options snd-usb-audio index=-2
...but no dice (frontend sound only)
I've left it uncommented
...but no dice (frontend sound only)
I've also changed the "-2" to "0"
...but no dice (no sound at all)

I've tried to blacklist the onboard sound card in /etc/modprobe.d/also-base-blacklist.conf with:
blacklist snd_bcm2835
(and "blacklist snd-bcm2835", with the hyphen, to be safe)
If I use this technique:
-with unchanged "options snd-usb-audio index=-2" , I get frontend sound only
-with change "options snd-usb-audio index=0" , I get frontend sound only
-with commented "options snd-usb-audio index=-2" , I get no sound at all

Finally I discovered /root/.asoundrc
wherein I can apparently change the default sound device.  It's normally card 1. My "C-Media UCB Audio Device" is card 0.  There are two occurrences like so:
pcm.!default {
        type hw
        card 1
}

ctl.!default {
        type hw
        card 1
}


Even as I type this, I might just be getting lost, but it seems like the card # changes on reboot depending on the techniques above.  When I restarted with an unchanged alsa-base.conf (options snd-usb-audio index=-2) and an unblacklisted also-base-blacklist.conf ... my .asoundrc now shows the card as 0.  Does that sound right?

I'm starting to wonder if there are sound settings for mame4all that I haven't been able to find.  That would work for me as I have no other sound sources.

Has anyone stumbled into the magic combo?

Jefferson

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 169
  • Last login:January 14, 2024, 08:50:59 pm
Re: R-Pi 2 model B USB sound issue
« Reply #1 on: March 14, 2016, 02:32:11 pm »
BTW The rom crashing results came from me combining the top techniques with changes to the .asoundrc file

nitrogen_widget

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1782
  • Last login:May 23, 2025, 02:30:58 pm
  • I want to build my own arcade controls!
Re: R-Pi 2 model B USB sound issue
« Reply #2 on: March 16, 2016, 03:18:49 pm »
Maybe this will help?

http://computers.tutsplus.com/articles/using-a-usb-audio-device-with-a-raspberry-pi--mac-55876

The DietPi Distro is a cut down raspbian so the above guide on setting up a USB soundcard should work.
Especially the part where you pick the default sound.

robboman

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 21
  • Last login:March 17, 2016, 11:02:55 am
Re: R-Pi 2 model B USB sound issue
« Reply #3 on: March 17, 2016, 10:42:33 am »
I noticed how bad the analog audio jack was too.  My solution was to use HDMI audio, in part because I also needed VGA output for my arcade monitor. 

So I plugged in one of these:



Audio is nice and clean from the analog headphone jack on the converter.  While I had to edit boot/config.txt to get SVGA video to work, I didn't have to do anything special for audio, it just works. 

For anyone else struggling with noisy audio.. I'll also mention that I had terrible, show-stopper noise issues with my old power supply.  I plugged in a new one and the noise was gone.   

robboman

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 21
  • Last login:March 17, 2016, 11:02:55 am
Re: R-Pi 2 model B USB sound issue
« Reply #4 on: March 17, 2016, 10:48:25 am »
Here's another potential solution.  Overkill for retro gaming, but it's only about 30 bucks and you can get very high end audio out of a PI this way:

http://www.suptronics.com/Xseries/x400.html

This board also has 2x 20w power amp on board. That's more than enough power to connect typical arcade cab speakers and drive them directly.     


« Last Edit: March 17, 2016, 10:58:46 am by robboman »

lazrhog

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 23
  • Last login:May 19, 2018, 07:03:56 am
  • I want to build my own arcade controls!
Re: R-Pi 2 model B USB sound issue
« Reply #5 on: April 05, 2016, 04:15:30 pm »
I tried using USB Audio with retropie, and I get sound in the main menu, but when mame4all starts, every rom generates an error trying to initialise sound, saying it can't do it.  any ideas ? 

Error message is :
lvl0:   VolumeControl::init() - Failed to find mixer elements!

Jefferson

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 169
  • Last login:January 14, 2024, 08:50:59 pm
Re: R-Pi 2 model B USB sound issue
« Reply #6 on: August 04, 2016, 08:46:14 pm »
Hey Nitro-- Step 6 is where I'm stuck (http://computers.tutsplus.com/articles/using-a-usb-audio-device-with-a-raspberry-pi--mac-55876).  I can't seem to get "amixer" to reflect the usb change upon restart.

Also in my experiments I learned that my root/.soundarc gets reset everytime I reboot, back to Card 1 (the onboard sound).  I've tried changing it in the GUI and in Terminal to Card 0 and it won't stick.  Alsamixer reflects this correctly.  No options in Alsamixer seem to be helping either

Also, for whatever reason, the games are starting to at least launch now (although still without sound).  The frontend continues to have sound.

Anyone know what'd be re-setting my amixer?  my  /.soundarc?
I read somewhere that PulseAudio might be interfering.  Dunno if I have that.
I'd still love to locate a sound setting in mame4all to experiment with...

 :banghead:


nitrogen_widget

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1782
  • Last login:May 23, 2025, 02:30:58 pm
  • I want to build my own arcade controls!
Re: R-Pi 2 model B USB sound issue
« Reply #7 on: August 05, 2016, 01:47:33 pm »
ok.
I still don't use external sound cards but I did find this out on stack exchange and maybe it will help because it sounds a lot like the issue you are having.
Are you using root or SU or whatever is required by your OS to gain admin rights to edit those config files?
Sometimes you have to open the editor as root in order to get settings to stick because some desktop environs dont even bother to tell you that you can't write to the config file.

http://raspberrypi.stackexchange.com/questions/19705/usb-card-as-my-default-audio-device


thestobbster

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 40
  • Last login:February 16, 2021, 10:44:01 pm
  • I want to build my own arcade controls!
Re: R-Pi 2 model B USB sound issue
« Reply #8 on: September 08, 2016, 06:23:55 pm »
I have been using a Griffin iMic. They are more expensive than some of the other usb audio devices but it is worth it. The sound quality is Crystal Clear.
THeSToBBSTeR