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

Modified Files:
        trident_main.c 
Log Message:
[PATCH: trident-prealloc-fix.dif]

- fixed pre-allocation of trident 4DNX (with sgbuf-patch applied).



Index: trident_main.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/trident/trident_main.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- trident_main.c      7 Jan 2003 10:49:12 -0000       1.23
+++ trident_main.c      7 Jan 2003 10:52:37 -0000       1.24
@@ -2110,21 +2110,24 @@
 {
        trident_t *trident = snd_magic_cast(trident_t, pcm->private_data, return);
        trident->pcm = NULL;
-       snd_pcm_lib_preallocate_free_for_all(pcm);
+       if (! trident->tlb.entries)
+               snd_pcm_lib_preallocate_free_for_all(pcm);
 }
 
 static void snd_trident_foldback_pcm_free(snd_pcm_t *pcm)
 {
        trident_t *trident = snd_magic_cast(trident_t, pcm->private_data, return);
        trident->foldback = NULL;
-       snd_pcm_lib_preallocate_free_for_all(pcm);
+       if (! trident->tlb.entries)
+               snd_pcm_lib_preallocate_free_for_all(pcm);
 }
 
 static void snd_trident_spdif_pcm_free(snd_pcm_t *pcm)
 {
        trident_t *trident = snd_magic_cast(trident_t, pcm->private_data, return);
        trident->spdif = NULL;
-       snd_pcm_lib_preallocate_free_for_all(pcm);
+       if (! trident->tlb.entries)
+               snd_pcm_lib_preallocate_free_for_all(pcm);
 }
 
 /*---------------------------------------------------------------------------
@@ -2162,7 +2165,8 @@
        strcpy(pcm->name, "Trident 4DWave");
        trident->pcm = pcm;
 
-       snd_pcm_lib_preallocate_pci_pages_for_all(trident->pci, pcm, 64*1024, 
256*1024);
+       if (! trident->tlb.entries)
+               snd_pcm_lib_preallocate_pci_pages_for_all(trident->pci, pcm, 64*1024, 
+128*1024);
 
        if (rpcm)
                *rpcm = pcm;
@@ -2211,7 +2215,8 @@
        }
        trident->foldback = foldback;
 
-       snd_pcm_lib_preallocate_pci_pages_for_all(trident->pci, foldback, 64*1024, 
128*1024);
+       if (! trident->tlb.entries)
+               snd_pcm_lib_preallocate_pci_pages_for_all(trident->pci, foldback, 
+64*1024, 128*1024);
 
        if (rpcm)
                *rpcm = foldback;
@@ -2250,7 +2255,8 @@
        strcpy(spdif->name, "Trident 4DWave IEC958");
        trident->spdif = spdif;
 
-       snd_pcm_lib_preallocate_pci_pages_for_all(trident->pci, spdif, 64*1024, 
128*1024);
+       if (! trident->tlb.entries)
+               snd_pcm_lib_preallocate_pci_pages_for_all(trident->pci, spdif, 
+64*1024, 128*1024);
 
        if (rpcm)
                *rpcm = spdif;



-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to