[parisc-linux-cvs] harmony updates
Helge Deller
deller@gmx.de
Tue, 15 Jan 2002 02:11:23 +0100
--------------Boundary-00=_ZMGYR8XYPMKGRS72R8J3
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
On Tuesday 15 January 2002 02:12, Helge Deller wrote:
> CVSROOT: /var/cvs
> Module name: linux
> Changes by: deller 02/01/14 18:12:57
>
> Modified files:
> drivers/sound : harmony.c
>
> Log message:
> use harmony_wait_CNTL() only where necessary (before a gsc_write()),
> wait 50 ms after resetting the chip (acording to the docu),
> print out h/w id
--------------Boundary-00=_ZMGYR8XYPMKGRS72R8J3
Content-Type: text/plain;
charset="iso-8859-1";
name="diff"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="diff"
Index: harmony.c
===================================================================
RCS file: /var/cvs/linux/drivers/sound/harmony.c,v
retrieving revision 1.21
diff -u -p -r1.21 harmony.c
--- harmony.c 2002/01/14 23:27:51 1.21
+++ harmony.c 2002/01/15 01:10:20
@@ -62,7 +62,7 @@ Changes:
#define PFX "harmony: "
-#define HARMONY_VERSION "0.9"
+#define HARMONY_VERSION "V0.9"
#undef DEBUG
@@ -237,7 +237,6 @@ static int __init harmony_alloc_buffer(s
int buffer_count)
{
b->len = buffer_count * HARMONY_BUF_SIZE;
- b->dma_handle = 0;
b->addr = pci_alloc_consistent(harmony.fake_pci_dev,
b->len, &b->dma_handle);
if (b->addr && b->dma_handle) {
@@ -297,7 +296,6 @@ static void harmony_update_control(void)
/* initialize CNTL */
harmony_wait_CNTL();
gsc_writel(default_cntl, &harmony.hpa->cntl);
- harmony_wait_CNTL();
}
static void harmony_set_control(u8 data_format, u8 sample_rate, u8 stereo_select)
@@ -411,8 +409,6 @@ static int harmony_audio_open(struct ino
harmony_silence(&played_buf, 0, HARMONY_BUF_SIZE*MAX_BUFS);
CHECK_WBACK_INV_OFFSET(played_buf, 0, HARMONY_BUF_SIZE*MAX_BUFS);
- harmony_wait_CNTL();
-
return 0;
}
@@ -546,7 +542,6 @@ static void harmony_format_auto_detect(c
}
}
harmony_set_control(HARMONY_DF_8BIT_ULAW, HARMONY_SR_8KHZ, HARMONY_SS_MONO);
- return;
}
#undef four_bytes_to_u32
@@ -761,7 +756,7 @@ static void harmony_interrupt(int irq, v
/* Setup the hpa */
hpa = ((struct harmony_dev *)dev)->hpa;
harmony_wait_CNTL();
-
+
/* Read dstatus and pcuradd (the current address) */
dstatus = gsc_readl(&hpa->dstatus);
@@ -856,9 +851,6 @@ static int harmony_audio_init(void)
harmony_silence(&silent, 0, HARMONY_BUF_SIZE);
CHECK_WBACK_INV_OFFSET(silent, 0, HARMONY_BUF_SIZE);
- /* Wait around until we're out of control mode */
- harmony_wait_CNTL();
-
harmony.audio_open = 0;
return 0;
@@ -871,7 +863,6 @@ static void harmony_mixer_set_gain(void)
{
harmony_wait_CNTL();
gsc_writel(harmony.current_gain, &harmony.hpa->gainctl);
- harmony_wait_CNTL();
}
/*
@@ -1158,8 +1149,9 @@ static void __init harmony_mixer_reset(v
{
harmony.current_gain = GAIN_TOTAL_SILENCE;
harmony_mixer_set_gain();
+ harmony_wait_CNTL();
gsc_writel(1, &harmony.hpa->reset);
- udelay(100);
+ mdelay(50); /* wait 50 ms */
gsc_writel(0, &harmony.hpa->reset);
harmony.current_gain = GAIN_DEFAULT;
harmony_mixer_set_gain();
@@ -1218,9 +1210,9 @@ harmony_driver_callback(struct parisc_de
cntl = gsc_readl(&harmony.hpa->cntl);
rev = (cntl>>20) & 0xff;
- printk(KERN_INFO "Lasi Harmony Audio driver vers. " HARMONY_VERSION ", "
- "h/w rev. %i at 0x%lx, IRQ %i\n",
- rev, dev->hpa, harmony.irq);
+ printk(KERN_INFO "Lasi Harmony Audio driver " HARMONY_VERSION ", "
+ "h/w id %i, rev. %i at 0x%lx, IRQ %i\n",
+ id, rev, dev->hpa, harmony.irq);
/* Make sure the control bit isn't set, although I don't think it
ever is. */
--------------Boundary-00=_ZMGYR8XYPMKGRS72R8J3--