Audio - IanSB/RGBtoHDMI GitHub Wiki

HDMI Audio Support

The audio board is an addon for existing RGBtoHDMI boards and provides HDMI audio support.
It is designed to be soldered on top of the existing CPLD board using just 8 solder points for power and data and 3 solder pads for the audio and ground.
The board is so thin that the resulting combination will still fit inside the plastic case.

Currently the audio board is only available assembled from the suppliers listed below:

The latest beta software that supports audio can be downloaded here:
https://github.com/IanSB/RGBtoHDMI/releases
This also has a WAV player so you can check if audio will work on your monitor without having the capture board fitted.

Although designed for the Pi zero and zero 2, the audio software should work on the Pi 1, 2 & 3 but will not currently work on the Pi 4 (The Pi 5 is not yet supported at all)

Photo of the upgrade board:
images/audio/audio-board-issue2.jpg

Audio Menu

images/audio/audio-menu.png

Options

Audio Capture On/Off - turns audio capture on or off.
Audio Mode: Options are Stereo, Mono, Mono (Right), Stereo (LR Swapped). Mono sends the left audio to both speakers.
Capture Type: Direct mode is lowest latency, Delayed DMA mode uses a memory buffer to delay the audio.
DMA delay: amount of audio delay in milliseconds.
Clock Sync: Several different ways of keeping the audio in sync. Variable PLL is the default with other options to try if there are problems.
Optimise profile: On/Off. when On, it changes settings such as core overclocking or bit depth to optimise audio capture.
Test WAV File: selects the test wav.
Play Test WAV: Plays the selected test wav file. Can be used to test HDMI audio output if audio interface not fitted.
Play all test WAVs: Plays all the WAV files in the WAV folder.
Play Test Tone: Plays a test tone.
Stop Playing Audio: Stops playing the wav or test tone.

You can add your own WAV files to the WAV folder on the SD card (48Khz sampling stereo only max 160MB)

Standard CPLD board fitting

The audio board should be fitted to the standard CPLD board as follows:

  • On the DIY issue 4 CPLD boards you will have to trim the ends of the leads of resistor network RN3 so the audio input end of the audio pcb lies flat.
    This is not required on the later issue 5, 6 or 7 pre-assembled boards as they use surface mount resistor networks.
  • First place the board over the CPLD as shown in the photo and solder one hole.
  • Then press on the large black chip on the audio board while re-melting the solder on that hole which will ensure that the audio board is lying flat on top of the large CPLD chip.
  • Then solder the remaining 7 holes. Make sure that solder has flowed through the holes and run down the pins to ensure good contact. If this doesn't happen you can end up with just a 'cap' of solder which makes intermittent contact with the pin. You can check this by viewing the side edge of the board.
  • Finally thread your audio cable through the hole in the CPLD board as indicated and solder it to the three solder pads (Left, Ground and Right).

