Update of /cvsroot/alsa/alsa-driver/pci/mixart
In directory sc8-pr-cvs1:/tmp/cvs-serv19152/mixart
Modified Files:
mixart.c
Log Message:
- fixed the duplicated pre-alloc buffer ids.
Index: mixart.c
===================================================================
RCS file: /cvsroot/alsa/alsa-driver/pci/mixart/mixart.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- mixart.c 12 Aug 2003 15:32:29 -0000 1.2
+++ mixart.c 19 Jan 2004 19:01:04 -0000 1.3
@@ -878,6 +878,22 @@
.pointer = snd_mixart_stream_pointer,
};
+static void preallocate_buffers(mixart_t *chip, snd_pcm_t *pcm)
+{
+ snd_pcm_substream_t *subs;
+ int stream;
+
+ for (stream = 0; stream < 2; stream++) {
+ int idx = 0;
+ for (subs = pcm->streams[stream].substream; subs; subs = subs->next,
idx++)
+ /* set up the unique device id with the chip index */
+ subs->dma_device.id = subs->pcm->device << 16 |
+ subs->stream << 8 | (subs->number + 1) |
+ (chip->chip_idx + 1) << 24;
+ }
+ snd_pcm_lib_preallocate_pci_pages_for_all(chip->mgr->pci, pcm, 32*1024,
32*1024);
+}
+
/*
*/
static int snd_mixart_pcm_analog(mixart_t *chip)
@@ -902,7 +918,7 @@
pcm->info_flags = 0;
strcpy(pcm->name, name);
- snd_pcm_lib_preallocate_pci_pages_for_all(chip->mgr->pci, pcm, 32*1024,
32*1024);
+ preallocate_buffers(chip, pcm);
chip->pcm = pcm;
return 0;
@@ -933,7 +949,7 @@
pcm->info_flags = 0;
strcpy(pcm->name, name);
- snd_pcm_lib_preallocate_pci_pages_for_all(chip->mgr->pci, pcm, 32*1024,
32*1024);
+ preallocate_buffers(chip, pcm);
chip->pcm_dig = pcm;
return 0;
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog