4750 views|2 replies

79

Posts

0

Resources
The OP
 

【BIGTREETECH PI development board】+08. Audio test (zmj) [Copy link]

 

【BIGTREETECH PI development board】+08. Audio test (zmj)

The BIGTREETECH Pi development board has a 3.5mm audio interface that can be used to play music and record. In theory, you can listen to music while playing with the development board (●''●)

1. Program Installation

The BIGTREETECH Pi development board system supports various common audio player software. You can choose according to your own preferences. I have installed a lot of them...

//------播放器及依赖安装(可选)
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 detailed information about each test item, refer to the Log record.

2.1 Sound card detection

The sound card detection can be checked through "aplay -l" or "aplay -L". From the log information, you can see that there are three sound cards: card-0/card-1/card-2.

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

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

2.2 Audio Playback

Audio playback I tested "gst-play-1.0 (plays mp3/wav files)" and "aplay (plays wav files)".

2.3 Recording function

The recording function includes the test of recording and playing recording. The recording uses "arecord" and the playing recording uses "gst-play-1.0".

//------声卡检测
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
//------音频播放(mp3和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
//------录音功能(包括录音和播放录音)
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
//------声卡设置(包括音量调节)
biqu@BTT-CB1:~/zmj_ws/music$ alsamixer

2.4 Sound Card Settings

Each sound card can be configured using "alsamixer", which is a graphical configuration tool used to configure various audio parameters. The command can be used to set the volume of the headphone output.

//------alsamixer comprehensive interface:

//------alsamixer view help F1:

//------end

This post is from Domestic Chip Exchange

Latest reply

A very cool person.   Details Published on 2023-8-11 08:08
 
 

6547

Posts

0

Resources
2
 

The 3.5mm audio test interface is still necessary.

This post is from Domestic Chip Exchange
 
 
 

6818

Posts

11

Resources
3
 

A very cool person.

This post is from Domestic Chip Exchange
 
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Featured Posts
Could you please help me see how to filter this switching power supply circuit?

As the title says, the ACDC switching power supply outputs 5V voltage through LDO. How to filter it next? Below is the ...

[Hua Diao DIY] Fast food box cover, a very low-cost experimental platform for building robot walking

This post was last edited by eagler8 on 2021-2-7 17:50 After eating the fast food porridge, in addition to the delicio ...

MS8211 Pen-Type Multimeter Disassembly

This post was last edited by dcexpert on 2022-2-4 16:55 I had nothing to do these few days, and I accidentally found th ...

My own feelings about simulation software

The most annoying thing about using LTspice is that it does not support mixed analog and digital simulation. Although it ...

About the defects of MOS switches

For example, when gs is 0, the current flowing from d to s can be blocked, but due to the presence of the parasitic diod ...

Oscillator Phase Noise and Frequency Stability

This book systematically introduces the theory of phase noise and frequency stability of oscillators, explains in depth ...

[HC32F4A0 development board review] + LED control based on I2C

There are three LED lights on the HC32F4A0 development board that cannot be controlled directly through the GPIO port be ...

Xiaomi responds to "Xiaomi Auto sales continue to decline": Delivery pressure is huge, and we are confident that we will deliver more than 10,000 cars this month

This post was last edited by wklwklwbh on 2024-6-15 09:27 According to Sanyan Technology on June 13, today, the topic # ...

"Time Analysis of Embedded Software" reading activity: 7 Chapter 7 Reading Notes - Software Time in Multi-core and Multi-ECU Environments

This chapter explains some knowledge and issues about software execution under multi-core or multi-ECU. The directory is ...

Practical knowledge! Detailed explanation of PWM control principle and circuit application

PWM (Pulse Width Modulation) is a technology that uses pulses to output analog signals. It modulates the width of a seri ...

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list