天嵌 ARM开发社区

 找回密码
 注册
查看: 3306|回复: 3

linux2.6.38.1下声卡uda1341移植成功,分享经验如下。

[复制链接]
longonly120 发表于 2011-4-29 22:05:09 | 显示全部楼层 |阅读模式
内核打印信息如下:
Linux version 2.6.38.1-Wamy (root@e) (gcc version 4.5.1 (Sourcery G++ Lite 2010.09-50) ) #79 Fri Apr 29 21:11:04 CST 2011
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
CPU: VIVT data cache, VIVT instruction cache
Machine: Wamy2440
Ignoring tag cmdline (using the default kernel command line)
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)
S3C24XX Clocks, Copyright 2004 Simtec Electronics
S3C244X: core 400.000 MHz, memory 100.000 MHz, peripheral 50.000 MHz
CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
Kernel command line: console=ttySAC0 root=/dev/nfs nfsroot=192.168.1.2:/opt/arm_tools/rootfs

ip=192.168.1.6:192.168.1.2:192.168.1.6:255.255.255.0:Wamy2440.Wamy2440.net:eth0:off mem=64MB rw
PID hash table entries: 256 (order: -2, 1024 bytes)
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: 60120k/60120k available, 5416k reserved, 0K highmem
Console: colour dummy device 80x30
console [ttySAC0] enabled
Calibrating delay loop... 199.47 BogoMIPS (lpj=498688)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
gpiochip_add: gpios 288..303 (GPIOK) failed to register
gpiochip_add: gpios 320..334 (GPIOL) failed to register
gpiochip_add: gpios 352..353 (GPIOM) failed to register
NET: Registered protocol family 16
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C24XX DMA Driver, Copyright 2003-2006 Simtec Electronics
DMA channel 0 at c4808000, irq 33
DMA channel 1 at c4808040, irq 34
DMA channel 2 at c4808080, irq 35
DMA channel 3 at c48080c0, irq 36
S3C244X: Clock Support, DVS off
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
s3c-i2c s3c2440-i2c: slave address 0x10
s3c-i2c s3c2440-i2c: bus frequency set to 97 KHz
s3c-i2c s3c2440-i2c: i2c-0: S3C I2C adapter
Advanced Linux Sound Architecture Driver Version 1.0.23.
cfg80211: Calling CRDA to update world regulatory domain
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
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
NetWinder Floating Point Emulator V0.97 (extended precision)
<8>yaffs: yaffs built Apr 11 2011 22:30:20 Installing.
msgmni has been set to 117
alg: No test for stdrng (krng)
io scheduler noop registered (default)
Console: switching to colour frame buffer device 40x30
fb0: s3c2410fb frame buffer device
LCDbacklight initialized
s3c2440-uart.0: ttySAC0 at MMIO 0x50000000 (irq = 70) is a S3C2440
s3c2440-uart.1: ttySAC1 at MMIO 0x50004000 (irq = 73) is a S3C2440
s3c2440-uart.2: ttySAC2 at MMIO 0x50008000 (irq = 76) is a S3C2440
loop: module loaded
st: Version 20101219, fixed bufsize 32768, s/g segs 256
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c24xx-nand s3c2440-nand: Tacls=1, 10ns Twrph0=3 30ns, Twrph1=1 10ns
s3c24xx-nand s3c2440-nand: NAND ECC disabled
NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 3,3V 8-bit)
NAND_ECC_NONE selected by board driver. This is not recommended !!
Scanning device for bad blocks
Bad eraseblock 453 at 0x0000038a0000
cmdlinepart partition parsing not available
Creating 3 MTD partitions on "NAND":
0x000000000000-0x000000040000 : "Wamy2440_Board_uboot"
0x000000200000-0x000000500000 : "Wamy2440_Board_kernel"
0x000000500000-0x000010000000 : "Wamy2440_Board_yaffs2"
dm9000 Ethernet Driver, V1.31
Now use the default MAC address: 10:23:45:67:89:ab
eth0: dm9000e at c4810000,c4814004 IRQ 51 MAC: 10:23:45:67:89:ab (--Wamy--)
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
usb usb1: New USB device found, idVendor=1d6b, idProduct=0001
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: S3C24XX OHCI
usb usb1: Manufacturer: Linux 2.6.38.1-Wamy ohci_hcd
usb usb1: SerialNumber: s3c24xx
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver usbserial
usbserial: USB Serial Driver core
USB Serial support registered for pl2303
usbcore: registered new interface driver pl2303
pl2303: Prolific PL2303 USB to serial adaptor driver
mousedev: PS/2 mouse device common for all mice
Wamy2440 TouchScreen successfully loaded
input: Wamy2440 TouchScreen as /devices/virtual/input/input0
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
s3c-rtc s3c2410-rtc: rtc disabled, re-enabling
s3c-rtc s3c2410-rtc: rtc core: registered s3c as rtc0
i2c /dev entries driver
lirc_dev: IR Remote Control driver registered, major 253
IR NEC protocol handler initialized
IR RC5(x) protocol handler initialized
IR RC6 protocol handler initialized
IR JVC protocol handler initialized
IR Sony protocol handler initialized
IR RC5 (streamzap) protocol handler initialized
IR LIRC bridge handler initialized
Linux video capture interface: v2.00
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
S3C24XX_UDA134X SoC Audio driver
UDA134X SoC Audio Codec
asoc: uda134x-hifi <-> s3c24xx-iis mapping ok
snd_card_register S3C24XX_UDA134X
snd_card_register S3C24XX_UDA134X
ALSA device list:
#0: S3C24XX_UDA134X
  Add->#0: S3C24XX_UDA134X
