[#5351] Wake up from mem in bf548-ezkit, audio apps fail to work
Submitted By: Vivi Li
Open Date
2009-07-14 00:23:36 Close Date
2009-07-29 03:31:17
Priority:
Medium High Assignee:
Cliff Cai
Status:
Closed Fixed In Release:
N/A
Found In Release:
N/A Release:
Category:
Drivers Board:
EZKIT Lite
Processor:
BF548 Silicon Revision:
Is this bug repeatable?:
Yes Resolution:
Fixed
Uboot version or rev.:
Toolchain version or rev.:
gcc4.1_2009r1-rc9
App binary format:
N/A
Summary: Wake up from mem in bf548-ezkit, audio apps fail to work
Details:
In latest branch 09r1, wake up from mem in bf548-ezkit or bf537-stamp with ad1981b, oss and alsa applications fail to work.
--
Linux version 2.6.28.10-ADI-2009R1-svn6972 (test@uclinux61-bf548-std) (gcc version 4.1.2 (ADI svn)) #40 Sun Jul 12 20:43:33 GMT 2009^M
bootconsole [early_shadow0] enabled^M
bootconsole [early_BFuart0] enabled^M
early printk enabled on early_BFuart0^M
Board Memory: 64MB^M
Kernel Managed Memory: 64MB^M
Memory map:^M
fixedcode = 0x00000400-0x00000490^M
text = 0x00001000-0x00177280^M
rodata = 0x00177280-0x001f6368^M
bss = 0x001f7000-0x0020ac08^M
data = 0x0020ac08-0x00222000^M
stack = 0x00220000-0x00222000^M
init = 0x00222000-0x00a3e000^M
available = 0x00a3e000-0x03dff000^M
DMA Zone = 0x03e00000-0x04000000^M
Hardware Trace Active and Enabled^M
Boot Mode: 1^M
Reset caused by Software reset^M
Blackfin support (C) 2004-2009 Analog Devices, Inc.^M
Compiled for ADSP-BF548 Rev 0.2^M
Blackfin Linux support by http://blackfin.uclinux.org/^M
Processor Speed: 525 MHz core clock and 131 MHz System Clock^M
NOMPU: setting up cplb tables^M
Instruction Cache Enabled for CPU0^M
Data Cache Enabled for CPU0 (write-back)^M
Data Cache (L2 SRAM) Enabled (write-back)^M
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 15747^M
Kernel command line: root=/dev/mtdblock0 rw earlyprintk=serial,uart0,57600 ip=10.100.4.50:10.100.4.174:192.168.0.1:255.255.255.0:bf548-ezkit:eth0:off^M
Configuring Blackfin Priority Driven Interrupts^M
PID hash table entries: 256 (order: 8, 1024 bytes)^M
console handover:boot [early_BFuart0] boot [early_shadow0] -> real [ttyBF0]^M
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)^M
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)^M
Memory available: 52428k/65536k RAM, (8304k init code, 1496k kernel code, 684k data, 2048k dma, 572k reserved)^M
Calibrating delay loop... 1046.52 BogoMIPS (lpj=2093056)^M
Security Framework initialized^M
Mount-cache hash table entries: 512^M
Blackfin Scratchpad data SRAM: 4 KB^M
Blackfin L1 Data A SRAM: 16 KB (15 KB free)^M
Blackfin L1 Data B SRAM: 16 KB (16 KB free)^M
Blackfin L1 Instruction SRAM: 48 KB (42 KB free)^M
Blackfin L2 SRAM: 128 KB (128 KB free)^M
net_namespace: 288 bytes^M
NET: Registered protocol family 16^M
Blackfin DMA Controller^M
ezkit_init(): registering device resources^M
SCSI subsystem initialized^M
NET: Registered protocol family 2^M
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)^M
TCP established hash table entries: 2048 (order: 2, 16384 bytes)^M
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)^M
TCP: Hash tables configured (established 2048 bind 2048)^M
TCP reno registered^M
NET: Registered protocol family 1^M
msgmni has been set to 102^M
io scheduler noop registered^M
io scheduler anticipatory registered (default)^M
io scheduler cfq registered^M
bfin-otp: initialized^M
Serial: Blackfin serial driver^M
bfin-uart.1: ttyBF0 at MMIO 0xffc02000 (irq = 48) is a BFIN-UART^M
brd: module loaded^M
smsc911x: Driver version 2007-07-13.^M
eth0: SMSC911x MAC Address: 00:e0:22:fe:bf:4e^M
Driver 'sd' needs updating - please use bus_type methods^M
register bfin atapi driver^M
scsi0 : pata-bf54x^M
ata1: PATA max UDMA/66 irq 68^M
ata1.00: ATA-6: TOSHIBA MK4032GAX, AD101A, max UDMA/100^M
ata1.00: 78140160 sectors, multi 16: LBA48 ^M
ata1.00: configured for UDMA/66^M
blk_queue_max_hw_segments: set to minimum 1^M
scsi 0:0:0:0: Direct-Access ATA TOSHIBA MK4032GA AD10 PQ: 0 ANSI: 5^M
sd 0:0:0:0: [sda] 78140160 512-byte hardware sectors: (40.0 GB/37.2 GiB)^M
sd 0:0:0:0: [sda] Write Protect is off^M
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA^M
sd 0:0:0:0: [sda] 78140160 512-byte hardware sectors: (40.0 GB/37.2 GiB)^M
sd 0:0:0:0: [sda] Write Protect is off^M
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA^M
sda: sda1 sda2^M
sd 0:0:0:0: [sda] Attached SCSI disk^M
physmap platform flash device: 02000000 at 20000000^M
physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank^M
Intel/Sharp Extended Query Table at 0x010A^M
Intel/Sharp Extended Query Table at 0x010A^M
Intel/Sharp Extended Query Table at 0x010A^M
Intel/Sharp Extended Query Table at 0x010A^M
Intel/Sharp Extended Query Table at 0x010A^M
Using buffer write method^M
Using auto-unlock on power-up/resume^M
cfi_cmdset_0001: Erase suspend on write enabled^M
RedBoot partition parsing not available^M
Using physmap partition information^M
Creating 3 MTD partitions on "physmap-flash.0":^M
0x00000000-0x00040000 : "bootloader(nor)"^M
0x00040000-0x00440000 : "linux kernel(nor)"^M
0x00440000-0x01000000 : "file system(nor)"^M
BF5xx on-chip NAND FLash Controller Driver, Version 1.2 (c) 2007 Analog Devices, Inc.^M
bf5xx-nand bf5xx-nand.0: page_size=256, data_width=8, wr_dly=3, rd_dly=3^M
NAND device: Manufacturer ID: 0x20, Chip ID: 0xda (ST Micro NAND 256MiB 3,3V 8-bit)^M
Creating 2 MTD partitions on "NAND 256MiB 3,3V 8-bit":^M
0x00000000-0x00400000 : "linux kernel(nand)"^M
0x00400000-0x10000000 : "file system(nand)"^M
input: bf54x-keys as /devices/platform/bf54x-keys/input/input0^M
bf54x-keys: Blackfin BF54x Keypad registered IRQ 76^M
rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0^M
i2c /dev entries driver^M
i2c-bfin-twi i2c-bfin-twi.0: Blackfin BF5xx on-chip I2C TWI Contoller, regs_base@ffc00700^M
i2c-bfin-twi i2c-bfin-twi.1: Blackfin BF5xx on-chip I2C TWI Contoller, regs_base@ffc02200^M
bfin-wdt: initialized: timeout=20 sec (nowayout=0)^M
bfin-sdh bfin-sdh.0: unable to request DMA channel^M
bfin-sdh: probe of bfin-sdh.0 failed with error -16^M
Advanced Linux Sound Architecture Driver Version 1.0.18rc3.^M
ALSA device list:^M
No soundcards found.^M
TCP cubic registered^M
NET: Registered protocol family 17^M
rtc-bfin rtc-bfin: setting system clock to 2004-05-31 16:44:55 UTC (1086021895)^M
eth0: SMSC911x/921x identified at 0x24000000, IRQ: 175^M
eth0: link down^M
IP-Config: Gateway not on directly connected network.^M
Freeing unused kernel memory: 8304k freed^M
dma_alloc_init: dma_page @ 0x00a3b000 - 512 pages at 0x03e00000^M
eth0: link up, 100Mbps, full-duplex, lpa 0x41E1^M
_____________________________________^M
a8888b. / Welcome to the uClinux distribution \^M
d888888b. / _ _ \^M
8P"YP"Y88 / | | |_| __ __ (TM) |^M
8|o||o|88 _____/ | | _ ____ _ _ \ \/ / |^M
8' .88 \ | | | | _ \| | | | \ / |^M
8`._.' Y8. \ | |__ | | | | | |_| | / \ |^M
d/ `8b. \ \____||_|_| |_|\____|/_/\_\ |^M
dP . Y8b. \ For embedded processors including |^M
d8:' " `::88b \ the Analog Devices Blackfin /^M
d8" 'Y88b \___________________________________/^M
:8P ' :888^M
8a. : _a88P For further information, check out:^M
._/"Yaa_: .| 88P| - http://blackfin.uclinux.org/^M
\ YP" `| 8P `. - http://docs.blackfin.uclinux.org/^M
/ \.___.d| .' - http://www.uclinux.org/^M
`--..__)8888P`._.' jgs/a:f - http://www.analog.com/blackfin^M
^M
Have a lot of fun...^M
^M
^M
BusyBox v1.13.4 (2009-07-12 20:40:37 GMT) built-in shell (msh)^M
Enter 'help' for a list of built-in commands.^M
^M
root:/> version^M
kernel: Linux release 2.6.28.10-ADI-2009R1-svn6972, build #40 Sun Jul 12 20:43:33 GMT 2009^M
toolchain: bfin-linux-uclibc-gcc release gcc version 4.1.2 (ADI svn)^M
user-dist: release svn-8484, build #812 Sun Jul 12 20:42:13 GMT 2009^M
root:/>
root:/> modprobe snd-soc-core
ASoC version 0.13.2
root:/> modprobe snd-ad1980
dma rx:0 tx:1, err irq:10, regs:ffc00800
AD1980 SoC Audio Codec
asoc: AC97 <-> bf5xx-ac97 mapping ok
root:/> vrec -w -S -b 16 -s 48000 -t 5|vplay^M
Recording WAVE : 16 bit, Speed 48000 Hz Stereo ...
Playing WAVE : 16 bit, Speed 48000 Hz Stereo ...
root:/>
root:/> arecord -t wav -c 2 -f S16_LE -r 48000 -d 5 |aplay
Recording WAVE 'stdin' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
Playing WAVE 'stdin' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
root:/>
root:/> rtcwake -s 15 -m mem^M
wakeup from "mem" at Mon May 31 16:45:40 2004^M
PM: Syncing filesystems ... done.^M
Freezing user space processes ... (elapsed 0.00 seconds) done.^M
Freezing remaining freezable tasks ... (elapsed 0.00 seconds) done.^M
Suspending console(s) (use no_console_suspend to debug)^M
sd 0:0:0:0: [sda] Synchronizing SCSI cache^M
sd 0:0:0:0: [sda] Stopping disk^M
sd 0:0:0:0: [sda] Starting disk^M
ata1.00: configured for UDMA/66^M
sd 0:0:0:0: [sda] 78140160 512-byte hardware sectors: (40.0 GB/37.2 GiB)^M
sd 0:0:0:0: [sda] Write Protect is off^M
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA^M
sda: detected capacity change from 0 to 40007761920^M
soc-audio soc-audio: scheduling resume work^M
soc-audio soc-audio: starting resume work^M
soc-audio soc-audio: resume work completed^M
Restarting tasks ... done.^M
root:/>
root:/> vrec -w -S -b 16 -s 48000 -t 5|vplay^M
Recording WAVE : 16 bit, Speed 48000 Hz Stereo ...^M
Playing WAVE : 16 bit, Speed 48000 Hz Stereo ...^M
/dev/dsp: Input/output error
root:/>
root:/> arecord -t wav -c 2 -f S16_LE -r 48000 -d 10 |aplay
Recording WAVE 'stdin' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
Playing WAVE 'stdin' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
arecord: pcm_read:1349: read error: Input/output error
root:/>
--
Follow-ups
--- Vivi Li 2009-07-15 03:46:31
For ad1981b on bf537-stamp, it shows "Bad page state in process aplay"
after wake up from mem.
--
root:/> rtcwake -s 15 -m mem
wakeup from "mem" at Tue Jan 6 12:11:57 1970
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.00 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.00 seconds) done.
Suspending console(s) (use no_console_suspend to debug)
PHY: 0:01 - Link is Down
soc-audio soc-audio: scheduling resume work
soc-audio soc-audio: starting resume work
soc-audio soc-audio: resume work completed
Restarting tasks ... done.
PHY: 0:01 - Link is Up - 100/Full
root:/>
root:/> arecord -t wav -c 2 -f S16_LE -r 48000 -d 10 |aplay
Recording WAVE 'stdin' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
Playing WAVE 'stdin' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
arecord: pcm_read:1349: read error: Input/output error
Bad page state in process 'aplay'
page:00906840 flags:0x00004000 mapping:00000000 mapcount:-4194304 count:0
Trying to fix it up, but a reboot is needed
Backtrace:
Hardware Trace:
0 Target : <0x00004b24> { _dump_stack + 0x0 }
Source : <0x000329fa> { _bad_page + 0x4e } CALL pcrel
1 Target : <0x000329fa> { _bad_page + 0x4e }
Source : <0x000103ae> { _printk + 0x16 } RTS
2 Target : <0x000103aa> { _printk + 0x12 }
Source : <0x00010c4a> { _vprintk + 0x132 } RTS
3 Target : <0x00010c3e> { _vprintk + 0x126 }
Source : <0xffa00c32> { __common_int_entry + 0xda } RTI
4 Target : <0xffa00bd0> { __common_int_entry + 0x78 }
Source : <0xffa00a10> { _return_from_int + 0x58 } RTS
5 Target : <0xffa00a10> { _return_from_int + 0x58 }
Source : <0xffa009e6> { _return_from_int + 0x2e } IF !CC JUMP
6 Target : <0xffa009b8> { _return_from_int + 0x0 }
Source : <0xffa00bcc> { __common_int_entry + 0x74 } CALL pcrel
7 Target : <0xffa00bca> { __common_int_entry + 0x72 }
Source : <0xffa00336> { _asm_do_IRQ + 0x6a } RTS
8 Target : <0xffa0032e> { _asm_do_IRQ + 0x62 }
Source : <0x00014228> { __local_bh_enable + 0x40 } RTS
9 Target : <0x000141e8> { __local_bh_enable + 0x0 }
Source : <0x00014310> { ___do_softirq + 0x9c } JUMP.L
10 Target : <0x00014308> { ___do_softirq + 0x94 }
Source : <0x000142ec> { ___do_softirq + 0x78 } IF !CC JUMP
11 Target : <0x000142ce> { ___do_softirq + 0x5a }
Source : <0x0002e478> { _rcu_process_callbacks + 0x30 } RTS
12 Target : <0x0002e474> { _rcu_process_callbacks + 0x2c }
Source : <0x0002e3ac> { ___rcu_process_callbacks + 0x15c } RTS
13 Target : <0x0002e3a6> { ___rcu_process_callbacks + 0x156 }
Source : <0x0002e310> { ___rcu_process_callbacks + 0xc0 } IF !CC
JUMP
14 Target : <0x0002e30a> { ___rcu_process_callbacks + 0xba }
Source : <0x0002e3c2> { ___rcu_process_callbacks + 0x172 } IF CC
JUMP
15 Target : <0x0002e3be> { ___rcu_process_callbacks + 0x16e }
Source : <0x0002e2fc> { ___rcu_process_callbacks + 0xac } IF !CC
JUMP
Stack info:
SP: [0x00247dc4] <0x00247dc4> /* kernel dynamic memory */
FP: (0x00247dc4)
Memory from 0x00247dc0 to 00248000
00247dc0: 00000000 [00000000]<000329fe> 00906840 <00004000>
037db680 0000ffff ffffffff
00247de0: 00000008 <00004000> 00000000 ffc00000 00000000
<00032d2c> 00906840 000000c2
00247e00: 03250120 0350ccb0 00000000 002d2780 033341e0 033328d8 037db680
<0003a4f8>
00247e20: 00258e00 033341e0 033341e0 033341e0 ffffffc0 ffffffc0 002c9940
<0003a52a>
00247e40: 002c6740 <0003a530><0003a52a> 002c64c0 0000003f
00000000 00000001 <0000e79c>
00247e60:<0000e694> 033341e0 037db680 037db680 <0001134c>
00246000 <0001140a> 00000000
00247e80: 0000003f 03334214 00000000 00000006 00000000 <0003fe54>
037db680 <000126a2>
00247ea0:<000126ac> 00246000 00000001 002c9940 00246000 00000000
00000000 00000004
00247ec0:<000142ce><0002d78c> 0018a5fc 00000001 003a5dd0
00000006 0039fdb4 <00012d70>
00247ee0: 00012d64 00000001 002c9940 00000000 ffffe000 00000000 002c9940
00000000
00247f00:<ffa00884><ffa00a66><ffa00884> 002d3a30 003a5dd0
002d3ab8 00000003 002c9940
00247f20: 00000000 0088c250 00008000 00000000 00000000 00248000 0088c250
0088c250
00247f40:<008b1788><ffa00f00> 02003025 0047393d 0089f7cf
0047393c 0089f7ce 00000000
00247f60: 00000000 00000005 00000000 00000005 00000000 00000000 00000000
00000000
00247f80: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000
00247fa0: 00000000 00000000 00000000 002c9940 008b65b8 0039fda8 0039fdb4
002c9940
00247fc0: 002c9940 002c9940 002c8fa4 00000005 00000001 002c9354 00000001
00000000
00247fe0: 002c9940 00000003 00000000 00000000 00000000 00000000 00000001
00000006
00248000: 00000000
Return addresses in stack:
frame 1 : <0x000329fe> { _bad_page + 0x52 }
address : <0x00004000> { _show_regs + 0x280 }
address : <0x00004000> { _show_regs + 0x280 }
address : <0x00032d2c> { ___free_pages_ok + 0x26c }
address : <0x0003a4f8> { _put_vma + 0xd0 }
address : <0x0003a52a> { _exit_mmap + 0x2e }
address : <0x0003a530> { _exit_mmap + 0x34 }
address : <0x0003a52a> { _exit_mmap + 0x2e }
address : <0x0000e79c> { _free_task + 0x1c }
address : <0x0000e694> { _mmput + 0x40 }
address : <0x0001134c> { _exit_mm + 0x20 }
address : <0x0001140a> { _exit_mm + 0xde }
address : <0x0003fe54> { ___fput + 0x100 }
address : <0x000126a2> { _do_exit + 0xca }
address : <0x000126ac> { _do_exit + 0xd4 }
address : <0x000142ce> { ___do_softirq + 0x5a }
address : <0x0002d78c> { _handle_simple_irq + 0x74 }
address : <0x00012d70> { _complete_and_exit + 0x0 }
address : <0xffa00884> { _system_call + 0x68 }
address : <0xffa00a66> { _schedule_and_signal_from_int + 0x32 }
address : <0xffa00884> { _system_call + 0x68 }
address : <0x008b1788> [ /lib/libc.so.0 + 0x31788 ]
address : <0xffa00f00> { _evt_system_call + 0x64 }
root:/>
--
--- Cliff Cai 2009-07-16 21:38:06
A gpio is used to reset AD1980 on BF548-EZKIT,and this gpio will be cleared
during the suspend to memory/resume course,and causes the codec to be reset
again.So, from the power management point of view,it's not a good way to employ
a gpio to do the reset work.
Cliff
--- Mike Frysinger 2009-07-16 22:06:23
guess we should report this to the board guys
can it be worked around by putting a pull up/down on the line ?
--- Cliff Cai 2009-07-22 23:12:32
I just work around it by reconfiguring the codec after resume.
--- Cliff Cai 2009-07-28 23:18:48
fixed now,we should deal with the scenario that,suspending to memory may happen
while the driver haven't been put into use yet,in such case,the related
registers are all reset and needed to be restored.
Cliff
--- Vivi Li 2009-07-29 03:31:17
OK now. Close it.
Files
Changes
Commits
Dependencies
Duplicates
Associations
Tags
File Name File Type File Size Posted By
config.power application/octet-stream 36619 Vivi Li