我是靠谱客的博主 大意翅膀,最近开发中收集的这篇文章主要介绍高通平台speaker通路是如何连通的,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

1.
<path name="speaker">
    <ctl name="RX3 MIX1 INP1" value="RX1" />
    <ctl name="SPK" value="Switch" />
</path>
2.
<path name="speaker">
    <ctl name="RX2 MIX1 INP1" value="RX1" />
    <ctl name="RDAC2 MUX" value="RX2" />
    <ctl name="HPHR" value="Switch" />
    <ctl name="Ext Spk Switch" value="On" />
</path>

红色是第一条通路(高通原生),紫色是第二条通路(外加功放驱动喇叭)。 

Msm-analog-cdc.c (vendorqcomopensourceaudio-kernelasoccodecssdm660_cdc)

static const struct snd_soc_dapm_route audio_map[] = {
    /* RDAC Connections */
    {"HPHR DAC", NULL, "RDAC2 MUX"},
    {"RDAC2 MUX", "RX1", "PDM_IN_RX1"},
    {"RDAC2 MUX", "RX2", "PDM_IN_RX2"},

    /* Earpiece (RX MIX1) */
    {"EAR", NULL, "EAR_S"},
    {"EAR_S", "Switch", "EAR PA"},
    {"EAR PA", NULL, "RX_BIAS"},
    {"EAR PA", NULL, "HPHL DAC"},
    {"EAR PA", NULL, "HPHR DAC"},
    {"EAR PA", NULL, "EAR CP"},
...
    /* Headset (RX MIX1 and RX MIX2) */
    {"HEADPHONE", NULL, "HPHL PA"},
    {"HEADPHONE", NULL, "HPHR PA"},

    {"Ext Spk", NULL, "Ext Spk Switch"},
    {"Ext Spk Switch", "On", "HPHL PA"},
    {"Ext Spk Switch", "On", "HPHR PA"},
...
    {"HPHL PA", NULL, "HPHL"},
    {"HPHR PA", NULL, "HPHR"},
    {"HPHL", "Switch", "HPHL DAC"},
    {"HPHR", "Switch", "HPHR DAC"},
    {"HPHL PA", NULL, "CP"},
    {"HPHL PA", NULL, "RX_BIAS"},
    {"HPHR PA", NULL, "CP"},
    {"HPHR PA", NULL, "RX_BIAS"},
    {"HPHL DAC", NULL, "PDM_IN_RX1"},

    {"SPK_OUT", NULL, "SPK PA"},
    {"SPK PA", NULL, "SPK_RX_BIAS"},
    {"SPK PA", NULL, "SPK"},
    {"SPK", "Switch", "SPK DAC"},
    {"SPK DAC", NULL, "PDM_IN_RX3"},
    {"SPK DAC", NULL, "VDD_SPKDRV"},

    {"PDM_IN_RX1", NULL, "RX1 CLK"},
    {"PDM_IN_RX2", NULL, "RX2 CLK"},
    {"PDM_IN_RX3", NULL, "RX3 CLK"},
...
};

Msm-digital-cdc.c (vendorqcomopensourceaudio-kernelasoccodecssdm660_cdc)

