全部博文(6)
分类: 嵌入式
2011-01-10 09:00:28
移植步骤:
1.获取声卡驱动s
2.将s
3.修改oss目录下的kconfig
vi sound/oss/Kconfig
添加
config S
tristate "S
depends on SOUND_PRIME!=n && SOUND && ARM && ARCH_S
help
4.修改oss目录下的makefile
vi sound/oss/Makefile
增加
obj-$(CONFIG_S
5.修改增加内存映射,以使内核知道该虚拟地址可用,而且对应的物理地址是我们的声卡。修改/arch/arm/mach-s
static struct map_desc smdk2410_iodesc[] __initdata = {
.virtual = 0xf0d00000,
.pfn = 0x55000000 >> PAGE_SHIFT,
.length = SZ_
.type = MT_DEVICE,
// 声卡内存映射
};
6.由于需要用到bitfield.h的头文件,而2.6的内核没有这个头文件,所以需要从
7.修复
2.6.22内核中dma通道的映射有问题。通道映射不正确的话,uda1341就没有输出。
修改arch/arm/plat-s
static struct s
{
struct s
struct s
struct s
int ch;
if (dma_sel.map == NULL || channel > dma_sel.map_size)
return NULL;
ch_map = dma_sel.map + channel;
/* first, try the board mapping */
#if 0 //这里
if (dma_order) {
ord = &dma_order->channels[channel];
for (ch = 0; ch list[ch]))
continue;
if (s
ch = ord->list[ch] & ~DMA_CH_VALID;
goto found;
}
}
if (ord->flags & DMA_CH_NEVER)
return NULL;
}
#endif //这里
/* second, search the channel map for first free */
就是注释掉一段代码就行了。
然后,还是同一个文档中,修改这个函数:s
} else if (chan->state == S
if (chan->flags & S
s
}
}
local_irq_restore(flags);
return 0;
}
上面注释的那行,把第一个参数chan->number,换成了现在的channel。
8. make menuconfig
选择Device driver->sound->sound card support->open sound system->uda1341(一,二两项)
add by eabi010.cublog.cn