Skip to main content

Audio Adapter

The Audio Adapter is a discrete PCB that connects to the main board by a flex PCB cable. It includes the ability to take analog audio in and out of the board.

Overviewโ€‹

Historically, we originally had the Audio Headphone connector on the board itself. But one of the main challenges of manufacturing has been that the module on the bottom of the board doesn't really allow for any through-hole components to be used. Having evaluated lots of options and board space area, we determined that we really couldn't find a good quality connector that we could fit on the top board that we're proud of. So given that this was a Kickstarter, we decided to just swallow our pride and built a small Audio Adapter.

Audio Adapter

That Audio Adapter can go either at the front or at the back of the board. It is highly configurable. It can even go outside of the box if you so want it. It supports a built-in microphone with a switch. The alternative is a headphone port which supports a three-pin headphone adapter with either a microphone and a headphone active, or if the switch is set, a built-in microphone and then external headphones.

The audio board uses ALSA under the hood. It can be configured to record and play audio in the usual ways inside the device. Note that if the audio board isn't connected, the main system won't determine that headphones are plugged in and probably won't switch the routing. But if you force the audio out of it, nothing bad will happenโ€”you'll just not get any egressed audio.

Audio Adapter Annotations
LabelDescription
1Headphone/microphone connector (3.5mm)
2Connection to Tachyon
3Microphone selector
4Internal microphone

The headphone connector can also be used with amplified speakers.


๐ŸŽง Audio Adapter Assemblyโ€‹

The audio adapter connects to your Tachyon using a 5-pin Flexible Flat Cable (FFC).
For this step, youโ€™ll need:

  • The audio adapter board
  • The FFC cable

Both are included in your Tachyon kit.

Audio Adapter 1

Start by opening the latch on the FFC connector of the audio adapter board.
You can use your fingertips or a small flat-head screwdriver to gently lift the latch.

Audio Adapter 1

Insert the FFC with the blue tab facing up. Gently slide the cable into the connector until fully seated.

Audio Adapter 1

Once the cable is inserted, close the latch on the connector. The cable should lie flat and snug in the housing.

Audio Adapter 1

Now repeat the process on the Tachyon boardโ€”open the latch on its FFC connector.

Audio Adapter 1

Insert the other end of the cable, again with the blue side facing up.

Audio Adapter 1

Close the latch to lock the cable in place.

Audio Adapter 1

Check both ends and make sure the cable is firmly connected on both the Tachyon and the adapter side.

Audio Adapter 1

Once everything is in place, your connection should look like this ๐Ÿ‘‡

Audio Adapter 1

You can now plug in a 3.5mm headphone jack and enjoy audio output!

๐ŸŽค Microphone switch tip:

  • Set the switch to EXT if youโ€™re using an external mic, like those on earphones.
  • Set it to INT to use the onboard mic on the adapter board.

๐Ÿ”ฉ Optional Mountingโ€‹

You can optionally mount the audio adapter board on top or underneath the Tachyon using nylon spacers and screws.
Note: These are not included in the kit.

Audio Adapter 1

In this example, weโ€™re using M2.5 x 11mm nylon spacers to mount the board on top.

Audio Adapter 1

Mounting the board helps keep the setup tidy and reduces stress on the FFC.


๐Ÿ”Š Audio Usageโ€‹

Below are minimal working shell scripts to get you started with audio routing, playback, and capture.

โ–ถ๏ธ Play an Audio Fileโ€‹

Hereโ€™s a basic script to configure audio routing and play a WAV file:

#!/bin/bash

# Minimal audio routing setup
tinymix set 'PRI_MI2S_RX Audio Mixer MultiMedia1' 1
tinymix set 'OUT1_L Switch' 1
tinymix set 'OUT1_R Switch' 1

# Play the audio file passed as first argument
tinyplay "$1"

Save this script as play.sh, then play a sample audio file like this:

bash play.sh /etc/misc/soundlib/telephone_ring.wav

๐Ÿ”‰ You should hear the file through the connected audio output (e.g., headphone jack on the audio adapter).

๐ŸŽ™๏ธ Record an Audio File (5 seconds)โ€‹

This script configures the minimal audio capture path and records an audio clip:

#!/bin/bash

# Minimal audio recording path setup
tinymix set 'MultiMedia1 Mixer PRI_MI2S_TX' '1'
tinymix set 'Capture Digital Volume' '192'
tinymix set 'Left Channel Capture Volume' '8'
tinymix set 'Right Channel Capture Volume' '8'
tinymix set 'Capture Mute' '0'
tinymix set 'Left PGA Mux' 'Line 1L'
tinymix set 'ADC Source Mux' 'left data = left ADC, right data = left ADC'

# Record to the file passed as argument, limited to 5 seconds
tinycap "$1" -t 5

Save this script as record.sh, then run it like this:

bash record.sh audiocapture.wav

This will capture 5 seconds of audio and save it as audiocapture.wav.

๐Ÿ” Playback Your Recordingโ€‹

You can now play back your recorded file using the same play.sh script:

bash play.sh audiocapture.wav

๐ŸŽง Tip: Make sure the microphone selector switch on your audio adapter is set correctly:

  • EXT for external mic (like headset)
  • INT for the onboard mic on the audio adapter

Limitations

On the current OS build (Ubuntu 20.04.6 LTS), audio is only supported in headless mode.
Audio output does not work in the desktop environment at this time.
Support for desktop audio is planned in a future releaseโ€”stay tuned!