Update of /cvsroot/alsa/alsa-kernel/pci/korg1212
In directory sc8-pr-cvs1:/tmp/cvs-serv29543

Modified Files:
        korg1212.c 
Log Message:
sync with kernel - fixes for 64bit architectures.



Index: korg1212.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/korg1212/korg1212.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- korg1212.c  8 May 2003 08:32:35 -0000       1.30
+++ korg1212.c  17 Jul 2003 15:53:13 -0000      1.31
@@ -2070,7 +2070,7 @@
        snd_iprintf(buffer, korg1212->card->longname);
        snd_iprintf(buffer, " (index #%d)\n", korg1212->card->number + 1);
        snd_iprintf(buffer, "\nGeneral settings\n");
-       snd_iprintf(buffer, "    period size: %d bytes\n", K1212_PERIOD_BYTES);
+       snd_iprintf(buffer, "    period size: %Zd bytes\n", K1212_PERIOD_BYTES);
        snd_iprintf(buffer, "     clock mode: %s\n", 
clockSourceName[korg1212->clkSrcRate] );
        snd_iprintf(buffer, "  left ADC Sens: %d\n", korg1212->leftADCInSens );
        snd_iprintf(buffer, " right ADC Sens: %d\n", korg1212->rightADCInSens );
@@ -2336,7 +2336,7 @@
        korg1212->sharedBufferPhy = (unsigned long)phys_addr;
 
         if (korg1212->sharedBufferPtr == NULL) {
-               snd_printk(KERN_ERR "can not allocate shared buffer memory (%d 
bytes)\n", sizeof(KorgSharedBuffer));
+               snd_printk(KERN_ERR "can not allocate shared buffer memory (%Zd 
bytes)\n", sizeof(KorgSharedBuffer));
                 return -ENOMEM;
         }
 
@@ -2385,9 +2385,12 @@
 
         korg1212->dspCodeSize = sizeof (dspCode);
 
-        korg1212->VolumeTablePhy = (u32) &((KorgSharedBuffer *) 
korg1212->sharedBufferPhy)->volumeData;
-        korg1212->RoutingTablePhy = (u32) &((KorgSharedBuffer *) 
korg1212->sharedBufferPhy)->routeData;
-        korg1212->AdatTimeCodePhy = (u32) &((KorgSharedBuffer *) 
korg1212->sharedBufferPhy)->AdatTimeCode;
+        korg1212->VolumeTablePhy = korg1212->sharedBufferPhy +
+               offsetof(KorgSharedBuffer, volumeData);
+        korg1212->RoutingTablePhy = korg1212->sharedBufferPhy +
+               offsetof(KorgSharedBuffer, routeData);
+        korg1212->AdatTimeCodePhy = korg1212->sharedBufferPhy +
+               offsetof(KorgSharedBuffer, AdatTimeCode);
 
         korg1212->dspMemPtr = snd_malloc_pci_pages(korg1212->pci, 
korg1212->dspCodeSize, &phys_addr);
        korg1212->dspMemPhy = (u32)phys_addr;



-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to