参考:
alsa声卡
飞凌
移植 UDA1341 声卡驱动 ,使用的是platform 总线
1.gedit arch/arm/plat-s3c24xx/devs.c //定义,添加如下内容
#include
#include
添加 UDA1341 ,注意这里 S3C2410_GPB(4),这里有括号
/* UDA1341 */
static struct s3c24xx_uda134x_platform_data s3c24xx_uda134x_data = {
.l3_clk = S3C2410_GPB(4),
.l3_data = S3C2410_GPB(3),
.l3_mode = S3C2410_GPB(2),
.model = UDA134X_UDA1341,
};
struct platform_device s3c_device_uda134x = {
.name = "s3c24xx_uda134x",
.dev = {
.platform_data = &s3c24xx_uda134x_data,
}
};
EXPORT_SYMBOL(s3c_device_uda134x);
2.gedit arch/arm/plat-s3c/include/plat/devs.h //声明,添加如下内容
extern struct platform_device s3c_device_uda134x;
3.#gedit arch/arm/mach-s3c2440/mach-smdk2440.c //添加到设备列表
static struct platform_device *smdk2440_devices[] __initdata = {
&s3c_device_usb,
&s3c_device_lcd,
&s3c_device_wdt,
&s3c_device_i2c0,
&s3c_device_iis,
&dm9000_device,
&s3c_device_uda134x, # 添加
};
Device Drivers --->
<*> Sound card support --->
--- Sound card support
<*> Advanced Linux Sound Architecture --->
--- Advanced Linux Sound Architecture
< > Sequencer support
<*> OSS Mixer API
<*> OSS PCM (digital audio) API
[*] OSS PCM (digital audio) API - Include plugin system
[ ] Dynamic device file minor numbers
[*] Support old ALSA API
[*] Verbose procfs contents
[*] Verbose printk
[ ] Debug
[ ] Generic sound devices --->
[ ] ARM sound devices --->
[ ] SPI sound devices --->
[*] USB sound devices --->
<*> ALSA for SoC audio support --->
--- ALSA for SoC audio support
<*> SoC Audio for the Samsung S3C24XX chips
< > SoC AC97 Audio support for LN2440SBC - ALC650
<*> SoC I2S Audio support UDA134X wired to a S3C24XX
< > Build all ASoC CODEC drivers
< > Open Sound System (DEPRECATED) --->
启动:
s3c-sdi s3c2440-sdi: failed to get writeprotect
s3c-sdi: probe of s3c2440-sdi failed with error -16
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)
TCP cubic registered
NET: Registered protocol family 17
在开发板中测试文件:
[root@yuweixian yu]# cat /home/yu/xx.wav > /dev/dsp
xx.wav 是我下载 的铃声
我们就可以听到音乐了
错误集:
s3c-sdi: probe of s3c2440-sdi failed with error -16
ALSA device list:
No soundcards found.
TCP cubic registered
NET: Registered protocol family 17
yaffs: dev is 32505858 name is "mtdblock2"
s3c-sdi: probe of s3c2440-sdi failed with error -16
No device for DAI UDA134X
No device for DAI s3c24xx-i2s
ALSA device list:
No soundcards found.
TCP cubic registered
阅读(1089) | 评论(0) | 转发(0) |