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.

Linux/TMDSLCDK138: unable to record audio using arecord

Part Number: TMDSLCDK138
Other Parts Discussed in Thread: OMAPL138, , OMAP-L138, TLV320AIC3106

Tool/software: Linux

Hi,

I am using ti-processor-sdk-linux-omapl138-lcdk-04.02.00.09-Linux-x86-Install.bin downloded from 

I am trying to record audio in the board.  audio is recording but when I play the recorded file there is no sound.

1. I am able to play a "  sample.wav " file (downloaded from internet) using "aplay" and sound is audible.

when i play the sample.wav it shows follows,

root@omapl138-lcdk:~# aplay sample.wav
Playing WAVE 'sample.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
root@omapl138-lcdk:~#

2. I am able to record and play sound using arecord  and aplay  in linux PC.sound is audible.(recorded audio is test_PC.wav)

     the procedures is,

allwyn@allwyn:~/Desktop$ arecord -d 10 test_PC.wav
Recording WAVE 'test_PC.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono
allwyn@allwyn:~/Desktop$ 
allwyn@allwyn:~/Desktop$ 
allwyn@allwyn:~/Desktop$ aplay test_PC.wav 
Playing WAVE 'test_PC.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono
allwyn@allwyn:~/Desktop$

3. I copied "test_PC.wav"  from PC to TMDSLCDK138 board. and played the file using "aplay" command. sound is audible

     procedure is,

root@omapl138-lcdk:~# aplay test_PC.wav
Playing WAVE 'test_PC.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono
root@omapl138-lcdk:~#

4. I recorded  audio in TMDSLCDK138 using arecord. audio recorded but when I play the test_LCDK.wav there is no sound.

      procedure is follows,

root@omapl138-lcdk:~# arecord -d 10 test_LCDK.wav
Recording WAVE 'test_LCDK.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono 
root@omapl138-lcdk:~# aplay test_LCDK.wav 
Playing WAVE 'test_LCDK.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono
root@omapl138-lcdk:~#

How can I resolve this problem?

Regards

