Skip to contentSkip to conversation

au88x0 - do codec init more like windows does

PATCH Applied Jeff Muizelaar 3 participants 4 messages Feb 23, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 au88x0 - do codec init more like windows does

The following patch makes the codec init code act more like the windows code.

Index: pci/au88x0/au88x0_core.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/au88x0/au88x0_core.c,v retrieving revision 1.10

au88x0/au88x0_core.c +3 -2
diff -u -r1.10 au88x0_core.c
@@ -2480,7 +2480,8 @@
 	int i;
 
 	for (i = 0; i < 32; i++) {
-		hwwrite(vortex->mmio, (VORTEX_CODEC_CHN + (i << 2)), 0);
+		/* the windows driver writes -i, so we write -i */
+		hwwrite(vortex->mmio, (VORTEX_CODEC_CHN + (i << 2)), -i);
 		msleep(2);
 	}
 	if (0) {
@@ -2502,7 +2503,7 @@
 		hwwrite(vortex->mmio, VORTEX_CODEC_CTRL, 0x00e8);
 	}
 	for (i = 0; i < 32; i++) {
-		hwwrite(vortex->mmio, (VORTEX_CODEC_CHN + (i << 2)), 0);
+		hwwrite(vortex->mmio, (VORTEX_CODEC_CHN + (i << 2)), -i);
 		msleep(5);
 	}
 	hwwrite(vortex->mmio, VORTEX_CODEC_CTRL, 0xe8);

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

Applied
#1 lore raw

At Tue, 22 Feb 2005 22:35:06 -0500,

Quoted 5 lines · Jeff Muizelaar

The following patch makes the codec init code act more like the windows code.

Thanks, applied now to CVS.

Takashi

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

#2 lore raw
In reply to Jeff Muizelaar
Quoted 24 lines · Jeff Muizelaar

The following patch makes the codec init code act more like the windows code.

Index: pci/au88x0/au88x0_core.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/au88x0/au88x0_core.c,v retrieving revision 1.10
diff -u -r1.10 au88x0_core.c

au88x0/au88x0_core.c +2 -1
@@ -2480,7 +2480,8 @@
 	int i;
 
 	for (i = 0; i < 32; i++) {
-		hwwrite(vortex->mmio, (VORTEX_CODEC_CHN + (i << 2)), 0);
+		/* the windows driver writes -i, so we write -i */
+		hwwrite(vortex->mmio, (VORTEX_CODEC_CHN + (i << 2)), -i);
 		msleep(2);
 	}
 	if (0) {

au88x0/au88x0_core.c line 2509

Quoted 8 lines
au88x0/au88x0_core.c +1 -1
@@ -2502,7 +2503,7 @@
 		hwwrite(vortex->mmio, VORTEX_CODEC_CTRL, 0x00e8);
 	}
 	for (i = 0; i < 32; i++) {
-		hwwrite(vortex->mmio, (VORTEX_CODEC_CHN + (i << 2)), 0);
+		hwwrite(vortex->mmio, (VORTEX_CODEC_CHN + (i << 2)), -i);
 		msleep(5);
 	}
 	hwwrite(vortex->mmio, VORTEX_CODEC_CTRL, 0xe8);

shouldn't the same comment be added to second occurence too?

aka sg like:

au88x0/au88x0_core.c +1 -0
@@ -2502,6 +2503,7 @@
 		hwwrite(vortex->mmio, VORTEX_CODEC_CTRL, 0x00e8);
 	}
 	for (i = 0; i < 32; i++) {
+		/* the windows driver writes -i, so we write -i */
 		hwwrite(vortex->mmio, (VORTEX_CODEC_CHN + (i << 2)), -i);
 		msleep(5);
 	}

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

#3 lore raw
Quoted 2 lines · Thierry Vignaud

shouldn't the same comment be added to second occurence too?

I thought about that, but the first occurence is close enough that saying it twice isn't really of much value. However, if anyone cares enough to submit a patch, I won't object.

-Jeff

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click