Hi all, I have an issue with the audio in Android. I suspect the sample rates being the cause. Synopsis as follows
Android 1.0 release with WindRiver's ALSA patch for audio and Hardware consists of OMAP3430 + TWL4030(Audio codec) TWL4030 audio CODEC driver is ASoC instead of ALSA With the music applications (music, volume, audible touch tones selection) The android's Dalvik logcat shows some debug crash. (You can find the crash as an attachment also.) The crash seems to be like the media servers getting killed and restarted automatically. other than this issue audio is working fine. May be this is silly work around. But, with this following TWL4030_RATES #define TWL4030_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_48000) #define TWL4030_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FORMAT_S24_LE) struct snd_soc_dai twl4030_dai = { .name = "twl4030", .playback = { .stream_name = "Playback", .channels_min = 2, .channels_max = 2, .rate_min = SNDRV_PCM_RATE_8000, .rate_max = SNDRV_PCM_RATE_48000, .rates = TWL4030_RATES, .formats = TWL4030_FORMATS,}, .capture = { .stream_name = "Capture", .channels_min = 2, .channels_max = 2, .rate_min = SNDRV_PCM_RATE_8000, .rate_max = SNDRV_PCM_RATE_48000, .rates = TWL4030_RATES, .formats = TWL4030_FORMATS,}, .ops = { .hw_params = twl4030_hw_params, }, .dai_ops = { .set_sysclk = twl4030_set_dai_sysclk, .set_fmt = twl4030_set_dai_fmt, } }; EXPORT_SYMBOL_GPL(twl4030_dai); In the sound/soc/omap/twl4030.c I dint came across the crash till now for about 2 weeks i have been testing. If i try making any change to the TWL4030_RATES macro to populate the .rates field of (twl4030_dai) like #define TWL4030_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 | \ SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_32000 | \ SNDRV_PCM_RATE_44100 |SNDRV_PCM_RATE_48000) The crash is consistent I gone through the sources of android/hardware/alsa_sound/* The sample rate for playback and capture path being hard coded here. and in the alsa CODEC driver of TWL4030 there is no mentioning abt the rates. only rate_min=8000, and rate_max=48000, are being used. Is my interception right or am i missing something, any code change is needed in the kernel side or in the Android side. If this is not the appropriate place for this issue. Kindly redirect me there. -- Cheers (: Naveen Krishna Ch :) --~--~---------~--~----~------------~-------~--~----~ unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting -~----------~----~----~----~------~----~------~--~---
/share/alsa/alsa.conf E/ALSALib ( 1096): external/alsa-lib/src/control/setup.c:345:(snd_config_get_ctl_elem_value) bad value index I/AudioHardwareALSA( 1096): Initialized ALSA PLAYBACK device AndroidPlayback_Speaker_normal D/AudioHardwareALSA( 1096): Set PLAYBACK PCM format to S16_LE (Signed 16 bit Little Endian) D/AudioHardwareALSA( 1096): Using 2 channels for PLAYBACK. D/AudioHardwareALSA( 1096): Set PLAYBACK sample rate to 44100 HZ W/WaterlooBatteryService( 848): getIntVal for /sys/class/power_supply/bq27000/online returns 2 D/LED ( 848): [set_led_state] colorARGB=FFFF0000, onMS=0, offMS=0 D/LED ( 848): [set_led_state] firstInvoke=0 I/DEBUG ( 1095): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** I/DEBUG ( 1095): Build fingerprint: 'sandisk/waterloo/waterloo/:1.0/TC3/eng.kalyan.20090104.170614:eng/test-keys' I/DEBUG ( 1095): pid: 1096, tid: 1098 >>> /system/bin/mediaserver <<< I/DEBUG ( 1095): signal 11 (SIGSEGV), fault addr 00000000 I/DEBUG ( 1095): r0 0002c668 r1 100ffd20 r2 00000010 r3 00000000 I/DEBUG ( 1095): r4 00000000 r5 00000038 r6 00000001 r7 0002c648 I/DEBUG ( 1095): r8 100ffda8 r9 0002c6b8 10 ffffffda fp 00000001 I/DEBUG ( 1095): ip 0002c648 sp 100ffd18 lr ab00becc pc 00000000 cpsr 20000010 I/DEBUG ( 1095): #00 pc 00000000 I/DEBUG ( 1095): #01 pc ab00bec8 /system/lib/libaudioflinger.so I/DEBUG ( 1095): #02 pc ab00c25c /system/lib/libaudioflinger.so I/DEBUG ( 1095): #03 pc ab00bdc8 /system/lib/libaudioflinger.so I/DEBUG ( 1095): #04 pc ab0125d2 /system/lib/libaudioflinger.so I/DEBUG ( 1095): #05 pc a9d27898 /system/lib/libutils.so I/DEBUG ( 1095): #06 pc a9d27674 /system/lib/libutils.so I/DEBUG ( 1095): #07 pc afe0ed58 /system/lib/libc.so I/DEBUG ( 1095): #08 pc afe0e8cc /system/lib/libc.so I/DEBUG ( 1095): stack: I/DEBUG ( 1095): 100ffcd8 00000000 I/DEBUG ( 1095): 100ffcdc 00000000 I/DEBUG ( 1095): 100ffce0 fffedc80 I/DEBUG ( 1095): 100ffce4 0001ffe0 [heap] I/DEBUG ( 1095): 100ffce8 0001ffe0 [heap] I/DEBUG ( 1095): 100ffcec 00000000 I/DEBUG ( 1095): 100ffcf0 00000000 I/DEBUG ( 1095): 100ffcf4 00000000 I/DEBUG ( 1095): 100ffcf8 00000038 I/DEBUG ( 1095): 100ffcfc 00000001 I/DEBUG ( 1095): 100ffd00 100ffd20 I/DEBUG ( 1095): 100ffd04 0002c6b8 [heap] I/DEBUG ( 1095): 100ffd08 100ffda8 I/DEBUG ( 1095): 100ffd0c 00000000 I/DEBUG ( 1095): 100ffd10 df002777 I/DEBUG ( 1095): 100ffd14 e3a070ad I/DEBUG ( 1095): #01 100ffd18 100ffd28 I/DEBUG ( 1095): 100ffd1c 100ffd20 I/DEBUG ( 1095): 100ffd20 00000000 I/DEBUG ( 1095): 100ffd24 00000000 I/DEBUG ( 1095): 100ffd28 00000000 I/DEBUG ( 1095): 100ffd2c 00000000 I/DEBUG ( 1095): 100ffd30 00000000 I/DEBUG ( 1095): 100ffd34 00000000 I/DEBUG ( 1095): 100ffd38 00000000 I/DEBUG ( 1095): 100ffd3c 00000000 I/DEBUG ( 1095): 100ffd40 00000000 I/DEBUG ( 1095): 100ffd44 00000000 I/DEBUG ( 1095): 100ffd48 00000000 I/DEBUG ( 1095): 100ffd4c 00000000 I/DEBUG ( 1095): 100ffd50 00000000 I/DEBUG ( 1095): 100ffd54 00000000 I/DEBUG ( 1095): 100ffd58 00000000 I/DEBUG ( 1095): 100ffd5c 00000000 I/DEBUG ( 1095): 100ffd60 00000000 I/DEBUG ( 1095): 100ffd64 00000000 I/DEBUG ( 1095): 100ffd68 00000000 I/DEBUG ( 1095): 100ffd6c 00000000 I/DEBUG ( 1095): 100ffd70 00000000 I/DEBUG ( 1095): 100ffd74 00000000 I/DEBUG ( 1095): 100ffd78 00000000 I/DEBUG ( 1095): 100ffd7c 00000000 I/DEBUG ( 1095): 100ffd80 00000000 I/DEBUG ( 1095): 100ffd84 00000000 I/DEBUG ( 1095): 100ffd88 00000000 I/DEBUG ( 1095): 100ffd8c 00000000 I/DEBUG ( 1095): 100ffd90 00000000 I/DEBUG ( 1095): 100ffd94 00000000 I/DEBUG ( 1095): 100ffd98 00000000 I/DEBUG ( 1095): 100ffd9c 00000000 I/DEBUG ( 1095): 100ffda0 0002cef0 [heap] I/DEBUG ( 1095): 100ffda4 00000011 I/DEBUG ( 1095): 100ffda8 00000001 I/DEBUG ( 1095): 100ffdac 00000000 I/DEBUG ( 1095): 100ffdb0 0002c648 [heap] I/DEBUG ( 1095): 100ffdb4 000002bc I/DEBUG ( 1095): 100ffdb8 00000001 I/DEBUG ( 1095): 100ffdbc 00000000 I/DEBUG ( 1095): 100ffdc0 ab016bf0 /system/lib/libaudioflinger.so I/DEBUG ( 1095): 100ffdc4 ab00c260 /system/lib/libaudioflinger.so binder: release 1096:1096 transaction 4547 in, still active binder: send failed reply for transaction 4547 to 1004:1004 W/MediaPlayer( 1004): MediaPlayer server died! W/MediaPlayer( 1004): IMediaplayer died I/ServiceManager( 824): service 'media.audio_flinger' died I/ServiceManager( 824): service 'media.player' died I/ServiceManager( 824): service 'media.camera' died W/AudioSystem( 848): AudioFlinger server died! E/MediaPlayer( 1004): Error (100,0) I/DEBUG ( 1095): debuggerd committing suicide to free the zombie! I/DEBUG ( 1106): debuggerd: Jan 4 2009 17:22:43 I/ ( 1107): ServiceManager: 0xaab8 E/AudioHardwareALSA( 1107): [initMixer]: trying to attach mixer to AndroidPlayback E/ALSALib ( 1107): external/alsa-lib/src/conf.c:2968:(snd_config_update_r) not an error-> [snd_config_update_r] configs=/system/ usr/share/alsa/alsa.conf E/AudioHardwareALSA( 1107): [initMixer]: trying to attach mixer to AndroidRecord E/ALSALib ( 1107): external/alsa-lib/src/conf.c:2