Difference between revisions of "The method of using commands to play audio"

From Wiki-Orange Pi
Jump to: navigation, search
Line 10: Line 10:
 
Subdevice #0: subdevice #0<br>
 
Subdevice #0: subdevice #0<br>
 
card 1: rockchiphdmi0 [rockchip-hdmi0], device 0: rockchip-hdmi0 i2s-hifi-0 [rockchip-hdmi0 i2s-hifi-0]<br>
 
card 1: rockchiphdmi0 [rockchip-hdmi0], device 0: rockchip-hdmi0 i2s-hifi-0 [rockchip-hdmi0 i2s-hifi-0]<br>
Subdevices: 1/1<br>
+
:Subdevices: 1/1<br>
Subdevice #0: subdevice #0<br>
+
:Subdevice #0: subdevice #0<br>
 
<span style="color:#0066CC;">card 2: rockchipes8388 [rockchip-es8388], device 0: dailink-multicodecs ES8323.6-0010-0 [dailink-multicodecs ES8323.6-0010-0]</span><br>
 
<span style="color:#0066CC;">card 2: rockchipes8388 [rockchip-es8388], device 0: dailink-multicodecs ES8323.6-0010-0 [dailink-multicodecs ES8323.6-0010-0]</span><br>
<span style="color:#0066CC;">Subdevices: 1/1</span>
+
:<span style="color:#0066CC;">Subdevices: 1/1</span><br>
 +
:<span style="color:#0066CC;">Subdevice #0: subdevice #0</span>
 
|}
 
|}
 
3) Then use the aplay command to play the audio file that comes with the system. If the earphone can hear the sound, it means that the hardware can be used normally.<br>
 
3) Then use the aplay command to play the audio file that comes with the system. If the earphone can hear the sound, it means that the hardware can be used normally.<br>
Line 29: Line 30:
 
|orangepi@orangepi:~$ '''aplay -l'''<br>
 
|orangepi@orangepi:~$ '''aplay -l'''<br>
 
<span></span>**** List of PLAYBACK Hardware Devices ****<br>
 
<span></span>**** List of PLAYBACK Hardware Devices ****<br>
card 0: rockchipdp0 [rockchip-dp0], device 0: rockchip-dp0 spdif-hifi-0 [rockchip-dp0 spdif-hifi-0] Subdevices: 1/1<br>
+
card 0: rockchipdp0 [rockchip-dp0], device 0: rockchip-dp0 spdif-hifi-0 [rockchip-dp0 spdif-hifi-0] <br>
Subdevice #0: subdevice #0<br>
+
:Subdevices: 1/1<br>
<span style="color:#0066CC;">card 1: rockchiphdmi0 [rockchip-hdmi0], device 0: rockchip-hdmi0 i2s-hifi-0 [rockchip-hdmi0 i2s-hifi-0] Subdevices: 1/1</span><br>
+
:Subdevice #0: subdevice #0<br>
<span style="color:#0066CC;">Subdevice #0: subdevice #0</span><br>
+
<span style="color:#0066CC;">card 1: rockchiphdmi0 [rockchip-hdmi0], device 0: rockchip-hdmi0 i2s-hifi-0 [rockchip-hdmi0 i2s-hifi-0]</span><br>
 +
:<span style="color:#0066CC;">Subdevices: 1/1</span><br>
 +
:<span style="color:#0066CC;">Subdevice #0: subdevice #0</span><br>
 
card 2: rockchipes8388 [rockchip-es8388], device 0: dailink-multicodecs ES8323.6-0010-0 [dailink-multicodecs ES8323.6-0010-0]<br>
 
card 2: rockchipes8388 [rockchip-es8388], device 0: dailink-multicodecs ES8323.6-0010-0 [dailink-multicodecs ES8323.6-0010-0]<br>
Subdevices: 1/1<br>
+
:Subdevices: 1/1<br>
Subdevice #0: subdevice #0<br>
+
:Subdevice #0: subdevice #0<br>
 
|}
 
|}
 
3) Then use the aplay command to play the audio file that comes with the system. If the HDMI monitor or TV can hear the sound, it means that the hardware can be used normally<br>
 
3) Then use the aplay command to play the audio file that comes with the system. If the HDMI monitor or TV can hear the sound, it means that the hardware can be used normally<br>

Revision as of 09:40, 25 April 2023

1.Headphone interface playback audio test

1) First insert the earphone into the earphone jack of the development board

Pi-5-details2-pic15.png

2) Then you can use the aplay -l command to view the sound card devices supported by the linux system. From the output below, we can see that card 2 is the sound card device of es8388, that is, the sound card device of the headset

orangepi@orangepi:~$ aplay -l

**** List of PLAYBACK Hardware Devices ****
card 0: rockchipdp0 [rockchip-dp0], device 0: rockchip-dp0 spdif-hifi-0 [rockchip-dp0 spdif-hifi-0] Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: rockchiphdmi0 [rockchip-hdmi0], device 0: rockchip-hdmi0 i2s-hifi-0 [rockchip-hdmi0 i2s-hifi-0]

Subdevices: 1/1
Subdevice #0: subdevice #0

card 2: rockchipes8388 [rockchip-es8388], device 0: dailink-multicodecs ES8323.6-0010-0 [dailink-multicodecs ES8323.6-0010-0]

Subdevices: 1/1
Subdevice #0: subdevice #0

3) Then use the aplay command to play the audio file that comes with the system. If the earphone can hear the sound, it means that the hardware can be used normally.

rangepi@orangepi:~$ aplay -D hw:2,0 /usr/share/sounds/alsa/audio.wav

Playing WAVE 'audio.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo

2.HDMI audio playback test

1) First use the HDMI to HDMI cable to connect the Orange Pi development board to the TV (other HDMI monitors need to ensure that they can play audio)

2) Then check the serial number of the HDMI sound card. From the output below, you can know that the HDMI sound card is card 1

orangepi@orangepi:~$ aplay -l

**** List of PLAYBACK Hardware Devices ****
card 0: rockchipdp0 [rockchip-dp0], device 0: rockchip-dp0 spdif-hifi-0 [rockchip-dp0 spdif-hifi-0]

Subdevices: 1/1
Subdevice #0: subdevice #0

card 1: rockchiphdmi0 [rockchip-hdmi0], device 0: rockchip-hdmi0 i2s-hifi-0 [rockchip-hdmi0 i2s-hifi-0]

Subdevices: 1/1
Subdevice #0: subdevice #0

card 2: rockchipes8388 [rockchip-es8388], device 0: dailink-multicodecs ES8323.6-0010-0 [dailink-multicodecs ES8323.6-0010-0]

Subdevices: 1/1
Subdevice #0: subdevice #0

3) Then use the aplay command to play the audio file that comes with the system. If the HDMI monitor or TV can hear the sound, it means that the hardware can be used normally

orangepi@orangepi:~$ aplay -D hw:1,0 /usr/share/sounds/alsa/audio.wav