#1: (null)
#2: (null)
#3: (null)
#4: (null)
#5: (null)
#6: (null)
#7: (null)
TCP cubic registered
lib80211: common routines for IEEE802.11 drivers
s3c-rtc s3c2410-rtc: setting system clock to 2008-12-05 21:13:55 UTC (1228511635)
usb 1-1: new low speed USB device using s3c2410-ohci and address 2
usb 1-1: New USB device found, idVendor=1c4f, idProduct=0002
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-1: Product: USB Keykoard
usb 1-1: Manufacturer: USB
input: USB USB Keykoard as /devices/platform/s3c2410-ohci/usb1/1-1/1-1:1.0/input/input1
generic-usb 0003:1C4F:0002.0001: input,hidraw0: USB HID v1.10 Keyboard [USB USB Keykoard] on usb-s3c24xx-1/input0
eth0: link down
IP-Config: Complete:
     device=eth0, addr=192.168.1.6, mask=255.255.255.0, gw=192.168.1.6,
     host=Wamy2440, domain=, nis-domain=Wamy2440.net,
     bootserver=192.168.1.2, rootserver=192.168.1.2, rootpath=
eth0: link up, 100Mbps, full-duplex, lpa 0x41E1
generic-usb 0003:1C4F:0002.0002: usb_submit_urb(ctrl) failed
generic-usb 0003:1C4F:0002.0002: timeout initializing reports
input: USB USB Keykoard as /devices/platform/s3c2410-ohci/usb1/1-1/1-1:1.1/input/input2
generic-usb 0003:1C4F:0002.0002: input,hidraw1: USB HID v1.10 Device [USB USB Keykoard] on usb-s3c24xx-1/input1
VFS: Mounted root (nfs filesystem) on device 0:12.
Freeing init memory: 188K
[05/Dec/2008:21:14:19 +0000] boa: server version Boa/0.94.13
[05/Dec/2008:21:14:19 +0000] boa: server built Jul 29 2009 at 14:27:34.
[05/Dec/2008:21:14:19 +0000] boa: starting server pid=441, port 80
Please press Enter to activate this console.
[root@Wamy2440 /]#
[root@Wamy2440 /]#
[root@Wamy2440 /]#
[root@Wamy2440 /]# madplay root/Documents/chuntianli.mp3
MPEG Audio Decoder 0.15.2 (beta) - Copyright (C) 2000-2004 Robert Leslie et al.
          Title: 贩
         Artist: 贩
          Album: 贩贩贩
10709 frames decoded (0:04:39.7), +1.3 dB peak amplitude, 17409 clipped samples
[root@Wamy2440 /]#

声卡之前没有移植成功,是因为uda134x_code,samsung_asoc_dma这两个没有注册。最后我看了inux2.6.38.4的补丁说明文件,参考mini2440的注册方法,找到

uda134x_code,samsung_asoc_dma注册方法如下:

static struct s3c24xx_uda134x_platform_data s3c24xx_uda134x_data = {
        .l3_clk = S3C2410_GPB(4),
        .l3_data = S3C2410_GPB(3),
        .l3_mode = S3C2410_GPB(2),
        .model = UDA134X_UDA1340,//////////天嵌的声卡是uda1341,但这里必须注册为uda1340,如果注册为uda1341就没声音了,不知为什么/////////
};

static struct platform_device s3c_device_uda134x = {
        .name = "s3c24xx_uda134x",
        .id                = 0,
        .dev = {
                .platform_data        = &s3c24xx_uda134x_data,
        }
};

static struct platform_device uda134x_codec = {
        .name = "uda134x-codec",
        .id = -1,
};

static struct platform_device *Wamy2440_devices[] __initdata = {
        &s3c_device_usb,
        &s3c_device_lcd,
        &s3c_device_wdt,
        &s3c_device_i2c0,
        &s3c_device_iis,
        &s3c_device_rtc,
#ifdef CONFIG_DM9000
        &s3c_device_dm9000,
#endif
        &s3c_device_usbgadget,
        &uda134x_codec, //增加
        &s3c_device_uda134x,
        &samsung_asoc_dma //增加
};
然后,按照linux2.6.38.4的补丁文件修改 linux2.6.38.1/sound/目录下的所有的与uda134x相关文件,至于要修改那些文件,请看linux2.6.38.4的补丁说明文件(本人移植的是linux2.6.38.1,所以必须手动修改,如果是直接移植的是linux2.6.38.4就没必要了)

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x

评分

参与人数 1 +6 收起 理由
shufexiu + 6

查看全部评分

shufexiu 发表于 2011-4-30 10:26:14 | 显示全部楼层
好帖子给你顶起来
Hens007 发表于 2013-1-6 16:50:38 | 显示全部楼层
楼主,我移植时声音不连续,时间走得很慢,请问会是啥问题?
Hens007 发表于 2013-2-23 12:19:52 | 显示全部楼层
哥们附件下载不了的
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

i.MX8系列ARM cortex A53 M4 工控板上一条 /1 下一条

Archiver|手机版|小黑屋|天嵌 嵌入式开发社区 ( 粤ICP备11094220号-2 )

GMT+8, 2024-10-5 12:22 , Processed in 1.033243 second(s), 20 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表