Please enable javascript, or click here to visit my ecommerce web site powered by Shopify.
Jump to: navigation, search

Zero/hardware/audio

< Zero‎ | hardware
Revision as of 11:37, 13 December 2021 by RadxaYuntian (Talk | contribs)

Radxa Zero > Hardware > Audio

USB Audio

Due to space constraint, Radxa Zero does not have a 3.5mm headphone jack for audio output. To get audio output from Radxa Zero, the easiest way is to connect to a HDMI soundbar.Actually HDMI audio is currently not working. This is a known issue. Alternatively you can connect to a USB sound card. Or even better, a USB speaker, which has integrated USB sound card inside. In this guide we will show you how to play sound on your USB speaker using Radxa Zero.

Please connect your hardware in following way:

Type-A USB speaker --- Type-C to Type-A USB Hub --- Radxa Zero

In a terminal window on Zero, we will first run aplay -l to check card id for our USB speaker.

root@zero:/home/rock# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: RADXAZERO [RADXA-ZERO], device 0: fe.dai-link-0 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: RADXAZERO [RADXA-ZERO], device 1: fe.dai-link-1 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: RADXAZERO [RADXA-ZERO], device 2: fe.dai-link-2 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: CD002 [CD002], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Once you identify your USB speaker, edit /etc/asound.conf to set it as the default output:

root@zero:/home/rock# cat /etc/asound.conf 
pcm.!default {
  type hw
  card 1
}

ctl.!default {
  type hw
  card 1
}

You can now test your speaker by playing some sound with mplay or aplay:

root@zero:/home/rock# mplay test.wav

or

root@zero:/home/rock# aplay -Dhw:1,0 test.wav