Merge "ARM: dts: msm: Disable WSA for internal codec SDM660"

This commit is contained in:
Linux Build Service Account 2017-01-30 07:05:26 -08:00 committed by Gerrit - the friendly Code Review server
commit f3b8923a2c
4 changed files with 71 additions and 37 deletions

View file

@ -1649,6 +1649,7 @@ Optional properties:
capacitor mode. capacitor mode.
- qcom,msm-micbias2-ext-cap : Boolean. Enable micbias2 external - qcom,msm-micbias2-ext-cap : Boolean. Enable micbias2 external
capacitor mode. capacitor mode.
- qcom,wsa-disable : Boolean. Disables WSA speaker dailinks from sound node.
- qcom,msm-spk-ext-pa : GPIO which enables external speaker pa. - qcom,msm-spk-ext-pa : GPIO which enables external speaker pa.
- qcom,msm-mclk-freq : This property is used to inform machine driver about - qcom,msm-mclk-freq : This property is used to inform machine driver about
mclk frequency needs to be configured for internal and external PA. mclk frequency needs to be configured for internal and external PA.
@ -1685,6 +1686,7 @@ Example:
qcom,msm-mclk-freq = <9600000>; qcom,msm-mclk-freq = <9600000>;
qcom,msm-mbhc-hphl-swh = <0>; qcom,msm-mbhc-hphl-swh = <0>;
qcom,msm-mbhc-gnd-swh = <0>; qcom,msm-mbhc-gnd-swh = <0>;
qcom,wsa-disable;
qcom,msm-mbhc-moist-cfg = <1>, <3>, <0>; qcom,msm-mbhc-moist-cfg = <1>, <3>, <0>;
qcom,msm-hs-micbias-type = "internal"; qcom,msm-hs-micbias-type = "internal";
qcom,msm-micbias1-ext-cap; qcom,msm-micbias1-ext-cap;

View file

@ -810,6 +810,7 @@
status = "disabled"; status = "disabled";
compatible = "qcom,sdm660-asoc-snd"; compatible = "qcom,sdm660-asoc-snd";
qcom,model = "sdm660-snd-card"; qcom,model = "sdm660-snd-card";
qcom,wsa-disable;
qcom,wcn-btfm; qcom,wcn-btfm;
qcom,mi2s-audio-intf; qcom,mi2s-audio-intf;
qcom,auxpcm-audio-intf; qcom,auxpcm-audio-intf;

View file

