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

Modified Files:
        memory.c 
Log Message:
Use runtime->dma_bytes instead sgbuf->size

Index: memory.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/emu10k1/memory.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- memory.c    28 Feb 2003 14:29:27 -0000      1.11
+++ memory.c    9 Mar 2003 23:59:10 -0000       1.12
@@ -290,18 +290,20 @@
 snd_util_memblk_t *
 snd_emu10k1_alloc_pages(emu10k1_t *emu, snd_pcm_substream_t *substream)
 {
-       struct snd_sg_buf *sgbuf = snd_pcm_substream_sgbuf(substream);
+       snd_pcm_runtime_t *runtime = substream->runtime;
+       struct snd_sg_buf *sgbuf = runtime->dma_private;
        snd_util_memhdr_t *hdr;
        emu10k1_memblk_t *blk;
        int page, err, idx;
 
        snd_assert(emu, return NULL);
-       snd_assert(sgbuf->size > 0 && sgbuf->size < MAXPAGES * EMUPAGESIZE, return 
NULL);
+       snd_assert(substream->dma_device.type == SNDRV_DMA_TYPE_PCI_SG, return NULL);
+       snd_assert(runtime->dma_bytes > 0 && runtime->dma_bytes < MAXPAGES * 
EMUPAGESIZE, return NULL);
        hdr = emu->memhdr;
        snd_assert(hdr, return NULL);
 
        down(&hdr->block_mutex);
-       blk = search_empty(emu, sgbuf->size);
+       blk = search_empty(emu, runtime->dma_bytes);
        if (blk == NULL) {
                up(&hdr->block_mutex);
                return NULL;



-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger 
for complex code. Debugging C/C++ programs can leave you feeling lost and 
disoriented. TotalView can help you find your way. Available on major UNIX 
and Linux platforms. Try it free. www.etnus.com
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to