Hi all,
I'm experiencing weird crash of alsa-lib. the sound card has 16/24 bit ADC. The ADC works on 24 bit mode, hw->formats= SNDRV_PCM_FMTBIT_S32_LE,and use 'copy' playback to copy DMA buffer to user space's buffer. I ran: arecord -t wav -c 2 -f U8 -r 8000 -d 5 a.wav
then arecord crash with following information:
Data access misaligned address violation - Attempted misaligned data memory or data cache access.
RETE: /* Maybe null pointer? */ RETN: /* unknown address */ RETX: [ /usr/lib/libasound.so.2 + 0x46da8 ] RETS: [ /usr/lib/libasound.so.2 + 0x46aec ] PC : [ /usr/lib/libasound.so.2 + 0x46da8 ] DCPLB_FAULT_ADDR: [ arecord + 0x2ac ] ICPLB_FAULT_ADDR: [ /usr/lib/libasound.so.2 + 0x46da8 ] Hardware Trace: 0 Target : { _trap_c + 0x0 } Source : { _exception_to_level5 + 0xb4 } 1 Target : { _exception_to_level5 + 0x0 } Source : { _ex_trap_c + 0x5c } 2 Target : { _ex_trap_c + 0x0 } Source : { _trap + 0x28 } 3 Target : { _trap + 0x0 } Source : [ /usr/lib/libasound.so.2 + 0x46da6 ] 4 Target : [ /usr/lib/libasound.so.2 + 0x46d9a ] Source : [ /usr/lib/libasound.so.2 + 0x46b54 ] 5 Target : [ /usr/lib/libasound.so.2 + 0x46b46 ] Source : [ /usr/lib/libasound.so.2 + 0x46b12 ] 6 Target : [ /usr/lib/libasound.so.2 + 0x46aec ] Source : [ /usr/lib/libasound.so.2 + 0x4d16a ] 7 Target : [ /usr/lib/libasound.so.2 + 0x4d166 ] Source : [ /usr/lib/libasound.so.2 + 0x4d17e ] 8 Target : [ /usr/lib/libasound.so.2 + 0x4d17c ] Source : [ /usr/lib/libasound.so.2 + 0x4d0b2 ] 9 Target : [ /usr/lib/libasound.so.2 + 0x4d09c ] Source : [ /usr/lib/libasound.so.2 + 0x278ec ] 10 Target : [ /usr/lib/libasound.so.2 + 0x278e4 ] Source : [ /usr/lib/libasound.so.2 + 0x46ae8 ] 11 Target : [ /usr/lib/libasound.so.2 + 0x46a74 ] Source : [ /usr/lib/libasound.so.2 + 0x28602 ] 12 Target : [ /usr/lib/libasound.so.2 + 0x285fa ] Source : [ /usr/lib/libasound.so.2 + 0x46eac ] 13 Target : [ /usr/lib/libasound.so.2 + 0x46e94 ] Source : [ /usr/lib/libasound.so.2 + 0x46e8a ] 14 Target : [ /usr/lib/libasound.so.2 + 0x46e88 ] Source : [ /usr/lib/libasound.so.2 + 0x46e38 ] 15 Target : [ /usr/lib/libasound.so.2 + 0x46e0e ] Source : [ /usr/lib/libasound.so.2 + 0x4d16a ]
Then I modified the driver ,set the ADC to 16bit mode and set hw->formats= SNDRV_PCM_FMTBIT_S16_LE no crash any more.
Any idea is appreciated. Thanks a lot in advance!
Cliff _________________________________________________________________ 天凉了,添衣了,心动了,“七件”了 http://get.live.cn