@ -2864,10 +2864,12 @@ static int msm_asoc_machine_probe(struct platform_device *pdev)
ret = -EPROBE_DEFER; ret = -EPROBE_DEFER;
goto err; goto err;
} }
ret = msm_init_wsa_dev(pdev, card);
if (ret)
goto err;
if (!of_property_read_bool(pdev->dev.of_node, "qcom,wsa-disable")) {
ret = msm_init_wsa_dev(pdev, card);
if (ret)
goto err;
}
ret = devm_snd_soc_register_card(&pdev->dev, card); ret = devm_snd_soc_register_card(&pdev->dev, card);
if (ret == -EPROBE_DEFER) { if (ret == -EPROBE_DEFER) {

View file

@ -2227,21 +2227,6 @@ static struct snd_soc_dai_link msm_int_dai[] = {
.codec_name = "snd-soc-dummy", .codec_name = "snd-soc-dummy",
}, },
{/* hw:x,35 */ {/* hw:x,35 */
.name = LPASS_BE_INT5_MI2S_TX,
.stream_name = "INT5 MI2S Capture",
.cpu_dai_name = "msm-dai-q6-mi2s.12",
.platform_name = "msm-pcm-hostless",
.codec_name = "msm_sdw_codec",
.codec_dai_name = "msm_sdw_vifeedback",
.be_id = MSM_BACKEND_DAI_INT5_MI2S_TX,
.be_hw_params_fixup = int_mi2s_be_hw_params_fixup,
.ops = &msm_sdw_mi2s_be_ops,
.no_host_mode = SND_SOC_DAI_LINK_NO_HOST,
.ignore_suspend = 1,
.dpcm_capture = 1,
.ignore_pmdown_time = 1,
},
{/* hw:x,36 */
.name = "Primary MI2S_RX Hostless", .name = "Primary MI2S_RX Hostless",
.stream_name = "Primary MI2S_RX Hostless", .stream_name = "Primary MI2S_RX Hostless",
.cpu_dai_name = "PRI_MI2S_RX_HOSTLESS", .cpu_dai_name = "PRI_MI2S_RX_HOSTLESS",
@ -2258,7 +2243,7 @@ static struct snd_soc_dai_link msm_int_dai[] = {
.codec_dai_name = "snd-soc-dummy-dai", .codec_dai_name = "snd-soc-dummy-dai",
.codec_name = "snd-soc-dummy", .codec_name = "snd-soc-dummy",
}, },
{/* hw:x,37 */ {/* hw:x,36 */
.name = "Secondary MI2S_RX Hostless", .name = "Secondary MI2S_RX Hostless",
.stream_name = "Secondary MI2S_RX Hostless", .stream_name = "Secondary MI2S_RX Hostless",
.cpu_dai_name = "SEC_MI2S_RX_HOSTLESS", .cpu_dai_name = "SEC_MI2S_RX_HOSTLESS",
@ -2275,7 +2260,7 @@ static struct snd_soc_dai_link msm_int_dai[] = {
.codec_dai_name = "snd-soc-dummy-dai", .codec_dai_name = "snd-soc-dummy-dai",
.codec_name = "snd-soc-dummy", .codec_name = "snd-soc-dummy",
}, },
{/* hw:x,38 */ {/* hw:x,37 */
.name = "Tertiary MI2S_RX Hostless", .name = "Tertiary MI2S_RX Hostless",
.stream_name = "Tertiary MI2S_RX Hostless", .stream_name = "Tertiary MI2S_RX Hostless",
.cpu_dai_name = "TERT_MI2S_RX_HOSTLESS", .cpu_dai_name = "TERT_MI2S_RX_HOSTLESS",
@ -2292,7 +2277,7 @@ static struct snd_soc_dai_link msm_int_dai[] = {
.codec_dai_name = "snd-soc-dummy-dai", .codec_dai_name = "snd-soc-dummy-dai",
.codec_name = "snd-soc-dummy", .codec_name = "snd-soc-dummy",
}, },
{/* hw:x,39 */ {/* hw:x,38 */
.name = "INT0 MI2S_RX Hostless", .name = "INT0 MI2S_RX Hostless",
.stream_name = "INT0 MI2S_RX Hostless", .stream_name = "INT0 MI2S_RX Hostless",
.cpu_dai_name = "INT0_MI2S_RX_HOSTLESS", .cpu_dai_name = "INT0_MI2S_RX_HOSTLESS",
@ -2309,6 +2294,28 @@ static struct snd_soc_dai_link msm_int_dai[] = {
.codec_dai_name = "snd-soc-dummy-dai", .codec_dai_name = "snd-soc-dummy-dai",
.codec_name = "snd-soc-dummy", .codec_name = "snd-soc-dummy",
}, },
};
static struct snd_soc_dai_link msm_int_wsa_dai[] = {
{/* hw:x,39 */
.name = LPASS_BE_INT5_MI2S_TX,
.stream_name = "INT5_mi2s Capture",
.cpu_dai_name = "msm-dai-q6-mi2s.12",
.platform_name = "msm-pcm-hostless",
.codec_name = "msm_sdw_codec",
.codec_dai_name = "msm_sdw_vifeedback",
.be_id = MSM_BACKEND_DAI_INT5_MI2S_TX,
.be_hw_params_fixup = int_mi2s_be_hw_params_fixup,
.ops = &msm_sdw_mi2s_be_ops,
.no_host_mode = SND_SOC_DAI_LINK_NO_HOST,
.ignore_suspend = 1,
.dpcm_capture = 1,
.ignore_pmdown_time = 1,
},
};
static struct snd_soc_dai_link msm_int_be_dai[] = {
/* Backend I2S DAI Links */ /* Backend I2S DAI Links */
{ {
.name = LPASS_BE_INT0_MI2S_RX, .name = LPASS_BE_INT0_MI2S_RX,
@ -2343,21 +2350,6 @@ static struct snd_soc_dai_link msm_int_dai[] = {
.ops = &msm_int_mi2s_be_ops, .ops = &msm_int_mi2s_be_ops,
.ignore_suspend = 1, .ignore_suspend = 1,
}, },
{
.name = LPASS_BE_INT4_MI2S_RX,
.stream_name = "INT4 MI2S Playback",
.cpu_dai_name = "msm-dai-q6-mi2s.11",
.platform_name = "msm-pcm-routing",
.codec_name = "msm_sdw_codec",
.codec_dai_name = "msm_sdw_i2s_rx1",
.no_pcm = 1,
.dpcm_playback = 1,
.be_id = MSM_BACKEND_DAI_INT4_MI2S_RX,
.init = &msm_sdw_audrx_init,
.be_hw_params_fixup = int_mi2s_be_hw_params_fixup,
.ops = &msm_sdw_mi2s_be_ops,
.ignore_suspend = 1,
},
{ {
.name = LPASS_BE_INT2_MI2S_TX, .name = LPASS_BE_INT2_MI2S_TX,
.stream_name = "INT2 MI2S Capture", .stream_name = "INT2 MI2S Capture",
@ -2898,11 +2890,32 @@ static struct snd_soc_dai_link msm_wcn_be_dai_links[] = {
}, },
}; };
static struct snd_soc_dai_link msm_wsa_be_dai_links[] = {
{
.name = LPASS_BE_INT4_MI2S_RX,
.stream_name = "INT4 MI2S Playback",
.cpu_dai_name = "msm-dai-q6-mi2s.11",
.platform_name = "msm-pcm-routing",
.codec_name = "msm_sdw_codec",
.codec_dai_name = "msm_sdw_i2s_rx1",
.no_pcm = 1,
.dpcm_playback = 1,
.be_id = MSM_BACKEND_DAI_INT4_MI2S_RX,
.init = &msm_sdw_audrx_init,
.be_hw_params_fixup = int_mi2s_be_hw_params_fixup,
.ops = &msm_sdw_mi2s_be_ops,
.ignore_suspend = 1,
},
};
static struct snd_soc_dai_link msm_int_dai_links[ static struct snd_soc_dai_link msm_int_dai_links[
ARRAY_SIZE(msm_int_dai) + ARRAY_SIZE(msm_int_dai) +
ARRAY_SIZE(msm_int_wsa_dai) +
ARRAY_SIZE(msm_int_be_dai) +
ARRAY_SIZE(msm_mi2s_be_dai_links) + ARRAY_SIZE(msm_mi2s_be_dai_links) +
ARRAY_SIZE(msm_auxpcm_be_dai_links)+ ARRAY_SIZE(msm_auxpcm_be_dai_links)+
ARRAY_SIZE(msm_wcn_be_dai_links)]; ARRAY_SIZE(msm_wcn_be_dai_links) +
ARRAY_SIZE(msm_wsa_be_dai_links)];
static struct snd_soc_card sdm660_card = { static struct snd_soc_card sdm660_card = {
/* snd_soc_card_sdm660 */ /* snd_soc_card_sdm660 */
@ -2965,6 +2978,16 @@ static struct snd_soc_card *msm_int_populate_sndcard_dailinks(
len1 = ARRAY_SIZE(msm_int_dai); len1 = ARRAY_SIZE(msm_int_dai);
memcpy(msm_int_dai_links, msm_int_dai, sizeof(msm_int_dai)); memcpy(msm_int_dai_links, msm_int_dai, sizeof(msm_int_dai));
dailink = msm_int_dai_links; dailink = msm_int_dai_links;
if (!of_property_read_bool(dev->of_node,
"qcom,wsa-disable")) {
memcpy(dailink + len1,
msm_int_wsa_dai,
sizeof(msm_int_wsa_dai));
len1 += ARRAY_SIZE(msm_int_wsa_dai);
}
memcpy(dailink + len1, msm_int_be_dai, sizeof(msm_int_be_dai));
len1 += ARRAY_SIZE(msm_int_be_dai);
if (of_property_read_bool(dev->of_node, if (of_property_read_bool(dev->of_node,
"qcom,mi2s-audio-intf")) { "qcom,mi2s-audio-intf")) {
memcpy(dailink + len1, memcpy(dailink + len1,
@ -2987,6 +3010,12 @@ static struct snd_soc_card *msm_int_populate_sndcard_dailinks(
sizeof(msm_wcn_be_dai_links)); sizeof(msm_wcn_be_dai_links));
len1 += ARRAY_SIZE(msm_wcn_be_dai_links); len1 += ARRAY_SIZE(msm_wcn_be_dai_links);
} }
if (!of_property_read_bool(dev->of_node, "qcom,wsa-disable")) {
memcpy(dailink + len1,
msm_wsa_be_dai_links,
sizeof(msm_wsa_be_dai_links));
len1 += ARRAY_SIZE(msm_wsa_be_dai_links);
}
card->dai_link = dailink; card->dai_link = dailink;
card->num_links = len1; card->num_links = len1;
return card; return card;