Jump to content
  • entries
  • comments
  • views

Vertical MAME pt 5



My current challenges are with getting the audio working - not something I expected, so it's fortunate I realized I could use the USB headset.  I've been working with RetroPie 4.5 as RecalBox is locked down by using a read-only partition.  (So I can't rotate Emulation Station.)


Audio on Linux is handled by ALSA.  It provides a lot of flexibility in order to handle the breadth of soundcards - which means a lot of complexity.  Unfortunately, there's not a lot of good, authoritative, current, how-to documentation.  ALSA also needs to handle three requirements - first is telling ALSA about the soundcards in the system.  Fortunately the automatic detection & configuration is working in this case (although not without a few wrinkles).  Second is the ALSA API which applications use.  Finally there's the part in between - getting the applications (e.g. mame4all-pi) to actually use the soundcard (USB headset).


mame4all-pi uses the "default" PCM "device" (via a hardcoded string).  Unfortunately, the automatic configuration lumps both the internal Raspberry Pi soundcard and the USB headset into the "default" PCM "device".  Disabling the internal soundcard (via the boot config.txt) still doesn't work because the USB headset is still card 1 (rather than card 0).  After much searching, I finally found instructions on how to renumber the two so the USB headset is card 0 and the internal soundcard is card 1.


The next problem is mame4all-pi is hardcoded to use 44.1kHz sampling, while my USB headset only supports 48kHz.  Fortunately ALSA supports plugins to automatically resample as part of configuring the "default" PCM "device".  The next problem is the USB headset doesn't support mono - again fixable via an ALSA plugin.  Unfortunately, mame4all-pi is now throwing another ALSA API error...

  • Like 1


Recommended Comments

There are no comments to display.

Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...