Loading sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c +23 −4 Original line number Diff line number Diff line Loading @@ -177,8 +177,31 @@ static int msm_compr_set_volume(struct snd_compr_stream *cstream, pr_debug("%s: call q6asm_set_lrgain\n", __func__); rc = q6asm_set_lrgain(prtd->audio_client, volume_l, volume_r); if (rc < 0) { pr_err("%s: set lrgain command failed rc=%d\n", __func__, rc); return rc; } /* * set master gain to unity so that only lr gain * is effective */ rc = q6asm_set_volume(prtd->audio_client, COMPRESSED_LR_VOL_MAX_STEPS); } else { pr_debug("%s: call q6asm_set_volume\n", __func__); /* * set left and right channel gain to unity so that * only master gain is effective */ rc = q6asm_set_lrgain(prtd->audio_client, COMPRESSED_LR_VOL_MAX_STEPS, COMPRESSED_LR_VOL_MAX_STEPS); if (rc < 0) { pr_err("%s: set lrgain command failed rc=%d\n", __func__, rc); return rc; } rc = q6asm_set_volume(prtd->audio_client, volume_l); } if (rc < 0) { Loading Loading @@ -677,10 +700,6 @@ static int msm_compr_configure_dsp(struct snd_compr_stream *cstream) return ret; } ret = msm_compr_set_volume(cstream, 0, 0); if (ret < 0) pr_err("%s : Set Volume failed : %d", __func__, ret); ret = q6asm_set_softvolume(ac, &softvol); if (ret < 0) pr_err("%s: Send SoftVolume Param failed ret=%d\n", Loading Loading
sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c +23 −4 Original line number Diff line number Diff line Loading @@ -177,8 +177,31 @@ static int msm_compr_set_volume(struct snd_compr_stream *cstream, pr_debug("%s: call q6asm_set_lrgain\n", __func__); rc = q6asm_set_lrgain(prtd->audio_client, volume_l, volume_r); if (rc < 0) { pr_err("%s: set lrgain command failed rc=%d\n", __func__, rc); return rc; } /* * set master gain to unity so that only lr gain * is effective */ rc = q6asm_set_volume(prtd->audio_client, COMPRESSED_LR_VOL_MAX_STEPS); } else { pr_debug("%s: call q6asm_set_volume\n", __func__); /* * set left and right channel gain to unity so that * only master gain is effective */ rc = q6asm_set_lrgain(prtd->audio_client, COMPRESSED_LR_VOL_MAX_STEPS, COMPRESSED_LR_VOL_MAX_STEPS); if (rc < 0) { pr_err("%s: set lrgain command failed rc=%d\n", __func__, rc); return rc; } rc = q6asm_set_volume(prtd->audio_client, volume_l); } if (rc < 0) { Loading Loading @@ -677,10 +700,6 @@ static int msm_compr_configure_dsp(struct snd_compr_stream *cstream) return ret; } ret = msm_compr_set_volume(cstream, 0, 0); if (ret < 0) pr_err("%s : Set Volume failed : %d", __func__, ret); ret = q6asm_set_softvolume(ac, &softvol); if (ret < 0) pr_err("%s: Send SoftVolume Param failed ret=%d\n", Loading