📄 peizhi2.6.txt
字号:
最后进行内核编译。
#make
然后将镜像下载到开发板中去,启动信息如下:
VIVI version 0.1.4 (root@embed4) (gcc version 2.95.3 20010315 (release)) #0.1.4 ?. 3.. 29 17:27:26 CST 2005GDLC
MMU table base address = 0x33DFC000
Succeed memory mapping.
NAND device: Manufacture ID: 0xec, Chip ID: 0x76 (Samsung K9D1208V0M)
Could not found stored vivi parameters. Use default vivi parameters.
Press Return to start the LINUX now, any other key for vivi
Copy linux kernel from 0x00030000 to 0x30008000, size = 0x00100000 ... done
zImage magic = 0x016f2818
Setup linux parameters at 0x30000100
linux command line is: "console=ttySAC0 root=/dev/nfs nfsroot=192.168.0.1:/friendly-arm/root ip=192.168.0.69:192.168.0.1:192"MACH_TYPE = 193
NOW, Booting Linux......
Uncompressing Linux........................................................... done, booting the kernel.
Linux version 2.6.11.1 (root@embed4) (gcc version 3.3.4) #172 Tue Apr 26 17:56:38 CST 2005
CPU: ARM920Tid(wb) [41129200] revision 0 (ARMv4T)
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
Machine: SMDK2410
ATAG_INITRD is deprecated; please update your bootloader.
Memory policy: ECC disabled, Data cache writeback
CPU S3C2410A (id 0x32410002)
S3C2410: core 200.000 MHz, memory 100.000 MHz, peripheral 50.000 MHz
S3C2410 Clock control, (c) 2004 Simtec Electronics
Built 1 zonelists
Kernel command line: console=ttySAC0 root=/dev/nfs nfsroot=192.168.0.1:/friendly-arm/root ip=192.168.0.69:192.168.0.1:192.16firq: clearing subpending status 00000002
PID hash table entries: 512 (order: 9, 8192 bytes)
timer tcon=00000000, tcnt a2c1, tcfg 00000200,00000000, usec 00001eb8
Console: colour dummy device 80x30
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 64MB = 64MB total
Memory: 62976KB available (1483K code, 269K data, 96K init)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
S3C2410: Initialising architecture
S3C2410 DMA Driver, (c) 2003-2004 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
devfs: 2004-01-31 Richard Gooch (rgooch@atnf.csiro.au)
devfs: devfs_debug: 0x0
devfs: boot_options: 0x1
leds initialized
s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2410
s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2410
s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2410
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
Cirrus Logic CS8900A driver for Linux (Modified for SMDK2410)
eth0: CS8900A rev E at 0xe0000300 irq=53, no eeprom , addr: 08: 0:3E:26:0A:5B
S3C2410 NAND Driver, (c) 2004 Simtec Electronics
s3c2410-nand: mapped registers at c4880000
80 ns is too big for current clock rate 100000000
80 ns is too big for current clock rate 100000000
80 ns is too big for current clock rate 100000000
s3c2410-nand: timing: Tacls 419ns, Twrph0 419ns, Twrph1 419ns
NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V 8-bit)
Scanning device for bad blocks
mice: PS/2 mouse device common for all mice
UDA1341 audio driver initialized
NET: Registered protocol family 2
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
NET: Registered protocol family 1
IP-Config: Complete:
device=eth0, addr=192.168.0.69, mask=255.255.255.0, gw=192.168.0.1,
host=matrix4, domain=, nis-domain=arm9.net,
bootserver=192.168.0.1, rootserver=192.168.0.1, rootpath=
Looking up port of RPC 100003/2 on 192.168.0.1
Looking up port of RPC 100005/1 on 192.168.0.1
VFS: Mounted root (nfs filesystem).
Mounted devfs on /dev
Freeing init memory: 96K
init started: BusyBox v0.60.5 (2003.09.05-09:25+0000) multi-call binary
mount: Mounting none on /root failed: Invalid argument
mount: Mounting none on /tmp failed: Invalid argument
mount: Mounting none on /var failed: Invalid argument
[01/Jan/1970:00:00:05 +0000] boa: server version Boa/0.94.13
[01/Jan/1970:00:00:05 +0000] boa: server built Feb 28 2004 at 21:47:23.
[01/Jan/1970:00:00:05 +0000] boa: starting server pid=28, port 80
Please press Enter to activate this console.
可以看到UDA1341 audio driver initialized的信息,说明声卡已经初始化。进入终端之后,查看设备文件名:
[root@fa /]# ls -al /dev/sound/*
crw------- 1 root root 14, 3 Jan 1 00:00 /dev/sound/dsp
crw------- 1 root root 14, 0 Jan 1 00:00 /dev/sound/mixer
由此可见,声卡已经成功驱动,要测试驱动程序可以用cat 命令(如:cat ALSNDMGR.WAV > dev/sound/dsp),也可以用madplay播放mp3文件。
第二部分 声卡UDA1341TS驱动程序播放部分的移植
1、UDA1341TS录音调试记录
修改sound/oss/s3c2410-uda1341.c 文件中的audio_init_dam函数
对应于dma_ch=1的情况
s3c2410_dma_config(s->dma_ch,2,0xa2900000);原来为0xa0900000(设置DCON寄存器,对应位[26:24]),查看S3C2410数据手册(8-10)中的对应位定义,DCON1[26:24]应为010(I2SSDI)、而原来设置为000(UART1)
2、测试:
(1)、从网上http://www.eca.cx/ecasound/download.php下载ecasound-2.4.3.tar.gz
(2)、tar zxf ecasound-2.4.3.tar.gz
(3)、cd ecasound-2.4.3
(4)、配置:
CC=/opt/crosstool/gcc-3.3.4-glibc-2.3.3/arm-s3c2410-linux-gnu/bin/arm-s3c2410-linux-gnu-gcc CXX=/opt/crosstool/gcc-3.3.4-glibc-2.3.3/arm-s3c2410-linux-gnu/bin/arm-s3c2410-linux-gnu-g++ ./configure --enable-all-static --disable-ncurses --host=arm-s3c2410-linux-gnu --target=arm-s3c2410-linux-gnu --prefix=/friendly-arm/rootfs_netserv/usr/local
(5)、编译
make
(6)、安装
sudo make install
(7)、cd /friemdly-arm/rootfs_netserv/usr/local/bin
(8)、./ecasound -i:/dev/sound/dsp -o /tmp/somefile.wav -c
********************************************************************************
* ecasound v2.4.3 (C) 1997-2005 Kai Vehmanen and others
********************************************************************************
(eca-resources) WARNING: Global resource file '/friendly-arm/rootfs_netserv/usr/local/share/ecasound/ecasoundrc' not availab![* Session created *]
[* Chainsetup created (cmdline) *]
(eca-resources) WARNING: Global resource file '/friendly-arm/rootfs_netserv/usr/local/share/ecasound/ecasoundrc' not availab!(eca-chainsetup) WARNING: Unable to read global resources. May result in incorrect behaviour.
ecasound ('h' for help)> h
(eca-iamode-parser)
-------------------------------------------------------------------
ecasound interactive-mode - command reference
-------------------------------------------------------------------
'q' - Quits ecasound
'start', 't' - Processing is started (play)
'stop', 's' - Stops processing
'rewind time-in-seconds', 'rw time-in-seconds' - Rewind
'forward time-in-seconds', 'fw time-in-seconds' - Forward
'setpos time-in-seconds' - Sets the current position to 'time-in-seconds' seconds from the beginning.
'engine-launch' - Initialize and start engine
'engine-status' - Engine status
'cs-status', 'st' - Chainsetup status
'c-status', 'cs' - Chain status
'cop-status', 'es' - Chain operator status
'ctrl-status' - Controller status
'aio-status', 'fs' - Audio input/output status
--- see ecasound-iam(1) manual page for more info -----------------
输入start
ecasound ('h' for help)> start
控制台终端反馈如下信息:
(eca-control) WARNING: No chainsetup connected. Trying to connect currently selected chainsetup.
[* Connecting chainsetup *]
(eca-chainsetup) 'rt' buffering mode selected.
(audioio-oss) (audioio-oss) WARNING: OSS-device doesn't support SNDCTL_DSP_GETCAPS.
(audioio-oss) WARNING: OSS-device doesn't support SNDCTL_DSP_SETTRIGGER!
(eca-chainsetup) Audio object "/dev/sound/dsp", mode "read".
(audio-io) Format: s16_le, channels 2, srate 44100, interleaved.
(eca-chainsetup) Audio object "some1.wav", mode "read/write".
(audio-io) Format: s16_le, channels 2, srate 44100, interleaved.
[* Chainsetup connected *]
(eca-control-objects) Connected chainsetup: "command-line-setup".
[* Controller/Processing started *]
ecasound ('h' for help)> [* Engine init - Driver start *]
(eca-engine) Using realtime-scheduling (SCHED_FIFO:50).
Unable to handle kernel paging request at virtual address ff3cfccf
pgd = c0004000
[ff3cfccf] *pgd=00000000
Internal error: Oops: 803 [#1]
Modules linked in: s3c2410_uda1341
CPU: 0
PC is at free_block+0x58/0x120
LR is at drain_array_locked+0x84/0xa8
pc : [] lr : [] Tainted: P
sp : c0323f08 ip : c0323f2c fp : c0323f28
r10: c023e524 r9 : 00000000 r8 : c02fc970
r7 : 00000000 r6 : 0000000b r5 : c02f8ec0 r4 : c2cda020
r3 : ff38fcd0 r2 : ff3cfccf r1 : c02fc970 r0 : c2cda070
Flags: Nzcv IRQs off FIQs on Mode SVC_32 Segment kernel
Control: 717F Table: 330A8000 DAC: 00000017
Process events/0 (pid: 3, stack limit = 0xc0322194)
Stack: (0xc0323f08 to 0xc0324000)
3f00: 0000000b c02fc960 c02fc970 c02f8f30 c023e514 c0323f44
3f20: c0323f2c c005abf0 c005a528 c02f8ec0 00000000 00000001 c0323f70 c0323f48
3f40: c005aca0 c005ab7c c02ed910 c023e534 80000013 c02ed908 00000000 c02ed900
3f60: c005ac14 c0323fc8 c0323f74 c0047884 c005ac24 ffffffff ffffffff 00000001
3f80: 00000000 c0034b50 00010000 00000000 00000000 c02eb7c0 c0034b50 00100100
3fa0: 00200200 c0322000 c0309f2c c02ed900 c00476bc fffffffc 00000000 c0323ff4
3fc0: c0323fcc c004bcc8 c00476cc ffffffff ffffffff 00000000 00000000 00000000
3fe0: 00000000 00000000 00000000 c0323ff8 c003a240 c004bc54 c0121508 c0121524
Backtrace:
[] (free_block+0x0/0x120) from [] (drain_array_locked+0x84/0xa8)
r8 = C023E514 r7 = C02F8F30 r6 = C02FC970 r5 = C02FC960
r4 = 0000000B
[] (drain_array_locked+0x0/0xa8) from [] (cache_reap+0x8c/0x1e8)
r6 = 00000001 r5 = 00000000 r4 = C02F8EC0
[] (cache_reap+0x0/0x1e8) from [] (worker_thread+0x1c8/0x258)
[] (worker_thread+0x0/0x258) from [] (kthread+0x84/0xb0)
[] (kthread+0x0/0xb0) from [] (do_exit+0x0/0x33c)
r8 = 00000000 r7 = 00000000 r6 = 00000000 r5 = 00000000
r4 = 00000000
Code: e2433606 e593401c e5942004 e5943000 (e5823000)
<7>dma1: s3c2410_dma_irq:567: ls=3, cur=c3d00f20, c3d00ba0 c3d00260
dma1: s3c2410_dma_irq:567: DCSRC=55000010, DISRC=55000010, DSTAT=00000000 DMT=02, DCON=a2900000
callback_fn=bf000414, buf=c3d00f20, id=c3cfa4c0, size=0, result=0
s3c2410_chan_loadbuffer: loading buff c3d00ba0 (0x32cca000,0x000000)
load_state is 2 => autoreload
s3c2410_dma_enqueue: id=c3cfa4c0, data=32cc8000, size=0
s3c2410_dma_enqueue: new buffer c3d00f20
dma1: s3c2410_dma_enqueue: buffer c3d00f20 queued onto non-empty channel
dma1: s3c2410_dma_irq:567: ls=3, cur=c3d00220, c3d00ee0 c3d00f20
dma1: s3c2410_dma_irq:567: DCSRC=55000010, DISRC=55000010, DSTAT=00000000 DMT=02, DCON=a2900000
callback_fn=bf000414, buf=c3d00220, id=c3cfa4e0, size=0, result=0
s3c2410_chan_loadbuffer: loading buff c3d00ee0 (0x32ccb000,0x000000)
load_state is 2 => autoreload
s3c2410_dma_enqueue: id=c3cfa4e0, data=32cc9000, size=0
s3c2410_dma_enqueue: new buffer c3d00220
dma1: s3c2410_dma_enqueue: buffer c3d00220 queued onto non-empty channel
dma1: s3c2410_dma_irq:567: ls=3, cur=c3d00ba0, c3d00a20 c3d00220
dma1: s3c2410_dma_irq:567: DCSRC=55000010, DISRC=55000010, DSTAT=00000000 DMT=02, DCON=a2900000
callback_fn=bf000414, buf=c3d00ba0, id=c3cfa500, size=0, result=0
s3c2410_chan_loadbuffer: loading buff c3d00a20 (0x32ccc000,0x000000)
load_state is 2 => autoreload
s3c2410_dma_enqueue: id=c3cfa500, data=32cca000, size=0
s3c2410_dma_enqueue: new buffer c3d00ba0
dma1: s3c2410_dma_enqueue: buffer c3d00ba0 queued onto non-empty channel
dma1: s3c2410_dma_irq:567: ls=3, cur=c3d00ee0, c3d009c0 c3d00ba0
dma1: s3c2410_dma_irq:567: DCSRC=55000010, DISRC=55000010, DSTAT=00000000 DMT=02, DCON=a2900000
callback_fn=bf000414, buf=c3d00ee0, id=c3cfa520, size=0, result=0
s3c2410_chan_loadbuffer: loading buff c3d009c0 (0x32ccd000,0x000000)
load_state is 2 => autoreload
s3c2410_dma_enqueue: id=c3cfa520, data=32ccb000, size=0
s3c2410_dma_enqueue: new buffer c3d00ee0
dma1: s3c2410_dma_enqueue: buffer c3d00ee0 queued onto non-empty channel
dma1: s3c2410_dma_irq:567: ls=3, cur=c3d00a20, c02ff960 c3d00ee0
dma1: s3c2410_dma_irq:567: DCSRC=55000010, DISRC=55000010, DSTAT=00000000 DMT=02, DCON=a2900000
callback_fn=bf000414, buf=c3d00a20, id=c3cfa540, size=0, result=0
s3c2410_chan_loadbuffer: loading buff c02ff960 (0x32cce000,0x000000)
load_state is 2 => autoreload
s3c2410_dma_enqueue: id=c3cfa540, data=32ccc000, size=0
s3c2410_dma_enqueue: new buffer c3d00a20
dma1: s3c2410_dma_enqueue: buffer c3d00a20 queued onto non-empty channel
dma1: s3c2410_dma_irq:567: ls=3, cur=c3d009c0, c3d00260 c3d00a20
dma1: s3c2410_dma_irq:567: DCSRC=55000010, DISRC=55000010, DSTAT=00000000 DMT=02, DCON=a2900000
callback_fn=bf000414, buf=c3d009c0, id=c3cfa560, size=0, result=0
s3c2410_chan_loadbuffer: loading buff c3d00260 (0x32ccf000,0x000000)
load_state is 2 => autoreload
s3c
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -