소스 검색

asoc: 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: I02254b5696a17e2792ea26a2265ab01326f5cf9e
Signed-off-by: Yidong Huang <[email protected]>
yidongh 7 년 전
부모
커밋
98526effb3
1개의 변경된 파일3개의 추가작업 그리고 6개의 파일을 삭제
  1. 3 6
      asoc/msm-compress-q6-v2.c

+ 3 - 6
asoc/msm-compress-q6-v2.c

@@ -388,12 +388,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);
 	}