From 8d8e7881dedeb5487769cbb3323c1ad653613f44 Mon Sep 17 00:00:00 2001 From: yidongh Date: Mon, 4 Sep 2017 12:33:22 +0800 Subject: [PATCH] ASoC: msm: qdsp6v2: initialize L/R/C gain for both mono/stereo playback When there's a dynamic channel change from mono to stereo, volume burst is observed because center channel gain for stereo is not initialized. Initialize center channel gain for both mono and stereo playback. CRs-Fixed: 2095081 Change-Id: Ib92236f55b1f171603be956d00c8fcab7c4169d3 Signed-off-by: Yidong Huang --- sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c b/sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c index c462f682e160..471be3294881 100644 --- a/sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c +++ b/sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c @@ -397,12 +397,9 @@ static int msm_compr_set_volume(struct snd_compr_stream *cstream, } else { gain_list[0] = volume_l; gain_list[1] = volume_r; - /* force sending FR/FL/FC volume for mono */ - if (prtd->num_channels == 1) { - gain_list[2] = volume_l; - num_channels = 3; - use_default = true; - } + gain_list[2] = volume_l; + num_channels = 3; + use_default = true; rc = q6asm_set_multich_gain(prtd->audio_client, num_channels, gain_list, chmap, use_default); }