If the 3.5mm cable mounted socket wire was supplied with your board, the colours are as shown in the photo (black = Ground, red = left (tip) and white = right (ring). Note that mono audio is taken from left input only to be fed to both speakers although you can connect the signal to both inputs. Route the cable out of the case with the video cable or connector. You might have to use a file to enlarge the existing hole if necessary.

images/audio/standard-cpld.jpg

Photo of 3.5mm stereo cable tail optionally available from some suppliers.
Note that the colours for left/tip (red) and right/ring (white) on this particular wire are reversed from those typically used so make sure you follow the above example when assembling with this particular cable. Other cables may have more typical colours. If you get the colours reversed it will swap left and right and then the "mono" setting in the audio menu might not work if mono audio was only fed to the left channel although "mono (right)" would then work instead. images/audio/3-5mm-cable.jpg

Mono / Lumacode CPLD board fitting

Some mono/lumacode boards were supplied with a captive video cable soldered on to the pcb rather than a 3.5mm TRRS socket. For those boards use the standard CPLD way of connecting with a separate cable as described above or remove the captive cable and install a TRRS socket (type PJ322).

To fit the audio board to the mono/lumacode CPLD board when a TRRS socket is fitted, you must first open or cut the solder jumpers labelled JP7 and JP8 on the underside of the board:
Note that some boards were supplied with those jumpers open, some boards were supplied with them solder bridged (use desolding braid), some were supplied with them bridged by default with PCB tracks (which have to be cut) and some might have been bridged on the PCB then had a solder blob on top (use desoldering braid and then cut the PCB tracks) so make sure that those jumpers are actually opened. When cutting the PCB track bridged jumpers it is better to try and dig them out with the point of a craft knife rather than slicing which could lead to other tracks getting cut if you slip. Another alternative to cut pcb bridges might be to use a Dremel with a small grinding bit.

images/audio/mono-bottom.jpg

Then fit the board to the top of the CPLD as described above for the standard CPLD but connect the audio to the 3.5mm socket pins using short jumper wires as shown in the photo:
The signals on the 3.5mm TRRS connector will then be as follows:
Tip: Video
Ring1: Left or Mono Audio
Ring2: Right Audio

images/audio/mono-top.jpg
Under normal circumstances mono audio would be used as all computers currently supported by this version are mono so a normal 3.5mm stereo jack to phono cable can be used with this board with video on the tip and mono audio on the ring with the right audio input being ignored. images/audio/jack-to-rca2.jpg If you require stereo audio then use a 3.5mm TRSS jack to three phono cable instead which will give you video + left and right audio.

c0pperdragon Amiga board fitting

The board can also be fitted to Amiga internal upgrade boards such as c0pperdragon's adapter:
Solder the board as indicated in the photos (Pin 1 of the 40 way connector to the hole by "J1") and wire up the left and right solder pads to the Amiga's audio connectors.
NOTE: There is also a "Reversed" version of c0pperdragon's board where the Pi zero sits above the RGBtoHDMI board rather than to one side and you cannot fit the audio board in this way. Instead use the upside down Pi zero fitting option detailed below.

images/audio/amiga-bottom.jpg

Top view:
images/audio/amiga-top.jpg

Fitted in the Amiga:
images/audio/amiga-fitted.jpg

Connection to pick up audio:
images/audio/amiga-audio.jpg

Alternative fitting methods for other boards

It should be possible to fit the audio upgrade to other Amiga board variants (Pin 1 of the 40 way Pi zero connector connects to the hole by "J1") so if anyone does that, please post photos on the issues tab for inclusion in future updates to the wiki. (See below)

If it is not possible to fit the upgrade board due to clearance or other issues, 8 wires could be used instead to move the board to a more suitable position but another alternative is to solder the board upside down to the Pi zero as shown in this photo:
Put a layer of insulating tape on the Pi zero PCB before soldering the board to avoid any shorts.

images/audio/audio-pi-zero.jpg

User supplied photos of fitting to other boards

Here are some user supplied photos showing the audio board fitted to other RGBtoHDMI variants:
Fitting to other boards

Two GPIO and One GPIO modes

Due to lack of spare GPIOs, the audio makes use of two GPIOs that are already allocated to other functions: LED2 and FFOSD.
LED2 is the second LED by the reset button and is used to indicate things like mode7 detected on the BBC micro.
When audio is enabled it will glow at roughly half intensity. When audio is disabled or not fitted, the LED behaves as previously.

Normally this Two GPIO mode is used to pass the audio data but the use of FFOSD means that the Amiga's Gotek overlay feature can't be used when the audio board is fitted.

However the board can be switched into One GPIO mode where it only uses the LED2 input thus freeing FFOSD for for use with the Gotek.
This mode is more CPU intensive and requires core overclocking so it is not the default.
To change into One GPIO mode, cut the pcb bridges on jumpers JP2 (1-2), JP3 (2-3), JP4 (2-3) and JP5 (2-3) with a sharp knife. The best way is to dig the bridge out with the point of a craft type knife or possibly use a Dremel with a small grinding bit.
Then make solder bridges on JP3 (1-2), JP4 (1-2) and JP5 (1-2) leaving JP2 open with no bridges at all. See below: (These changes are auto detected by the software and the connection type will be displayed on power up or in the system summary menu.)

images/audio/1gpio-mode.jpg