asoc: tegra-alt: fix admaif channel status check
Dara Ramesh [Thu, 20 Aug 2015 07:59:22 +0000 (12:59 +0530)]
-fix incorrect channel status check for playback
and record path

Change-Id: I51ad4541e3e2b6eb68265ab1d712fb0c2082600a
Signed-off-by: Dara Ramesh <dramesh@nvidia.com>
Reviewed-on: http://git-master/r/786430
(cherry picked from commit c85528601c3f60ec94fab8b081088e4bd5365a15)
Reviewed-on: http://git-master/r/790885
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Viraj Karandikar <vkarandikar@nvidia.com>

sound/soc/tegra-alt/tegra210_admaif_alt.c

index 932633d..113d112 100644 (file)
@@ -172,10 +172,10 @@ static int tegra210_admaif_get_status(struct snd_soc_dai *dai,
        unsigned int status_reg, val;
 
        if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
-               status_reg = TEGRA210_ADMAIF_XBAR_RX_STATUS +
+               status_reg = TEGRA210_ADMAIF_XBAR_TX_STATUS +
                        (dai->id * TEGRA210_ADMAIF_CHANNEL_REG_STRIDE);
        } else {
-               status_reg = TEGRA210_ADMAIF_XBAR_TX_STATUS +
+               status_reg = TEGRA210_ADMAIF_XBAR_RX_STATUS +
                        (dai->id * TEGRA210_ADMAIF_CHANNEL_REG_STRIDE);
        }
        regmap_read(admaif->regmap, status_reg, &val);