What should i do record a sound from microphone on mini6410? Is there a simple console application for Linux for sound recording?
How to record sound
I was asking myself the same question a while ago, and here is what I ultimately came up with. I'll throw it on here for future reference: To get the sound working you should probably put ALSA on the unit. The stock unit looks like it has ALSA on it, but somehow I couldn't get any audio to work (maybe it is just the minimum install to run QTopia?!?!?). Anyhow here is how I did it: Cross compile ALSA-LIB and ALSA-UTIL on your Linux box. Use version 1.18: MAKE ALSA-LIB: ============== CC=arm-linux-gcc ./configure --target=arm-linux --host=i686-pc-linux-gnu --prefix=/usr make install /buildroot/ MAKE ALSA-UTIL: =============== apt-get install xmlto apt-get install gettext CC=arm-linux-gcc ./configure --target=arm-linux --host=i686-pc-linux-gnu --prefix=/usr --with-alsa-inc-prefix=/buildroot/usr/include --with-alsa-prefix=/buildroot/usr/lib --disable-alsamixer make install DESTDIR=/buildroot/ LOAD TO TARGET: =============== cd /buildroot tar czf myalsa.tar usr ftp 192.168.2.222 <=== or whatever your units IP is (logon) send myalsa.tar exit telnet 192.168.2.222 (logon) cd / tar xzvf myalsa.tar -C/ CONFIGURE DEVICE ================ add the following to the /etc/init.d/rcS mkdir /dev/snd/ cd /dev/snd ln -s /dev/controlC0 controlC0 ln -s /dev/pcmC0D0c pcmC0D0c ln -s /dev/pcmC0D0p pcmC0D0p ...then reboot TEST ==== speaker-test -W /usr/share/sounds/alsa/ -w Front_Center.wav -twav if you hear the sound in your speakers, then ALSA is working correctly. You can also use the arecord and aplay utilities. And most importantly you can write your own software now to use the ALSA API. One other important thing regarding the recording: You can use the program "amixer" to control various sound options, the one important to know is "Input Mux" which has four options: - Differential - Analog1 - Analog2 - Both Analog1 is the Mic that you plug-in above the USB-B connector. Analog2 is the on-board Mic for the other ones, look at the codec chip data sheet for details. Hope this could help. What I haven't found out yet is how to set the above parameter to a default. amixer -store didn't do it for me. When the system boots, it seems to default to "Differential". When I open the default input device, the setting changes to "Analog2". How can I make it default to and stay at Analog1 ???
can you tell me some details about ""amixer" to control various sound options, the one important to know is "Input Mux" which has four options: - Differential - Analog1 - Analog2 - Both " how to write commands.....
when i configure the alsa-lib it gives me the following error : checking for C compiler default output file name... configure: error: C compiler cannot create executables See `config.log' for more details. any help please .
when i make install /buildroot/ it gives me the following error make: *** No rule to make target `install'. Stop. how can i fix it ?
Hi Micha, I just followed your steps for configuring alsa-utils. Once after the build, I have copied all the files from DESTDIR to rootfs but on target I found below issues. mini2440> aplay -/bin/sh: aplay: not found mini2440> speaker-test -/bin/sh: speaker-test: not found Could you please tell me, does alsa require any more libs other than built onces... Thanks, Jagan.
mini2440> aplay -/bin/sh: aplay: not found mini2440> speaker-test -/bin/sh: speaker-test: not found ---u r cross compiler s are different from mini2440..please reset cross compiler from friendly arm.net
# speaker-test -W /usr/share/sounds/alsa/ -w Front_Center.wav -twav speaker-test 1.0.24.2 Playback device is default Stream parameters are 48000Hz, S16_LE, 1 channels WAV file(s) ALSA lib pcm_hw.c:1401:(_snd_pcm_hw_open) Invalid value for card Playback open error: -19,No such device