Chinaunix首页 | 论坛 | 博客
  • 博客访问: 160372
  • 博文数量: 21
  • 博客积分: 2227
  • 博客等级: 大尉
  • 技术积分: 215
  • 用 户 组: 普通用户
  • 注册时间: 2009-10-07 19:51
文章分类
文章存档

2012年(1)

2011年(1)

2009年(19)

分类: LINUX

2009-11-11 21:36:25

1)
# gedit arch/arm/mach-s3c2440/mach-smdk2440.c

加入以下的内容:

#include <sound/s3c24xx_uda134x.h>
#include <sound/uda134x.h>

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, //加上这一句
};



2)
# 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



3)
# make zImage

4)
播放时出现断断续续的现象!
网上找到的解决办法:

先获取 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
/arch/arm/mach-s3c2410/include/mach/" 目录下。

在 "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 成员变量。

5)

# make clean  最好执行一次
# make zImage

OK!

阅读(2396) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~