Template:Glsdk running aplay arecord

Running aplay and arecord application
Audio playback is supported on HDMI and via headset. By default, the audio playback takes place on the HDMI. To listen to audio via the HDMI, run the aplay application

target # aplay .wav

If playback is required via headset, please make sure that the following amixer settings are done for the corresponding card (check the card no. by running the command cat /proc/asound/cards, assuming the card 1 is for headset here):

target # amixer cset -c 1 name='Headset Left Playback' 1 target # amixer cset -c 1 name='Headset Right Playback' 1 target # amixer cset -c 1 name='Headset Playback Volume' 12 target # amixer cset -c 1 name='DL1 PDM Switch' 1 target # amixer cset -c 1 name='Sidetone Mixer Playback' 1 target # amixer cset -c 1 name='SDT DL Volume' 120 target # amixer cset -c 1 name='DL1 Mixer Multimedia' 1 target # amixer cset -c 1 name='DL1 Media Playback Volume' 110 target # amixer sset -c 1 'Analog Left',0 'Aux/FM Left' target # amixer sset -c 1 'Analog Right',0 'Aux/FM Right' target # amixer sset -c 1 'Aux FM',0 7 target # amixer sset -c 1 'AUDUL Media',0 149 target # amixer sset -c 1 'Capture',0 4 target # amixer sset -c 1 MUX_UL00,0 AMic0 target # amixer sset -c 1 MUX_UL01,0 AMic1 target # amixer sset -c 1 'AMIC UL',0 120

Once these settings are done, one could do playback via headset using aplay by the following command: target # aplay -Dplughw:1,0 .wav

To playback/record on the evm via headset/mic, please make sure the following amixer settings are done:

amixer sset 'Left DAC Mux',0 'DAC_L2' amixer sset 'Right DAC Mux',0 'DAC_R2' amixer cset name='HP Playback Switch' On  amixer cset name='Line Playback Switch' Off amixer cset name='PCM Playback Volume' 127
 * For playback via headset, enter the following at prompt target#

Once these settings are successful, use aplay application for playback:

target # aplay .wav

amixer cset name='Left PGA Mixer Mic3L Switch' On  amixer cset name='Right PGA Mixer Mic3L Switch' On   amixer cset name='Left PGA Mixer Line1L Switch' off amixer cset name='Right PGA Mixer Line1R Switch' off amixer cset name='PGA Capture Switch' on  amixer cset name='PGA Capture Volume' 6
 * For recording via Mic In

Once these settings are successful, use arecord to record

target # arecord -r 44.1 > .wav

To playback/record on the evm via Line Out/ Line In, please make sure the following amixer settings are done:

amixer cset name='Line Playback Switch' On  amixer cset name='PCM Playback Volume' 127
 * For playback via Line Out, enter the following at prompt target#

Once these settings are successful, use aplay application for playback, e.g.,

target # aplay .wav

amixer cset name='Left PGA Mixer Mic2L Switch' On  amixer cset name='Right PGA Mixer Mic2L Switch' On   amixer cset name='Left PGA Mixer Line1L Switch' On   amixer cset name='Right PGA Mixer Line1R Switch' On   amixer cset name='PGA Capture Switch' On   amixer cset name='PGA Capture Volume' 50
 * For recording via Line In

Once these settings are successful, use arecord to record, e.g.,

target # arecord -r 44100 -c 2 -f S16_LE .wav