asoc: tegra: handling of i2s capture in voice call recording
Nikesh Oswal [Wed, 28 Dec 2011 08:56:51 +0000 (13:56 +0530)]
stop the enabling/disabling of i2s capture from i2s dai in
voice call recording usecase because this would be handled
by the voice call management functions and also add parameters
for voice call record usecase in i2s structures.

Bug: 912897

Change-Id: I9df117300121218fe7f258fd8c79092ab3e1f8e1
Signed-off-by: Nikesh Oswal <noswal@nvidia.com>
Reviewed-on: http://git-master/r/72352
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

Rebase-Id: R004f0ff546ec28e0e0b36c7332f5f9733fc71d50

sound/soc/tegra/tegra30_i2s.c
sound/soc/tegra/tegra30_i2s.h

index 74a812a..e18a3d8 100644 (file)
@@ -352,16 +352,18 @@ static void tegra30_i2s_stop_playback(struct tegra30_i2s *i2s)
 static void tegra30_i2s_start_capture(struct tegra30_i2s *i2s)
 {
        tegra30_ahub_enable_rx_fifo(i2s->capture_fifo_cif);
-       regmap_update_bits(i2s->regmap, TEGRA30_I2S_CTRL,
-                          TEGRA30_I2S_CTRL_XFER_EN_RX,
-                          TEGRA30_I2S_CTRL_XFER_EN_RX);
+       if (!i2s->is_call_mode_rec)
+               regmap_update_bits(i2s->regmap, TEGRA30_I2S_CTRL,
+                                  TEGRA30_I2S_CTRL_XFER_EN_RX,
+                                  TEGRA30_I2S_CTRL_XFER_EN_RX);
 }
 
 static void tegra30_i2s_stop_capture(struct tegra30_i2s *i2s)
 {
        tegra30_ahub_disable_rx_fifo(i2s->capture_fifo_cif);
-       regmap_update_bits(i2s->regmap, TEGRA30_I2S_CTRL,
-                          TEGRA30_I2S_CTRL_XFER_EN_RX, 0);
+       if (!i2s->is_call_mode_rec)
+               regmap_update_bits(i2s->regmap, TEGRA30_I2S_CTRL,
+                                  TEGRA30_I2S_CTRL_XFER_EN_RX, 0);
 }
 
 static int tegra30_i2s_trigger(struct snd_pcm_substream *substream, int cmd,
index 0acfff4..c948518 100644 (file)
@@ -250,6 +250,8 @@ struct tegra30_i2s {
 #ifdef CONFIG_PM
        u32  reg_cache[(TEGRA30_I2S_CIF_TX_CTRL >> 2) + 1];
 #endif
+       int call_record_dam_ifc;
+       int is_call_mode_rec;
 };
 
 struct codec_config {