ASoC: msm: Fix the last param 'for_each_set_bit'
The adm command does not get executed for last session in
'for_each_set_bit' loop. This results in failiure of Multimedia4
session.
The last parameter for 'for_each_set_bit' is size rather than
id bit. The current usage of bit id results in no adm command
for the last session.
Replace the last parameter to appropriate size macro.
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
Change-Id: I309fb9b1c1cf5d49b6d13acedbfb5f1e20540771
diff --git a/sound/soc/msm/msm-pcm-routing.c b/sound/soc/msm/msm-pcm-routing.c
index 453bce4..e7c2694 100644
--- a/sound/soc/msm/msm-pcm-routing.c
+++ b/sound/soc/msm/msm-pcm-routing.c
@@ -1348,7 +1348,7 @@
mutex_lock(&routing_lock);
- for_each_set_bit(i, &bedai->fe_sessions, MSM_FRONTEND_DAI_MM_MAX_ID) {
+ for_each_set_bit(i, &bedai->fe_sessions, MSM_FRONTEND_DAI_MM_SIZE) {
if (fe_dai_map[i][session_type] != INVALID_SESSION)
adm_close(bedai->port_id);
}
@@ -1402,7 +1402,7 @@
*/
bedai->active = 1;
- for_each_set_bit(i, &bedai->fe_sessions, MSM_FRONTEND_DAI_MM_MAX_ID) {
+ for_each_set_bit(i, &bedai->fe_sessions, MSM_FRONTEND_DAI_MM_SIZE) {
if (fe_dai_map[i][session_type] != INVALID_SESSION) {
adm_open(bedai->port_id, path_type,
params_rate(bedai->hw_params),