static const struct snd_soc_dapm_route audio_dig_map[] = {
    {"RX_I2S_CLK", NULL, "CDC_CONN"},
    {"I2S RX1", NULL, "RX_I2S_CLK"},
    {"I2S RX2", NULL, "RX_I2S_CLK"},
    {"I2S RX3", NULL, "RX_I2S_CLK"},

    {"PDM_OUT_RX1", NULL, "RX1 CHAIN"},
    {"PDM_OUT_RX2", NULL, "RX2 CHAIN"},
    {"PDM_OUT_RX3", NULL, "RX3 CHAIN"},

    {"RX1 CHAIN", NULL, "RX1 MIX2"},
    {"RX2 CHAIN", NULL, "RX2 MIX2"},
    {"RX3 CHAIN", NULL, "RX3 MIX1"},

    {"RX1 MIX1", NULL, "RX1 MIX1 INP1"},
    {"RX1 MIX1", NULL, "RX1 MIX1 INP2"},
    {"RX1 MIX1", NULL, "RX1 MIX1 INP3"},
    {"RX2 MIX1", NULL, "RX2 MIX1 INP1"},
    {"RX2 MIX1", NULL, "RX2 MIX1 INP2"},
    {"RX3 MIX1", NULL, "RX3 MIX1 INP1"},
    {"RX3 MIX1", NULL, "RX3 MIX1 INP2"},
    {"RX1 MIX2", NULL, "RX1 MIX1"},
    {"RX1 MIX2", NULL, "RX1 MIX2 INP1"},
    {"RX2 MIX2", NULL, "RX2 MIX1"},
    {"RX2 MIX2", NULL, "RX2 MIX2 INP1"},

    {"RX1 MIX1 INP1", "RX1", "I2S RX1"},
    {"RX1 MIX1 INP1", "RX2", "I2S RX2"},
    {"RX1 MIX1 INP1", "RX3", "I2S RX3"},
    {"RX1 MIX1 INP1", "IIR1", "IIR1"},
    {"RX1 MIX1 INP1", "IIR2", "IIR2"},
    {"RX1 MIX1 INP2", "RX1", "I2S RX1"},
    {"RX1 MIX1 INP2", "RX2", "I2S RX2"},
    {"RX1 MIX1 INP2", "RX3", "I2S RX3"},
    {"RX1 MIX1 INP2", "IIR1", "IIR1"},
    {"RX1 MIX1 INP2", "IIR2", "IIR2"},
    {"RX1 MIX1 INP3", "RX1", "I2S RX1"},
    {"RX1 MIX1 INP3", "RX2", "I2S RX2"},
    {"RX1 MIX1 INP3", "RX3", "I2S RX3"},

    {"RX2 MIX1 INP1", "RX1", "I2S RX1"},
    {"RX2 MIX1 INP1", "RX2", "I2S RX2"},
    {"RX2 MIX1 INP1", "RX3", "I2S RX3"},
    {"RX2 MIX1 INP1", "IIR1", "IIR1"},
    {"RX2 MIX1 INP1", "IIR2", "IIR2"},
    {"RX2 MIX1 INP2", "RX1", "I2S RX1"},
    {"RX2 MIX1 INP2", "RX2", "I2S RX2"},
    {"RX2 MIX1 INP2", "RX3", "I2S RX3"},
    {"RX2 MIX1 INP2", "IIR1", "IIR1"},
    {"RX2 MIX1 INP2", "IIR2", "IIR2"},
    {"RX2 MIX1 INP3", "RX1", "I2S RX1"},
    {"RX2 MIX1 INP3", "RX2", "I2S RX2"},
    {"RX2 MIX1 INP3", "RX3", "I2S RX3"},

    {"RX3 MIX1 INP1", "RX1", "I2S RX1"},
    {"RX3 MIX1 INP1", "RX2", "I2S RX2"},
    {"RX3 MIX1 INP1", "RX3", "I2S RX3"},
    {"RX3 MIX1 INP1", "IIR1", "IIR1"},
    {"RX3 MIX1 INP1", "IIR2", "IIR2"},
    {"RX3 MIX1 INP2", "RX1", "I2S RX1"},
    {"RX3 MIX1 INP2", "RX2", "I2S RX2"},
    {"RX3 MIX1 INP2", "RX3", "I2S RX3"},
    {"RX3 MIX1 INP2", "IIR1", "IIR1"},
    {"RX3 MIX1 INP2", "IIR2", "IIR2"},
    {"RX3 MIX1 INP3", "RX1", "I2S RX1"},
    {"RX3 MIX1 INP3", "RX2", "I2S RX2"},
    {"RX3 MIX1 INP3", "RX3", "I2S RX3"},
};

通过DTSI将二者相连通。
qcom,audio-routing =
				"RX_BIAS", "MCLK",
				"SPK_RX_BIAS", "MCLK",
				"INT_LDO_H", "MCLK",
				"RX_I2S_CLK", "MCLK",
				"TX_I2S_CLK", "MCLK",
				"MIC BIAS External", "Handset Mic",
				"MIC BIAS Internal2", "Headset Mic",
				"MIC BIAS External", "Secondary Mic",
				"AMIC1", "MIC BIAS External",
				"AMIC2", "MIC BIAS Internal2",
				"AMIC3", "MIC BIAS External",
				"ADC1_IN", "ADC1_OUT",
				"ADC2_IN", "ADC2_OUT",
				"ADC3_IN", "ADC3_OUT",
				"PDM_IN_RX1", "PDM_OUT_RX1",
				"PDM_IN_RX2", "PDM_OUT_RX2",
				"PDM_IN_RX3", "PDM_OUT_RX3";

总线路:1.I2S RX1->RX3 MIX1 INP1->RX3 MIX1->RX3 CHAIN->PDM_OUT_RX3-->PDM_IN_RX3->SPK DAC->SPK->SPK PA->SPK_OUT

2.I2S RX1->RX2 MIX1 INP1->RX2 MIX1->RX2 MIX2->RX2 CHAIN->PDM_OUT_RX2-->PDM_IN_RX2->RDAC2 MUX->HPHR DAC->HPHR->HPHR PA->Ext Spk Switch->Ext Spk

最后

以上就是大意翅膀为你收集整理的高通平台speaker通路是如何连通的的全部内容,希望文章能够帮你解决高通平台speaker通路是如何连通的所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(63)

评论列表共有 0 条评论

立即
投稿
返回
顶部