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/OMAP-L138: OMAP-L138 LCDK Alsa capture from from microphone

Part Number: OMAP-L138

Tool/software: Linux

Hi all,

I am using OMAP L138 LCDK with Linux OS. I have compiled and loaded Linux kernel version 3.3 after configuring with the below command.
$sudo make da850_lcdk_defconfig ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi-

My board is booting and working properly.
Now I want to work on ALSA. The LCDK has two capture ports as Line In and Mic. I have given alsa device list command and its output below.

root@omapl138-lcdk:~# arecord -L
null
    Discard all samples (playback) or generate zero samples (capture)
default:CARD=EVM
    DA850/OMAP-L138 EVM,
    Default Audio Device
sysdefault:CARD=EVM
    DA850/OMAP-L138 EVM,
    Default Audio Device

I can capture audio from Line In port easily using arecord commands. But I want to capture audio from Mic input. I have connected a standard 3.5 mm single channel laptop microphone to Mic port. No sound is getting captured. I don't know what mistake I have done. Kindly help me.

Thanks in advanced....

Regards,
Jagadish Haldar

  • Hi Jagadish,

    Have you tried executing the following amixer commands prior to recording:
    root@omapl138-lcdk:~# amixer sset 'Right PGA Mixer Mic3L' on
    Simple mixer control 'Right PGA Mixer Mic3L',0
    Capabilities: pswitch pswitch-joined penum
    Playback channels: Mono
    Mono: Playback [on]
    root@omapl138-lcdk:~# amixer sset 'Right PGA Mixer Mic3R' on
    Simple mixer control 'Right PGA Mixer Mic3R',0
    Capabilities: pswitch pswitch-joined penum
    Playback channels: Mono
    Mono: Playback [on]
    root@omapl138-lcdk:~# amixer sset 'Left PGA Mixer Mic3L' on
    Simple mixer control 'Left PGA Mixer Mic3L',0
    Capabilities: pswitch pswitch-joined penum
    Playback channels: Mono
    Mono: Playback [on]
    root@omapl138-lcdk:~# amixer sset 'Left PGA Mixer Mic3R' on
    Simple mixer control 'Left PGA Mixer Mic3R',0
    Capabilities: pswitch pswitch-joined penum
    Playback channels: Mono
    Mono: Playback [on]
    root@omapl138-lcdk:~#

    Best Regards,
    Yordan
  • Hi Yordan,

    Thank you very much for replying me.
    I have not tried the commands mentioned by you earlier. Now I ran the commands and got the below results.

    root@omapl138-lcdk:~/alsa_test# amixer sset 'Right PGA Mixer Mic3L' on
    Simple mixer control 'Right PGA Mixer Mic3L',0
      Capabilities: pswitch pswitch-joined penum
      Playback channels: Mono
      Mono: Playback [on]
    root@omapl138-lcdk:~/alsa_test# amixer sset 'Right PGA Mixer Mic3R' on
    Simple mixer control 'Right PGA Mixer Mic3R',0
      Capabilities: pswitch pswitch-joined penum
      Playback channels: Mono
      Mono: Playback [on]
    root@omapl138-lcdk:~/alsa_test# amixer sset 'Left PGA Mixer Mic3L' on
    Simple mixer control 'Left PGA Mixer Mic3L',0
      Capabilities: pswitch pswitch-joined penum
      Playback channels: Mono
      Mono: Playback [on]
    root@omapl138-lcdk:~/alsa_test# amixer sset 'Left PGA Mixer Mic3R' on
    Simple mixer control 'Left PGA Mixer Mic3R',0
      Capabilities: pswitch pswitch-joined penum
      Playback channels: Mono
      Mono: Playback [on]

    Then I connected a standard PC microphone to mic input port and ran the below commands. And yes, it successfully captured my voice. Thank you again.

    root@omapl138-lcdk:~/alsa_test#arecord -vv -d 10 test-mic.wav
    root@omapl138-lcdk:~/alsa_test#aplay test-mic.wav  

    After trying this I connected Line In and mic simultaneously and tried the arecord command to check whether ALSA records from Line In or mic.
    But unfortunately it stopped capturing from both of them. I tried Line In and Mic separetly, but no success. I tried "alsactl restore" to restore ALSA settings. But no success. I really don't know why this happened. Kindly help me again to find what happened...

    Thanks & reagrds,
    Jagadish Haldar

  • Hi Jagadish,

    Apologies for the late reply.

    Did you get any error log from your device? Have you tried running the arecord with a verbose option (-v)?
    What does the amixer command outputs?

    Best Regards,
    Yordan
  • Hi Yordan,

    How are you?

    Thank you for your reply.

    I am not getting any error. If I run

    "arecord -vv  file.wav"  then the input level indicator showing level to MAX always. In this situation Line in signal is almost captured by mic always showing MAX even no mic connected.

    Thanks & regards,

    Jagadish.