NOt taking audio from MIC in android
<p>I have created an app which will take sound from MIC and display its frequecy level in dB.</p>

<p>but when I am running the App,then error is coming in logcat.<br><code>10-18 15:38:17.651: ERROR/ALSALib(2376): external/alsa-lib/src/pcm/pcm.c:2201(snd_pcm_open_noupdate) Unknown PCM AndroidRecord_Speaker
10-18 15:38:17.651: ERROR/ALSALib(2376): external/alsa-lib/src/pcm/pcm.c:2201:(snd_pcm_open_noupdate) Unknown PCM NULL_Device
10-18 15:38:17.651: INFO/AudioHardwareALSA(2376): Initialized ALSA CAPTURE device NULL_Device
10-18 15:38:17.651: ERROR/AudioHardwareALSA(2376):  open (0,0x40000) = -2
10-18 15:38:17.651: ERROR/AudioHardwareALSA(2376): setInputDevice(0 , 0x40000) = -2
10-18 15:38:17.651: ERROR/AudioRecord(3461): Could not get audio input for record source 1
10-18 15:38:17.651: ERROR/AudioRecord-JNI(3461): Error creating AudioRecord instance: initialization check failed.
10-18 15:38:17.655: ERROR/AudioRecord-Java(3461): [ android.media.AudioRecord ] Error code -20 when initializing native AudioRecord object.
10-18 15:38:17.655: WARN/dalvikvm(3461): threadid=8: thread exiting with uncaught exception (group=0x4001d7d0)
10-18 15:38:17.659: ERROR/AndroidRuntime(3461): FATAL EXCEPTION: Thread-9
10-18 15:38:17.659: ERROR/AndroidRuntime(3461): java.lang.IllegalStateException: startRecording() called on an uninitialized AudioRecord.
10-18 15:38:17.659: ERROR/AndroidRuntime(3461):     at android.media.AudioRecord.startRecording(AudioRecord.java:495)
10-18 15:38:17.659: ERROR/AndroidRuntime(3461):     at com.android.spl.Recorder.run(Recorder.java:178)
10-18 15:38:17.659: ERROR/AndroidRuntime(3461):     at java.lang.Thread.run(Thread.java:1096)</code></p>

<p>Thanks
Please anybody help me...</p>
