This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Problem with audio recording on TI AM335X EVM.

Other Parts Discussed in Thread: AM3352

Hello All,

We are doing  a  Audio recording functionality  on AM335X EVM by using the following command

 Alsa recording Utility :   arecord –d10 –fS16_LE –r8000 –c2 sample.wav  -v

 After issuing the above command, It is recording a wave file for a duration of 10 seconds. 

 When I am trying to playback the recorded audio file but unable to hear any sound on Headphone.

 Alsa Playback Utility command :  aplay  -d10 –fS16_LE –r8000 –c2 sample.wav

 I also try the following commands to increase the “Capture” volume   as mentioned in the Ti user guide  but didn’t get any audio on Headphone.

http://processors.wiki.ti.com/index.php/AM335x_Audio_Driver's_Guide

 

$ amixer sset ‘Right PGA Mixer Mic3L’ on/off

$ amixer sset ‘Right PGA Mixer Mic3R’ on/off

$ amixer sset ‘Left PGA Mixer Mic3L’ on/off

$ amixer sset ‘Left PGA Mixer Mic3R’ on/off

To unmute/mute the line input and use differential configuration

$ amixer sset 'Right PGA Mixer Line1R' on/off

$ amixer sset 'Right PGA Mixer Line1L' on/off

$ amixer sset 'Left PGA Mixer Line1R' on/off

$ amixer sset 'Left PGA Mixer Line1L' on/off

$ amixer sset 'Left Line1R Mux' differential

$ amixer sset 'Right Line1L Mux' differential

To increase the volume for capture and playback

$ amixer cset name='PCM Playback Volume' x%,x% (x between 0-100)

$ amixer cset name='PGA Capture Volume'  x%,x%

 Note : PLAY BACK mode is working fine when we ruuning the script which is mentioned in the below path

usr/bin :  ./runAACDec.sh

 Problem : Recorded audio is not getting Played on the Headphone.

 

Thanks,

Surendra

 

 

  • Hi, Surendra.

    Sorry, I'm not AM335X user, but I have some suggestions.

    The playback and capture subsystems always must be checked separately.

    Ok. You have created the wav-file.
    Can you play it on host?
    If you hear silence, it's capture problem.
    Possible, you need to switch on microphone.

    The second task is to check playback subsystem.
    You need to have good wav-file that can be played on the host without problems.
    Then, you need to move this file to device side and try to play it.
    If silence detected, it's playback problem.
    Possible, you need to switch on PCM playback control.

    PS: You can use 'aplay' without parameters, because wav-header contains all necessary
    info about data format, rate, num of channels and so on. Try to use 'aplay' with filename only.

    ---
    best regards, senchuss

  • I am running into the same problem as posted by Surendra.

    When I played back the file recorded on am335x on a PC host, it is the same result. No audio heard (just backgroud noise, eventhough I was shouting/speeking into the Mic during the recording on am335x board).

    Same arecord and aplay cmd generate a good recorded audio clip with my "Ubuntu+linux" machine. The recorded audio in this case playback well with the expected recorded sound.

    Is anyone can help here or been through this before? I am suspecting a missing Microphone device configuration in my am335x!!

  • Hi,

    Please ensure that you have done audio configuration through amixer (mute off, vol INC etc.,)

    Have you tried audio loopback ?

    target# arecord -f CD | aplay


    If error still persists, Please create new thread.

  • Thank you for the loopback idea. I tried it and it is not working o my evm335x

    If I try the same loopback on my Ubuntu machine, it works fine. I can hear form speaker, the sound that going into Microphone. My Ubuntu runs the same linux version as my evm335x board.

    I tried amixer cmds to mute/unmute Mic and it did not help. Same commands can mute/unmute Mic on my ubuntu.

    audio output on my evm335x work fine if I just play (aplay) an audio file

    Anymore ideas?

    Thanks

  • Hello everyone,

    It can be tricky to get the gain high enough on a mic to get audible recorded data.  I would recommend that you start by plugging an mp3 player into the the MIC IN port on the EVM and maxing the output volume of the music.  Try using arecord or gstreamer alsasrc plugin to record audio (and be sure you are enabling mic in in amixer).  After you are sure you can get audio, then plug in your mic and play with the input gain.

    I've run into this issue many times and been able to overcome by this process, so hopefully it is helpful to you, as well.

    Regards,

    Josh

  • Hi,Josh
      My Platform AM3352, Audio IC is TLV320AIC3106EVM
      Audio format set IIS Mode
      Play Audio is OK
      MAC IN(microphone input) record command:
      arecord -t wav -c 2 -f S16_LE -r 44100 -d 10 record_auio.wav
      Then play the audio file:
      aplay record_auio.wav
      I can hear the audio content but there are a lot of noise!
      I don't know whether there are other configuration?