summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Chen <chenche@codeaurora.org>2017-05-10 17:16:38 -0400
committerGerrit - the friendly Code Review server <code-review@localhost>2017-05-24 05:59:14 -0700
commitf5f76777192bc5591fb005f067de501705d68fd7 (patch)
tree6998df6baae821aa2d886df1eb1683b80e315985
parent60be71604a84d2e047215cb702d6324379a353bb (diff)
ASoC: msm: qdsp6v2: set voc type according to stream type
Set voc path type according to stream type during routing preparation for voice session to fix uninitialized voc path type causing voc device port configuration failure. CRs-fixed: 2045461 Change-Id: I4983ba55b1854879680b6d13c33904a522092eb0 Signed-off-by: Derek Chen <chenche@codeaurora.org>
-rw-r--r--sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.c b/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.c
index 0f63fd6bbd00..d2cd318b0e8c 100644
--- a/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.c
+++ b/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.c
@@ -14270,10 +14270,10 @@ static int msm_pcm_routing_prepare(struct snd_pcm_substream *substream)
pr_debug("%s voice session_id: 0x%x\n", __func__,
session_id);
- if (session_type == SESSION_TYPE_TX)
- voc_path_type = TX_PATH;
- else
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
voc_path_type = RX_PATH;
+ else
+ voc_path_type = TX_PATH;
voc_set_route_flag(session_id, voc_path_type, 1);