Difference between revisions of "Zero/hardware/audio"
RadxaYuntian (Talk | contribs) |
RadxaYuntian (Talk | contribs) (→USB Audio) |
||
Line 15: | Line 15: | ||
In a terminal window on Zero, we will first run <code>aplay -l</code> to check card id for our USB speaker. | In a terminal window on Zero, we will first run <code>aplay -l</code> to check card id for our USB speaker. | ||
− | + | root@zero:/home/rock# aplay -l | |
− | root@zero:/home/rock# aplay -l | + | **** List of PLAYBACK Hardware Devices **** |
− | **** List of PLAYBACK Hardware Devices **** | + | card 0: RADXAZERO [RADXA-ZERO], device 0: fe.dai-link-0 (*) [] |
− | 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 (*) [] | |
− | 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 (*) [] | |
− | 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]''' | |
− | '''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: | Once you identify your USB speaker, edit /etc/asound.conf to set it as the default output: |
Revision as of 07:14, 2 December 2021
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. 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