这几天在调试TQ210的WM8960声卡驱动,发现厂家也是封装成KO了。郁闷! 
于是就自己替换厂家的wm8960.ko跟s5pv210_wm8960.ko驱动(位于/system/lib/modules)。 
1. 首先要禁止上面2个驱动自动加载。  方法:注释或删掉/system/etc/init.tq210.sh文件中"sound_insmod"即可。 
2. 参考网址“http://www.arm9home.net/simple/index.php?t27280.html”即可。 
3. 需要注意的是需要修改wm8960.c文件中的“wm8960_reg”。 参考下面即可。 
4. 附图为需要注意的地方, 其他的不用做什么修改。。 
5. 记得打开"Kernel_3.0.8_TQ210_for_Android_v1.2\sound\soc\samsung\Makefile"中被注释掉的: 
 obj-$(CONFIG_SND_S5PV2XX_SOC_WM8960)  += snd-soc-s3c-idma.o 
 obj-$(CONFIG_SND_S5PV2XX_SOC_WM8960)  += snd-soc-i2s.o 
 snd-soc-wm8960-objs     := wm8960.o 
 obj-$(CONFIG_SND_SOC_WM8960_TQ210)   += snd-soc-wm8960.o 
 snd-soc-tq210-wm8960-objs    := tq210_wm8960.o 
 obj-$(CONFIG_SND_SOC_WM8960_TQ210)  += snd-soc-tq210-wm8960.o 
 
 
/* 
 * wm8960 register cache 
 * We can't read the WM8960 register space when we are 
 * using 2 wire for device control, so we cache them instead. 
 */ 
static const u16 wm8960_reg[WM8960_CACHEREGNUM] = { 
 0x0017, 0x0017, 0x0000, 0x0000, 
 0x0000, 0x0000, 0x0000, 0x0002, 
 0x01c0, 0x0040, 0x00ff, 0x00ff, 
 0x0000, 0x0000, 0x0000, 0x0000, 
 0x0000, 0x007b, 0x0100, 0x0032, 
 0x0000, 0x00d1, 0x00d1, 0x01c0, 
 0x0000, 0x0000, 0x0000, 0x0000, 
 0x0000, 0x0000, 0x0000, 0x0000, 
 0x0100, 0x0130, 0x0050, 0x0050, 
 0x0050, 0x0050, 0x0000, 0x0000, 
 0x0079, 0x0079, 0x0040, 0x0000, 
 0x0000, 0x0050, 0x0050, 0x0000, 
 0x0002, 0x0037, 0x004d, 0x0080, 
 0x0008, 0x0031, 0x0026, 0x00e9, 
}; 
 
 
 |