VIM4 Audio Out for external speakers?

The VIM4 documentation doesn’t appear to mention Audio Out functionality.

Audio out over HDMI works, and I assume audio out over Bluetooth is possible with OS support. However, I would ike to use two 1" X 1" speakers with my new VIM4, as I intend to use the LCD display.

I checked the VIM4 Hardware Documentation page [Khadas VIM3 Hardware Documentation | Khadas Documentation] (Khadas VIM3 Hardware Documentation | Khadas Documentation), but there is no content at this time. I checked the GPIO documentation page https://docs.khadas.com/linux/vim4/gpio.html also, and found no mention of audio out.

What is the appropreate means of connecting speakers to the VIM4?

Also, where can the VIM4 serial number be found?

Thanks to the Khadas team for producing this delightful new product and their very professional support.

Best regards,
Larry

There are no analog outputs on VIMx boards - only digital interfaces available - either I2S bus or SPDIF.
So the following only options are available to get sound from VIM boards.
1/. Buy some DAC chip and connect it to I2S bus - a bit complex task and perhaps will require some soldering
2/ Get any small USB-DAC (but drivers can be an issue here)
3/ Get some DAC with SPDIF-IN support and attach it to SPDIF-OUT pin on GPIO, pretty easy solution as there are a lot of SPDIF to Analog convertors on the market. No drivers, no soldering or whatever required
4/ Get ToneBoard from Khadas and use in as “hat” on top of GPIO header

2 Likes

@OldNavi thank you very much for your informative response to my question.

My comments in-line below:

OldNavi

There are no analog outputs on VIMx boards - only digital interfaces available - either I2S bus or SPDIF.
So the following only options are available to get sound from VIM boards.
1/. Buy some DAC chip and connect it to I2S bus - a bit complex task and perhaps will require some soldering

I favor this approach; soldering is not an issue for me. However I have no idea what is specifically required.

2/ Get any small USB-DAC (but drivers can be an issue here)

Yes. Finding a compatible driver will likely obviate this approach.

3/ Get some DAC with SPDIF-IN support and attach it to SPDIF-OUT pin on GPIO, pretty easy solution as there are a lot of SPDIF to Analog convertors on the market. No drivers, no soldering or whatever required

This also sounds like an easy approach to getting audio out of the ViM4. However, the SPDIF-IN of the devices my research found all require optical input, while the VIM4 GPIO is obviously electrical. I presume the GPIO signal might be used to drive a LED to provided the required optical signal, but it might be a kludge. Alternatively, the GPIO SPDIF signals might be wired directly in place of the output of the SPDIF receiver’s output.

Re-reading this suggestion, I believe you were referring to a " DAC with SPDIF-IN support" chip, rather than a commercial product. I had a look on Mouser, and find this approach might be a lot of work.

4/ Get ToneBoard from Khadas and use in as “hat” on top of GPIO header

While the Khadas ToneBoards doubtless provide quality audio, their cost is prohibitive in my application. Tone2 Pro $249.90, Tone Board $79.90

I have purchased these two devices in the hope that I might modify them for my application:

HDMI to RCA Cable, HDMI Male to 3 RCA Converter Adapter Audio Extractor Jacks

HDMI Female to VGA Male Converter with Audio Adapter Support 1080P Signal Output

I’m hoping I might build something small and low-power in keeping with the VIM4 design philosophy. If the HDMI audio-out interface was part of, and powered by the HDMI cable, that would be ideal, from my point of view.

Again, thank you for the information you provided. Very much appreciated.

Best regards,
Larry

USB speakers work on mine.

Ubuntu dashboard for adjusting them is funky. Test the config by changing the alert sounds.
sound1

There are tons of cheap convertors with coaxial input - take a look on aliexpress - like

Just $4 - and you can just disassemble it in case you need to use it in your own projects.
or on Ebay
https://www.ebay.com/itm/324614897744?hash=item4b948e4050:g:iJYAAOSwTDhiQbBm
all you need is just couple of restistors and 1 capacitor to make signal ratio to be compatible with SPDIF coax specs. Example schematic can be found in ToneBoard page.

1 Like

HI - i have khadas VIM4 - installed ubuntu 22.04 gnome 42.1. But i have no sound over HDMI. I have installed third party codecs. Only one sound card in alsamixer is AML-AUGESOUND. There is no hdmi option in gnome sound settings. How do you make HDMI works???

I have the same issue in the Ubuntu Gnome image - no HDMI (Digital Stereo) output option in both the Sound configuration and PulseAudio Volume Control configuration tab. I know that it’s not my HDMI cable since the sound works fine in the OOWOW test and in Android 11.

Please check topic ubuntu gnome no sound over hdmi.

That worked! Thank you.

(Old) USB Audio Class 1.0 devices should work with Ubuntu stock drivers. Most USB Audio Class 1.1 devices will not work on kernel versions less than 5.10. There’s a handful of Class 1.1 devices that have been special-cased and do work, but there are mostly older models that would difficult to come by.

General rule: the older and crustier the USB device, the more likely it is to work with out-of-the-box class drivers.

Anything that supports >16-bit audio, or greater than 48khz sampling rate will be a Class 1.1 device.

Not specifically tested on VIM4, but based on experience with Raspberry Pi OS/Ubuntu 21.04 on PI kernels. Current PI OSes will support pretty much any USB audio device you throw at it.