diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2017-01-30 07:05:26 -0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-01-30 07:05:26 -0800 |
commit | f3b8923a2c45ba48e1c364d9661afb6af081f78b (patch) | |
tree | 750ac2b1b3b8f58f246e33987d81a176b4ff98fa /sound | |
parent | e1e1ad059212d925fbd04a1493a5885c65725324 (diff) | |
parent | 82dc8dd4bc8fddcb543165f9228ef90dc4482521 (diff) |
Merge "ARM: dts: msm: Disable WSA for internal codec SDM660"
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/msm/sdm660-common.c | 8 | ||||
-rw-r--r-- | sound/soc/msm/sdm660-internal.c | 97 |
2 files changed, 68 insertions, 37 deletions
diff --git a/sound/soc/msm/sdm660-common.c b/sound/soc/msm/sdm660-common.c index 58eb30c39764..5dc5bf9d1b3c 100644 --- a/sound/soc/msm/sdm660-common.c +++ b/sound/soc/msm/sdm660-common.c @@ -2864,10 +2864,12 @@ static int msm_asoc_machine_probe(struct platform_device *pdev) ret = -EPROBE_DEFER; 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); if (ret == -EPROBE_DEFER) { diff --git a/sound/soc/msm/sdm660-internal.c b/sound/soc/msm/sdm660-internal.c index c002399beb6b..805ff2335b42 100644 --- a/sound/soc/msm/sdm660-internal.c +++ b/sound/soc/msm/sdm660-internal.c @@ -2227,21 +2227,6 @@ static struct snd_soc_dai_link msm_int_dai[] = { .codec_name = "snd-soc-dummy", }, {/* 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", .stream_name = "Primary 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_name = "snd-soc-dummy", }, - {/* hw:x,37 */ + {/* hw:x,36 */ .name = "Secondary MI2S_RX Hostless", .stream_name = "Secondary 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_name = "snd-soc-dummy", }, - {/* hw:x,38 */ + {/* hw:x,37 */ .name = "Tertiary MI2S_RX Hostless", .stream_name = "Tertiary 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_name = "snd-soc-dummy", }, - {/* hw:x,39 */ + {/* hw:x,38 */ .name = "INT0 MI2S_RX Hostless", .stream_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_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 */ { .name = LPASS_BE_INT0_MI2S_RX, @@ -2344,21 +2351,6 @@ static struct snd_soc_dai_link msm_int_dai[] = { .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, .stream_name = "INT2 MI2S Capture", .cpu_dai_name = "msm-dai-q6-mi2s.9", @@ -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[ 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_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 = { /* snd_soc_card_sdm660 */ @@ -2965,6 +2978,16 @@ static struct snd_soc_card *msm_int_populate_sndcard_dailinks( len1 = ARRAY_SIZE(msm_int_dai); memcpy(msm_int_dai_links, msm_int_dai, sizeof(msm_int_dai)); 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, "qcom,mi2s-audio-intf")) { memcpy(dailink + len1, @@ -2987,6 +3010,12 @@ static struct snd_soc_card *msm_int_populate_sndcard_dailinks( sizeof(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->num_links = len1; return card; |