linux2.26.32.8 s3c2440 移植uda1341声卡驱动

1、驱动使用到的内核文件主要有以下几个:

The main source code is located at:
sound/soc/codecs/uda134x.c             --  UDA134x codec driver
sound/soc/s3c24xx/s3c24xx-i2s.c         --  S3C24xx I2S driver
sound/soc/s3c24xx/s3c24xx_uda134x.c   -- S3C24xx based board specific configuration for UDA134x

2、修改arch/arm/mach-s3c2440/mach-smdk2440.c

增加包含头文件:#include <sound/s3c24xx_uda134x.h>

增加代码:

static struct s3c24xx_uda134x_platform_data s3c24xx_uda134x_data = {
        .l3_clk = S3C2410_GPB(4),
        .l3_data = S3C2410_GPB(3),
        .l3_mode = S3C2410_GPB(2),
    //    .power = NULL,
        .model = UDA134X_UDA1341,
};
static struct platform_device s3c24xx_uda134x = {
        .name = "s3c24xx_uda134x",
        .dev = {
                .platform_data    = &s3c24xx_uda134x_data,
        }
};
//written by yichi 2010.02.14 19:47:30

 

修改smdk2440_devices,增加红色部分:

static struct platform_device *smdk2440_devices[] __initdata = {
    &s3c_device_usb,
    &s3c_device_lcd,
    &s3c_device_wdt,
    &s3c_device_i2c0,
    &s3c_device_iis,
    &s3c24xx_uda134x, //written by yichi 2010.02.14 19:49:13
};

 

3、编译后加载运行时输出:

Advanced Linux Sound Architecture Driver Version 1.0.21.                       
No device for DAI UDA134X                                                      
No device for DAI s3c24xx-i2s                                                  
S3C24XX_UDA134X SoC Audio driver                                               
UDA134X SoC Audio Codec                                                        
asoc: UDA134X <-> s3c24xx-i2s mapping ok                                       
ALSA device list:                                                              
  #0: S3C24XX_UDA134X (UDA134X)   

 

4、需要了解的是,ALSA本身并不会生成/dev/dsp节点,那是OSS驱动的东西。
要在你的系统里使用/dev/dsp节点,你必须确保选中了ALSA的“OSS 模拟”选项。它可以通过在内核配置中的
"Sound card support" ---> "Advanced Linux Sound Architecture" --> "OSS PCM (digital audio) API"
配置。

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值