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"
配置。