diff options
author | Kunlei Zhang <kunleiz@codeaurora.org> | 2020-06-30 21:05:46 +0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2020-07-13 19:15:04 -0700 |
commit | f712be0718828b5e04a89dd4d658febfae5a8f56 (patch) | |
tree | 7d9c14f71f588d88a3701ddee24b2f158dc72d57 /asoc | |
parent | 6f900e6d5ab5bb1b6a7dd859692711888eae8822 (diff) | |
download | msm-extra-f712be0718828b5e04a89dd4d658febfae5a8f56.tar.gz |
asoc: kona: update sound wire port frame config routing
update sound wire port frame config routing to ensure use
correct port config for device with no WCD.
Change-Id: I1746323230064f51020850cf8e1dbf2c29977bed
Signed-off-by: Kunlei Zhang <kunleiz@codeaurora.org>
Diffstat (limited to 'asoc')
-rw-r--r-- | asoc/kona.c | 39 |
1 files changed, 18 insertions, 21 deletions
diff --git a/asoc/kona.c b/asoc/kona.c index 02b9e016..f2bdb382 100644 --- a/asoc/kona.c +++ b/asoc/kona.c @@ -5425,6 +5425,7 @@ static int msm_int_audrx_init(struct snd_soc_pcm_runtime *rtd) struct snd_soc_component *aux_comp; struct platform_device *pdev = NULL; int i = 0; + bool is_wcd937x_used = false; char *data = NULL; struct msm_asoc_mach_data *pdata = snd_soc_card_get_drvdata(rtd->card); @@ -5521,33 +5522,29 @@ static int msm_int_audrx_init(struct snd_soc_pcm_runtime *rtd) if (data != NULL) { if (!strncmp(data, "wcd937x", sizeof("wcd937x"))) { - bolero_set_port_map(component, - ARRAY_SIZE(sm_port_map_wcd937x), - sm_port_map_wcd937x); - break; - } else if (!strncmp( data, "wcd938x", - sizeof("wcd938x"))) { - if (pdata->lito_v2_enabled) { - /* - * Enable tx data line3 for - * saipan version v2 and - * write corresponding - * lpi register. - */ - bolero_set_port_map(component, - ARRAY_SIZE(sm_port_map_v2), - sm_port_map_v2); - } else { - bolero_set_port_map(component, - ARRAY_SIZE(sm_port_map), - sm_port_map); - } + is_wcd937x_used = true; break; } } } } + if (is_wcd937x_used) { + bolero_set_port_map(component, + ARRAY_SIZE(sm_port_map_wcd937x), + sm_port_map_wcd937x); + } else if (pdata->lito_v2_enabled) { + /* + * Enable tx data line3 for saipan version v2 and + * write corresponding lpi register. + */ + bolero_set_port_map(component, ARRAY_SIZE(sm_port_map_v2), + sm_port_map_v2); + } else { + bolero_set_port_map(component, ARRAY_SIZE(sm_port_map), + sm_port_map); + } + card = rtd->card->snd_card; if (!pdata->codec_root) { entry = snd_info_create_subdir(card->module, "codecs", |