ASoC: msm: qdsp6v2: compress passthrough fixes
- Ignore stream volume and pp params calls for compress passthrough playback. - Use correct COPP index for compress passthrough playback in adm_send_compressed_device_mute. Signed-off-by: Mingming Yin <mingming@codeaurora.org> Change-Id: I10d1aaf3bb6cbf6358378667f93970e9eb21be1d
This commit is contained in:
parent
cf6e60c32f
commit
40685fa4c5
2 changed files with 22 additions and 11 deletions
|
@ -1492,16 +1492,27 @@ static int msm_compr_trigger(struct snd_compr_stream *cstream, int cmd)
|
||||||
pr_debug("%s: SNDRV_PCM_TRIGGER_START\n", __func__);
|
pr_debug("%s: SNDRV_PCM_TRIGGER_START\n", __func__);
|
||||||
atomic_set(&prtd->start, 1);
|
atomic_set(&prtd->start, 1);
|
||||||
|
|
||||||
/* set volume for the stream before RUN */
|
/*
|
||||||
rc = msm_compr_set_volume(cstream, volume[0], volume[1]);
|
* compr_set_volume and compr_init_pp_params
|
||||||
if (rc)
|
* are used to configure ASM volume hence not
|
||||||
pr_err("%s : Set Volume failed : %d\n",
|
* needed for compress passthrough playback.
|
||||||
__func__, rc);
|
*
|
||||||
|
* compress passthrough volume is controlled in
|
||||||
|
* ADM by adm_send_compressed_device_mute()
|
||||||
|
*/
|
||||||
|
if (prtd->compr_passthr == LEGACY_PCM) {
|
||||||
|
/* set volume for the stream before RUN */
|
||||||
|
rc = msm_compr_set_volume(cstream,
|
||||||
|
volume[0], volume[1]);
|
||||||
|
if (rc)
|
||||||
|
pr_err("%s : Set Volume failed : %d\n",
|
||||||
|
__func__, rc);
|
||||||
|
|
||||||
rc = msm_compr_init_pp_params(cstream, ac);
|
rc = msm_compr_init_pp_params(cstream, ac);
|
||||||
if (rc)
|
if (rc)
|
||||||
pr_err("%s : init PP params failed : %d\n",
|
pr_err("%s : init PP params failed : %d\n",
|
||||||
__func__, rc);
|
__func__, rc);
|
||||||
|
}
|
||||||
|
|
||||||
/* issue RUN command for the stream */
|
/* issue RUN command for the stream */
|
||||||
q6asm_run_nowait(prtd->audio_client, 0, 0, 0);
|
q6asm_run_nowait(prtd->audio_client, 0, 0, 0);
|
||||||
|
|
|
@ -9114,7 +9114,7 @@ static int msm_routing_put_device_pp_params_mixer(struct snd_kcontrol *kcontrol,
|
||||||
(msm_bedais[be_idx].compr_passthr_mode !=
|
(msm_bedais[be_idx].compr_passthr_mode !=
|
||||||
LEGACY_PCM))
|
LEGACY_PCM))
|
||||||
adm_send_compressed_device_mute(port_id,
|
adm_send_compressed_device_mute(port_id,
|
||||||
copp, mute);
|
idx, mute);
|
||||||
break;
|
break;
|
||||||
case ADM_PP_PARAM_LATENCY_ID:
|
case ADM_PP_PARAM_LATENCY_ID:
|
||||||
pr_debug("%s: ADM_PP_PARAM_LATENCY\n", __func__);
|
pr_debug("%s: ADM_PP_PARAM_LATENCY\n", __func__);
|
||||||
|
@ -9128,7 +9128,7 @@ static int msm_routing_put_device_pp_params_mixer(struct snd_kcontrol *kcontrol,
|
||||||
(msm_bedais[be_idx].compr_passthr_mode !=
|
(msm_bedais[be_idx].compr_passthr_mode !=
|
||||||
LEGACY_PCM))
|
LEGACY_PCM))
|
||||||
adm_send_compressed_device_latency(port_id,
|
adm_send_compressed_device_latency(port_id,
|
||||||
copp, latency);
|
idx, latency);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
pr_info("%s, device pp param %d not supported\n",
|
pr_info("%s, device pp param %d not supported\n",
|
||||||
|
|
Loading…
Add table
Reference in a new issue