Index: cmpci.c
===================================================================
RCS file: /home/cltien/cvs/cmpci/cmpci.c,v
retrieving revision 6.64
retrieving revision 6.65
diff -a -u -r6.64 -r6.65
--- cmpci.c	22 Mar 2004 17:07:02 -0000	6.64
+++ cmpci.c	29 Mar 2004 22:58:49 -0000	6.65
@@ -977,14 +977,16 @@
 {
 	int   i = size / 2;
 	unsigned long data;
+	unsigned short data16;
 	unsigned long *dst = (unsigned long *) dest;
 	unsigned short *src = (unsigned short *)source;
 	int err;
 
 	do {
-		if ((err = __get_user(data, src)))
+		if ((err = __get_user(data16, src)))
 			return err;
 		src++;
+		data = (unsigned long)le16_to_cpu(data16);
 		data <<= 12;			// ok for 16-bit data
 		if (s->spdif_counter == 2 || s->spdif_counter == 3)
 			data |= 0x40000000;	// indicate AC-3 raw data
@@ -996,7 +998,7 @@
 			data |= 5;		// odd, 'W'
 		else
 			data |= 9;		// even, 'M'
-		*dst++ = data;
+		*dst++ = cpu_to_le32(data);
 		s->spdif_counter++;
 		if (s->spdif_counter == 384)
 			s->spdif_counter = 0;
@@ -3208,7 +3210,7 @@
 
 static int __init init_cmpci(void)
 {
-	printk(KERN_INFO "cmpci: version $Revision: 6.64 $ time " __TIME__ " " __DATE__ "\n");
+	printk(KERN_INFO "cmpci: version $Revision: 6.65 $ time " __TIME__ " " __DATE__ "\n");
 	return pci_module_init(&cm_driver);
 }
 
