全部博文(59)
分类: LINUX
2011-12-17 14:03:15
1、makemenuconfig 声卡的配置是:
Device Drivers
<*>Sound card support
<*>Advanced Linux Sound Architecture
<*>ALSA for Soc audiosupport-à
<*>SoC Audiofor the Samsung S3C24XXchips
<*>SoC I2SAudio support UDA134X wired to a S3C24XX
2、配置声卡驱动
下面是我在mach-smdk2440.c上修改的地方:
…
#include
…
static struct s3c24xx_uda134x_platform_data s3c24xx_uda134x_data =
{
.l3_clk = S3C2410_GPG(10), //这三个引脚是跟据自己开发板的硬件连接决定的
.l3_data = S3C2410_GPG(11), //L3接口需要三个线:时钟、数据、模式选择线,根据自己的
.l3_mode = S3C2410_GPG(9),
.model = UDA134X_UDA1341,
};
static struct platform_device s3c24xx_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,
&s3c24xx_uda134x,
};
3、编译、下载
在内核目录下make zImage后将生成的内核文件烧写到开发板。
4、测试
启动开发板后将已经拷贝歌曲的U盘插入到开发板的USB接口,挂载U盘后,运行”cat 01.mp3 > /dev/dsp”命令后听到音频耳机输出哧哧的声音,证明声卡驱动配置成功。