Audio issue and my solution
  • I am new here and just at the beginning of a build (I'll share the details in a later topic). I'm brand new to all of this, so it's been a steep learning curve for me.

    I'm running a B+ and I need to hook it up to a VGA monitor. So, I got an HDMI to VGA converter off of e-bay. This particular converter has an audio out connection on it to pull the audio from the HDMI.

    When I hooked up the system video worked great, but I got no sound out of either the HDMI jack or the Pi's 3.5mm analog jack.
    So I went into Raspi-Config and forced the audio out to HDMI, still nothing on there. Then I switched the speakers to the Pi's audio jack, forced the audio out there and I got sound! Success, I thought, but I had horrible static coming from the speakers along with the sound. I tried EVERYTHING to get the static to go away: changed speakers, changed power supplies, put a ferrite bead on the power supply and on the speakers, unplugged the Wifi dongle, key board, mouse and monitor. Still horrible sound.

    In desperation, I hooked the system up to my HDMI TV and sound through there worked great. My TV also has a VGA connection, so I tried that. The video didn't work, but oddly enough the sound started working through the HDMI jack. This got me thinking that the Pi was sensing something and turning off the sound to the HDMI.

    As it turns out, this is the case. If the Pi senses HDMI, it sends video and audio out the connection. If it senses DVI, then just video, no audio. For whatever reason, with the HDMI to VGA converter it was sending video and no audio.

    A simple change in the config.txt as below (2) and clean sound came from the HDMI jack!! I still don't know why I get static with my sound out of the 3.5mm, but at least now I have a workable solution to get clean sound.

    I hope this helps someone else!

    hdmi_drive chooses between HDMI and DVI modes

    hdmi_drive=1 Normal DVI mode (No sound)
    hdmi_drive=2 Normal HDMI mode (Sound will be sent if supported and enabled)
  • @atv223 - just an fyi, you can also use raspi-config to force audio through either hdmi or 3.5mm.
  • It may be just an issue with the particular adaptor I am using. But just forcing audio to HDMI through raspi-config did not work by itself. I tried it dozens of times with PiPlay, RetroPie and just a plain Raspbian distro. The adaptor made the Pi think it was DVI, and cut the audio. So in addition to forcing it to HDMI, I had to add the hdmi_drive=2 line
  • huh, weird.
  • glad you got it working though!
  • that's why config.txt is more powerful than raspi-config ;) and for numerous other config options (scaling etc.... )
  • Sorry to revive an old post.
    Trying to get audio working through the 3.5mm jack with no joy!
    raspi-config doesnt seem to work and have also tried hdmi_drive=1.
    Monitor is VGA attached via an hdmi to vga adapter.
    I can get sound working by exiting piplay to the command line and using sudo amixer cset numid=3 1 and tests ok with aplay command.
    However, when I boot back to piplay, no sound again :(
    Is there something I can edit in config.txt?
    Thanks for any help!
  • I have the exact same problem. Works fine when not using piplay. Enter piplay and no sound on the games! not sure if it works on the games outside of piplay, but definately get sound when I use the command line soundtest commands.
  • in /boot/config.txt, try adding:
    hdmi_ignore_edid_audio=1
  • try deleting /home/pi/pimame/config/piplay-sound.state
    then:
    sudo raspi-config
    select the following options:
    8 advanced options
    A9 Audio
    1 Force 3.5mm ('headphone') jack

Howdy, Stranger!

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