|
# --- Download alsa s3c2410 uda1341 patch from http://www.evolware.org/chri/paciugo/asound.patch
# save it as alsa-s3c2410-patch
patch -p1 < ./alsa-s3c2410-patch
# --- small patch by ltz to uda1341.c
@@ -234,7 +234,7 @@
if (ret == 0) {
unsigned char buf[2] ;
- buf[0] = uda->regs.stat0 | STAT0;
+ buf[0] = uda->regs.stat0 | STAT0 | STAT0_DC_FILTER | STAT0_RST; ///by ltz
buf[1] = uda->regs.stat1 | STAT1;
if (conf->record) {
buf[1] |= STAT1_ADC_ON;
@@ -692,7 +692,7 @@
/* reset UDA */
buf[0] = uda->regs.stat0 | STAT0_RST;
- buf[1] = uda->regs.stat0;
+ buf[1] = uda->regs.stat1; ///by ltz
l3_write(uda->l3_bus, UDA1341_STATUS, buf, 2);
# --- patch kernel's Makefile, add alsa s3c2410 driver dir here
vmlinux-dirs := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \
$(core-y) $(core-m) $(drivers-y) $(drivers-m) \
- $(net-y) $(net-m) $(libs-y) $(libs-m)))
+ $(net-y) $(net-m) $(libs-y) $(libs-m))) \
+ ThePathToYouAlsaDriver/local
# --- patch kernel source
#arch/arm/mach-s3c2410/devs.h
+
+extern struct platform_device audio_dev'
+extern struct platform_device uda1341_dev;
#arch/arm/mach-s3c2410/devs.c
+struct platform_device audio_dev = { /// add here for testing alsa driver
+ .name = "akt50-sound",
+ .dev = {
+ .parent = &s3c_device_iis.dev,
+ },
+};
+EXPORT_SYMBOL(audio_dev);
+
+struct platform_device uda1341_dev = { /// add here for testing alsa driver
+ .name = "uda1341",
+ .dev = {
+ .parent = &audio_dev.dev,
+ },
+};
+EXPORT_SYMBOL(uda1341_dev);
+
#patch mach-smdk2410.c
static struct platform_device *smdk2410_devices[] __initdata = {
&s3c_device_ts,
&s3c_device_usb,
&s3c_device_lcd,
&s3c_device_wdt,
/* &s3c_device_i2c, */
&s3c_device_iis,
+ &audio_dev, /// add here for testing alsa driver
+ &uda1341_dev,
&s3c_device_nand,
&s3c_device_spi0,
&s3c_device_rtc,
};
#kernel make menuconfig
<*> Sound card support
<*> Advanced Linux Sound Architecture
<*> OSS Mixer API
<*> OSS PCM (digital audio) API
#make zImage and upload the image to your board
#make modules and copy the *.ko to you board's /usr/lib/.
#sudo:
insmod l3_core.ko
insmod l3_algo_bit.ko
insmod uda1341.ko
insmod s3c24xx_iis.ko
insmod akt50_sound.ko
#PATACH needed: I have test this driver on smdk2410 and find the play speed is 2 time faster than normal;
I also test s3c2410-uda1341-superlp's oss driver, the play speed is also too faster.
But why? |
|