Skip to contentSkip to conversation

Question about microphone usage on OMAP2430SDP

DISCUSSION RobertChou 3 participants 3 messages Jan 24, 2007

lore
Share & tools
lore

RobertChou

author
#0 lore raw

hi,

I'm trying to record some voice through Main/Sub & Headset microphone on
OMAP2430SDP board. But only noises is recorded (does not sound like voice).

I have used
1. cat /dev/dsp > audio.out & cat audio.out > /dev/dsp --> failed
2. sample program from pjsip (open source sip protocol stack)

       which config. sample rate=44100, ch=2, bits=16
       (able to record sound in x86 system)                        --> failed

Besides main/sub mic, I noticed that the record source can be switch to
Headset by ioctl OSS driver. I tried to use audio connector to 3.5mm microphone to the headset plug. But still doesn't work.

I'm using linux-2.6.14-omap2430 downloaded from TI webiste. Does anyone ever
successfully record anything from OMAP2430 main/sub or headset mic? And how can i correctly connect microphone to on-board headset plug? I'm currently using audio connector grab from nokia mobile accessory. Thx for answering my question.

Best Regards,

Robert

#1 lore raw

Hi,

What is the version of your 2430 SDP? It will be printed on MMC slot-1.

Regards,
Khasim

Quoted 2 lines

-----Original Message-----
From: [email protected]

[mailto:linux-omap-

Quoted 8 lines

[email protected]] On Behalf Of RobertChou
Sent: Tuesday, January 23, 2007 7:58 PM
To: [email protected]
Subject: Question about microphone usage on OMAP2430SDP

hi,

I'm trying to record some voice through Main/Sub & Headset

microphone on

Quoted 5 lines

OMAP2430SDP board. But only noises is recorded (does not sound like voice).

I have used
1. cat /dev/dsp > audio.out & cat audio.out > /dev/dsp -->

failed

Quoted 3 lines

2. sample program from pjsip (open source sip protocol stack) which config. sample rate=44100, ch=2, bits=16 (able to record sound in x86 system)

-->

Quoted 3 lines

failed

Besides main/sub mic, I noticed that the record source can be

switch to

Quoted 5 lines

Headset by ioctl OSS driver. I tried to use audio connector to 3.5mm microphone
to the headset plug. But still doesn't work.

I'm using linux-2.6.14-omap2430 downloaded from TI webiste. Does

anyone

Quoted 2 lines

ever
successfully record anything from OMAP2430 main/sub or headset mic?

And

Quoted 2 lines

how
can i correctly connect microphone to on-board headset plug? I'm

currently

Quoted 11 lines

using
audio connector grab from nokia mobile accessory. Thx for answering my question.

Best Regards,

Robert
_______________________________________________
Linux-omap-open-source mailing list
[email protected]
http://linux.omap.com/mailman/listinfo/linux-omap-open-source

#2 lore raw
In reply to RobertChou

RobertChou stated on 1/23/2007 7:57 PM:

Quoted 4 lines

I'm trying to record some voice through Main/Sub & Headset microphone on OMAP2430SDP board. But only noises is recorded (does not sound like voice).

Am assuming you are using OSS driver. Ideally, this code could come over to 2430 git as ALSA driver.. but i guess, it;d need some time to get the framework for that in place.. hmm...todo...
anyways, am looking at
http://linux.omap.com/pub/kernel/2430sdp/source/linux-2.6.10-omap2420-omap2430.tgz
which is same as the 2.6.14 code..

Quoted 2 lines

I have used
1. cat /dev/dsp > audio.out & cat audio.out > /dev/dsp --> failed

failed in what sense? did u do a hexdump audio.out? is it all 0x0000 or some constant value?
2. sample program from pjsip (open source sip protocol stack)

Quoted 7 lines
       which config. sample rate=44100, ch=2, bits=16
       (able to record sound in x86 system)                        -->

failed

Besides main/sub mic, I noticed that the record source can be switch to
Headset by ioctl OSS driver. I tried to use audio connector to 3.5mm microphone to the headset plug. But still doesn't work.

Did u try something simpler, like plugging a speaker (8ohm stereo speaker) to the 3.5mm jack? the default setting should allow you to listen to music on that.. cat /bin/ls>/dev/sound/dsp (you should listen to some noise)...
am hoping that your volume levels are all set properly here... else use some mixer app like aumix or somethin to set it up.

Quoted 5 lines

I'm using linux-2.6.14-omap2430 downloaded from TI webiste. Does
anyone ever
successfully record anything from OMAP2430 main/sub or headset mic? And how

yes, it works.. you have ioctls for that..

Quoted 2 lines

can i correctly connect microphone to on-board headset plug? I'm currently using

I used a 2.5 mm mono headset+mic combination we can buy at walmart.. :).. dont remember the make though...

Quoted 2 lines

audio connector grab from nokia mobile accessory. Thx for answering my question.

I'd say, go step by step...
1. check first that you are able to play a music on bootup - use a simple filesystem that does not do any fancy pre-init like starting off a sound server etc.. cat abc.wav>/dev/sound/dsp (where abc.wav is a 44100 stereo 16 bit wav/raw signed PCM file)
2. use the correct ioctls:
see /drivers/sound/omap-audio-twl4030.c and the ioctl functions to understand which ioctls are supported,
see the .h file for the following info:
/*
* Mapping of OSS devices to TWL devices
* TWL Device OSS MASK
* ==============================================================
* OUTPUT:
* =======

 * OUTPUT_STEREO_HEADSET           SOUND_MASK_LINE1
 * OUTPUT_HANDS_FREE_CLASSD        SOUND_MASK_SPEAKER
 * OUTPUT_MONO_EARPIECE            SOUND_MASK_PHONEOUT (mono Sink)

*
* INPUT:
* ======
* INPUT_HEADSET_MIC SOUND_MASK_LINE
* INPUT_MAIN_MIC + INPUT_SUB_MIC SOUND_MASK_MIC
*
* CURRENT SOURCES:
* ===============
* SOUND_MIXER_OUTSRC - output source
* SOUND_MIXER_RECSRC - input source
* Operations:
* MIXER_READ() and MIXER_WRITE() to control the sources *
* VOLUME CONTROL:
* ===============
* SOUND_MIXER_RECLEV - control the gain level of recording
* SOUND_MIXER_VOLUME - control the gain level of playback
* MIXER_WRITE and MIXER_READ with each of the device masks will
* control the coarse volume control of the
device
*/

using the MIXER_WRITE with SOUND_MIXER_RECSRC with SOUND_MASK_MIC - records stereo from both main and sub mic (in left and right channels each). and so on.. read this on a associated issue:
http://www.music.columbia.edu/pipermail/linux-audio-dev/2006-June/016125.html

Regards,
Nishanth Menon