summaryrefslogtreecommitdiff
path: root/sound/soc
diff options
context:
space:
mode:
authorJubeom Kim <jubeomk@nvidia.com>2012-04-27 16:19:30 +0900
committerSimone Willett <swillett@nvidia.com>2012-05-01 14:26:17 -0700
commit06b7198b27ce0b427472484a388607ca62fa0be1 (patch)
tree1a4060d559b213b9065faec83c7b34974f1e9e94 /sound/soc
parentd5e341a0b8bbabf9096bb5d271c49b40b29da42a (diff)
ASoC: tegra: Fix bit-format checking
condition to check bit-format is always false because TEGRA20_I2S_CTRL_BIT_FORMAT_I2S is zero. Bug 947429 Change-Id: Ieb92f0732b092100dc1bf323ad60aff4439d5b3d Signed-off-by: Jubeom Kim <jubeomk@nvidia.com> Reviewed-on: http://git-master/r/99341 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Scott Peterson <speterson@nvidia.com> Reviewed-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/tegra/tegra20_i2s.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/tegra/tegra20_i2s.c b/sound/soc/tegra/tegra20_i2s.c
index e6de1c07a399..d90c0991ed65 100644
--- a/sound/soc/tegra/tegra20_i2s.c
+++ b/sound/soc/tegra/tegra20_i2s.c
@@ -191,8 +191,9 @@ static int tegra20_i2s_hw_params(struct snd_pcm_substream *substream,
struct tegra20_i2s *i2s = snd_soc_dai_get_drvdata(dai);
u32 reg;
int ret, sample_size, srate, i2sclock, bitcnt, i2sclk_div;
+ u32 bit_format = i2s->reg_ctrl & TEGRA20_I2S_CTRL_BIT_FORMAT_MASK;
- if ((i2s->reg_ctrl & TEGRA20_I2S_CTRL_BIT_FORMAT_I2S) &&
+ if ((bit_format == TEGRA20_I2S_CTRL_BIT_FORMAT_I2S) &&
(params_channels(params) != 2)) {
dev_err(dev, "Only Stereo is supported in I2s mode\n");
return -EINVAL;