一、熟悉原理图
分析如下:直接从模块的LINE_OUT两处PIN脚接到音频功放AW8733的输入,然后喇叭接在PA的输出端。
二、音频路由定义
对应代码路径为:kernel/msm-3.18/sound/soc/codecs/msm8x16-wcd.c
将以下代码:
static const struct snd_soc_dapm_route audio_map[] = {
{"LINEOUT", NULL, "LINEOUT PA"},
{"LINEOUT PA", NULL, "SPK_RX_BIAS"},
{"LINEOUT PA", NULL, "LINE_OUT"},
{"LINE_OUT", "Switch", "LINEOUT DAC"},
{"LINEOUT DAC", NULL, "RX3 CHAIN"},
};
调整为:
static const struct snd_soc_dapm_route audio_map[] = {
{"LINEOUT", NULL, "LINEOUT PA"},
{"LINEOUT PA", NULL, "SPK_RX_BIAS"},
{"LINEOUT PA", NULL, "LINE_OUT"},
{"LINE_OUT", "Switch", "Ext Spk Switch"},
{"Ext Spk Switch", "On", "LINEOUT DAC"},
{"LINEOUT DAC", NULL, "RX3 CHAIN"},
};
三、音频路由配置
把以下xml配置:
<path name="speaker">
<ctl name="MI2S_RX Channels" value="Two" />
<ctl name="RX1 MIX1 INP1" value="RX1" />
<ctl name="RX2 MIX1 INP1" value="RX2" />
<ctl name="RDAC2 MUX" value="RX2" />
<ctl name="HPHL" value="Switch" />
<ctl name="HPHR" value="Switch" />
<ctl name="Ext Spk Switch" value="On" />
</path>
修改为:
<path name="speaker">
<ctl name="RX3 MIX1 INP1" value="RX1" />
<ctl name="Ext Spk Switch" value="On" />
<ctl name="LINE_OUT" value="Switch" />
</path>