[#3811] On BF537-STAMP with AD1836, it fails to record wav audio with particular settings by alsa lib tool
Submitted By: Vivi Li
Open Date
2008-01-03 22:56:10 Close Date
2008-02-18 05:04:40
Priority:
Medium Assignee:
Cliff Cai
Status:
Closed Fixed In Release:
N/A
Found In Release:
N/A Release:
Category:
N/A Board:
N/A
Processor:
N/A Silicon Revision:
Is this bug repeatable?:
Yes Resolution:
Fixed
Uboot version or rev.:
Toolchain version or rev.:
toolchain-gcc4.1-2008_Jan_01
App binary format:
N/A
Summary: On BF537-STAMP with AD1836, it fails to record wav audio with particular settings by alsa lib tool
Details:
On BF537-STAMP with AD1836, using alsa lib tool to record a wav stereo audio with 8k sample rate and U8 format, it will fail. Recording with other format and sample rate is OK. Config file is attached.
Below is the log:
## Starting application at 0x0017a000 ...
Linux version 2.6.22.15-ADI-2007R2-pre-svn4075 (test@Linux165-ViviLi) (gcc version 4.1.2 (ADI svn)) #330 Thu Jan 3 19:43:41 8
Hardware Trace Active and Enabled
Warning: limiting memory to 56MB due to hardware anomaly 05000263
Blackfin support (C) 2004-2007 Analog Devices, Inc.
Compiled for ADSP-BF537 Rev 0.2
Blackfin Linux support by http://blackfin.uclinux.org/
Processor Speed: 500 MHz core clock and 100 MHz System Clock
Board Memory: 64MB
Kernel Managed Memory: 64MB
Memory map:
text = 0x00001000-0x00117800
rodata = 0x00118000-0x0016629c
data = 0x00167000-0x0017a000
stack = 0x00168000-0x0016a000
init = 0x0017a000-0x00495000
bss = 0x00495000-0x004a4ab0
available = 0x004a4ab0-0x037ff000
DMA Zone = 0x03f00000-0x04000000
Instruction Cache Enabled
Data Cache Enabled (write-through)
Built 1 zonelists. Total pages: 14224
Kernel command line: root=/dev/mtdblock0 rw ip=10.100.4.50:10.100.4.174:10.99.22.174:255.255.255.0:BF537:eth0:off
Configuring Blackfin Priority Driven Interrupts
PID hash table entries: 256 (order: 8, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Physical pages: 37ff
Memory available: 51948k/64100k RAM, (3180k init code, 1114k kernel code, 62k data, 1024k dma)
Blackfin Scratchpad data SRAM: 4 KB
Blackfin Data A SRAM: 16 KB (15 KB free)
Blackfin Data B SRAM: 16 KB (16 KB free)
Blackfin Instruction SRAM: 48 KB (39 KB free)
Security Framework v1.0.0 initialized
Mount-cache hash table entries: 512
NET: Registered protocol family 16
Blackfin GPIO Controller
Blackfin DMA Controller
stamp_init(): registering device resources
Generic PHY: Registered new driver
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler cfq registered
Dynamic Power Management Controller Driver v0.1: major=10, minor = 254
bfin-wdt: initialized: timeout=20 sec (nowayout=0)
Serial: Blackfin serial driver
bfin-uart.1: ttyBF0 at MMIO 0xffc00400 (irq = 18) is a BFIN-UART
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
SMSC LAN83C185: Registered new driver
bfin_mac_mdio: probed
bfin_mac: attached PHY driver [SMSC LAN83C185] (mii_bus:phy_addr=0:01, irq=-1, mdc_clk=2500000Hz(mdc_div=19)@sclk=100MHz)
bfin_mac: Version 1.1, Blackfin BF53[67] BF527 on-chip Ethernet MAC driver
bfin-spi bfin-spi.0: Blackfin BF5xx on-chip SPI Contoller Driver, Version 1.0, regs_base@ffc00500, dma channel@7
rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0
Advanced Linux Sound Architecture Driver Version 1.0.12rc1 (Thu Jun 22 13:55:50 2006 UTC).
dma_alloc_init: dma_page @ 0x031c2000 - 256 pages at 0x03f00000
ALSA device list:
#0: ADI ad1836 at PF4 SPORT0 rx/tx dma 3/4 err irq 45
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
rtc-bfin rtc-bfin: setting the system clock to 1970-01-01 01:29:21 (5361)
IP-Config: Gateway not on directly connected network.
Freeing unused kernel memory: 3180k freed
_____________________________________
a8888b. / Welcome to the uClinux distribution \
d888888b. / _ _ \
8P"YP"Y88 / | | |_| __ __ (TM) |
8|o||o|88 _____/ | | _ ____ _ _ \ \/ / |
8' .88 \ | | | | _ \| | | | \ / |
8`._.' Y8. \ | |__ | | | | | |_| | / \ |
d/ `8b. \ \____||_|_| |_|\____|/_/\_\ |
dP . Y8b. \ For embedded processors including |
d8:' " `::88b \ the Analog Devices Blackfin /
d8" 'Y88b \___________________________________/
:8P ' :888
8a. : _a88P For further information, check out:
._/"Yaa_: .| 88P| - http://blackfin.uclinux.org/
\ YP" `| 8P `. - http://docs.blackfin.uclinux.org/
/ \.___.d| .' - http://www.uclinux.org/
`--..__)8888P`._.' jgs/a:f - http://www.analog.com/blackfin
Have a lot of fun...
BusyBox v1.4.1 (2008-01-03 19:39:37 CST) Built-in shell (msh)
Enter 'help' for a list of built-in commands.
root:~> arecord -t wav -c 2 -f U8 -r 8000 -d 5 wav
Recording WAVE 'wav' : Unsigned 8 bit, Rate 8000 Hz, Stereo
Data access misaligned address violation
- Attempted misaligned data memory or data cache access.
Defered Exception context
CURRENT PROCESS:
COMM=arecord PID=114
TEXT = 0x033c0000-0x033cb900 DATA = 0x037ae900-0x037af504
BSS = 0x037af504-0x033e0000 USER-STACK = 0x033ffe70
return address: [0x00246da8]; contents of:
0x00246d80: 9b28 e5a0 0001 e6a8 0001 e5a0 0002 e6a8
0x00246d90: 0002 5b1c 5b45 6000 2f67 b9e3 0c03 1b63
0x00246da0: b9ea e0b2 2005 9120 [9328] 5b1c 5b45 6000
0x00246db0: 2f5b 9969 544c 9b29 50b2 5641 6040 0802
SEQUENCER STATUS:
SEQSTAT: 00002024 IPEND: 0030 SYSCFG: 0006
HWERRCAUSE: 0x0
EXCAUSE : 0x24
RETE: <0x00000000> /* Maybe null pointer? */
RETN: <0x03796000> /* unknown address */
RETX: <0x00246da8> [ /usr/lib/libasound.so.2 + 0x46da8 ]
RETS: <0x00246aec> [ /usr/lib/libasound.so.2 + 0x46aec ]
PC : <0x00246da8> [ /usr/lib/libasound.so.2 + 0x46da8 ]
DCPLB_FAULT_ADDR: <0x003302ac> [ arecord + 0x2ac ]
ICPLB_FAULT_ADDR: <0x00246da8> [ /usr/lib/libasound.so.2 + 0x46da8 ]
PROCESSOR STATE:
R0 : fb4d0a00 R1 : 00000004 R2 : 003302ae R3 : 00000800
R4 : 0032a744 R5 : 0032a704 R6 : 033d63b8 R7 : 00000020
P0 : 00000004 P1 : 00246b58 P2 : 00000800 P3 : 00000008
P4 : 00340004 P5 : 003302ae FP : 033fda04 SP : 03795f24
LB0: 0030f0c5 LT0: 0030f0b8 LC0: 00000000
LB1: 00246dad LT1: 00246da6 LC1: 00000800
B0 : 00000000 L0 : 00000000 M0 : 00000000 I0 : 0032c802
B1 : 00000000 L1 : 00000000 M1 : 00000000 I1 : 00000000
B2 : 00000000 L2 : 00000000 M2 : 00000000 I2 : 00000000
B3 : 00000000 L3 : 00000000 M3 : 00000000 I3 : 033fd7a8
A0.w: 00000000 A0.x: 00000000 A1.w: 00000000 A1.x: 00000000
USP : 033fd9e0 ASTAT: 02003004
Hardware Trace:
0 Target : <0x000047dc> { _trap_c + 0x0 }
Source : <0xffa00ad4> { _exception_to_level5 + 0xb4 }
1 Target : <0xffa00a20> { _exception_to_level5 + 0x0 }
Source : <0xffa00978> { _ex_trap_c + 0x5c }
2 Target : <0xffa0091c> { _ex_trap_c + 0x0 }
Source : <0xffa00b74> { _trap + 0x28 }
3 Target : <0xffa00b4c> { _trap + 0x0 }
Source : <0x00246da6> [ /usr/lib/libasound.so.2 + 0x46da6 ]
4 Target : <0x00246d9a> [ /usr/lib/libasound.so.2 + 0x46d9a ]
Source : <0x00246b54> [ /usr/lib/libasound.so.2 + 0x46b54 ]
5 Target : <0x00246b46> [ /usr/lib/libasound.so.2 + 0x46b46 ]
Source : <0x00246b12> [ /usr/lib/libasound.so.2 + 0x46b12 ]
6 Target : <0x00246aec> [ /usr/lib/libasound.so.2 + 0x46aec ]
Source : <0x0024d16a> [ /usr/lib/libasound.so.2 + 0x4d16a ]
7 Target : <0x0024d166> [ /usr/lib/libasound.so.2 + 0x4d166 ]
Source : <0x0024d17e> [ /usr/lib/libasound.so.2 + 0x4d17e ]
8 Target : <0x0024d17c> [ /usr/lib/libasound.so.2 + 0x4d17c ]
Source : <0x0024d0b2> [ /usr/lib/libasound.so.2 + 0x4d0b2 ]
9 Target : <0x0024d09c> [ /usr/lib/libasound.so.2 + 0x4d09c ]
Source : <0x002278ec> [ /usr/lib/libasound.so.2 + 0x278ec ]
10 Target : <0x002278e4> [ /usr/lib/libasound.so.2 + 0x278e4 ]
Source : <0x00246ae8> [ /usr/lib/libasound.so.2 + 0x46ae8 ]
11 Target : <0x00246a74> [ /usr/lib/libasound.so.2 + 0x46a74 ]
Source : <0x00228602> [ /usr/lib/libasound.so.2 + 0x28602 ]
12 Target : <0x002285fa> [ /usr/lib/libasound.so.2 + 0x285fa ]
Source : <0x00246eac> [ /usr/lib/libasound.so.2 + 0x46eac ]
13 Target : <0x00246e94> [ /usr/lib/libasound.so.2 + 0x46e94 ]
Source : <0x00246e8a> [ /usr/lib/libasound.so.2 + 0x46e8a ]
14 Target : <0x00246e88> [ /usr/lib/libasound.so.2 + 0x46e88 ]
Source : <0x00246e38> [ /usr/lib/libasound.so.2 + 0x46e38 ]
15 Target : <0x00246e0e> [ /usr/lib/libasound.so.2 + 0x46e0e ]
Source : <0x0024d16a> [ /usr/lib/libasound.so.2 + 0x4d16a ]
Stack from 03795f04:
00000000 ffa00ad8 0016c788 0016c788 0016c784 00000000 03785ba8 0040d058
00246da8 00000030 00002024 00000000 03796000 00246da8 00246da8 00246aec
fb4d0a00 02003004 00246dad 0030f0c5 00246da6 0030f0b8 00000800 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
033fd7a8 00000000 00000000 0032c802 033fd9e0 033fda04 003302ae 00340004
Call Trace:
Bus error
root:~>
Follow-ups
--- Cliff Cai 2008-01-22 05:39:25
It can be seen from the log that arecord crashs in libasound.so,
reason is :Data access misaligned address violation
- Attempted misaligned data memory or data cache access.
but there is no such problem on AD1981.I modified the driver to let AD1836 run
on 16 bit mode as AD1981,no crash any more.
--- Cliff Cai 2008-02-01 03:24:56
use fixed period number to avoid memory address misaligned.
--- Vivi Li 2008-02-18 05:04:40
OK. Close it. Thanks!
Files
Changes
Commits
Dependencies
Duplicates
Associations
Tags
File Name File Type File Size Posted By
config.ad1836 text/plain 28485 Vivi Li