Okay, I kept digging further and finally found that my driver is going to XRUNs whenever I try to load any piece of audio .
when my board completed booting, the params look like: #cat /proc/asound/card0/pcm0p/sub0/status state: PREPARED owner_pid : 1055 trigger_time: 0.000000000 tstamp : 10.809844973 delay : 0 avail : 2048 avail_max : 0 ----- hw_ptr : 0 appl_ptr : 0 But when android tries to play the booting sound, it immediately changes to the following. And is not able to recover . #cat /proc/asound/card0/pcm0p/sub0/status state: XRUN owner_pid : 1055 trigger_time: 30.074615484 tstamp : 39.793883833 delay : 0 avail : 2048 avail_max : 2083 ----- hw_ptr : 2048 appl_ptr : 2048 I am using Android RowBoat version and I am not sure if it is a known issue or has some_fix_I_did_not_adapt. any ideas? Thanks & regards Murali On Mon, Jan 3, 2011 at 4:15 PM, Amit Pundir <pundira...@gmail.com> wrote: > On Sun, Jan 2, 2011 at 6:34 PM, Murali K. Vemuri < > vemuri.muralikris...@gmail.com> wrote: > >> Hello Srinath and group, >> >> I made the changes in asound.conf and also I found some h/w errors and >> also some issues at driver, and fixed one by one. Finally I checked the >> BIT(or Serial) CLK & LR (Left-Right) CLK for my codec, once I got all these >> right, now I have the "logcat" filled with these log messages. >> >> W/AudioTrack( 1054): obtainBuffer timed out (is the CPU pegged?) 0x61e60 >> user=00003000, server=00001000 >> W/AudioTrack( 1054): obtainBuffer timed out (is the CPU pegged?) 0x61e60 >> user=00003000, server=00001000 >> W/AudioTrack( 1054): obtainBuffer timed out (is the CPU pegged?) 0x61e60 >> user=00003000, server=00001000 >> W/AudioTrack( 1054): obtainBuffer timed out (is the CPU pegged?) 0x61e60 >> user=00003000, server=00001000 >> W/AudioFlinger( 1054): write blocked for 9999 msecs, 5 delayed writes, >> thread 0x539c0 >> W/AudioFlinger( 1054): write blocked for 9999 msecs, 6 delayed writes, >> thread 0x539c0 >> W/AudioFlinger( 1054): write blocked for 9999 msecs, 7 delayed writes, >> thread 0x539c0 >> W/AudioFlinger( 1054): write blocked for 9999 msecs, 8 delayed writes, >> thread 0x539c0 >> I googled on this, but nothing much I could use on this error. >> > > Hi Murali, > > I got a similar issue sometime back on a different platform. In my case > the issue was with my audio driver which was not able to reset the device > properly. This causes the write to the Audio device to block indefinitely > and the buffers never got freed and thats why I was getting "unable to > obtain buffer, cpu pegged?" error. > > 1) Recommended solution is to debug your audio driver and check if it > handles suspend/resume mode properly. > 2) A quick fix is to modify the Android user space and don't let your audio > go in stand-by mode. > > As far as OMAP3 is concerned try Rowboat, Android port > http://code.google.com/p/rowboat/ which has Android base port available > for TI OMAP35x, AM35x, AM37x and DM37x platforms. > > Regards, > Amit Pundir > > >> Any pointers??? >> Thanks & regards >> Murali >> On Mon, Dec 27, 2010 at 11:48 PM, srinath ramini <raminisrin...@gmail.com >> > wrote: >> >>> Hi Murali, >>> >>> In your asound.conf file AndroidPlayback pcm configuration details are >>> not avilable. >>> >>> Replace your asound.conf with the following content and try it. >>> >>> ## >>> >>> ## Mixer Devices >>> >>> ## >>> >>> ctl.AndroidPlayback { >>> >>> type hw >>> >>> card 1 >>> >>> device 0 >>> >>> } >>> >>> ctl.AndroidCapture { >>> >>> type hw >>> >>> card 1 >>> >>> device 0 >>> >>> } >>> >>> ## >>> >>> ## Playback Devices >>> >>> ## >>> >>> pcm.AndroidPlayback { >>> >>> type hw >>> >>> card 1 >>> >>> device 0 >>> >>> } >>> >>> ## >>> >>> ## Recording device >>> >>> ## >>> >>> pcm.AndroidCapture { >>> >>> type hw >>> >>> card 1 >>> >>> device 0 >>> >>> } >>> >>> >>> >>> Regards, >>> >>> Sreenath >>> On Sat, Dec 25, 2010 at 5:41 PM, Murali K. Vemuri < >>> vemuri.muralikris...@gmail.com> wrote: >>> >>>> Hello there, >>>> Sorry for the delayed reply. I see these log messages on "logcat": >>>> >>>> E/AudioHardwareALSA( 1031): ERROR PIPE (underflow), resetting to >>>> RECOVER!! >>>> >>>> E/AudioHardwareALSA( 1031): >>>> >>>> and since I am not very familiar with the android config files, I am >>>> attaching my default config file. Can someone help me? >>>> >>>> Thanks ®ards >>>> Murali >>>> >>>> >>>> On Thu, Dec 23, 2010 at 12:14 AM, srinath ramini < >>>> raminisrin...@gmail.com> wrote: >>>> >>>>> Hi Murali, >>>>> >>>>> Please check your /etc/asound.conf file. File should conatin Hardware >>>>> configuration details. >>>>> >>>>> Regards, >>>>> Sreenath >>>>> >>>>> On Wed, Dec 22, 2010 at 4:27 PM, Murali K. Vemuri < >>>>> vemuri.muralikris...@gmail.com> wrote: >>>>> >>>>>> Hello group, >>>>>> >>>>>> I am using LINUX with Android on OMAP3530 and am finding Audio is not >>>>>> working. >>>>>> I tried checking the "logcat" and the output: >>>>>> >>>>>> W/AudioHardwareALSA( 1020): Unable to attach mixer to device >>>>>> AndroidOut: Invalid argument >>>>>> >>>>>> W/AudioHardwareALSA( 1020): Unable to attach mixer to device >>>>>> AndroidIn: Invalid argument >>>>>> >>>>>> I/CameraService( 1020): CameraService started: pid=1020 >>>>>> >>>>>> >>>>>> D/AudioHardwareALSA( 1020): openOutputStream called for devices: >>>>>> 0x00000002 >>>>>> >>>>>> D/ALSAModule( 1020): open called for devices 00000002 in mode 0... >>>>>> >>>>>> >>>>>> E/ALSALib ( 1020): >>>>>> external/alsa-lib/src/pcm/pcm.c:2201:(snd_pcm_open_noupdate) Unknown PCM >>>>>> AndroidPlayback_Speaker_normal >>>>>> >>>>>> E/ALSALib ( 1020): >>>>>> external/alsa-lib/src/pcm/pcm.c:2201:(snd_pcm_open_noupdate) Unknown PCM >>>>>> AndroidPlayback_Speaker >>>>>> >>>>>> E/ALSALib ( 1020): >>>>>> external/alsa-lib/src/pcm/pcm.c:2201:(snd_pcm_open_noupdate) Unknown PCM >>>>>> AndroidPlayback >>>>>> >>>>>> D/AndroidRuntime( 1018): --- registering native functions --- >>>>>> >>>>>> >>>>>> I/ALSAModule( 1020): Initialized ALSA PLAYBACK device default >>>>>> >>>>>> >>>>>> I/AudioFlinger( 1020): AudioFlinger's thread 0x53018 ready to run >>>>>> >>>>>> >>>>>> D/ALSAModule( 1020): route called for devices 00000002 in mode 0... >>>>>> >>>>>> >>>>>> Any pointers???? >>>>>> >>>>>> Thanks & regards >>>>>> Murali >>>>>> >>>>>> -- >>>>>> unsubscribe: >>>>>> android-porting+unsubscr...@googlegroups.com<android-porting%2bunsubscr...@googlegroups.com> >>>>>> website: http://groups.google.com/group/android-porting >>>>>> >>>>> >>>>> >>>> >>> >> >> >> -- >> न चोर हार्यं न च राजहार्यं >> न भ्रातृभाज्यं न च भारकारी >> व्ययी कृते वर्धत एव नित्यं >> विद्या धनं सर्व धनं प्रधानं >> Thieves cannot steal it, Kings cannot tax it, >> Siblings cannot demand a share in it, and it does not weigh a lot, >> The more you spend it, increases every day, >> the wealth of knowledge is the PRIME WEALTH . >> >> -- >> unsubscribe: >> android-porting+unsubscr...@googlegroups.com<android-porting%2bunsubscr...@googlegroups.com> >> website: http://groups.google.com/group/android-porting >> > > -- न चोर हार्यं न च राजहार्यं न भ्रातृभाज्यं न च भारकारी व्ययी कृते वर्धत एव नित्यं विद्या धनं सर्व धनं प्रधानं Thieves cannot steal it, Kings cannot tax it, Siblings cannot demand a share in it, and it does not weigh a lot, The more you spend it, increases every day, the wealth of knowledge is the PRIME WEALTH . -- unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting