From 4bb899878875af238cbb1d648759920ed7e3ff7f Mon Sep 17 00:00:00 2001 From: Surendar Karka Date: Tue, 1 Oct 2019 13:51:11 +0530 Subject: [PATCH] asoc: update number of channel only for default channel map Volume setting on the custom channel map is failed as use default channel map is always set to true. Use default channel map from runtime data and update number of channels only if custom channel map is not set. Change-Id: I2326b52687144a584f85ab3db8a2930f8fa5c3ea Signed-off-by: Surendar Karka --- asoc/msm-compress-q6-v2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/asoc/msm-compress-q6-v2.c b/asoc/msm-compress-q6-v2.c index 4347bec26ed6..45602990ac61 100644 --- a/asoc/msm-compress-q6-v2.c +++ b/asoc/msm-compress-q6-v2.c @@ -408,8 +408,8 @@ static int msm_compr_set_volume(struct snd_compr_stream *cstream, gain_list[0] = volume_l; gain_list[1] = volume_r; gain_list[2] = volume_l; - num_channels = 3; - use_default = true; + if (use_default) + num_channels = 3; rc = q6asm_set_multich_gain(prtd->audio_client, num_channels, gain_list, chmap, use_default); }