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