USB audio card issue with PiPlay.
  • Hey guys! Newbie here. I'm planning to build a mini tabletop Pi cabinet. Just have a little issue here. So I installed a USB sound card for the Pi. Every time I load a game through PiPlay, it crashes and brings me back to terminal. It says "Segmentation faultitialize...set params) Rate doesn't match (requested 44100Hz, get 0Hz)" But when I remove the USB sound card, it works. What can I be doing wrong?
  • sorry man, I have no experience with the extra sound cards, hopefully someone else does.
  • Roxima, did you find the solution to that usb sound card problem?
    I have the same.
    thx
  • I had the same error "Segmentation fault" but not the audio portion of the error when running the game West Story (weststry.zip) under MAME4ALL. I am running Beta 3 of PiPlay with no extra hardware so I am not sure what that error is. It's the only game I am seeing that particular error.
  • @Roxima, Saga and Chad:
    Have someone resolved the problem, I plan to build a mame arcade machine.
    I would use the Raspberry Pi with a usb sound card.

    regards
    sappi
  • @sappi:

    I had the same problem when I first plugged my USB sound card in. Found the solution here:
    USB Sound on the Rasp. Pi
    When done, don't forget to fire up alsamixer, switch to your USB sound card with F6, and make sure the volume/mute is set appropriately.
  • @pilesofspam: Your solution dosn't work with my B+ Model.
    Now i receive the following error:
    Segmentation fault0:(snd_pcm_set_params) Channels count(1) not available for PLAYBACK: Invalid arguments
  • Sorry I missed this- Sappi- which USB sound card are you using? When do you see that error? I'm using a B+ with a PCM2704 based sound card.
  • Ideal! Turns out there's a set of instructions written specifically for that device:

    adafruit RASBPI USB audio
  • I did the configuration step by step like described in the text.
    But i receive the error "Segmentation faultitialize...set params) Rate doesn't match (requested 44100Hz, get 0Hz)"

    When I do the configuration like your description (http://raspberrypi4dummies.wordpress.com/2013/03/17/how-to-enable-usb-sound-on-a-raspberry-pi/) i receive an other error Segmentation fault0:(snd_pcm_set_params) Channels count(1) not available for PLAYBACK: Invalid arguments.

    I killed the project to create a arcade cabin with a Raspberry Pi, so the problem is also resolved :-)
  • ^^^^ @sappi make a file called asound.conf and put it in /etc/ with this code in it

    pcm.!default {
    type hw
    card 0
    }

    ctl.!default {
    type hw
    card 0
    }



    that should fix the rate doesn't match error.
  • I am having the same problem as @sappi. @tearexairz when I put the file in as you have suggested, I get:
    ALSA lib pcm.c:7420:(snd_pcm_set_params) Channels count (1) not available for PLAYBACK: Invalid argument Segmentation fault

    Any thoughts?
  • After trying countless things, I used this code in the asound.conf and it worked!

    ctl.!default {
    type hw
    card 0
    }
    pcm.usb
    {
    type hw
    card "U012529205"
    format S16_LE
    }

    pcm.!default {
    type asym
    playback.pcm
    {
    type plug
    slave {
    pcm "hw:0"
    format S16_LE
    }
    }
    capture.pcm
    {
    type plug
    slave.pcm "usb"
    }
    }

    Found it here: http://www.raspberrypi.org/forums/viewtopic.php?f=66&t=7107&start=150
  • @atv223 I used your suggested code in my asound.conf and was able to hear sound using the aplay command. However, when I run MAME I still get the samplingrate error described in the first post in this thread. I commented out the samplingrate line in MAME.cfg and now MAME has sound and does not crash. However, the sound quality is nearly identical (i.e. bad) to the onboard RPI audio via the 3.5 mm jack. Not sure where to go from here.
  • Well, I finally figured out a solution to my sound problem. I changed the screen resolution to a lower setting by hitting "m" when MAME launches. This eliminated the repetitive popping noise and overall bad sound quality. I suspect the higher resolution either took too much processing power or generated some sort of interference with the audio. BTW, I am using a USB sound card. MAME is running like a champ now!
  • Excellent! Can you tell me what games you see this in, and can you give me some more information about what resolutions you're running? I'll likely see the same problem.
  • The problem affects nearly all of the 150+ MAME games I have installed. Donkey Kong is an example of a game most affected. 800x600 resolution seems to work ok for most games (sometimes I had to drop it to 640x480) but any higher resolution results in sound problems... mainly repetitive popping sounds and what I can only describe as lag when game music plays.

    I am using HDMI plugged directly into the monitor without any adapter. I suspect the issue could be related specifically to this monitor but I do not have any other HDMI monitors to test this theory.
  • Interesting. I have an original model B (the one with 256MB ram) and a B+. I've got one hooked to composite out (one of those cheap rear view camera displays from ebay) and one hooked to HDMI with identical performance. Most games were OK with a few popping sounds and the static on the internal sound card. Seemed to improve when I switched to the USB audio. The only artifact I still have is that I hear a soft pop when the sound is engaged, but nothing horrendous. Let me look up my mame sampling rate and my asound.conf and I'll report back tonight.
  • I have the same issue. It's annoying. Trying also to build a home-made arcade cabinet. For the moment my alternative is buying a cheap second-hand tv and just using hdmi.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!