diff options
author | Soumya Managoli <smanag@codeaurora.org> | 2020-11-27 15:43:55 +0530 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2020-12-09 01:43:21 -0800 |
commit | adeb331165b22dbdd8a7a20e0caf8fda9f40463b (patch) | |
tree | 1a3849fa33bb2ab7a63c023d4659654d92ed4eef /asoc | |
parent | 154ac2f8432e9270da63cf609fb16c40dd6378d7 (diff) | |
download | msm-extra-adeb331165b22dbdd8a7a20e0caf8fda9f40463b.tar.gz |
ASoC: Add support to send voice UI port id to afe
As per the current design in afe, if the
afe_get_cal_topology for AFE_TOPOLOGY_CAL
or send_afe_cal_type for AFE_COMMON_TX_CAL
fails, then the voice UI calblock is fetched/sent.
This is resulting in sending voice UI calblock
on a non voice UI port during concurrent usecase scenario.
Fix is to check if the calblock for get/set is for
a voice UI port or not. Added support to send this
port id info from routing driver to afe when usecase
is enabled via mixer_control.
Change-Id: I356aae61e1b9d11324e7b9f9a57953767a64b71e
Signed-off-by: Soumya Managoli <smanag@codeaurora.org>
Diffstat (limited to 'asoc')
-rw-r--r-- | asoc/msm-pcm-routing-v2.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/asoc/msm-pcm-routing-v2.c b/asoc/msm-pcm-routing-v2.c index 03603a2c..37635a84 100644 --- a/asoc/msm-pcm-routing-v2.c +++ b/asoc/msm-pcm-routing-v2.c @@ -3033,6 +3033,7 @@ static int msm_routing_lsm_port_put(struct snd_kcontrol *kcontrol, struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; int mux = ucontrol->value.enumerated.item[0]; int lsm_port = AFE_PORT_ID_SLIMBUS_MULTI_CHAN_5_TX; + int lsm_port_idx = 0; u8 fe_idx = 0; if (mux >= e->items) { @@ -3042,6 +3043,7 @@ static int msm_routing_lsm_port_put(struct snd_kcontrol *kcontrol, pr_debug("%s: LSM enable %ld\n", __func__, ucontrol->value.integer.value[0]); + lsm_port_idx = ucontrol->value.integer.value[0]; switch (ucontrol->value.integer.value[0]) { case 1: lsm_port = AFE_PORT_ID_SLIMBUS_MULTI_CHAN_0_TX; @@ -3098,6 +3100,10 @@ static int msm_routing_lsm_port_put(struct snd_kcontrol *kcontrol, set_lsm_port(lsm_port); msm_routing_get_lsm_fe_idx(kcontrol, &fe_idx); lsm_port_index[fe_idx] = ucontrol->value.integer.value[0]; + /* Set the default AFE LSM Port to 0xffff */ + if(lsm_port_idx <= 0 || lsm_port_idx >= ARRAY_SIZE(lsm_port_text)) + lsm_port = 0xffff; + afe_set_lsm_afe_port_id(fe_idx, lsm_port); return 0; } |