summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sound/soc/tegra/tegra20_ac97.c14
-rw-r--r--sound/soc/tegra/tegra20_ac97.h3
2 files changed, 9 insertions, 8 deletions
diff --git a/sound/soc/tegra/tegra20_ac97.c b/sound/soc/tegra/tegra20_ac97.c
index 8a57bcc26de7..f43b69f5250f 100644
--- a/sound/soc/tegra/tegra20_ac97.c
+++ b/sound/soc/tegra/tegra20_ac97.c
@@ -345,8 +345,6 @@ static unsigned short tegra20_ac97_read(struct snd_ac97 *ac97_snd, unsigned shor
u32 val;
int timeout = 100;
-//pr_info("%s(0x%04x)", __func__, reg);
-
// mutex_lock(&car_mutex);
/* Set MSB=1 to indicate Read Command! */
@@ -356,15 +354,17 @@ static unsigned short tegra20_ac97_read(struct snd_ac97 *ac97_snd, unsigned shor
AC_AC_CMD_BUSY, ac97->regs + AC_AC_CMD_0);
while (!((val = readl(ac97->regs + AC_AC_STATUS1_0)) &
- AC_AC_STATUS1_STA_VALID1) && timeout--)
+ AC_AC_STATUS1_STA_VALID1) && --timeout)
mdelay(1);
// mutex_unlock(&car_mutex);
-//pr_info(" = 0x%04x\n", (val & AC_AC_STATUS1_STA_DATA1_MASK) >> AC_AC_STATUS1_STA_DATA1_SHIFT);
-
- return (val & AC_AC_STATUS1_STA_DATA1_MASK) >>
+ val = (val & AC_AC_STATUS1_STA_DATA1_MASK) >>
AC_AC_STATUS1_STA_DATA1_SHIFT;
+
+// pr_debug("%s: 0x%02x 0x%04x\n", __func__, reg, val);
+
+ return val;
}
static void tegra20_ac97_write(struct snd_ac97 *ac97_snd, unsigned short reg,
@@ -384,7 +384,7 @@ static void tegra20_ac97_write(struct snd_ac97 *ac97_snd, unsigned short reg,
AC_AC_CMD_BUSY, ac97->regs + AC_AC_CMD_0);
while (((val = readl(ac97->regs + AC_AC_CMD_0)) &
- AC_AC_CMD_BUSY) && timeout--)
+ AC_AC_CMD_BUSY) && --timeout)
mdelay(1);
// mutex_unlock(&car_mutex);
diff --git a/sound/soc/tegra/tegra20_ac97.h b/sound/soc/tegra/tegra20_ac97.h
index 430ecc1500f4..027f717343a8 100644
--- a/sound/soc/tegra/tegra20_ac97.h
+++ b/sound/soc/tegra/tegra20_ac97.h
@@ -27,7 +27,8 @@
#define AC97_FIFO_TX 0
#define AC97_FIFO_RX 1
-#define AC97_SAMPLE_RATES SNDRV_PCM_RATE_8000_48000
+/* AC97 sample rate is really fixed */
+#define AC97_SAMPLE_RATES SNDRV_PCM_RATE_48000
/* AC97 controller */
struct tegra20_ac97 {