summaryrefslogtreecommitdiffstats
path: root/sound/sparc
diff options
context:
space:
mode:
authorKrzysztof Helt <krzysztof.h1@wp.pl>2006-08-21 19:29:18 +0200
committerJaroslav Kysela <perex@suse.cz>2006-09-23 10:42:24 +0200
commitd1fdf07e22efdb9fa53739c0f0fec1f6b24c2056 (patch)
treecb83b26fd0e84741e80a0a053374fe2fff8e995c /sound/sparc
parent470f1f1a1c2597fab98339ab0966dbf602d604f0 (diff)
downloadop-kernel-dev-d1fdf07e22efdb9fa53739c0f0fec1f6b24c2056.zip
op-kernel-dev-d1fdf07e22efdb9fa53739c0f0fec1f6b24c2056.tar.gz
[ALSA] sparc dbri: fixed setting of burst size after reset
A proper way to set DBRI's burst size. The size must be set after each chip reset. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/sparc')
-rw-r--r--sound/sparc/dbri.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/sound/sparc/dbri.c b/sound/sparc/dbri.c
index 6fc37c9..810f8b9 100644
--- a/sound/sparc/dbri.c
+++ b/sound/sparc/dbri.c
@@ -690,6 +690,7 @@ static void dbri_cmdsend(struct snd_dbri * dbri, volatile s32 * cmd)
static void dbri_reset(struct snd_dbri * dbri)
{
int i;
+ u32 tmp;
dprintk(D_GEN, "reset 0:%x 2:%x 8:%x 9:%x\n",
sbus_readl(dbri->regs + REG0),
@@ -699,13 +700,20 @@ static void dbri_reset(struct snd_dbri * dbri)
sbus_writel(D_R, dbri->regs + REG0); /* Soft Reset */
for (i = 0; (sbus_readl(dbri->regs + REG0) & D_R) && i < 64; i++)
udelay(10);
+
+ /* A brute approach - DBRI falls back to working burst size by itself
+ * On SS20 D_S does not work, so do not try so high. */
+ tmp = sbus_readl(dbri->regs + REG0);
+ tmp |= D_G | D_E;
+ tmp &= ~D_S;
+ sbus_writel(tmp, dbri->regs + REG0);
}
/* Lock must not be held before calling this */
static void dbri_initialize(struct snd_dbri * dbri)
{
volatile s32 *cmd;
- u32 dma_addr, tmp;
+ u32 dma_addr;
unsigned long flags;
int n;
@@ -721,13 +729,6 @@ static void dbri_initialize(struct snd_dbri * dbri)
for (n = 0; n < DBRI_NO_PIPES; n++)
dbri->pipes[n].desc = dbri->pipes[n].first_desc = -1;
- /* A brute approach - DBRI falls back to working burst size by itself
- * On SS20 D_S does not work, so do not try so high. */
- tmp = sbus_readl(dbri->regs + REG0);
- tmp |= D_G | D_E;
- tmp &= ~D_S;
- sbus_writel(tmp, dbri->regs + REG0);
-
/*
* Initialize the interrupt ringbuffer.
*/
OpenPOWER on IntegriCloud