How to use the /dev/mixer on the Neo
Pranav Desai
pranavadesai at gmail.com
Sun May 4 01:05:08 CEST 2008
Hello,
I am trying to port one voice recog. application I found on the internet
which uses the mic to record the voice. It works fine on my desktop, but on
the Neo it cant seem to get the mic device.
Here is a part of the code.
dev_mixer = "/dev/mixer";
if ((fd = open(dev_mixer, O_RDWR, 0)) == -1)
return(MIXER_ERR);
/***** check whether mic and igain devices available */
if (ioctl(fd, SOUND_MIXER_READ_DEVMASK, &mask_mixer) == -1)
return(MIXER_ERR);
if (!(mask_mixer & SOUND_MASK_MIC))
return(MIXER_ERR);
But the MIC seems unavailable i.e. it returns after the above statement. So
is the code using the wrong MASK, wrong device or is there something else
wrong.
I tried some other program which list the capabilities of the mixer. Below
is the output of that program. Which also says that mic is no available. It
does show 2 PCMs, so I am not sure what should be used. I can attach the src
if someone is interested.
Status of /dev/mixer:
Mixer Device Recording Active Stereo Current
Channel Available Source Source Device Level
--------- --------- --------- -------- --------- ---------
0 Vol no no no no
1 Bass no no no no
2 Trebl no no no no
3 Synth no no no no
4 Pcm yes no no yes 90% 90%
5 Spkr no no no no
6 Line no no no no
7 Mic no no no no
8 CD no no no no
9 Mix no no no no
10 Pcm2 yes no no yes 100% 100%
11 Rec no no no no
12 IGain yes no no yes 0% 0%
13 OGain no no no no
14 Line1 no no no no
15 Line2 no no no no
Thanks for any help I can get.
-- Pranav
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openmoko.org/pipermail/openmoko-devel/attachments/20080503/2d2a1735/attachment-0001.html
More information about the openmoko-devel
mailing list