Welcome, Guest

Author Topic: record sound via Mic pin  (Read 2294 times)

ehsan51

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
record sound via Mic pin
« on: January 26, 2015, 06:01:15 AM »
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

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
Re: record sound via Mic pin
« Reply #1 on: January 27, 2015, 10:10:36 PM »
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
 
« Last Edit: January 27, 2015, 10:34:46 PM by ehsan51 »

ehsan51

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
Re: record sound via Mic pin
« Reply #2 on: January 29, 2015, 08:13:13 AM »
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 :)
« Last Edit: January 29, 2015, 10:30:19 PM by ehsan51 »