안녕하세요. 이재훈입니다.
출장중 잠시 복귀해서 aESOP 3차보드 가지고놀기(^^) 를 하던중에...
Linux kernel 2.6.21을 aESOP 보드에 적용하고자 삽질을 하고 있습니다.
cross toolchain도 다시 업데이트하고.. 커널을 만지면서..
대략 완성된 부분은...
커널부팅, Serial, SMSC, FrameBuffer/LCD, 부팅로고, MTD, Yaffs, 기타등등..입니다. 지금 삽질을 하다가 딱 멈춘곳이 uda1341 오디오 부분입니다.
아시는 분들은 아시겠지만..
uda1341 오디오 부분의 정상동작을 위해서는..
1. DMA 부분
2. drivers/L3 디바이스 드라이버 부분
3. iis 부분
4. sound/oss/aesop 관련 파일들..
이런식으로 조합이 됩니다.
현재 2.6.13 커널을 분석하며 오디오 부분과 관련하여 2.6.21 커널로 변경을 하는중에 오디오쪽의 현상이 아래와 같습니다.
커널부팅시 로고를 살펴보면.. 아래와 같구요.
Linux version 2.6.21-kingseft-aesop (root@TechwinLinux) (gcc version 3.4.5) #63 PREEMPT Fri Jun 22 21:50:02 KST 2007
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0003177
Machine: aESOP-2440
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)
S3C244X: core 399.651 MHz, memory 133.217 MHz, peripheral 66.608 MHz
S3C24XX Clocks, (c) 2004 Simtec Electronics
CLOCK: Slow mode (2.116 MHz), fast, MPLL on, UPLL on
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
Built 1 zonelists. Total pages: 16256
Kernel command line: root=/dev/nfs rw nfsroot=192.168.1.2:/korea-dokdo/aesop3/small_2613 ip=192.168.1.100:192.168.1.2:192.168.1.1:255.255.255.0::eth0:off console=ttySAC0,115200n81 mtdparts=aesop-nor:512k(uboot),1m(kernel),-(extra)
irq: clearing pending ext status 00000200
irq: clearing subpending status 00000002
PID hash table entries: 256 (order: 8, 1024 bytes)
timer tcon=00500000, tcnt d8d2, tcfg 00000200,00000000, usec 0000170f
Console: colour dummy device 80x30
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 62000KB available (2416K code, 338K data, 108K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
S3C2410 Power Management, (c) 2004 Simtec Electronics
PM initialize
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C2440: Clock Support, DVS off
S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics
DMA channel 0 at c4800000, irq 33
DMA channel 1 at c4800040, irq 34
DMA channel 2 at c4800080, irq 35
DMA channel 3 at c48000c0, irq 36
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
NetWinder Floating Point Emulator V0.97 (double precision)
yaffs Jun 22 2007 21:48:08 Installing.
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
Console: switching to colour frame buffer device 120x45
fb0: s3c2410fb frame buffer device
l3_2440 0
l3_2440 1
l3_2440 2
GPIO L3 bus interface for S3C2440, installed
s3c2440-uart.0: s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2440
s3c2440-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2440
s3c2440-uart.2: s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2440
RAMDISK driver initialized: 8 RAM disks of 8192K size 1024 blocksize
loop: loaded (max 8 devices)
nbd: registered device at major 43
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
PPP MPPE Compression module registered
NET: Registered protocol family 24
smc91x.c: v1.1, sep 22 2004 by Nicolas Pitre <
[email protected]>
eth0: SMC91C11xFD (rev 2) at c4802300 IRQ 53
eth0: Ethernet addr: 08:00:3e:26:0a:5b
AESOP NOR-Flash Driver, (c) 2006 AESOP Embedded
aesop-nor: Found 1 x16 devices at 0x0 in 16-bit bank
Amd/Fujitsu Extended Query Table at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
3 cmdlinepart partitions found on MTD device aesop-nor
Creating 3 MTD partitions on "aesop-nor":
0x00000000-0x00080000 : "uboot"
0x00080000-0x00180000 : "kernel"
0x00180000-0x00200000 : "extra"
Generic platform RAM MTD, (c) 2004 Simtec Electronics
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c2440-nand s3c2440-nand: Tacls=2, 15ns Twrph0=8 60ns, Twrph1=4 30ns
NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V 8-bit)
Scanning device for bad blocks
Creating 3 MTD partitions on "NAND 64MiB 3,3V 8-bit":
0x00040000-0x02800000 : "FileSystem Partition"
0x02800000-0x03c00000 : "UserData Partition"
0x03c00000-0x04000000 : "Backup Partition"
mice: PS/2 mouse device common for all mice
godori: AESOP2440 SOUND driver register
godori: AESOP2440 SOUND driver.........probe
ao_dcon = 0x00000000
audio_init_dma: dma request done audio out channel
mapped channel 1 to 1
ai_dcon = 0x00000000
audio_init_dma: dma request done audio in channel
AESOP2440 UDA1341 audio driver initialized
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
eth0: link down
IP-Config: Complete:
device=eth0, addr=192.168.1.100, mask=255.255.255.0, gw=192.168.1.1,
host=192.168.1.100, domain=, nis-domain=(none),
bootserver=192.168.1.2, rootserver=192.168.1.2, rootpath=
Looking up port of RPC 100003/2 on 192.168.1.2
eth0: link up, 100Mbps, full-duplex, lpa 0x43E1
Looking up port of RPC 100005/1 on 192.168.1.2
VFS: Mounted root (nfs filesystem).
Freeing init memory: 108K
INIT: version 2.86 booting
Initializing udev dynamic device directory.
mount: Mounting /dev/root on / failed: No such file or directory
INIT: Entering runlevel: 3
[: 0: unknown operand
AESOP Linux
/) /)
(='.'=) <- godori
login[774]: root login on `tts/0'
-sh: sh_eraseall: not found
root@godori:~#
위의 메시지와 같이..
DMA부분, L3 드라이버 부분, 그리고 UDA1341 오디오 Probe 부분까지 로그메시지는 잘 나오는 것 같습니다.
정작 문제는
madplayer, mplayer 등으로 구동을 시키면
로그 메시지가 아래와 같이 나오네요.
root@godori:~# ./madplay 01.mp3
MPEG Audio Decoder 0.15.2 (beta) - Copyright (C) 2000-2004 Robert Leslie et al.
audio_open
requested sample_rate = 44100
calculated (5-1) freq = 34692, error = 9408
calculated (4-1) freq = 43365, error = 735
calculated (3-1) freq = 57820, error = 13720
selected prescale value = 3, freq = 43365, error = 735
requested sample_rate = 44100
calculated (5-1) freq = 34692, error = 9408
calculated (4-1) freq = 43365, error = 735
calculated (3-1) freq = 57820, error = 13720
selected prescale value = 3, freq = 43365, error = 735
audio_sync
requested = 44100, limit = 173460
requested sample_rate = 44100
calculated (5-1) freq = 34692, error = 9408
calculated (4-1) freq = 43365, error = 735
calculated (3-1) freq = 57820, error = 13720
selected prescale value = 3, freq = 43365, error = 735
return audio_rate = 44100
audio_write : start count=4608
buf 0: start ffc41000 dma 866779136
buf 1: start ffc45000 dma 866795520
buf 2: start ffc49000 dma 866811904
buf 3: start ffc4d000 dma 866828288
buf 4: start ffc51000 dma 866844672
buf 5: start ffc55000 dma 866861056
buf 6: start ffc59000 dma 866877440
buf 7: start ffc5d000 dma 866893824
write 4608 to 0
audio_write : end count=4608
audio_write : start count=4608
write 4608 to 0
audio_write : end count=4608
audio_write : start count=4608
write 4608 to 0
audio_write : end count=4608
audio_write : start count=4608
write 2560 to 0
write 2048 to 1
audio_write : end count=4608
audio_write : start count=4608
write 4608 to 1
audio_write : end count=4608
audio_write : start count=4608
write 4608 to 1
audio_write : end count=4608
audio_write : start count=4608
write 4608 to 1
audio_write : end count=4608
audio_write : start count=4608
write 512 to 1
write 4096 to 2
audio_write : end count=4608
audio_write : start count=4608
write 4608 to 2
audio_write : end count=4608
audio_write : start count=4608
write 4608 to 2
audio_write : end count=4608
audio_write : start count=4608
write 3072 to 2
write 1536 to 3
audio_write : end count=4608
audio_write : start count=4608
write 4608 to 3
audio_write : end count=4608
audio_write : start count=4608
write 4608 to 3
audio_write : end count=4608
audio_write : start count=4608
write 4608 to 3
audio_write : end count=4608
audio_write : start count=4608
write 1024 to 3
write 3584 to 4
audio_write : end count=4608
audio_write : start count=4608
write 4608 to 4
audio_write : end count=4608
audio_write : start count=4608
write 4608 to 4
audio_write : end count=4608
audio_write : start count=4608
write 3584 to 4
write 1024 to 5
audio_write : end count=4608
audio_write : start count=4608
write 4608 to 5
audio_write : end count=4608
audio_write : start count=4608
write 4608 to 5
audio_write : end count=4608
audio_write : start count=4608
write 4608 to 5
audio_write : end count=4608
audio_write : start count=4608
write 1536 to 5
write 3072 to 6
audio_write : end count=4608
audio_write : start count=4608
write 4608 to 6
audio_write : end count=4608
audio_write : start count=4608
write 4608 to 6
audio_write : end count=4608
audio_write : start count=4608
write 4096 to 6
write 512 to 7
audio_write : end count=4608
audio_write : start count=4608
write 4608 to 7
audio_write : end count=4608
audio_write : start count=4608
write 4608 to 7
audio_write : end count=4608
audio_write : start count=4608
write 4608 to 7
audio_write : end count=4608
audio_write : start count=4608
write 2048 to 7
여기서 멈춰버립니다.
2.6.13 커널로 동일하게 돌리면 위의 메시지중 마지막인
audio_write : start count=4608
write 2048 to 7
다음에 다시 write xxx to 0 으로 가고 계속 반복되거든요.. ㅜ.ㅜ
이상태에서 Ctrl-Z 로 멈추고 메시지를 보면..
714 root SW< [rpciod/0]
774 root 932 S -sh
776 root 888 T ./madplay 01.mp3
780 root 736 R ps
root@godori:~# kill -9 776
root@godori:~# audio_release
audio_sync
audio_dmaout_done_callback: tranter error
audio_dmaout_done_callback: tranter error
audio_dmaout_done_callback: tranter error
audio_dmaout_done_callback: tranter error
audio_dmaout_done_callback: tranter error
audio_dmaout_done_callback: tranter error
audio_dmaout_done_callback: tranter error
audio_dmaout_done_callback: tranter error
[1] + Killed ./madplay 01.mp3
root@godori:~#
이와같이 audio_dmaout_done_callback 메시지를 뿌리는군요...
지금 그래서 의심을 하는 부분이
DMA, L3 Driver, Sound/OSS/aesop 오디오부분
이 세부분을 보고 있답니다. ㅜ.ㅜ
----------------------------------------
[진짜질문]
혹시 2.6.21 이후 커널로 aESOP 보드 포팅같이 해보실 분 있으신가요? 오디오쪽 같이 잡았으면 해서요... 안되면 현철님 붙잡고 늘어지는.... (^^)
다 완성되면 aESOP 보드 가지고놀기 2탄.. aESOP 3차보드... 하나 배포해야겠지요 ^^
그냥 질문겸 잡담겸 푸념이었습니다.
세팅이 안되는 증상이네요...
uda1341에서 받아들일 수 없는 상태이기 때문에, dma 내부버퍼까지만
데이터가 들어가고 더이상 진행되지 않는 겁니다.
즉, dma가 안되는 것 때문에 멈춘겁니다.