record sound via Mic pin

Started by ehsan51, January 26, 2015, 06:01:15 AM

Previous topic - Next topic

ehsan51

Hi all
I have IMX233-mini-wifi and I want to record sound via microphone. I connect the microphone according to schema bellow:


and followed the instruction bellow, but I got noisy sound! What do I do wrong?
Thanks

1. Set Headphone Mux to DAC Out type:

[root@alarm ~]# amixer cset name='HP Mux' 0
numid=9,iface=MIXER,name='HP Mux'
   ; type=ENUMERATED,access=rw------,values=1,items=2
   ; Item #0 'DAC Out'
   ; Item #1 'Line In 1'
   : values=0

2. Set Left ADC Mux to MIC type:

[root@alarm ~]# amixer cset name='Left ADC Mux' 0
numid=11,iface=MIXER,name='Left ADC Mux'
   ; type=ENUMERATED,access=rw------,values=1,items=4
   ; Item #0 'Mic'
   ; Item #1 'Line In 1'
   ; Item #2 'Head Phone'
   ; Item #3 'Line In 2'
   : values=1

3. Set Right ADC Mux to MIC type:

[root@alarm ~]# amixer cset name='Right ADC Mux' 0
numid=10,iface=MIXER,name='Right ADC Mux'
   ; type=ENUMERATED,access=rw------,values=1,items=4
   ; Item #0 'Mic'
   ; Item #1 'Line In 1'
   ; Item #2 'Head Phone'
   ; Item #3 'Line In 2'
   : values=1

4. Plug in a 3.5 mm audio jack with audio source to the board's Line in connector and type:

[root@alarm ~]# arecord -f cd -D hw:0,0 -d 5 test.wav
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo

The result should be a 5 sec long test.wav file with recorded sound from the
your audio source.

5. Playing of recorded sound from the test.wav file. Plug in Headphones to the board HEADPHONES connector and type:

[root@alarm ~]# aplay -f cd -D hw:0,0 test.wav
Playing WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo


ehsan51

#1
Hi again
I used wrong resistor! now it works but the sound is too noisy. Any idea to reduce the noise? Also I am looking for a command to change the gain of amplifier, I have seen the command somewhere in the forum before but I can not find it now!
(I use IMX233-mini-wifi and arch linux)
Best

ehsan51

#2
Update,
I changed the circuit to what is implemented in A13 / A20 and change the ADC capacitor :
"amixer sset "ADC" xx% cap" , xx<100
and it helps to reduce the noise, Sometimes it is so clear , and sometimes it is noisy, sometimes it record nothing but "shshshhhhhh" sound!
Any help will be appreciate :)