Update of /cvsroot/alsa/alsa-driver/pci
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24264/pci
Modified Files:
atiixp.c hdspm.c intel8x0m.c
Log Message:
- clean up the DMA code. added the wrapper for 2.2/2.4 kernels.
- don't include unneeded header files for 2.6 kernels.
- always export pci_alloc_consistent() wrapper for 2.2 kernels.
it's used for ISA buffer allocation now.
- added the missing header files.
Index: atiixp.c
===================================================================
RCS file: /cvsroot/alsa/alsa-driver/pci/atiixp.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- atiixp.c 2 Mar 2004 15:32:35 -0000 1.2
+++ atiixp.c 6 Mar 2004 16:55:13 -0000 1.3
@@ -360,8 +360,8 @@
if (dma->desc_buf.area == NULL) {
memset(&dma->desc_dev, 0, sizeof(dma->desc_dev));
- dma->desc_dev.type = SNDRV_DMA_TYPE_PCI;
- dma->desc_dev.dev.pci = chip->pci;
+ dma->desc_dev.type = SNDRV_DMA_TYPE_DEV;
+ dma->desc_dev.dev = snd_dma_pci_data(chip->pci);
if (snd_dma_alloc_pages(&dma->desc_dev, ATI_DESC_LIST_SIZE,
&dma->desc_buf) < 0)
return -ENOMEM;
dma->period_bytes = dma->periods = 0; /* clear */
@@ -1221,8 +1221,8 @@
pcm->private_data = chip;
strcpy(pcm->name, "ATI IXP AC97");
- snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_PCI,
- chip->pci, 64*1024, 128*1024);
+ snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
+ snd_dma_pci_data(chip->pci), 64*1024,
128*1024);
/* no SPDIF support on codec? */
if (chip->dmas[ATI_DMA_SPDIF].pcm && ! chip->dmas[ATI_DMA_SPDIF].pcm->rates)
@@ -1236,8 +1236,8 @@
pcm->private_data = chip;
strcpy(pcm->name, "ATI IXP IEC958");
- snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_PCI, chip->pci,
- 64*1024, 128*1024);
+ snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
+ snd_dma_pci_data(chip->pci), 64*1024,
128*1024);
/* pre-select AC97 SPDIF slots 10/11 */
for (i = 0; i < 3; i++) {
Index: hdspm.c
===================================================================
RCS file: /cvsroot/alsa/alsa-driver/pci/hdspm.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- hdspm.c 2 Mar 2004 15:32:35 -0000 1.2
+++ hdspm.c 6 Mar 2004 16:55:13 -0000 1.3
@@ -3418,8 +3418,8 @@
if ((err =
snd_pcm_lib_preallocate_pages_for_all(pcm,
- SNDRV_DMA_TYPE_PCI_SG,
- hdspm->pci,
+ SNDRV_DMA_TYPE_DEV_SG,
+ snd_dma_pci_data(hdspm->pci),
wanted,
wanted)) < 0) {
snd_printdd("Could not preallocate %d Bytes\n", wanted);
Index: intel8x0m.c
===================================================================
RCS file: /cvsroot/alsa/alsa-driver/pci/intel8x0m.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- intel8x0m.c 4 Mar 2004 18:44:27 -0000 1.4
+++ intel8x0m.c 6 Mar 2004 16:55:13 -0000 1.5
@@ -808,8 +808,8 @@
strcpy(pcm->name, chip->card->shortname);
chip->pcm[device] = pcm;
- snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_PCI,
- chip->pci,
+ snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
+ snd_dma_pci_data(chip->pci),
rec->prealloc_size,
rec->prealloc_max_size);
@@ -1315,8 +1315,8 @@
/* allocate buffer descriptor lists */
/* the start of each lists must be aligned to 8 bytes */
memset(&chip->dma_dev, 0, sizeof(chip->dma_dev));
- chip->dma_dev.type = SNDRV_DMA_TYPE_PCI;
- chip->dma_dev.dev.pci = pci;
+ chip->dma_dev.type = SNDRV_DMA_TYPE_DEV;
+ chip->dma_dev.dev = snd_dma_pci_data(pci);
if (snd_dma_alloc_pages(&chip->dma_dev, chip->bdbars_count * sizeof(u32) *
ICH_MAX_FRAGS * 2, &chip->bdbars) < 0) {
snd_intel8x0_free(chip);
return -ENOMEM;
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog