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>
This commit is contained in:
Derek Chen 2017-05-10 17:16:38 -04:00 committed by Gerrit - the friendly Code Review server
parent 60be71604a
commit f5f7677719

View file

@ -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);