diff --git a/include/sound/apr_audio-v2.h b/include/sound/apr_audio-v2.h index ed1f80c501f6f80f556f86975050b178d83f6724..37d44914140ea32f45b3c1a9b7aa2eac66f5aeb8 100644 --- a/include/sound/apr_audio-v2.h +++ b/include/sound/apr_audio-v2.h @@ -4145,6 +4145,9 @@ struct asm_stream_cmd_open_write_v3 { /* Absolute timestamp is identified by this value.*/ #define ASM_ABSOLUTEIMESTAMP 1 +/* Bit value for Low Latency Tx stream subfield */ +#define ASM_LOW_LATENCY_TX_STREAM_SESSION 1 + /* Bit shift for the stream_perf_mode subfield. */ #define ASM_SHIFT_STREAM_PERF_MODE_FLAG_IN_OPEN_READ 29 diff --git a/sound/soc/msm/qdsp6v2/msm-pcm-q6-v2.c b/sound/soc/msm/qdsp6v2/msm-pcm-q6-v2.c index ab5a0f330ae117922b4bf9993dd2552e2654e1ff..0855ae2016a8975cfb1bcc5b0808927b855588fe 100644 --- a/sound/soc/msm/qdsp6v2/msm-pcm-q6-v2.c +++ b/sound/soc/msm/qdsp6v2/msm-pcm-q6-v2.c @@ -323,17 +323,28 @@ static int msm_pcm_capture_prepare(struct snd_pcm_substream *substream) struct snd_pcm_runtime *runtime = substream->runtime; struct msm_audio *prtd = runtime->private_data; struct snd_soc_pcm_runtime *soc_prtd = substream->private_data; + struct msm_plat_data *pdata; struct snd_pcm_hw_params *params; struct msm_pcm_routing_evt event; int ret = 0; int i = 0; uint16_t bits_per_sample = 16; + pdata = (struct msm_plat_data *) + dev_get_drvdata(soc_prtd->platform->dev); + if (!pdata) { + pr_err("%s: platform data not populated\n", __func__); + return -EINVAL; + } + pr_debug("%s\n", __func__); params = &soc_prtd->dpcm[substream->stream].hw_params; if (params_format(params) == SNDRV_PCM_FORMAT_S24_LE) bits_per_sample = 24; + prtd->audio_client->perf_mode = pdata->perf_mode; + pr_debug("%s: perf_mode: 0x%x\n", __func__, pdata->perf_mode); + pr_debug("%s Opening %d-ch PCM read stream\n", __func__, params_channels(params)); ret = q6asm_open_read_v2(prtd->audio_client, FORMAT_LINEAR_PCM, diff --git a/sound/soc/msm/qdsp6v2/q6asm.c b/sound/soc/msm/qdsp6v2/q6asm.c index eaf644eac2e9a8038c13f7305f74173ea7d1df9d..cbc88b7f118d480eddc0f85309a1321ff609379c 100644 --- a/sound/soc/msm/qdsp6v2/q6asm.c +++ b/sound/soc/msm/qdsp6v2/q6asm.c @@ -1768,7 +1768,7 @@ static int __q6asm_open_read(struct audio_client *ac, open.mode_flags = 0x0; if (ac->perf_mode == LOW_LATENCY_PCM_MODE) { - open.mode_flags |= ASM_LOW_LATENCY_STREAM_SESSION << + open.mode_flags |= ASM_LOW_LATENCY_TX_STREAM_SESSION << ASM_SHIFT_STREAM_PERF_MODE_FLAG_IN_OPEN_READ; } else { open.mode_flags |= ASM_LEGACY_STREAM_SESSION <<