Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hang and static on samsung galaxy s #1

Open
kreucher opened this issue Dec 4, 2010 · 3 comments
Open

hang and static on samsung galaxy s #1

kreucher opened this issue Dec 4, 2010 · 3 comments

Comments

@kreucher
Copy link

kreucher commented Dec 4, 2010

tried micdroid today... it mostly just hangs (android says the app is busy with options to force close or wait), and the one time i was able to record all I got was static when I played it back :(

perhaps a samsung galaxy s specific issue? android 2.1-update1

@intervigilium
Copy link
Owner

I've got a lot of reports of problems after the latest update. I suspect it has something to do with the updated exception handling code. Galaxy S phones have always had problems on MicDroid since their audio hardware has buffer issues. I'll have a serious look at it after next week when exams are open, but I do not have a Galaxy S phone to test on so I can't guarantee results. If you can get me some log info that would go a long way.

@kreucher
Copy link
Author

kreucher commented Dec 7, 2010

Hope this helps:

adb logcat

V/InputDevice( 2248): ID[0]=0 Dn (0=>1)
V/WindowManager( 2248): Dsptch > Window{47dbc6e0 com.intervigil.micdroid/com.intervigil.micdroid.Mic paused=false}
V/InputDevice( 2248): ID[0]=0 Up (1=>0)
V/WindowManager( 2248): Dsptch > Window{47dbc6e0 com.intervigil.micdroid/com.intervigil.micdroid.Mic paused=false}
I/AudioHelper( 9162): AudioRecord initialized with saved configuration! sample rate: 22050, buffer size adjuster: 16
V/AudioRecord( 9162): set(): sampleRate 22050, channels 16, frameCount 5120
V/AudioPolicyManager( 2183): getInput() inputSource 1, samplingRate 22050, format 1, channels 10, acoustics 0
E/AudioHardwareALSA( 2183): AudioStreamInALSA::AudioStreamInALSA mMode=-1
E/AudioHardwareALSA( 2183): AudioStreamInALSA - input   - format = 1, channels = 16, rate = 22050
V/AudioHardwareALSA( 2183): # virtual uint32_t android::AudioStreamInALSA::getAndroidChannels(int)
E/AudioHardwareALSA( 2183): AudioStreamInALSA - default - format = 1, channels = 16, rate = 44100
V/AudioHardwareALSA( 2183): # virtual uint32_t android::AudioStreamInALSA::getAndroidChannels(int)
V/AudioHardwareALSA( 2183): # virtual uint32_t android::AudioStreamInALSA::getAndroidChannels(int)
E/AudioHardwareALSA( 2183): AudioStreamInALSA lrate - mDefaults->sampleRate = 44100
V/AudioHardwareALSA( 2183):
V/AudioHardwareALSA( 2183): ------------------------>>>>>> ALSA OPEN mode 0,device 262144
I/AudioHardwareALSA( 2183): # open mode: 0 / device: 0x40000
I/AudioHardwareALSA( 2183): Initialized ALSA CAPTURE device AndroidRecord_Speaker_normal
D/AudioHardwareALSA( 2183): Set CAPTURE PCM format to S16_LE (Signed 16 bit Little Endian)
D/AudioHardwareALSA( 2183): Using 1 channel for CAPTURE.
D/AudioHardwareALSA( 2183): Set CAPTURE sample rate to 44100 HZ
D/AudioHardwareALSA( 2183): Buffer size: 4160
D/AudioHardwareALSA( 2183): Latency: 94331
E/AudioFlinger( 2183): readInputParameters mInputBytes 4160, mFrameSize 2 mSampleRate 44100 mChannelCount(1)
E/        ( 2183): AFCCreateReSampler: avAFCInfo->bUsed[0] inSampleRate[44100] outSampleRate[22050] nChannel[1] outbitDepth[16]
V/AudioRecord( 9162): AudioRecord::set() minFrameCount = 320 
V/AudioRecord( 9162): start
V/AudioPolicyManager( 2183): startInput() input 2
D/AudioHardwareALSA( 2183): AudioStreamInALSA::setParameters() routing=262144
V/AudioHardwareALSA( 2183):
V/AudioHardwareALSA( 2183): ------------------------>>>>>> ALSA OPEN mode 0,device 262144
I/AudioHardwareALSA( 2183): # open mode: 0 / device: 0x40000
I/AudioHardwareALSA( 2183): Initialized ALSA CAPTURE device AndroidRecord_Speaker_normal
D/AudioHardwareALSA( 2183): Set CAPTURE PCM format to S16_LE (Signed 16 bit Little Endian)
D/AudioHardwareALSA( 2183): Using 1 channel for CAPTURE.
D/AudioHardwareALSA( 2183): Set CAPTURE sample rate to 44100 HZ
D/AudioHardwareALSA( 2183): Buffer size: 4160
E/ALSALib ( 2183): external/alsa-lib/src/pcm/pcm.c:7231:(snd_pcm_recover) overrun occured
E/AudioFlinger( 2183): RecordThread::threadLoop Resampling mBytesRead[0] buffer.frameCount[2080] mReqChannelCount[1], convertedSize[0] retValue[-22]
E/ALSALib ( 2183): external/alsa-lib/src/pcm/pcm.c:7231:(snd_pcm_recover) overrun occured
E/AudioFlinger( 2183): RecordThread::threadLoop Resampling mBytesRead[0] buffer.frameCount[2080] mReqChannelCount[1], convertedSize[0] retValue[-22]
E/ALSALib ( 2183): external/alsa-lib/src/pcm/pcm.c:7231:(snd_pcm_recover) overrun occured
E/AudioFlinger( 2183): RecordThread::threadLoop Resampling mBytesRead[0] buffer.frameCount[960] mReqChannelCount[1], convertedSize[0] retValue[-22]
W/AudioFlinger( 2183): RecordThread: buffer overflow
V/NotificationService( 2248): notification manager receiver action = android.intent.action.BATTERY_CHANGED
I/StatusBarPolicy( 2248): battery level:75 lowBatteryWaringLevel:15 plugged:true fullBatteryNotify:false isCharging:2 lcdDimgingLevel :5
I/StatusBarPolicy( 2248): BAT. status:2 health:2
D/SyncmlService( 2334): mBatteryReceiver: action - android.intent.action.BATTERY_CHANGED
V/NotificationService( 2248): notification manager receiver action = android.intent.action.BATTERY_CHANGED
I/StatusBarPolicy( 2248): battery level:75 lowBatteryWaringLevel:15 plugged:true fullBatteryNotify:false isCharging:2 lcdDimgingLevel :5
I/StatusBarPolicy( 2248): BAT. status:2 health:2
D/SyncmlService( 2334): mBatteryReceiver: action - android.intent.action.BATTERY_CHANGED
V/InputDevice( 2248): ID[0]=0 Dn (0=>1)
V/InputDevice( 2248): ID[0]=0 Up (1=>0)
I/POWER_OFF_TEST( 2248): mBatteryLevel = 75   mBatteryDecimalPoint = 1
D/dalvikvm( 5297): GC freed 100 objects / 3560 bytes in 295ms
W/WindowManager( 2248): Key dispatching timed out sending to com.intervigil.micdroid/com.intervigil.micdroid.Mic

It hung as soon as I pressed the record button. So then I pressed "back" a few times and eventually got a "force close" or "wait" dialog. I force closed. Here is the relevant bits of /data/anr/traces.txt:

Cmd line: com.intervigil.micdroid

DALVIK THREADS:
"main" prio=5 tid=3 NATIVE
  | group="main" sCount=1 dsCount=0 s=N obj=0x4001b260 self=0xbc18
  | sysTid=9162 nice=0 sched=0/0 cgrp=default handle=-1343993168
  at android.media.AudioRecord.native_start(Native Method)
  at android.media.AudioRecord.startRecording(AudioRecord.java:501)
  at com.intervigil.micdroid.AudioRecordWrapper.start(AudioRecordWrapper.java:54)
  at com.intervigil.micdroid.Recorder.start(Recorder.java:86)
  at com.intervigil.micdroid.Mic$3.onCheckedChanged(Mic.java:446)
  at android.widget.CompoundButton.setChecked(CompoundButton.java:122)
  at android.widget.ToggleButton.setChecked(ToggleButton.java:66)
  at android.widget.CompoundButton.toggle(CompoundButton.java:85)
  at android.widget.CompoundButton.performClick(CompoundButton.java:97)
  at android.view.View.onTouchEvent(View.java:4232)
  at android.widget.TextView.onTouchEvent(TextView.java:6591)
  at android.view.View.dispatchTouchEvent(View.java:3762)
  at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
  at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
  at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
  at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
  at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
  at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
  at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1814)
  at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1149)
  at android.app.Activity.dispatchTouchEvent(Activity.java:2070)
  at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1798)
  at android.view.ViewRoot.handleMessage(ViewRoot.java:1698)
  at android.os.Handler.dispatchMessage(Handler.java:99)
  at android.os.Looper.loop(Looper.java:123)
  at android.app.ActivityThread.main(ActivityThread.java:4370)
  at java.lang.reflect.Method.invokeNative(Native Method)
  at java.lang.reflect.Method.invoke(Method.java:521)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:862)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
  at dalvik.system.NativeStart.main(Native Method)

"Thread-8" prio=5 tid=15 RUNNABLE
  | group="main" sCount=1 dsCount=0 s=Y obj=0x47a89060 self=0x13e660
  | sysTid=9169 nice=0 sched=0/0 cgrp=default handle=1304440
  at com.intervigil.micdroid.Recorder.access$100(Recorder.java:~40)
  at com.intervigil.micdroid.Recorder$MicWriter.run(Recorder.java:130)

@intervigilium
Copy link
Owner

Can you try again with the latest set of commits? I've looked through the sipdroid audiorecord code and used that in a Recorder object to try to solve the Galaxy S issues.
There's a link here: http://db.tt/UmPAUnO to an updated apk if you can't build yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants