summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShalini Manjunatha <shalma@codeaurora.org>2020-01-13 18:21:11 +0530
committerShalini Manjunatha <shalma@codeaurora.org>2020-01-14 11:42:58 +0530
commite6f9fd09cc38cc5ea552ce7287559699d55ba391 (patch)
treef09e7c53b611923d4ce719416bdd90fd2ed7fc6b
parentc4156234868bc905c9409956e3853b2a8b417c94 (diff)
downloadmsm-extra-e6f9fd09cc38cc5ea552ce7287559699d55ba391.tar.gz
asoc: fix for fm not routing to speaker
The value range of reg in soc_mixer_control is 0 to 31. When using SOC_SINGLE_EXT, the backend id for reg may be over 31 and overflow issue may happen. Change SOC_SINGLE_EXT to SOC_DOUBLE_EXT. Set backend id as left shift and frontend id as right shift to avoid possible overflow. Made above related change in msm_routing_put_port_mixer() function as well. CR's fixed: 2602269 Change-Id: If04743299e65316718f8646b2d6c6c9cb40ec645 Signed-off-by: Shalini M <shalma@codeaurora.com>
-rw-r--r--asoc/msm-pcm-routing-v2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/asoc/msm-pcm-routing-v2.c b/asoc/msm-pcm-routing-v2.c
index 537cf09d..dceed139 100644
--- a/asoc/msm-pcm-routing-v2.c
+++ b/asoc/msm-pcm-routing-v2.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2019, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2020, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -2786,7 +2786,7 @@ static int msm_routing_put_port_mixer(struct snd_kcontrol *kcontrol,
(unsigned long *)&msm_bedais[mc->shift].port_sessions[idx]);
} else {
afe_loopback(0, msm_bedais[mc->shift].port_id,
- msm_bedais[mc->shift].port_id);
+ msm_bedais[mc->rshift].port_id);
clear_bit(shift,
(unsigned long *)&msm_bedais[mc->shift].port_sessions[idx]);
}