[SOLVED] VGA output causes sound problems
-
Hi All,
I have a raspberry PI B+ that I am setting up with retropie. I have an old VGA monitor that I wan't to connect using the Gert VGA 666 adapter.
To activate the VGA I have added the following to my /boot/config.txt:
dtoverlay=vga666
enable_dpi_lcd=1
display_default_lcd=1
dpi_group=2
dpi_mode=4Now, I have two problems:
- First, I need to manually copy the dt-blob.bin from https://github.com/fenlogic/vga666/tree/master/setup to my boot partition to make the VGA work. Apperently, there is already an overlay for VGA666 in /boot/overlays but it doesn't seem to work
- secondly, as soon as the dt-blob.bin is present in /boot the analog sound is broken. Even if I don't activate the VGA in boot/config.txt. In mame for example, the pitch is constantly changing and speeding up/down (really strange!) and in pocksnes and picodrive (snes and genesis emulators) the sound is crackling as if the cpu can't keep up even though the video is OK.
Does someone else have this problem? I have been trying al night to get this thing to work and it is driving me crazy! When I remove dt-blob.bin and use the hdmi output analog audio is fine!
-
Anyone got an idea?
-
I would open a ticket on the github page for the driver in question - https://github.com/fenlogic/vga666
the retropie image is just Raspbian Lite with retropie installed on top.
-
I think I have found the cause: retroarch.
It seems like retroarch handles all the sound and video for most of the installed emulators. It also handles synchronisation of audio and video. Somehow retroarch gets confused when you have VGA over the DPI interface running instead of the HDMI interface. When I run snes9x for example sound is fine because I think that one is not using retroarch. lr-picodrive is affected but if I tweak the retroarch settings file a bit I can make the sound run without hickups but then the sound and game run too fast :-(.
So, to be continued. A first solution is to use emulators that do not rely on retroarch. But, I want to dig further into this and see if I can tweaak retroarch into shape :-)
BTW, the DPI interface is very capable. It can also output interlaced and/or 15khz video. In theory this would be perfect for supersmooth emuulation without any frame-skipping/stuttering.
-
just out of interest what does
tvservice -s
output on your setup ? Also does it make any difference if you enable or disable thevideo_threaded
option (in configuration editor (Advanced Configuration -> Configure Libretro options -> all/retroarch.cfg) ? -
tvservice -s returns this:
pi@retropie:~ $ tvservice -s
state 0x400000 [LCD], 720x480 @ 0.00Hz, progressiveDisabling (commenting out) the video_threaded options doesn't make any difference
-
The tvservice output might be a problem - runcommand tries to be clever and set the retroarch video refresh to the refresh of the current mode (as with threaded video retroarch cannot work it out automatically)
As a test try moving tvservice out of the way so it is ignored
sudo mv /usr/bin/tvservice /usr/bin/tvservice.bak
If this works, I will do a workaround so it detects if the hz is invalid.
-
@BuZz
I tried renaming tvservice but the problem is still there. Also, I could make a difference by chaning the refresh rate in retroarch.cfg but after the renaming it seems to no longer have an effect.Today I tried recalbox and that worked with the VGA adapter. Also, the standard device overlay worked while it wouldn't work on retropie. On retropie i needed the dt-blob.bin (that could maybe also cause the problem)
Recalbox has other problems in that it is buildroot based making it difficult to add my own stuff.
To give an idea of what I'm doing: I designed a small add-on board that contains a VGA-666 adapter, an 18 input GPIO multiplexer using shift registers and a small 1W audio amp. Perfect for a cheap arcade box.
The GPIO multiplexer needs a small tool that i've written that uses uinput and wiringpi. That part works like a charm on retropie.I would thus really like to use retropie as it works easier for me. The fact that sound+vga works OK on recalbox means that it is possible :-)
I will now do a clean install of retropie and try again. I have been messing so much with all kinds of settings that may have affected some things. I'll keep you posted.
PS thanks for the support, I would really like to make this work. If you have any more ideas.....
-
Make sure you update after a fresh install if installing from image. I made a change that may or may not help relating to retroarch refresh.
-
@BuZz
Ok, I did a clean install and here is how it went:-
added the lines to activate vga to /boot/config.txt and I got video the first try this time! No need to install dt-blob.bin
-
tried sonic on megadrive (this one gave me the most problems) and... perfect sound!
-
updated all packages, still perfect sound. Also in mame and lr-pocketsnes
-
installed wiringpi, uinput was already loaded.
-
installed my own tool for the GPIO multiplexer. EVERYTHING WORKED!!!!!
So, I don't know what happened the first time but it was the dt-blob.bin from https://github.com/fenlogic/vga666/tree/master/setup that caused all the problems. Now that I did a clean install the overlay worked and I didn't need it anymore and all the sound problems went away.
BTW, retropie seems to run al little smoother than recalbox on a B+ :-) Also, tvservice -s still reports 0.00Hz but apparently this doesn't hurt?
-
-
Hi,
I know this is an old topic and Solved too. But it fixed my problem and it took me a few days of looking though boards to find it.
My Problem was that videos (mp4 or streams: flash and html5) would run too fast, about 120% or so.
I have a Gert 666 VGA adapter and was running the sound out of the audio Jack.
I tested the setup on a HDMI TV and when I switched between "sound through HDMI" and "sound through Audio Jack" the video would go from playing correct speed to playing too fast.
After reading this post I removed the dt-blob.bin out of the Boot directory and restarted.
Videos now play correctly. It seems a better driver is available in the default packages than is provided in the Github suppository for the vga666.
I hope this makes it easier for someone else to find this 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.