Test the audio line-in of the IMX233-olinuxino-MINI-WIFI

Started by phinguyen, July 10, 2014, 02:09:52 PM

Previous topic - Next topic

phinguyen

Hi everyone,
I buy the board IMX233-olinuxino-MINI-WIFI from Olimex.
I copy the official image from IMX-Olimex Wiki (kernel 2.6.35) into the SD-card for the board.
I don't know how to check the audio line-in of the board!

I try to use:
arecord
and
aplay
But i have a problem:
Is the DMA channel dead?
I also try to use a 3.5mm Male Cable to connect from line-out of my laptop with line-in of the board, and use again:
arecord
But meet the same thing!

Please tell me how to do now?

Thanks,
phinguyen

LubOlimex

Hey there,

Hopefully, somebody would find the below instructions to record audio with the ArchLinux image for imx233 helpful. They are suitable not only for the MINI but for the MAXI also. Below are the commands to record and then play audio file:

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 Line 1 type:

[root@alarm ~]# amixer cset name='Left ADC Mux' 1
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 Line 1 type:

[root@alarm ~]# amixer cset name='Right ADC Mux' 1
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
[root@alarm ~]# aplay -f cd -D hw:0,0 test.wav
Playing WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
[root@alarm ~]#

You should hear the recorded sound from the test.wav file for 5 sec.

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex

benbiles

#2
you will need to;

1: set HP Mux to 'Line in 1'

amixer cset name='HP Mux' 1

then....


2. Set Left ADC Mux to Line 1 type:

amixer cset name='Left ADC Mux' 1


3. Set Right ADC Mux to Line 1 type:

amixer cset name='Right ADC Mux' 1


then you can record.

arecord -f cd -D hw:0,0 -d 60 test.wav

this will record 60 seconds

( you will see buffer underuns and the recorded audio will have drop outs (( no known fix ))

then..

1: set HP Mux to 'DAC out'

amixer cset name='HP Mux' 0

then finally!

aplay -f cd -D hw:0,0 test.wav

IF you have not adjusted alsamixer audio levels then you may here some fairly terrible stereo audio with estimated 5% harmonic distortion + 8% noise floor from the board...

If you have adjusted any alsamixer levels the chances are you will here nothing or very distorted one channel audio ( left ) quiet.

I would consider this a non-working audio input / driver ?

audio not working or supported at all in the later 3.x kernel