Allwyn

  

  • Hi Alwyn,

    What mic were you using to record the file? Can you share the amixer settings on your OMAPL138 LCDK?

    Best Regards,
    Yordan
  • Hi Yordan,

    I am using headset mic (iball) to record the audio file.

    The amixer settings is ,
    root@omapl138-lcdk:~# amixer
    Simple mixer control 'PCM',0
    Capabilities: pvolume
    Playback channels: Front Left - Front Right
    Limits: Playback 0 - 127
    Mono:
    Front Left: Playback 87 [69%] [-20.00dB]
    Front Right: Playback 87 [69%] [-20.00dB]
    Simple mixer control 'Line',0
    Capabilities: pswitch
    Playback channels: Front Left - Front Right
    Mono:
    Front Left: Playback [on]
    Front Right: Playback [on]
    Simple mixer control 'Line DAC',0
    Capabilities: pvolume
    Playback channels: Front Left - Front Right
    Limits: Playback 0 - 118
    Mono:
    Front Left: Playback 71 [60%] [-23.50dB]
    Front Right: Playback 71 [60%] [-23.50dB]
    Simple mixer control 'Line Line2 Bypass',0
    Capabilities: volume
    Playback channels: Front Left - Front Right
    Capture channels: Front Left - Front Right
    Limits: 0 - 118
    Front Left: 71 [60%] [-23.50dB]
    Front Right: 71 [60%] [-23.50dB]
    Simple mixer control 'Line PGA Bypass',0
    Capabilities: volume
    Playback channels: Front Left - Front Right
    Capture channels: Front Left - Front Right
    Limits: 0 - 118
    Front Left: 71 [60%] [-23.50dB]
    Front Right: 71 [60%] [-23.50dB]
    Simple mixer control 'Mono',0
    Capabilities: pswitch pswitch-joined
    Playback channels: Mono
    Mono: Playback [on]
    Simple mixer control 'Mono DAC',0
    Capabilities: pvolume
    Playback channels: Front Left - Front Right
    Limits: Playback 0 - 118
    Mono:
    Front Left: Playback 71 [60%] [-23.50dB]
    Front Right: Playback 71 [60%] [-23.50dB]
    Simple mixer control 'Mono Line2 Bypass',0
    Capabilities: volume
    Playback channels: Front Left - Front Right
    Capture channels: Front Left - Front Right
    Limits: 0 - 118
    Front Left: 71 [60%] [-23.50dB]
    Front Right: 71 [60%] [-23.50dB]
    Simple mixer control 'Mono Mixer DACL1',0
    Capabilities: pswitch pswitch-joined
    Playback channels: Mono
    Mono: Playback [on]
    Simple mixer control 'Mono Mixer DACR1',0
    Capabilities: pswitch pswitch-joined
    Playback channels: Mono
    Mono: Playback [on]
    Simple mixer control 'Mono Mixer Line2L Bypass',0
    Capabilities: pswitch pswitch-joined
    Playback channels: Mono
    Mono: Playback [off]
    Simple mixer control 'Mono Mixer Line2R Bypass',0
    Capabilities: pswitch pswitch-joined
    Playback channels: Mono
    Mono: Playback [off]
    Simple mixer control 'Mono Mixer PGAL Bypass',0
    Capabilities: pswitch pswitch-joined
    Playback channels: Mono
    Mono: Playback [off]
    Simple mixer control 'Mono Mixer PGAR Bypass',0
    Capabilities: pswitch pswitch-joined
    Playback channels: Mono
    Mono: Playback [off]
    Simple mixer control 'Mono PGA Bypass',0
    Capabilities: volume
    Playback channels: Front Left - Front Right
    Capture channels: Front Left - Front Right
    Limits: 0 - 118
    Front Left: 71 [60%] [-23.50dB]
    Front Right: 71 [60%] [-23.50dB]
    Simple mixer control 'ADC HPF Cut-off',0
    Capabilities: enum
    Items: 'Disabled' '0.0045xFs' '0.0125xFs' '0.025xFs'
    Item0: 'Disabled'
    Item1: 'Disabled'
    Simple mixer control 'AGC',0
    Capabilities: pswitch
    Playback channels: Front Left - Front Right What mic were you using to record the file?
    Mono:
    Front Left: Playback [off]
    Front Right: Playback [off]
    Simple mixer control 'De-emphasis',0
    Capabilities: pswitch
    Playback channels: Front Left - Front Right
    Mono:
    Front Left: Playback [off]
    Front Right: Playback [off]
    Simple mixer control 'HP',0
    Capabilities: pswitch
    Playback channels: Front Left - Front Right
    Mono:
    Front Left: Playback [on]
    Front Right: Playback [on]
    Simple mixer control 'HP DAC',0
    Capabilities: pvolume
    Playback channels: Front Left - Front Right
    Limits: Playback 0 - 118
    Mono:
    Front Left: Playback 71 [60%] [-23.50dB]
    Front Right: Playback 71 [60%] [-23.50dB]
    Simple mixer control 'HP Line2 Bypass',0
    Capabilities: volume
    Playback channels: Front Left - Front Right
    Capture channels: Front Left - Front Right
    Limits: 0 - 118
    Front Left: 71 [60%] [-23.50dB]
    Front Right: 71 [60%] [-23.50dB]
    Simple mixer control 'HP PGA Bypass',0
    Capabilities: volume
    Playback channels: Front Left - Front Right
    Capture channels: Front Left - Front Right
    Limits: 0 - 118
    Front Left: 71 [60%] [-23.50dB]
    Front Right: 71 [60%] [-23.50dB]
    Simple mixer control 'HPCOM',0
    Capabilities: pswitch
    Playback channels: Front Left - Front Right
    Mono:
    Front Left: Playback [on]
    Front Right: Playback [on]
    Simple mixer control 'HPCOM DAC',0
    Capabilities: pvolume
    Playback channels: Front Left - Front Right
    Limits: Playback 0 - 118
    Mono:
    Front Left: Playback 71 [60%] [-23.50dB]
    Front Right: Playback 71 [60%] [-23.50dB]
    Simple mixer control 'HPCOM Line2 Bypass',0
    Capabilities: volume
    Playback channels: Front Left - Front Right
    Capture channels: Front Left - Front Right
    Limits: 0 - 118
    Front Left: 71 [60%] [-23.50dB]
    Front Right: 71 [60%] [-23.50dB]
    Simple mixer control 'HPCOM PGA Bypass',0
    Capabilities: volume
    Playback channels: Front Left - Front Right
    Capture channels: Front Left - Front Right
    Limits: 0 - 118
    Front Left: 71 [60%] [-23.50dB]
    Front Right: 71 [60%] [-23.50dB]
    Simple mixer control 'Left AGC Attack time',0
    Capabilities: enum
    Items: '8ms' '11ms' '16ms' '20ms'
    Item0: '8ms'
    Simple mixer control 'Left AGC Decay time',0
    Capabilities: enum
    Items: '100ms' '200ms' '400ms' '500ms'
    Item0: '100ms'
    Simple mixer control 'Left AGC Target level',0
    Capabilities: enum
    Items: '-5.5dB' '-8dB' '-10dB' '-12dB' '-14dB' '-17dB' '-20dB' '-24dB'
    Item0: '-5.5dB'
    Simple mixer control 'Left DAC Mux',0
    Capabilities: enum
    Items: 'DAC_L1' 'DAC_L3' 'DAC_L2'
    Item0: 'DAC_L1'
    Simple mixer control 'Left HP Mixer DACL1',0
    Capabilities: pswitch pswitch-joined
    Playback channels: Mono
    Mono: Playback [on]
    Simple mixer control 'Left HP Mixer DACR1',0
    Capabilities: pvolume pvolume-joined pswitch pswitch-joined
    Playback channels: Mono
    Limits: Playback 0 - 118
    Mono: Playback 118 [100%] [0.00dB] [off]
    Simple mixer control 'Left HP Mixer Line2L Bypass',0
    Capabilities: pswitch pswitch-joined
    Playback channels: Mono
    Mono: Playback [off]
    Simple mixer control 'Left HP Mixer Line2R Bypass',0
    Capabilities: volume volume-joined pswitch pswitch-joined
    Playback channels: Mono
    Capture channels: Mono
    Limits: 0 - 118
    Mono: 118 [100%] [0.00dB] Playback [off]
    Simple mixer control 'Left HP Mixer PGAL Bypass',0
    Capabilities: pswitch pswitch-joined
    Playback channels: Mono
    Mono: Playback [off]
    Simple mixer control 'Left HP Mixer PGAR Bypass',0
    Capabilities: volume volume-joined pswitch pswitch-joined
    Playback channels: Mono
    Capture channels: Mono
    Limits: 0 - 118
    Mono: 118 [100%] [0.00dB] Playback [off]
    Simple mixer control 'Left HPCOM Mixer DACL1',0
    Capabilities: pswitch pswitch-joined
    Playback channels: Mono
    Mono: Playback [on]
    Simple mixer control 'Left HPCOM Mixer DACR1',0
    Capabilities: pvolume pvolume-joined pswitch pswitch-joined
    Playback channels: Mono
    Limits: Playback 0 - 118
    Mono: Playback 118 [100%] [0.00dB] [off]
    Simple mixer control 'Left HPCOM Mixer Line2L Bypass',0
    Capabilities: pswitch pswitch-joined
    Playback channels: Mono
    Mono: Playback [off]
    Simple mixer control 'Left HPCOM Mixer Line2R Bypass',0
    Capabilities: volume volume-joined pswitch pswitch-joined
    Playback channels: Mono
    Capture channels: Mono
    Limits: 0 - 118
    Mono: 118 [100%] [0.00dB] Playback [off]
    Simple mixer control 'Left HPCOM Mixer PGAL Bypass',0
    Capabilities: pswitch pswitch-joined
    Playback channels: Mono
    Mono: Playback [off]
    Simple mixer control 'Left HPCOM Mixer PGAR Bypass',0
    Capabilities: volume volume-joined pswitch pswitch-joined
    Playback channels: Mono
    Capture channels: Mono
    Limits: 0 - 118
    Mono: 118 [100%] [0.00dB] Playback [off]
    Simple mixer control 'Left HPCOM Mux',0
    Capabilities: enum
    Items: 'differential of HPLOUT' 'constant VCM' 'single-ended'
    Item0: 'differential of HPLOUT'
    Simple mixer control 'Left Line Mixer DACL1',0
    Capabilities: pswitch pswitch-joined
    Playback channels: Mono
    Mono: Playback [on]
    Simple mixer control 'Left Line Mixer DACR1',0
    Capabilities: pvolume pvolume-joined pswitch pswitch-joined
    Playback channels: Mono
    Limits: Playback 0 - 118
    Mono: Playback 118 [100%] [0.00dB] [off]
    Simple mixer control 'Left Line Mixer Line2L Bypass',0
    Capabilities: pswitch pswitch-joined
    Playback channels: Mono
    Mono: Playback [off]
    Simple mixer control 'Left Line Mixer Line2R Bypass',0
    Capabilities: volume volume-joined pswitch pswitch-joined
    Playback channels: Mono
    Capture channels: Mono
    Limits: 0 - 118
    Mono: 118 [100%] [0.00dB] Playback [off]
    Simple mixer control 'Left Line Mixer PGAL Bypass',0
    Capabilities: pswitch pswitch-joined
    Playback channels: Mono
    Mono: Playback [off]
    Simple mixer control 'Left Line Mixer PGAR Bypass',0
    Capabilities: volume volume-joined pswitch pswitch-joined
    Playback channels: Mono
    Capture channels: Mono
    Limits: 0 - 118
    Mono: 118 [100%] [0.00dB] Playback [off]
    Simple mixer control 'Left Line1L Mux',0
    Capabilities: enum
    Items: 'single-ended' 'differential'
    Item0: 'single-ended'
    Simple mixer control 'Left Line1R Mux',0
    Capabilities: enum
    Items: 'single-ended' 'differential'
    Item0: 'single-ended'
    Simple mixer control 'Left Line2L Mux',0
    Capabilities: enum
    Items: 'single-ended' 'differential'
    Item0: 'single-ended'
    Simple mixer control 'Left PGA Mixer Line1L',0
    Capabilities: pswitch pswitch-joined
    Playback channels: Mono
    Mono: Playback [on]
    Simple mixer control 'Left PGA Mixer Line1R',0
    Capabilities: pswitch pswitch-joined
    Playback channels: Mono
    Mono: Playback [off]
    Simple mixer control 'Left PGA Mixer Line2L',0
    Capabilities: pswitch pswitch-joined
    Playback channels: Mono
    Mono: Playback [off]
    Simple mixer control 'Left PGA Mixer Mic3L',0
    Capabilities: pswitch pswitch-joined
    Playback channels: Mono
    Mono: Playback [off]
    Simple mixer control 'Left PGA Mixer Mic3R',0
    Capabilities: pswitch pswitch-joined
    Playback channels: Mono
    Mono: Playback [off]
    Simple mixer control 'Output Driver Power-On time',0
    Capabilities: enum
    Items: '0us' '10us' '100us' '1ms' '10ms' '50ms' '100ms' '200ms' '400ms' '800m'
    Item0: '0us'
    Simple mixer control 'Output Driver Ramp-up step',0
    Capabilities: enum
    Items: '0ms' '1ms' '2ms' '4ms'
    Item0: '0ms'
    Simple mixer control 'PGA',0
    Capabilities: cvolume cswitch
    Capture channels: Front Left - Front Right
    Limits: Capture 0 - 119
    Front Left: Capture 32 [27%] [16.00dB] [on]
    Front Right: Capture 32 [27%] [16.00dB] [on]
    Simple mixer control 'Right AGC Attack time',0
    Capabilities: enum
    Items: '8ms' '11ms' '16ms' '20ms'
    Item0: '8ms'
    Simple mixer control 'Right AGC Decay time',0
    Capabilities: enum
    Items: '100ms' '200ms' '400ms' '500ms'
    Item0: '100ms'
    Simple mixer control 'Right AGC Target level',0
    Capabilities: enum
    Items: '-5.5dB' '-8dB' '-10dB' '-12dB' '-14dB' '-17dB' '-20dB' '-24dB'
    Item0: '-5.5dB'
    Simple mixer control 'Right DAC Mux',0
    Capabilities: enum
    Items: 'DAC_R1' 'DAC_R3' 'DAC_R2'
    Item0: 'DAC_R1'
    Simple mixer control 'Right HP Mixer DACL1',0
    Capabilities: pvolume pvolume-joined pswitch pswitch-joined
    Playback channels: Mono
    Limits: Playback 0 - 118
    Mono: Playback 118 [100%] [0.00dB] [off]
    Simple mixer control 'Right HP Mixer DACR1',0
    Capabilities: pswitch pswitch-joined
    Playback channels: Mono
    Mono: Playback [on]
    Simple mixer control 'Right HP Mixer Line2L Bypass',0
    Capabilities: volume volume-joined pswitch pswitch-joined
    Playback channels: Mono
    Capture channels: Mono
    Limits: 0 - 118
    Mono: 118 [100%] [0.00dB] Playback [off]
    Simple mixer control 'Right HP Mixer Line2R Bypass',0
    Capabilities: pswitch pswitch-joined
    Playback channels: Mono
    Mono: Playback [off]
    Simple mixer control 'Right HP Mixer PGAL Bypass',0
    Capabilities: volume volume-joined pswitch pswitch-joined
    Playback channels: Mono
    Capture channels: Mono
    Limits: 0 - 118
    Mono: 118 [100%] [0.00dB] Playback [off]
    Simple mixer control 'Right HP Mixer PGAR Bypass',0
    Capabilities: pswitch pswitch-joined
    Playback channels: Mono
    Mono: Playback [off]
    Simple mixer control 'Right HPCOM Mixer DACL1',0
    Capabilities: pvolume pvolume-joined pswitch pswitch-joined
    Playback channels: Mono
    Limits: Playback 0 - 118
    Mono: Playback 118 [100%] [0.00dB] [off]
    Simple mixer control 'Right HPCOM Mixer DACR1',0
    Capabilities: pswitch pswitch-joined
    Playback channels: Mono
    Mono: Playback [on]
    Simple mixer control 'Right HPCOM Mixer Line2L Bypass',0
    Capabilities: volume volume-joined pswitch pswitch-joined
    Playback channels: Mono
    Capture channels: Mono
    Limits: 0 - 118
    Mono: 118 [100%] [0.00dB] Playback [off]
    Simple mixer control 'Right HPCOM Mixer Line2R Bypass',0
    Capabilities: pswitch pswitch-joined
    Playback channels: Mono
    Mono: Playback [off]
    Simple mixer control 'Right HPCOM Mixer PGAL Bypass',0
    Capabilities: volume volume-joined pswitch pswitch-joined
    Playback channels: Mono
    Capture channels: Mono
    Limits: 0 - 118
    Mono: 118 [100%] [0.00dB] Playback [off]
    Simple mixer control 'Right HPCOM Mixer PGAR Bypass',0
    Capabilities: pswitch pswitch-joined
    Playback channels: Mono
    Mono: Playback [off]
    Simple mixer control 'Right HPCOM Mux',0
    Capabilities: enum
    Items: 'differential of HPROUT' 'constant VCM' 'single-ended' 'differential o'
    Item0: 'differential of HPROUT'
    Simple mixer control 'Right Line Mixer DACL1',0
    Capabilities: pvolume pvolume-joined pswitch pswitch-joined
    Playback channels: Mono
    Limits: Playback 0 - 118
    Mono: Playback 118 [100%] [0.00dB] [off]
    Simple mixer control 'Right Line Mixer DACR1',0
    Capabilities: pswitch pswitch-joined
    Playback channels: Mono
    Mono: Playback [on]
    Simple mixer control 'Right Line Mixer Line2L Bypass',0
    Capabilities: volume volume-joined pswitch pswitch-joined
    Playback channels: Mono
    Capture channels: Mono
    Limits: 0 - 118
    Mono: 118 [100%] [0.00dB] Playback [off]
    Simple mixer control 'Right Line Mixer Line2R Bypass',0
    Capabilities: pswitch pswitch-joined
    Playback channels: Mono
    Mono: Playback [off]
    Simple mixer control 'Right Line Mixer PGAL Bypass',0
    Capabilities: volume volume-joined pswitch pswitch-joined
    Playback channels: Mono
    Capture channels: Mono
    Limits: 0 - 118
    Mono: 118 [100%] [0.00dB] Playback [off]
    Simple mixer control 'Right Line Mixer PGAR Bypass',0
    Capabilities: pswitch pswitch-joined
    Playback channels: Mono
    Mono: Playback [off]
    Simple mixer control 'Right Line1L Mux',0
    Capabilities: enum
    Items: 'single-ended' 'differential'
    Item0: 'single-ended'
    Simple mixer control 'Right Line1R Mux',0
    Capabilities: enum
    Items: 'single-ended' 'differential'
    Item0: 'single-ended'
    Simple mixer control 'Right Line2R Mux',0
    Capabilities: enum
    Items: 'single-ended' 'differential'
    Item0: 'single-ended'
    Simple mixer control 'Right PGA Mixer Line1L',0
    Capabilities: pswitch pswitch-joined
    Playback channels: Mono
    Mono: Playback [off]
    Simple mixer control 'Right PGA Mixer Line1R',0
    Capabilities: pswitch pswitch-joined
    Playback channels: Mono
    Mono: Playback [on]
    Simple mixer control 'Right PGA Mixer Line2R',0
    Capabilities: pswitch pswitch-joined
    Playback channels: Mono
    Mono: Playback [off]
    Simple mixer control 'Right PGA Mixer Mic3L',0
    Capabilities: pswitch pswitch-joined
    Playback channels: Mono
    Mono: Playback [off]
    Simple mixer control 'Right PGA Mixer Mic3R',0
    Capabilities: pswitch pswitch-joined
    Playback channels: Mono
    Mono: Playback [off]
    root@omapl138-lcdk:~#

    Regards,
    Allwyn
  • Hi,

    Can you try to enable all the capture channels and increase the volumes? Also when running arecord, specify the alsa device (-D) which does the record.

    Best Regards,
    Yordan
  • Hi Yordan,

    my capture channels is follows,

    and i recorded using --> arecord -d 10 test_LCDK.wav. but there is no sound.

    arecord -l is follows,

    root@omapl138-lcdk:~# arecord -l
    **** List of CAPTURE Hardware Devices ****
    card 0: LCDK [DA850/OMAP-L138 LCDK], device 0: davinci-mcasp.0-tlv320aic3x-hifi tlv320aic3x-hifi-0 []
    Subdevices: 1/1
    Subdevice #0: subdevice #

    I specified the device to record using following command.

                       arecord -D default:LCDK -d 10 sound.wav

                       when i play it , there is no sound.

                       is that command right?

    what is the procedure  or command to specify  the alsa device to record

    Regards,

    Allwyn 

  • Hi ,

    Any updates?

    Regards
    Allwyn
  • Hi,

    Sorry for the delay.

    Yes, the command is right. Have you tried executing: root@omapl138-lcdk:~# arecord test.wav -vv to see if you will get a more verbose output out of arecord?
    Did you make any modifications to the LCDK or the TI Linux SDK?

    Best Regards,
    Yordan
  • Hi Yordan,

    I did not make any modification to LCDK and TI linux SDK.

    I checked with this command,
    root@omapl138-lcdk:~# arecord -d 10 test.wav -vv
    Recording WAVE 'test.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono
    Plug PCM: Route conversion PCM (sformat=S16_LE)
    Transformation table:
    0 <- 0*0.5 + 1*0.5
    Its setup is:
    stream : CAPTURE
    access : RW_INTERLEAVED
    format : U8
    subformat : STD
    channels : 1
    rate : 8000
    exact rate : 8000 (8000/1)
    msbits : 8
    buffer_size : 4000
    period_size : 1000
    period_time : 125000
    tstamp_mode : NONE
    tstamp_type : MONOTONIC
    period_step : 1
    avail_min : 1000
    period_event : 0
    start_threshold : 1
    stop_threshold : 4000
    silence_threshold: 0
    silence_size : 0
    boundary : 2097152000
    Slave: Hardware PCM card 0 'DA850/OMAP-L138 LCDK' device 0 subdevice 0
    Its setup is:
    stream : CAPTURE
    access : MMAP_INTERLEAVED
    format : S16_LE
    subformat : STD
    channels : 2
    rate : 8000
    exact rate : 8000 (8000/1)
    msbits : 16
    buffer_size : 4000
    period_size : 1000
    period_time : 125000
    tstamp_mode : NONE
    tstamp_type : MONOTONIC
    period_step : 1
    avail_min : 1000
    period_event : 0
    start_threshold : 1
    stop_threshold : 4000
    silence_threshold: 0
    silence_size : 0
    boundary : 2097152000
    appl_ptr : 0
    hw_ptr : 0
    ####### + | 14%
    root@omapl138-lcdk:~#
    root@omapl138-lcdk:~#
    root@omapl138-lcdk:~# aplay test.wav
    Playing WAVE 'test.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono
    root@omapl138-lcdk:~#

    when i play audio , I can hear noise only.

    I checked with LCDK and SD card shipped with LCDK. it shows the same problem, i can not here anyhing.

    Regards,
    Allwyn
  • Hi

    Any Updates?

    Regards
    Allwyn
  • Hello Allwyn,

    Sorry for the delay. I will try to replicate your issue on an EVM board. I'm out of the office with the flu currently, so I probably won't be able to run tests until next week. Just checking: if you have used previous SDKs with this board, did aplay work on them?

    Regards,
    Nick
  • Hi,
    Sorry for delay. I checked with SDK (SD card )that is shipped with board. aplay is working on it and when i record audio using " arecord " , there is no sound in the recorded file.

    Regards
    Allwyn
  • Hello Allwyn,

    Got it. I'll try to replicate your results tomorrow and see if we can come up with some next steps.

    Regards,
    Nick
  • Hi Nick,

    Ok thank you. please see to it that we get the results as soon as possible

    Regards,
    Allwyn
  • Hello Allwyn,

    Are you plugging your microphone jack into MIC or LINE_IN? I can get recordings out of the box using the create-sdcard.sh script in Processor SDK 4.02 when I plug my microphone into the LINE_IN port, but not when it is plugged into the MIC port.

    1) Could you verify that you are able to get recordings when plugged into LINE_IN?

    Check out Yordan's instructions on this e2e post  to try to enable the MIC input. When I followed his instructions, I could get recordings when plugged into MIC.

    2) Are you able to get recordings on MIC after following those instructions?

    If you can't do 1) and 2) on your board: I am using the TMDSLCDK138 version of the EVM. Are you using that version, or the older TMDXLCDK138?

    Regards, 

    Nick

  • Hi Nick,

    I tried both MIC and LINE IN. I can record ,but when i playing it there is no sound. And I cheked the file ,it contains garbage (same )values.

    I am not able to get recordings (no sound when play the file) when plugged into LINE_IN

    I did the Yordan's instruction in " e2e.ti.com/.../2103501 " on this post. I checked with both MIC and LINE IN after this.The result was same, there is no sound in recorded file.

    I am using TMDSLCDK138.

    I was able to record sound using USB SOUND CARD(USB webcam) and when I play the recorded file I can hear sound.

    But Recording using both MIC and LINE IN are not working.

    Regards
    Allwyn
  • Hello Allwyn,

    The audio jack you are using: is it a 3 conductor TRS jack, or a 4 conductor TRRS jack? I was able to successfully record audio using a 3 conductor TRS jack (aux cable from laptop to board), but was unsuccessful when using a 4 conductor TRRS jack (earbuds with microphone).

    The schematic looks like both LINE_IN and MIC only have contacts for AUDIO_LEFT/RIGHT channels, so I wouldn't expect them to pick up signals from a separate MIC conductor.

    Regards,
    Nick
  • Hi Nick,

    I am using Headphone with mic.

    I have 2 TMDSLCDK138 board. I checked audio recording using headphone with both board. But there is no sound in the recorded file.

    did you record audio using heaphone through LINE IN and MIC?

    if yes, What was the Result?

    Regards,

    Allwyn

  • Hello Allwyn,

    I got my hands on a TRS jack from a headset MIC and was able to replicate your results: microphone able to record when connected to computer, not when connected to OMAP-L138 board.

    Looked a bit more at the schematic, MICs need a bias voltage. MIC_BIAS doesn't connect to AUDIO_IN, so we won't be able to get microphone input on that port. MIC_BIAS does connect to MIC_IN, so we should be able to get the microphone working on that port. I didn't measure a voltage on the MIC_RIGHT and MIC_LEFT pins, so I'm guessing we need to set that output high before being able to get in audio.

    Once that happens, we might also need to adjust the gain since MIC signals can be smaller.

    I haven't had a chance to try changing anything in the TLV320AIC3106 yet.

    Regards,
    Nick
  • Hi Nick,

    Thanks for your replay.

    So what do you suggest we do next?

    Regards,

    Allwyn

  • Hello Allwyn,

    It turns out we need to add an argument to the device tree file in order to enable MICBIAS voltage output.

    I made the following changes to the Linux SDK 4.2 da850-lcdk.dts file:

    	tlv320aic3106: tlv320aic3106@18 {
    		#sound-dai-cells = <0>;
    		compatible = "ti,tlv320aic3106";
    		reg = <0x18>;
    		status = "okay";
    		
    		/* Added_Code{ */
                    /* MICBIAS is off if ai3x-micbias-vg not included */
    		/* 1 - MICBIAS = 2.0V */
    		/* 2 - MICBIAS = 2.5V */
    		/* 3 - MICBIAS = AVDD */
    		ai3x-micbias-vg = <1>;
    		/* }Added_Code  */
    
    	};

    When I updated the DTS file, I measured MICBIAS voltage = 0V when idle, and it rose to the set voltage during an arecord session.

    I also updated amixer settings from the default in the command line:

    # #enable the MIC input
    # amixer sset 'Left PGA Mixer Mic3L' on
    # amixer sset 'Right PGA Mixer Mic3R' on
    # 
    # #optional - if you want to disable LINE_IN
    # amixer sset 'Left PGA Mixer Line1L' off
    # amixer sset 'Right PGA Mixer Line1R' off

    I'm not a microphone expert, but the microphone should determine which MICBIAS voltage you select. 2V is the "safest" if your mic doesn't list a bias voltage, but the noise to signal ratio will be higher and you may need to increase the gain.

    Please let me know if this works for you and if you need additional assistance!

    Regards, 

    Nick

  • Hi Nick,

    I did the following changes. But I can not hear anything ,when playing the recorded file.

    There is slight variation after the change as mentioned you.

    I am attaching the graph of recorded file for your referece.

    figure 1 : recorded audio file before the change.

    figure 2 : recorded audio file after the change.

    I tried only at 2v as mentioned you.

    How can I adjust the gain?

    Regards

    Allwyn

  • Hello Allwyn,

    That is awesome, it looks like your mic is actually recording sound now!

    1) try this command (capture gain can change from 0,0 to 119,119): amixer sset 'PGA',0 119,119

    2) if your mic can handle higher bias voltages, higher voltage should give you more signal-to-noise and give you a louder output

    Regards,
    Nick
  • Hi Nick,

    sorry for the delay.

    I executed the command and result is following,

    root@omapl138-lcdk:~# amixer sset 'PGA',0 119,119
    Simple mixer control 'PGA',0
    Capabilities: cvolume cswitch
    Capture channels: Front Left - Front Right
    Limits: Capture 0 - 119
    Front Left: Capture 119 [100%] [59.50dB] [on]
    Front Right: Capture 119 [100%] [59.50dB] [on]
    root@omapl138-lcdk:~#

    Then I recorded audio.But the result was same, I can not hear anything.
    Is there any other solution for this issue.?

    Regards
    Allwyn
  • Hello Allwyn,

    I just realized I was testing with 2.5V bias voltage, not 2V bias voltage. When I tried with 2V bias, I could not hear any of the mic input. Could you try with 2.5V?

    Thanks,
    Nick
  • Hello Allwyn,

    Hope the board is working for you now. Please let me know if you have additional questions.

    Regards,
    Nick
  • Hi Nick,

    Sorry for the delay

    I tried with 2.5V. the result was same. I couldn't hear anything from the recorded audio file.

    Regards

    Allwyn 

  • Hello Allwyn,

    Ok, I restarted with a fresh SD card from bin/create-sdcard.sh.

    1) added " ai3x-micbias-vg = <2>; " to tlv320aic3106@18{ ... } in da850-lcdk.dts to power MICBIAS output to 2.5V

    2) compiled the da850-lcdk.dts device tree binary

    3) removed the existing da850-lcdk.dtb file from the boot folder of partition 2 on the SD card, and replaced it with my new dtb file

    4) enabled the Mic inputs from the command line:

    # amixer sset 'Left PGA Mixer Mic3L' on

    # amixer sset 'Right PGA Mixer Mic3R' on

    5) Increased the capture gain to max:

    # amixer sset 'PGA',0 119,119

    6) ensured the volume knob on my headset was all the way to max, that microphone jack was plugged into MIC port, and that headphones jack was plugged into the bottom port of the little audio tower (LINE_OUT port)

    7) captured audio

    # arecord -d 5 test0.wav

    8) played back audio

    # aplay test0.wav

    I was able to hear myself at both regular talking volume and when shouting into the microphone - in fact, regular volume was amplified enough that shouting into the mic just caused a lot of clipping of the signal. In the below images, test0 is my regular speaking voice, while test1 is shouting into the mic.

    Regards, 

    Nick

  • Hi Nick,

    I tried with all procedure. But the result was same. I can not hear anything from recorded file.

    Regards

    Allwyn

  • Hello Allwyn,

    Could you confirm that the MIC_BIAS voltage measured at MIC pin 3 rises above 0V while an arecord is occuring, and drops back to 0V after the arecord finishes?

    Regards,
    Nick
  • Hi Nick,

    I checked MIC pin 3 voltage. it remains to 0V while recording.

    I did the following procedure,

    1.downloaded "ti-processor-sdk-linux-omapl138-lcdk-04.02.00.09-Linux-x86-Install.bin"

    2. ./ti-processor-sdk-linux-omapl138-lcdk-04.02.00.09-Linux-x86-Install.bin

    3. cd  ti-processor-sdk-linux-omapl138-lcdk-04.02.00.09/board-support/linux-4.9.59+gitAUTOINC+a75d8e9305-ga75d8e9305/arch/arm/boot/dts

    4.added " ai3x-micbias-vg = <2>;" in da850-lcdk.dts file

    5. sudo ./setup.sh

    6. make

    7. sudo ./bin/create-sdcard.sh

    8. then gave the following paths (sd card prepration)

    138-lcdk-04.02.00.09$ sudo ./bin/create-sdcard.sh
    [sudo] password for allwyn:


    ################################################################################

    This script will create a bootable SD card from custom or pre-built binaries.

    The script must be run with root permissions and from the bin directory of
    the SDK

    Example:
    $ sudo ./create-sdcard.sh

    Formatting can be skipped if the SD card is already formatted and
    partitioned properly.

    ################################################################################


    Available Drives to write images to:

    # major minor size name
    1: 8 16 3872256 sdb

    Enter Device Number or n to exit: 1

    sdb was selected

    /dev/sdb is an sdx device
    Unmounting the sdb drives
    unmounted /dev/sdb1
    unmounted /dev/sdb2
    Current size of sdb1 71680 bytes
    Current size of sdb2 3783680 bytes

    ################################################################################

    Select 2 partitions if only need boot and rootfs (most users).
    Select 3 partitions if need SDK & other content on SD card. This is
    usually used by device manufacturers with access to partition tarballs.

    ****WARNING**** continuing will erase all data on sdb

    ################################################################################

    Number of partitions needed [2/3] : 2


    Now partitioning sdb with 2 partitions...

    ################################################################################

    Now making 2 partitions

    ################################################################################

    1024+0 records in
    1024+0 records out
    1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.343807 s, 3.0 MB/s
    DISK SIZE - 3965190144 bytes

    ################################################################################

    Partitioning Boot

    ################################################################################
    mkfs.fat 3.0.28 (2015-05-16)
    mkfs.fat: warning - lowercase labels might not work properly with DOS or Windows

    ################################################################################

    Partitioning rootfs

    ################################################################################
    mke2fs 1.42.13 (17-May-2015)
    /dev/sdb2 contains a ext3 file system labelled 'rootfs'
    last mounted on / on Tue May 29 15:35:36 2018
    Proceed anyway? (y,n) y
    Creating filesystem with 945920 4k blocks and 236640 inodes
    Filesystem UUID: 50686d2b-ff3d-4b07-a63d-5ccaca5ada3f
    Superblock backups stored on blocks:
    32768, 98304, 163840, 229376, 294912, 819200, 884736

    Allocating group tables: done
    Writing inode tables: done
    Creating journal (16384 blocks): done
    Writing superblocks and filesystem accounting information: done

    ################################################################################

    Partitioning is now done
    Continue to install filesystem or select 'n' to safe exit

    **Warning** Continuing will erase files any files in the partitions

    ################################################################################


    Would you like to continue? [y/n] : y



    Mount the partitions

    Emptying partitions

    Syncing....

    ################################################################################

    Choose file path to install from

    1 ) Install pre-built images from SDK
    2 ) Enter in custom boot and rootfs file paths

    ################################################################################

    Choose now [1/2] : 2

    ################################################################################

    For U-boot and MLO

    If files are located in Tarball write complete path including the file name.
    e.x. $: /home/user/MyCustomTars/boot.tar.xz

    If files are located in a directory write the directory path
    e.x. $: /ti-sdk/board-support/prebuilt-images/

    NOTE: Not all platforms will have an MLO file and this file can
    be ignored for platforms that do not support an MLO.

    Update: The proper location for the kernel image and device tree
    files have moved from the boot partition to the root filesystem.

    ################################################################################

    Enter path for Boot Partition : /D/LINUX-BOARD-MAY_HEAD_PHONE/ti-processor-sdk-linux-omapl138-lcdk-04.02.00.09/board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04

    Directory exists

    This directory contains:
    Kbuild arch dts spl u-boot.img
    Kconfig board examples test u-boot.lds
    Licenses cmd fs tools u-boot.map
    MAINTAINERS common include u-boot u-boot.srec
    Makefile config.mk lib u-boot-nodtb.bin u-boot.sym
    README configs net u-boot.ais
    System.map disk post u-boot.bin
    TISDK-README doc scripts u-boot.cfg
    api drivers snapshot.commit u-boot.cfg.configs

    Is this correct? [y/n] : y


    ################################################################################

    For Kernel Image and Device Trees files

    What would you like to do?
    1) Reuse kernel image and device tree files found in the selected rootfs.
    2) Provide a directory that contains the kernel image and device tree files
    to be used.

    ################################################################################

    Choose option 1 or 2 : 2


    Choosing a directory that contains the kernel files to be used

    ################################################################################

    For Kernel Image and Device Trees files

    The kernel image name should contain the image type uImage or zImage depending
    on which format is used.

    The device tree files must end with .dtb
    e.g am335x-evm.dtb am43x-gp-evm.dtb


    ################################################################################

    Enter path for kernel image and device tree files : /D/LINUX-BOARD-MAY_HEAD_PHONE/ti-processor-sdk-linux-omapl138-lcdk-04.02.00.09/board-support/linux-4.9.59+gitAUTOINC+a75d8e9305-ga75d8e9305/arch/arm/boot

    Directory exists

    This directory contains:
    Image Makefile bootp compressed dts install.sh zImage

    Is this correct? [y/n] : y


    ################################################################################

    For Rootfs partition

    If files are located in Tarball write complete path including the file name.
    e.x. $: /home/user/MyCustomTars/rootfs.tar.xz

    If files are located in a directory write the directory path
    e.x. $: /ti-sdk/targetNFS/

    ################################################################################

    Enter path for Rootfs Partition : /D/LINUX-BOARD-MAY_HEAD_PHONE/ti-processor-sdk-linux-omapl138-lcdk-04.02.00.09/targetNFS

    This directory contains:
    bin dev home init media opt run srv tmp var
    boot etc include lib mnt proc sbin sys usr www

    Is this correct? [y/n] : y

    ################################################################################

    Copying files now... will take minutes

    ################################################################################

    Copying boot partition

    MLO file not found


    u-boot.img copied


    Copying rootfs System partition
    609124 / 608888 copied

    Syncing...
    ls: cannot access '/D/LINUX-BOARD-MAY_HEAD_PHONE/ti-processor-sdk-linux-omapl138-lcdk-04.02.00.09/board-support/u-boot-2017.01+gitAUTOINC+340fb36f04-g340fb36f04/zImage': No such file or directory
    Kernel image copied
    No device tree files found

    Un-mount the partitions

    962+1 records in
    962+1 records out
    492840 bytes (493 kB, 481 KiB) copied, 0.181326 s, 2.7 MB/s
    u-boot.ais copied

    Remove created temp directories

    Operation Finished

    9. After this step, SD card put in to board and on the board.

    10. enabled the Mic inputs from the command line:

           # amixer sset 'Left PGA Mixer Mic3L' on

           # amixer sset 'Right PGA Mixer Mic3R' on

    11. Increased the capture gain to max:

           # amixer sset 'PGA',0 119,119

    12. captured audio

              # arecord -d 20 test_audio.wav

    13.I checked the voltage at MIC pin3 it remains 0v while recording the audio.but 1.5 v is at TLV320AIC3106IRGZ's pin 3.

    14. I can not hear anything from the recorded audio.

    Is the building procedure right? 

    How can i compile  da850-lcdk.dts seperatly.?

    Regards,

    Allwyn

     

  • Hello Allwyn,

    It doesn't look like create-sdcard is finding the kernel and device tree files. Please see directions for compiling zImage and the dtb file here. Please see my note for modifications to those instructions here

    As an FYI, my device tree section looks like this:

    	tlv320aic3106: tlv320aic3106@18 {
    		#sound-dai-cells = <0>;
    		compatible = "ti,tlv320aic3106";
    		reg = <0x18>;
    		status = "okay";
    /* Change{ 180417 for e2e "unable to record audio using arecord" */
    		ai3x-micbias-vg = <2>;
    /* }Change */
    	};

    Regards, 

    Nick

  • Hello Allwyn,

    Hope this worked out. Let me know if there are further questions.

    Regards,
    Nick
  • Hi Nick,

    I didn't check that. I will check it. Let you know the result.

    Regards

    Allwyn

  • Hi Nick,

    Thank you very much for your help. It worked for me. I am able to record using MIC IN , but the clarity is not good.

    How can I remove noise.?
    Is it possible to record using LINE IN ?

    Regards
    Allwyn

  • Hello Allwyn,

    A higher Microphone bias voltage should give a greater signal-to-noise ratio as long as the voltage is safe for that particular mic. You may be able to play with different gain settings to make sure you are not clipping your signal. I am sure there are other ways to get cleaner-sounding mic audio in ALSA settings or through other means like filtering the audio, but that is outside the scope of what I can support.

    You can record from LINE IN, but keep in mind that microphones need a bias voltage and LINE IN does not provide a bias voltage - so you would only be able to record from inputs which did not require a bias voltage (like the aux cable from a computer I was using in my initial tests).

    Regards,
    Nick
  • Hi Nick,

    Thanks for your support.

    Regards
    Allwyn