Zero/hardware/audio
Radxa Zero > Hardware > Audio
USB Audio
Equipped with one USB speaker device, Radxa Zero can output sound.
Let's take playing a song as an example.
This is the hardware connection
Type-A USB speaker --- Type-C to Type-A USB Hub --- Radxa Zero
Firstly use command, aplay -l, to check the audio card number. Here is card 1.
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
Secondly create file /etc/asound.conf and add the following content.
root@zero:/home/rock# cat /etc/asound.conf pcm.!default { type hw card 1 } ctl.!default { type hw card 1 }
Finally use mplayer or aplay to play songs.
root@zero:/home/rock# mplay test.wav
or
root@zero:/home/rock# aplay -Dhw:1,0 test.wav
Troubleshooting
- Post your issue on the forum: https://forum.radxa.com/c/zero