Audio pros and cons
-
Retropie 4.2.2 on a Raspberry Pi 3
Hey all
I was wondering what would be the best audio driver/setup to use for RetroPie and the pros and cons of each of them.
When I use the 3.5mm jack for audio I get white noise, but I am able to remove this white noise by adding "audio_pwm_mode=2" to my /boot/config.txt file.
I was reading the "Known rough edges" section here: https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=136445 but I was unsure how these affect real world game performance.
HDMI audio seems to be fine (little to no white noise), and I was basically wondering if I could leave "audio_pwm_mode=2" enabled for cases where I need to use the 3.5mm for audio (so I wouldn't have to change it). This way I would be able to just "plug-and-play" and would make it more user friendly.I was playing a PlayStation 1 game that where the audio would stutter when I enabled the higher resolution, but when I was using the "audio_pwm_mode=2" option it seemed fine even with the resolution enabled.
Also I tried "disable_audio_dither=1" with a combination of HDMI/3.5mm and "audio_pwm_mode=2" and did not notice any differences whatsoever.Basically I (and i'm sure many others) would like a table of the pros/cons for each audio driver/setup
example table:
(also maybe a 4th column for notes)Thanks :)
-
Another option is to use a USB sound-card, if audio over hdmi is not an option.
-
@Zigurana said in Audio pros and cons:
Another option is to use a USB sound-card, if audio over hdmi is not an option.
I used USB audio for a while, but found that I was running into odd compatibility issues all over. For example, I always had an error message about PCM, which I eventually assumed came from attempts to either set volume, or preserve volume settings. You see, the Adafruit USB I have wants to be called "headphones" when using amixer controls. I would LOVE to see this table expand to include USB audio, and perhaps reference the best way to configure it too. It has been a while since I gave up on it, so maybe the OS has improved in this regard.
-
yeah, getting it to work properly, was a bit of pain in the behind. I am using a Logitech S150 speakerset, which registers as a USB soundcard, and a keyboard (HID).
Below the notes I made over a year ago to get it working sufficiently well:
INSPIRATION FROM: http://raspberrypi.stackexchange.com/questions/40831/how-do-i-configure-my-sound-for-jasper-on-raspbian-jessie
- create a new conf file in modprobe.d
$ sudo nano /etc/modprobe.d/alsa-base.conf ----add this ----------------------- # This sets the index value of the cards but doesn't reorder. options snd_usb_audio index=0 options snd_bcm2835 index=1 # Does the reordering. options snd slots=snd-usb-audio,snd-bcm2835 ------------------------------------------
Now for the buttons:
- user triggerhappy to configure the keymappings:
https://www.raspberrypi.org/forums/viewtopic.php?t=53916&p=411882 - set the deamon user to pi:
$sudo nano /etc/init.d/triggerhappy
- and update the following line:
DAEMON_ARGS="--daemon --triggers /etc/triggerhappy/triggers.d/ --socket /var/run/thd.socket --pidfile $PIDFILE --user pi /dev/input/event*"
- then, create config file:
$ sudo nano /etc/triggerhappy/triggers.d/volumectrl.conf
with the following content:
# DaPo: 29.03.2016: First version, triggerhappy config for volume control of USB sound card. KEY_VOLUMEDOWN 1 /usr/bin/amixer sset PCM,0 2dB- KEY_VOLUMEUP 1 /usr/bin/amixer sset PCM,0 2dB+ KEY_MIN_INTERESTING 1 /usr/bin/amixer sset PCM,0 1+ toggle
- and restart the triggerhappy deamon with:
$sudo invoke-rc.d triggerhappy restart
or$sudo service triggerhappy restart
or$sudo /etc/init.d/triggerhappy reload
, whatever.
Hopefully that gives you some inspiration to get it working!
-
@Zigurana Thanks for the note. I have pages that are quite similar!
I have done the index and the reordering. It works for the most part. However, notice how your volume command/usr/bin/amixer sset PCM,0 2dB-
references PCM? That will fail on my USB because it is looking for HEADPHONES as a controller name. Sure, I can simply adjust my volume commands, but it is the embedded calls to PCM that would generate errors and for some emulators, I would get no audio. Perhaps I need to find another USB Sound card. The problem is that "amixer controller name" is not usually in the documentation!
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.