- tl320aic3120单声道的codec + freescale i.MX6DL, 使用android4.3.3,内核版本为3.0.35.
驱动代码我们使用的是从linux 4.0.0内down porting下来的,目前codec有声音出来。但是现在的情况是:
1:如果是按键音,提示音,都是正常的。
2:如果播放mp3的纯音乐,也是正常的。
3:但是在播放mp3歌曲时,歌曲的配音部分是正常的,但是人声部分明显变得尖锐了.但是总时长是对的。
以下是我们的i2c寄存器配置序列:以及pll相关配置。(page 1 register addess=0x80+real address)
debugcodec->name=tlv320aic31xx-codec.0-0018,page_num=0,write 1 = 1
debugcodec->name=tlv320aic31xx-codec.0-0018,page_num=1,write a3 = 40
debugcodec->name=tlv320aic31xx-codec.0-0018,page_num=1,write aa = 4
debugcodec->name=tlv320aic31xx-codec.0-0018,page_num=1,write a6 = ff
debugcodec->name=tlv320aic31xx-codec.0-0018,page_num=1,write a6 = 80
debugcodec->name=tlv320aic31xx-codec.0-0018,page_num=1,write aa = 1c
debugdebug:## aic31xx_set_dai_sysclk: clk_id = 0, freq = 12000000, dir = 1
debugdebug:## aic31xx_hw_params: format 2 rate 44100
[DES][aic31xx_setup_pll:827]: ## aic31xx_setup_pll
debugcodec->name=tlv320aic31xx-codec.0-0018,page_num=0,write 4 = 3
debugcodec->name=tlv320aic31xx-codec.0-0018,page_num=0,write 6 = 7
debugcodec->name=tlv320aic31xx-codec.0-0018,page_num=0,write 7 = 14
debugcodec->name=tlv320aic31xx-codec.0-0018,page_num=0,write 8 = 90
debugcodec->name=tlv320aic31xx-codec.0-0018,page_num=0,write b = 8
debugcodec->name=tlv320aic31xx-codec.0-0018,page_num=0,write c = 2
debugcodec->name=tlv320aic31xx-codec.0-0018,page_num=0,write d = 0
debugcodec->name=tlv320aic31xx-codec.0-0018,page_num=0,write e = 80
debugcodec->name=tlv320aic31xx-codec.0-0018,page_num=0,write 12 = 8
debugcodec->name=tlv320aic31xx-codec.0-0018,page_num=0,write 13 = 2
debugcodec->name=tlv320aic31xx-codec.0-0018,page_num=0,write 14 = 80
debugcodec->name=tlv320aic31xx-codec.0-0018,page_num=0,write 1e = 8
debugdebug: pll 7.5264/1 dosr 128 n 8 m 2 aosr 128 n 8 m 2 bclk_n 8
debugdebug: codec clock -> on (rate 44100)
debugcodec->name=tlv320aic31xx-codec.0-0018,page_num=0,write 5 = 91
debugcodec->name=tlv320aic31xx-codec.0-0018,page_num=0,write b = 88
debugcodec->name=tlv320aic31xx-codec.0-0018,page_num=0,write c = 82
debugcodec->name=tlv320aic31xx-codec.0-0018,page_num=0,write 12 = 88
debugcodec->name=tlv320aic31xx-codec.0-0018,page_num=0,write 13 = 82
debugcodec->name=tlv320aic31xx-codec.0-0018,page_num=0,write 1e = 88
debugcodec->name=tlv320aic31xx-codec.0-0018,page_num=0,write 3f = 94
debugcodec->name=tlv320aic31xx-codec.0-0018,page_num=1,write a0 = 86
[DES][aic31xx_dac_mute:988]: ## aic31xx_dac_mute debugmute = 0
debugcodec->name=tlv320aic31xx-codec.0-0018,page_num=0,write 40 = 0
[DES][aic31xx_dac_mute:988]: ## aic31xx_dac_mute debugmute = 1
debugcodec->name=tlv320aic31xx-codec.0-0018,page_num=0,write 40 = c
上层传下来的是44.1K双声道的音频,
我们将这个序列与你们的"CodecControl.exe"工具导出来的寄存器配置进行了对比,发现是一样的,不同点只是mclkin输入的频率不同导致的pll相关寄存器不同,speaker的audio path是一样的。
如果对应你们驱动的audio path如下:
{"Left Analog Vol to SPL", NULL, "Left Output Mixer"},
SND_SOC_DAPM_MIXER("Left Output Mixer", SND_SOC_NOPM, 0, 0,
&left_output_mixer_controls[0],
ARRAY_SIZE(left_output_mixer_controls)),
static const struct snd_kcontrol_new
left_output_mixer_controls[] = {
SOC_DAPM_SINGLE("DAC_L To Left Mixer Amp switch",
DAC_MIX_CTRL, 6, 1, 0),
SND_SOC_DAPM_DAC("Left DAC", "Left Playback", DAC_CHN_REG, 7, 0),
{"SPL Class - D", NULL, "Left Analog Vol to SPL"},
SND_SOC_DAPM_DAC ("Left Analog Vol to SPL", "LAV to SPL",
L_ANLOG_VOL_2_SPL, 7, 0),
{"SPL", NULL, "SPL Class - D"},
SND_SOC_DAPM_DAC ("SPL Class - D", "SPL Powerup",
CLASSD_SPEAKER_AMP, 7, 0),
然后我们的驱动的audio path如下:
static const struct snd_soc_dapm_route
aic310x_audio_map[] = {
/* SP L path */
{"Speaker", "Switch", "Output Left"},
//Output Left_Switch //AIC31XX_DACMIXERROUTE 0xA3: D6= 01 DAC is routed to the mixer amplifier
//{"Output Left", "From Left DAC", "DAC Left"},
//DAC Left: //AIC31XX_DACSETUP=0x3f D7=1 DAC is powered up
{"SPK ClassD", NULL, "Speaker"},
//Speaker://AIC31XX_LANALOGSPL 0xA6: D7=1 analog volume control output is routed to class-D output driver
{"SPK", NULL, "SPK ClassD"},
//SPK ClassD: AIC31XX_SPKAMP:0xA0:D7=1 : class-D otuput driver is powered up
};
其实也是一样的,所以目前从软件方面,我们找不到原因,希望能得你们的指导。我们在考虑是不是音乐和人声的频率不同,你们的codec对人声频率的增益或是其它方面是不是有硬件的不匹配的地方,因为speader没有打开dsp来做eq,所以不是eq的问题。
-------------------------------------------------------------------------------------
另外,也想问一下因为是播放的标准44.1K双声道的音频,而你们的codec其实是单声道的,那对right声道是如何处理的,是不是直接丢掉,这种处理会不会影响到人声?
0
|
1个回答
|
|
|