Skip to contentSkip to conversation

emu10k1-pointer-bug-fix.dif

PATCH Gregoire Favre 2 participants 2 messages Aug 7, 2003

lore
Share & tools
lore
#0 lore raw

Hello,

I want to use the http://bitstreamout.sourceforge.net/ and in it there is a dif about a bug:

Index: alsa-kernel/pci/emu10k1/emupcm.c
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/pci/emu10k1/emupcm.c,v retrieving revision 1.20

pci/emu10k1/emupcm.c +4 -1
diff -u -r1.20 emupcm.c
@@ -666,8 +666,11 @@
 #else	/* EMU10K1 Open Source code from Creative */
 	if (ptr < epcm->ccca_start_addr)
 		ptr += runtime->buffer_size - epcm->ccca_start_addr;
-	else
+	else {
 		ptr -= epcm->ccca_start_addr;
+		if (ptr >= runtime->buffer_size)
+			ptr -= runtime->buffer_size;
+	}
 #endif
 	// printk("ptr = 0x%x, buffer_size = 0x%x, period_size = 0x%x\n", ptr, runtime->buffer_size, runtime->period_size);
 	return ptr;

I have just checked my 2.6.0-test2-bk4 kernel, and it seems it's not
applied: is it really a bug, should I really apply it?

Thank you very much,

Grégoire
__________________________________________________________________
http://www-ima.unil.ch/greg ICQ:16624071 mailto:[email protected]

-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01

#1 lore raw

At Thu, 7 Aug 2003 14:51:13 +0200,

Quoted 5 lines · Gregoire Favre

Hello,

I want to use the http://bitstreamout.sourceforge.net/ and in it there is a dif about a bug:

oh, i remember this one in my deepest memory...

Quoted 22 lines

Index: alsa-kernel/pci/emu10k1/emupcm.c
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/pci/emu10k1/emupcm.c,v retrieving revision 1.20
diff -u -r1.20 emupcm.c

pci/emu10k1/emupcm.c +4 -1
@@ -666,8 +666,11 @@
 #else	/* EMU10K1 Open Source code from Creative */
 	if (ptr < epcm->ccca_start_addr)
 		ptr += runtime->buffer_size - epcm->ccca_start_addr;
-	else
+	else {
 		ptr -= epcm->ccca_start_addr;
+		if (ptr >= runtime->buffer_size)
+			ptr -= runtime->buffer_size;
+	}
 #endif
 	// printk("ptr = 0x%x, buffer_size = 0x%x, period_size = 0x%x\n", ptr, runtime->buffer_size, runtime->period_size);
 	return ptr;
Quoted 2 lines

I have just checked my 2.6.0-test2-bk4 kernel, and it seems it's not
applied: is it really a bug, should I really apply it?

it's a rather a workaround and is harmless in normal cases. however, i don't know if this really fixes the problem. when i gave this patch, the answer was no...

could someone verify this?
if this patch really matters, i'll commit it.

Takashi

-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01