Difference between revisions of "Zero/hardware/audio"
(Created page with "{{Zero_header}} {{Languages|zero/hardware/audio}} Radxa Zero > Hardware > Audio === USB Audio === Equipped with...") |
RadxaYuntian (Talk | contribs) |
||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Zero_header}} | {{Zero_header}} | ||
+ | |||
{{Languages|zero/hardware/audio}} | {{Languages|zero/hardware/audio}} | ||
− | + | [[Zero | Radxa Zero]] > [[zero/hardware | Hardware]] > [[zero/hardware/audio | Audio]] | |
=== USB 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. | |
− | + | Note: currently the HDMI audio is not working out-of-box on our official image. You will need to [https://github.com/RadxaYuntian/libreelec-alsa-utils/releases/latest manually install this package] to have it working. We will add it to our official image in a later time once we know the package won't negatively affect existing users. | |
− | + | Please connect your hardware in following way: | |
− | + | Type-A USB speaker --- Type-C to Type-A USB Hub --- Radxa Zero | |
− | Type-A USB speaker --- Type-C to Type-A USB Hub --- Radxa Zero | + | |
− | + | ||
− | + | 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: | |
<pre> | <pre> | ||
Line 50: | Line 47: | ||
</pre> | </pre> | ||
− | + | You can now test your speaker by playing some sound with <code>mplay</code> or <code>aplay</code>: | |
+ | |||
+ | root@zero:/home/rock# mplay test.wav | ||
− | |||
− | |||
− | |||
or | or | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | root@zero:/home/rock# aplay -Dhw:1,0 test.wav |
Latest revision as of 13:16, 3 March 2022
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.
Note: currently the HDMI audio is not working out-of-box on our official image. You will need to manually install this package to have it working. We will add it to our official image in a later time once we know the package won't negatively affect existing users.
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