Rockpi4/dev/headphone-jack-work-on-rock-pi-4cplus
ROCK Pi 4 > Development > Headphone work on ROCK Pi 4C Plus
Description
Here are the rockpi4cplus instructions for using headphones.
Test Audio Player
Download a wav audio file, and use the command to test the HP player.
$ amixer -c 1 cset numid=1 3 $ amixer -c 1 cset numid=1 4 #These two commands need to be executed twice, when you need to play numid=1,iface=MIXER,name='Playback Path' ; type=ENUMERATED,access=rw------,values=1,items=11 ; Item #0 'OFF' ; Item #1 'RCV' ; Item #2 'SPK' ; Item #3 'HP' ; Item #4 'HP_NO_MIC' ; Item #5 'BT' ; Item #6 'SPK_HP' ; Item #7 'RING_SPK' ; Item #8 'RING_HP' ; Item #9 'RING_HP_NO_MIC' ; Item #10 'RING_SPK_HP' : values=3 $ aplay -D plughw:1,0 test.wav Playing WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
To test the Mic recording, please follow:
$ amixer -c 1 cset numid=2 1 $ arecord -Dhw:1,0 -d 10 -f cd -r 44100 -c 2 -t wav ./mic_test.wav #this is a record command Recording WAVE './mic_test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo $ aplay -D plughw:1,0 mic_test.wav