ASoC: tegra-alt: Fix byte mask for AMX for 512fs
Arun Shamanna Lakshmi [Wed, 17 Sep 2014 06:17:59 +0000 (23:17 -0700)]
Bug 1540137

Change-Id: I51d006721407e2bf66d2c9dd461ca228754a9079
Signed-off-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
Reviewed-on: http://git-master/r/499649
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Justin Kim (SW-TEGRA) <juskim@nvidia.com>

sound/soc/tegra-alt/tegra114_amx_alt.c
sound/soc/tegra-alt/tegra210_amx_alt.c

index 03cad1f..b4111b8 100644 (file)
@@ -360,9 +360,9 @@ int tegra114_amx_set_channel_map(struct snd_soc_dai *dai,
 
                        /* making byte_mask */
                        if (i > 32)
-                               byte_mask2 |= 1 << (32 - i);
+                               byte_mask2 |= (1 << (i - 32));
                        else
-                               byte_mask1 |= 1 << i;
+                               byte_mask1 |= (1 << i);
                }
        }
 
index 9fcdd19..363647f 100644 (file)
@@ -356,9 +356,9 @@ int tegra210_amx_set_channel_map(struct snd_soc_dai *dai,
 
                        /* making byte_mask */
                        if (i > 32)
-                               byte_mask2 |= 1 << (32 - i);
+                               byte_mask2 |= (1 << (i - 32));
                        else
-                               byte_mask1 |= 1 << i;
+                               byte_mask1 |= (1 << i);
                }
        }