jackbella 发表于 2013-8-22 23:00:39

ok6410 madplay移植ok

郭天祥的视频后出现了 没有音乐 原来是WM驱动使用喇喇叭的初始化代码没有加进去
可以录音可以放音,也就是选择是放音功能功能没有开启 方法如下
在文件sound/soc/samsung/ac97.c中
在static struct snd_soc_dai_ops s3c_ac97_dai_ops结构体添加:
.prepare= earphone_out,(初始化函数)
实现该函数(参考飞凌):
int earphone_out(struct snd_pcm_substream *substream,struct snd_soc_dai *dai)
{
struct snd_ac97 *ac97;
ac97 = 0;
s3c_ac97_write(ac97,0x26,0x0);
s3c_ac97_write(ac97, 0x0c, 0x0808);
s3c_ac97_write(ac97,0x3c, 0xf803);
s3c_ac97_write(ac97,0x3e,0xb990);
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
//s3c6400_ac97_write(0,0x02, 0x8080);
s3c_ac97_write(ac97,0x02, 0x0404);
s3c_ac97_write(ac97, 0x04, 0x0606);
//s3c6400_ac97_write(0,0x1c, 0x00aa);
s3c_ac97_write(ac97,0x1c, 0x12aa);
}
else
{
s3c_ac97_write(ac97, 0x12, 0x0f0f);
#ifdef CONFIG_SOUND_WM9713_INPUT_STREAM_MIC
s3c_ac97_write(ac97,0x5c,0x2);
s3c_ac97_write(ac97,0x10,0x68);
s3c_ac97_write(ac97,0x14,0xfe00);
#else /* Input Stream is LINE-IN */
s3c_ac97_write(ac97, 0x14, 0xd612);
#endif
}
return 0;
}
页: [1]
查看完整版本: ok6410 madplay移植ok