Difference between revisions of "ROM-6881 Audio"
From ESS-WIKI
Xingxing.li (talk | contribs) (Created page with " === '''Audio Test''' === Before the test, you need to prepare an audio card (ROM-EG57), a microphone and headphones. The test environment is shown in the picture below: F...") |
Xingxing.li (talk | contribs) |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 2: | Line 2: | ||
=== '''Audio Test''' === | === '''Audio Test''' === | ||
| − | Before the test, you need to prepare an audio card (ROM-EG57), a microphone and headphones. The test environment is shown in the picture | + | Before the test, you need to prepare an audio card (ROM-EG57), a microphone and a pair of headphones. The test and jumper setup environment is as shown in the following picture.[[File:ROM-6881 Audio.png|RTENOTITLE]] |
| − | + | '''1、Record<br/> Take Card ID 0 as an example:<br/> Change CARD_ID=0 according "Get the Audio board ID".''' | |
| − | |||
| − | ''' | ||
<pre># cat /proc/asound/cards | <pre># cat /proc/asound/cards | ||
0 [rockchiprt5640c]: rockchip_rt5640 - rockchip,rt5640-codec | 0 [rockchiprt5640c]: rockchip_rt5640 - rockchip,rt5640-codec | ||
| − | + | rockchip,rt5640-codec | |
| − | 1 [rockchiphdmi0 ]: rockchip-hdmi0 - rockchip-hdmi0 | + | 1 [rockchiphdmi0 ]: rockchip-hdmi0 - rockchip-hdmi0 |
| − | + | rockchip-hdmi0 | |
| − | 2 | + | |
| − | + | # CARD_ID=0 | |
| + | # amixer -c $CARD_ID cset name='DAI select' '1:1|2:2' && \ | ||
| + | amixer -c $CARD_ID cset name='RECMIXL BST1 Switch' 1 && \ | ||
| + | amixer -c $CARD_ID cset name='RECMIXR BST1 Switch' 1 && \ | ||
| + | amixer -c $CARD_ID cset name='RECMIXL BST2 Switch' 0 && \ | ||
| + | amixer -c $CARD_ID cset name='RECMIXR BST2 Switch' 0 && \ | ||
| + | amixer -c $CARD_ID cset name='Stereo ADC1 Mux' 'ADC' && \ | ||
| + | amixer -c $CARD_ID cset name='Stereo ADC MIXL ADC1 Switch' 1 && \ | ||
| + | amixer -c $CARD_ID cset name='Stereo ADC MIXR ADC1 Switch' 1 && \ | ||
| + | amixer -c $CARD_ID cset name='Stereo ADC MIXL ADC2 Switch' 0 && \ | ||
| + | amixer -c $CARD_ID cset name='Stereo ADC MIXR ADC2 Switch' 0 && \ | ||
| + | amixer -c $CARD_ID cset name='ADC Capture Switch' 1 1 && \ | ||
| + | amixer -c $CARD_ID cset name='ADC Capture Volume' 50% && \ | ||
| + | amixer -c $CARD_ID cset name='ADC Boost Gain' 1 1 && \ | ||
| + | amixer -c $CARD_ID cset name='IN Capture Volume' 17 17 && \ | ||
| + | amixer -c $CARD_ID cset name='IN1 Boost' 3 && \ | ||
| + | amixer -c $CARD_ID cset name='IN2 Boost' 3 && \ | ||
| + | amixer -c $CARD_ID cset name='IN3 Boost' 3 | ||
</pre> | </pre> | ||
| Line 19: | Line 34: | ||
Take Card ID 0 for example: | Take Card ID 0 for example: | ||
| − | <pre># arecord -Dplughw: | + | <pre># arecord -Dplughw:$CARD_ID,0 -f S16_LE -r 16000 -d 10 -t wav test.wav |
</pre> | </pre> | ||
'''3、Playback''' | '''3、Playback''' | ||
| − | + | Take Card ID 0 as an example:<br/> Change CARD_ID=0 according "Get the Audio board ID". | |
| − | <pre># aplay -Dplughw: | + | <pre># CARD_ID=0 |
| + | # aplay -Dplughw:$CARD_ID,0 -t wav test.wav | ||
</pre> | </pre> | ||
'''RK Tool Function:''' | '''RK Tool Function:''' | ||
| − | <pre> | + | <pre>/tools/test/adv/audio/audio_record_test.sh 0 |
| − | + | /tools/test/adv/audio/audio_play_test.sh 0 | |
</pre> | </pre> | ||
Latest revision as of 10:28, 25 July 2025
Audio Test
Before the test, you need to prepare an audio card (ROM-EG57), a microphone and a pair of headphones. The test and jumper setup environment is as shown in the following picture.
1、Record
Take Card ID 0 as an example:
Change CARD_ID=0 according "Get the Audio board ID".
# cat /proc/asound/cards 0 [rockchiprt5640c]: rockchip_rt5640 - rockchip,rt5640-codec rockchip,rt5640-codec 1 [rockchiphdmi0 ]: rockchip-hdmi0 - rockchip-hdmi0 rockchip-hdmi0 # CARD_ID=0 # amixer -c $CARD_ID cset name='DAI select' '1:1|2:2' && \ amixer -c $CARD_ID cset name='RECMIXL BST1 Switch' 1 && \ amixer -c $CARD_ID cset name='RECMIXR BST1 Switch' 1 && \ amixer -c $CARD_ID cset name='RECMIXL BST2 Switch' 0 && \ amixer -c $CARD_ID cset name='RECMIXR BST2 Switch' 0 && \ amixer -c $CARD_ID cset name='Stereo ADC1 Mux' 'ADC' && \ amixer -c $CARD_ID cset name='Stereo ADC MIXL ADC1 Switch' 1 && \ amixer -c $CARD_ID cset name='Stereo ADC MIXR ADC1 Switch' 1 && \ amixer -c $CARD_ID cset name='Stereo ADC MIXL ADC2 Switch' 0 && \ amixer -c $CARD_ID cset name='Stereo ADC MIXR ADC2 Switch' 0 && \ amixer -c $CARD_ID cset name='ADC Capture Switch' 1 1 && \ amixer -c $CARD_ID cset name='ADC Capture Volume' 50% && \ amixer -c $CARD_ID cset name='ADC Boost Gain' 1 1 && \ amixer -c $CARD_ID cset name='IN Capture Volume' 17 17 && \ amixer -c $CARD_ID cset name='IN1 Boost' 3 && \ amixer -c $CARD_ID cset name='IN2 Boost' 3 && \ amixer -c $CARD_ID cset name='IN3 Boost' 3
2、Record
Take Card ID 0 for example:
# arecord -Dplughw:$CARD_ID,0 -f S16_LE -r 16000 -d 10 -t wav test.wav
3、Playback
Take Card ID 0 as an example:
Change CARD_ID=0 according "Get the Audio board ID".
# CARD_ID=0 # aplay -Dplughw:$CARD_ID,0 -t wav test.wav
RK Tool Function:
/tools/test/adv/audio/audio_record_test.sh 0 /tools/test/adv/audio/audio_play_test.sh 0