Rockchip (EASY EAI) RV1126B Audio Input
1. Introduction to Sound Card Resources
The EASY-EAI-Nano-TB has only one sound card output by the RV1126B main controller.
You can access the development board terminal via serial debugging or SSH debugging. Execute the aplay command to view detailed information regarding the sound card, as shown below.
arecord -l
1.1 Hardware Interface
The location of the hardware interface is shown below.

2. Sound Card Control
Linux systems typically use the ALSA framework (aplay, arecord, amixer) to access sound cards at the application layer. This article will only describe the parts relevant to this development board platform. If users wish to learn more about ALSA usage, they can refer to the "Introduction to ALSA Usage" in the developer community.
2.1 Audio Recording
Audio recording is performed using the arecord command.
arecord -D plughw:0,0 -c 2 -r 44100 -f S16_LE 1234567.wav
Terminate recording using the [Ctrl+C] key combination.
Note: When recording single-channel (-c 1) audio, -f only supports two sampling bit depths: [S16_LE] and [S24_LE].
2.2 Recording Volume Adjustment
The [range] of the Card0 recording volume [value] is from 0 to 31.
amixer -c 0 cset name='ACodec_LP PGA Gain Volume' 0 ## Set Card0 output volume [value] to 0 amixer -c 0 cset name='ACodec_LP PGA Gain Volume' 16 ## Set Card0 output volume [value] to 16 amixer -c 0 cset name='ACodec_LP PGA Gain Volume' 31 ## Set Card0 output volume [value] to 31
Note: The [value] here is a variable positively correlated with gain, but it is neither the gain itself nor a volume percentage. Furthermore, when adjusting it, the change in volume is [not linear].
2.3 Detailed Explanation of Recording Commands
Record in CD format (terminate recording with the [Ctrl+C] key combination):
arecord -D hw:0,0 -f cd 1234567.wav
Specifying the CD recording format is equivalent to fixing the channels (stereo), sample rate (44100Hz), and sampling bit depth (S16_LE).
Specify recording duration:
arecord -D hw:0,0 -f cd -d 10 1234567.wav
-d 10: Indicates that the recording will automatically end after a specified duration of 10s.
For more usage methods of arecord, refer to:
arecord -h