Example audio line¶
Objective¶
This wiki page demonstrates how to verify that the audio out and audio in lines are working.
Prerequisites¶
- Add a jumper to J16 to choose between audio in/out and bluetooth audio. See closeup of J16 for position of jumper for audio.
- Audio speaker or stereo headphones with a 3.5mm plug in order to listen to the audio
- Audio microphone with 3.5mm plug
- Locate the audio sockets on the dev-kit.
The pictures below show the full dev-kit board and a close-up of the portion with the audio plugs and the J16 jumper.
Steps¶
Audio Out
- Enter the following commands to adjust the output volume
amixer set PCM 85%
- Plug the speaker or headphones into the Stereo Out socket.
- Enter the following command to play a 440 Hz tone which alternates 5 times between the left and right channels
speaker-test -c2 -f440 -t sine -l 5
- You should hear a tone which alternates between the left and right speakers or the left and right sides of the headphones. If you only have a mono speaker, then you will just hear a steady tone.
Audio In
- Enter the following command to adjust the input volume
Note: Depending on the kernel one of these commands will work and the other erroramixer set "PCM Capture Mute" unmute amixer cset name="PCM Capture Switch" on
- Set capture volume to something reasonable
amixer cset name='PCM Capture Volume' 40
- When using a microphone.
- Start recording using this command
arecord -f dat --vumeter=mono test_mic.wav
- Say something deep and profound
- The vumeter option will show if audio is detected. Adjust capture volume if audio is too low or too high.
- Hit ctrl-C to stop the record.
- Connect the speaker to the Stereo Out socket.
- Use the following command to play the recording
aplay test_mic.wav
- You should hear your recorded message
- Start recording using this command
Note: As of 2023/09, TI has a bug in the kernel which only allows opening the recording device once. A reboot is required to reset and record again. https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1217223/processor-sdk-am62x-audio-capture-dma-issue-repeated-capture-commands-fail
2b00000.mcasp: Receive buffer overflow
Conclusion¶
This wiki page has demonstrated how to verify that the Stereo Out is working and then how to make a recording from the Line In and play it back.
Go to top