- 论坛徽章:
- 0
|
15)、声卡移植
# gedit arch/arm/mach-s3c2440/mach-smdk2440.c
加入如下内容:
#include #include struct s3c24xx_uda134x_platform_data s3c24xx_uda134x_data = { .l3_clk = S3C2410_GPB4, .l3_data = S3C2410_GPB3, .l3_mode = S3C2410_GPB2, .model = UDA134X_UDA1341,};static struct platform_device s3c_device_uda134x = { .name = "s3c24xx_uda134x", .dev = { .platform_data = &s3c24xx_uda134x_data, }};
static struct platform_device *smdk2440_devices[] __initdata = { &s3c_device_usb, &s3c_device_lcd, &s3c_device_wdt, &s3c_device_i2c0, &s3c_device_iis, &s3c_device_rtc, &s3c_device_dm9000, &s3c_device_uda134x, //加上这句};
# make menuconfig选上以下几项:
Device Drivers ---> Sound card support ---> --- Sound card support Advanced Linux Sound Architecture ---> --- Advanced Linux Sound Architecture OSS Mixer API OSS PCM (digital audio) API Verbose procfs contents ALSA for SoC audio support ---> --- ALSA for SoC audio support SoC Audio for the Samsung S3CXXXX chips SoC I2S Audio support UDA134X wired to a S3C24XX
# make zImage
播放时出现断断续续的现象!网上找到的解决办法:
先获取 1.0.18a 的声卡驱动,可以下载 Linux-2.6.29.xxx 的内核源码;然后复制 "Linux-2.6.29.xxx/sound/" 目录和 "Linux-2.6.29.xxx/include/sound/" 目录到 Linux-2.6.30.4 内核中替换掉对应的目录;复制 "Linux-2.6.29.xxx/include/asm-arm/plat-s3c24xx" 目录到 "Linux-2.6.30.4/include/asm-arm/" 目录下;复制 "Linux-2.6.29.xxx/arch/arm/mach-s3c2410/include/mach/audio.h" 文件到 Linux-2.6.30.4 内核中对应的目录下。在 "Linux-2.6.30.4/include/linux/proc_fs.h" 文件的第70行添加如下内容:struct module *owner;因为在 "Linux-2.6.30.4/sound/core/info.c" 文件的 159 和 982 行用到了 struct proc_dir_entry 结构图的 owner 变量。
# make zImage
编译成功,但播放NOT OK!
估计是由于我的Linux-2.6.29.xxx已经编译过,Linux-2.6.29.xxx/sound/目录已经存放中间文件,替换sound目录到Linux-2.6.30.4后并没有重新编译的原因!
# make clean
# make zImage
OK!
[color="#02368d"]移植Linux 2.6.30.4到mini2440(SD卡)
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/49274/showart_2059850.html |
|