Read two thousand one hundred and eighty | return two

seventy-eight

Posts

zero

TA resources

A grain of gold sand (advanced)

Building owner
 

[BIGTREETECH PI development board]+08. Audio test (zmj) [Copy Link]

 

[BIGTREETECH PI development board]+08. Audio test (zmj)

BIGTREETECH Pi development board It has a 3.5mm audio interface, which can play music or record. Theoretically, you can listen to music while playing the development board (● '◡' ●)

 

1. Program installation

BIGTREETECH Pi development board The system supports a variety of common audio player software, which you can choose according to your own preferences. I have installed a bunch of

 //------Player and dependent installation (optional) sudo apt install zoom-player wordplay wdisplays \ vdr-plugin-mplayer smplayer sidplay qtav-players \ playmidi playerctl multimedia-players node-react-audio-player \ mplayer* media-player-info madplay gbsplay alsaplayer*

2. Audio test

For details of each test item, refer to the Log record.

 

2.1 Sound card detection

Sound card detection can be viewed through "aplay - l" or "aplay - L". Through the Log information, we can see that there are three sound cards: card-0/card-1/card-2.

Function division: card-0 is used to process multimedia, system and companion flow; Card-1 is the audio stream of HDMI interface; Card-2 is the audio codec of CPU. Here we mainly test card-0.

BIGTREETECH Pi development board The specific principle of dividing sound cards in the system of has not been studied in depth. It should be related to the device tree and drivers

2.2 Audio playback

For audio playback, I tested "gst-play-1.0 (playing MP3/wav files)" and "aplay (playing wav files)".

2.3 Recording function

The recording function includes recording and playing recording tests. "Arecord" for recording and "gst play 1.0" for playing recording

 //------Sound card detection biqu@BTT-CB1 :~/zmj_ws/music$ aplay -l **** List of PLAYBACK Hardware Devices **** card 0: sndahub [sndahub], device 0: Media Stream sunxi-ahub-aif1-0 [Media Stream sunxi-ahub-aif1-0] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: sndahub [sndahub], device 1: System Stream sunxi-ahub-aif2-1 [System Stream sunxi-ahub-aif2-1] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: sndahub [sndahub], device 2: Accompany Stream sunxi-ahub-aif2-2 [Accompany Stream sunxi-ahub-aif2-2] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: allwinnerhdmi [allwinner-hdmi], device 0: hdmi i2s-hifi-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 2: Codec [H616 Audio Codec], device 0: CDC PCM Codec-0 [CDC PCM Codec-0] Subdevices: 1/1 Subdevice #0: subdevice #0 //------Audio playback (mp3 and wav) biqu@BTT-CB1 :~/zmj_ws/music$ find / -name *.mp3 ./Born a Stranger.mp3 ./The promise.mp3 biqu@BTT-CB1 :~/zmj_ws/music$ gst-play-1.0 ./ Press 'k' to see a list of keyboard shortcuts. Now playing /usr/share/myir/Music/Born a Stranger.mp3 Redistribute latency... 0:01:41.7 / 0:01:41.7 Now playing /usr/share/myir/Music/The promise.mp3 Redistribute latency... 0:03:15.8 / 0:03:15.8 Reached end of play list. biqu@BTT-CB1 :~/zmj_ws/music$ ll /usr/share/sounds/alsa/ total 5076 -rw-rw-r-- 1 root root 1982048 Mar  3 09:10 audio.wav -rw-r--r-- 1 root root  137134 Dec  7  2020 Front_Center.wav -rw-r--r-- 1 root root  142128 Dec  7  2020 Front_Left.wav -rw-r--r-- 1 root root  146990 Dec  7  2020 Front_Right.wav -rw-rw-r-- 1 root root 1972332 Mar  3 09:10 mute.wav -rw-r--r-- 1 root root  135202 Dec  7  2020 Noise.wav -rw-r--r-- 1 root root  130096 Dec  7  2020 Rear_Center.wav -rw-r--r-- 1 root root  126064 Dec  7  2020 Rear_Left.wav -rw-r--r-- 1 root root  146480 Dec  7  2020 Rear_Right.wav -rw-r--r-- 1 root root  134868 Dec  7  2020 Side_Left.wav -rw-r--r-- 1 root root  129966 Dec  7  2020 Side_Right.wav biqu@BTT-CB1 :~/zmj_ws/music$ aplay /usr/share/sounds/alsa/audio.wav  Playing WAVE '/usr/share/sounds/alsa/audio.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo biqu@BTT-CB1 :~/zmj_ws/music$ aplay /usr/share/sounds/alsa/Noise.wav  Playing WAVE '/usr/share/sounds/alsa/Noise.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo //------Recording function (including recording and playing recording) biqu@BTT-CB1 :~/zmj_ws/music$ arecord -f cd audio_test.wav Recording WAVE 'audio_test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stere o ^ CAborted by signal Interrupt.. biqu@BTT-CB1 :~/zmj_ws/music$ gst-play-1.0 audio_test.wav Press 'k' to see a list of keyboard shortcuts. Now playing audio_test.wav Redistribute latency... 0:00:18.6 / 0:00:18.6 //------Sound card settings (including volume adjustment) biqu@BTT-CB1 :~/zmj_ws/music$ alsamixer

 

2.4 Sound card settings

Use "alsamixer" to configure each sound card. It is a graphical interface configuration tool, which is used to configure various audio parameters. You can use this command to set the volume of the headset output.

//------Alsamaxer comprehensive interface:

//------Alsamixer View Help F1:

 

//------end

Latest reply

What an awesome person details reply Published at 08:08, August 11, 2023
give the thumbs-up follow
 
 

reply
report

Colorful wafer (advanced)

sofa
 

The 3.5mm audio test interface is still necessary

 
 
 

reply

Moderator

Bench
 

What an awesome person

 
 
 

reply
You need to log in before you can reply Sign in | register

Guess you like it
look around
Find Data Book?

EEWorld Datasheet Technical Support

Related articles More>>
close
Recommended by webmaster Previous one /9  Next
Copyright Electronic Engineering World Beijing B2-20211791 Jing ICP Bei 10001474-1 TSSP [2006] No. 258 Jinggong Network Anbei No. 11010802033920 Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved
Quick reply Back to top Back to list