Update of /cvsroot/alsa/alsa-kernel/pci
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23362/pci
Modified Files:
als4000.c azt3328.c bt87x.c cmipci.c cs4281.c ens1370.c
es1938.c es1968.c fm801.c intel8x0.c maestro3.c rme32.c
rme96.c sonicvibes.c via82xx.c
Log Message:
- clean up the DMA code again.
now only struct device pointer is handled for every BUS type.
the pointer must be given via the corresponding macro snd_dma_xxx_data().
- added the hack for dma_alloc_coherent() to accept dev = NULL for ISA
buffers.
- added the missing include files.
Index: als4000.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/als4000.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- als4000.c 2 Mar 2004 15:32:37 -0000 1.30
+++ als4000.c 6 Mar 2004 16:51:30 -0000 1.31
@@ -523,7 +523,7 @@
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_als4000_playback_ops);
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_als4000_capture_ops);
- 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),
64*1024, 64*1024);
chip->pcm = pcm;
Index: azt3328.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/azt3328.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- azt3328.c 2 Mar 2004 15:32:37 -0000 1.10
+++ azt3328.c 6 Mar 2004 16:51:30 -0000 1.11
@@ -1253,8 +1253,8 @@
strcpy(pcm->name, chip->card->shortname);
chip->pcm = pcm;
- snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_PCI,
- chip->pci, 64*1024, 64*1024);
+ snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
+ snd_dma_pci_data(chip->pci), 64*1024,
64*1024);
snd_azf3328_dbgcallleave();
return 0;
Index: bt87x.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/bt87x.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- bt87x.c 2 Mar 2004 15:32:37 -0000 1.2
+++ bt87x.c 6 Mar 2004 16:51:30 -0000 1.3
@@ -197,8 +197,8 @@
if (chip->dma_risc.area == NULL) {
memset(&chip->dma_dev, 0, sizeof(chip->dma_dev));
- chip->dma_dev.type = SNDRV_DMA_TYPE_PCI;
- chip->dma_dev.dev.pci = chip->pci;
+ chip->dma_dev.type = SNDRV_DMA_TYPE_DEV;
+ chip->dma_dev.dev = snd_dma_pci_data(chip->pci);
if (snd_dma_alloc_pages(&chip->dma_dev, PAGE_ALIGN(MAX_RISC_SIZE),
&chip->dma_risc) < 0)
return -ENOMEM;
}
@@ -682,8 +682,8 @@
strcpy(pcm->name, name);
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_bt87x_pcm_ops);
return snd_pcm_lib_preallocate_pages_for_all(pcm,
- SNDRV_DMA_TYPE_PCI_SG,
- chip->pci,
+ SNDRV_DMA_TYPE_DEV_SG,
+ snd_dma_pci_data(chip->pci),
128 * 1024,
(255 * 4092 + 1023) & ~1023);
}
Index: cmipci.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/cmipci.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -r1.60 -r1.61
--- cmipci.c 2 Mar 2004 15:32:37 -0000 1.60
+++ cmipci.c 6 Mar 2004 16:51:30 -0000 1.61
@@ -2087,8 +2087,8 @@
strcpy(pcm->name, "C-Media PCI DAC/ADC");
cm->pcm = pcm;
- snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_PCI,
- cm->pci, 64*1024, 128*1024);
+ snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
+ snd_dma_pci_data(cm->pci), 64*1024,
128*1024);
return 0;
}
@@ -2110,8 +2110,8 @@
strcpy(pcm->name, "C-Media PCI 2nd DAC");
cm->pcm2 = pcm;
- snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_PCI,
- cm->pci, 64*1024, 128*1024);
+ snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
+ snd_dma_pci_data(cm->pci), 64*1024,
128*1024);
return 0;
}
@@ -2141,8 +2141,8 @@
strcpy(pcm->name, "C-Media PCI IEC958");
cm->pcm_spdif = pcm;
- snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_PCI,
- cm->pci, 64*1024, 128*1024);
+ snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
+ snd_dma_pci_data(cm->pci), 64*1024,
128*1024);
return 0;
}
Index: cs4281.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/cs4281.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- cs4281.c 2 Mar 2004 15:32:37 -0000 1.48
+++ cs4281.c 6 Mar 2004 16:51:30 -0000 1.49
@@ -1039,8 +1039,8 @@
strcpy(pcm->name, "CS4281");
chip->pcm = pcm;
- snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_PCI,
- chip->pci, 64*1024, 512*1024);
+ snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
+ snd_dma_pci_data(chip->pci), 64*1024,
512*1024);
if (rpcm)
*rpcm = pcm;
Index: ens1370.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/ens1370.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -r1.57 -r1.58
--- ens1370.c 2 Mar 2004 15:32:37 -0000 1.57
+++ ens1370.c 6 Mar 2004 16:51:30 -0000 1.58
@@ -1250,8 +1250,8 @@
#endif
ensoniq->pcm1 = pcm;
- snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_PCI,
- ensoniq->pci, 64*1024, 128*1024);
+ snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
+ snd_dma_pci_data(ensoniq->pci), 64*1024,
128*1024);
if (rpcm)
*rpcm = pcm;
@@ -1295,8 +1295,8 @@
#endif
ensoniq->pcm2 = pcm;
- snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_PCI,
- ensoniq->pci, 64*1024, 128*1024);
+ snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
+ snd_dma_pci_data(ensoniq->pci), 64*1024,
128*1024);
if (rpcm)
*rpcm = pcm;
@@ -1914,8 +1914,8 @@
ensoniq->irq = pci->irq;
#ifdef CHIP1370
memset(&ensoniq->dma_dev, 0, sizeof(ensoniq->dma_dev));
- ensoniq->dma_dev.type = SNDRV_DMA_TYPE_PCI;
- ensoniq->dma_dev.dev.pci = pci;
+ ensoniq->dma_dev.type = SNDRV_DMA_TYPE_DEV;
+ ensoniq->dma_dev.dev = snd_dma_pci_data(pci);
if (snd_dma_alloc_pages(&ensoniq->dma_dev, 16, &ensoniq->dma_bug) < 0) {
snd_printk("unable to allocate space for phantom area - dma_bug\n");
snd_ensoniq_free(ensoniq);
Index: es1938.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/es1938.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- es1938.c 2 Mar 2004 15:32:37 -0000 1.32
+++ es1938.c 6 Mar 2004 16:51:30 -0000 1.33
@@ -1014,8 +1014,8 @@
pcm->info_flags = 0;
strcpy(pcm->name, "ESS Solo-1");
- snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_PCI,
- chip->pci, 64*1024, 64*1024);
+ snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
+ snd_dma_pci_data(chip->pci), 64*1024,
64*1024);
if (rpcm)
*rpcm = pcm;
Index: es1968.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/es1968.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -r1.60 -r1.61
--- es1968.c 2 Mar 2004 18:07:40 -0000 1.60
+++ es1968.c 6 Mar 2004 16:51:30 -0000 1.61
@@ -1498,8 +1498,8 @@
int err;
esm_memory_t *chunk;
- chip->dma_dev.type = SNDRV_DMA_TYPE_PCI;
- chip->dma_dev.dev.data = chip->pci;
+ chip->dma_dev.type = SNDRV_DMA_TYPE_DEV;
+ chip->dma_dev.dev = snd_dma_pci_data(chip->pci);
chip->dma_dev.id = 0;
if (! snd_dma_get_reserved(&chip->dma_dev, &chip->dma)) {
err = snd_dma_alloc_pages_fallback(&chip->dma_dev,
chip->total_bufsize, &chip->dma);
Index: fm801.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/fm801.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- fm801.c 2 Mar 2004 15:32:37 -0000 1.42
+++ fm801.c 6 Mar 2004 16:51:30 -0000 1.43
@@ -703,8 +703,9 @@
strcpy(pcm->name, "FM801");
chip->pcm = pcm;
- snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_PCI,
- chip->pci, chip->multichannel ? 128*1024
: 64*1024, 128*1024);
+ snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
+ snd_dma_pci_data(chip->pci),
+ chip->multichannel ? 128*1024 : 64*1024,
128*1024);
if (rpcm)
*rpcm = pcm;
Index: intel8x0.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/intel8x0.c,v
retrieving revision 1.123
retrieving revision 1.124
diff -u -r1.123 -r1.124
--- intel8x0.c 5 Mar 2004 13:13:16 -0000 1.123
+++ intel8x0.c 6 Mar 2004 16:51:30 -0000 1.124
@@ -1452,7 +1452,7 @@
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);
return 0;
@@ -2533,8 +2533,8 @@
chip->pcm_pos_shift = (device_type == DEVICE_SIS) ? 0 : 1;
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);
/* allocate buffer descriptor lists */
/* the start of each lists must be aligned to 8 bytes */
Index: maestro3.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/maestro3.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- maestro3.c 2 Mar 2004 15:32:37 -0000 1.47
+++ maestro3.c 6 Mar 2004 16:51:30 -0000 1.48
@@ -1816,8 +1816,8 @@
strcpy(pcm->name, chip->card->driver);
chip->pcm = pcm;
- snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_PCI,
- chip->pci, 64*1024, 64*1024);
+ snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
+ snd_dma_pci_data(chip->pci), 64*1024,
64*1024);
return 0;
}
Index: rme32.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/rme32.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- rme32.c 2 Mar 2004 15:32:37 -0000 1.30
+++ rme32.c 6 Mar 2004 16:51:30 -0000 1.31
@@ -1379,7 +1379,7 @@
snd_pcm_lib_preallocate_pages_for_all(rme32->spdif_pcm,
SNDRV_DMA_TYPE_CONTINUOUS,
- snd_pcm_dma_flags(GFP_KERNEL),
+ snd_dma_continuous_data(GFP_KERNEL),
RME32_BUFFER_SIZE,
RME32_BUFFER_SIZE);
@@ -1407,7 +1407,7 @@
snd_pcm_lib_preallocate_pages_for_all(rme32->adat_pcm,
SNDRV_DMA_TYPE_CONTINUOUS,
- snd_pcm_dma_flags(GFP_KERNEL),
+
snd_dma_continuous_data(GFP_KERNEL),
RME32_BUFFER_SIZE,
RME32_BUFFER_SIZE);
}
Index: rme96.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/rme96.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- rme96.c 2 Mar 2004 15:32:37 -0000 1.32
+++ rme96.c 6 Mar 2004 16:51:30 -0000 1.33
@@ -1720,7 +1720,7 @@
snd_pcm_lib_preallocate_pages_for_all(rme96->spdif_pcm,
SNDRV_DMA_TYPE_CONTINUOUS,
- snd_pcm_dma_flags(GFP_KERNEL),
+ snd_dma_continuous_data(GFP_KERNEL),
RME96_BUFFER_SIZE,
RME96_BUFFER_SIZE);
@@ -1744,7 +1744,7 @@
snd_pcm_lib_preallocate_pages_for_all(rme96->adat_pcm,
SNDRV_DMA_TYPE_CONTINUOUS,
- snd_pcm_dma_flags(GFP_KERNEL),
+
snd_dma_continuous_data(GFP_KERNEL),
RME96_BUFFER_SIZE,
RME96_BUFFER_SIZE);
}
Index: sonicvibes.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/sonicvibes.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- sonicvibes.c 2 Mar 2004 15:32:37 -0000 1.32
+++ sonicvibes.c 6 Mar 2004 16:51:30 -0000 1.33
@@ -886,8 +886,8 @@
strcpy(pcm->name, "S3 SonicVibes");
sonic->pcm = pcm;
- snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_PCI,
- sonic->pci, 64*1024, 128*1024);
+ snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
+ snd_dma_pci_data(sonic->pci), 64*1024,
128*1024);
if (rpcm)
*rpcm = pcm;
Index: via82xx.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/via82xx.c,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -r1.90 -r1.91
--- via82xx.c 5 Mar 2004 12:04:43 -0000 1.90
+++ via82xx.c 6 Mar 2004 16:51:30 -0000 1.91
@@ -1290,8 +1290,8 @@
/* capture */
init_viadev(chip, chip->capture_devno, VIA_REG_CAPTURE_8233_STATUS, 1);
- if ((err = snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_PCI_SG,
- chip->pci, 64*1024,
128*1024)) < 0)
+ if ((err = snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG,
+ snd_dma_pci_data(chip->pci),
64*1024, 128*1024)) < 0)
return err;
/* PCM #1: multi-channel playback and 2nd capture */
@@ -1307,8 +1307,8 @@
/* set up capture */
init_viadev(chip, chip->capture_devno + 1, VIA_REG_CAPTURE_8233_STATUS + 0x10,
1);
- if ((err = snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_PCI_SG,
- chip->pci, 64*1024,
128*1024)) < 0)
+ if ((err = snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG,
+ snd_dma_pci_data(chip->pci),
64*1024, 128*1024)) < 0)
return err;
return 0;
@@ -1341,8 +1341,8 @@
/* capture */
init_viadev(chip, chip->capture_devno, VIA_REG_CAPTURE_8233_STATUS, 1);
- if ((err = snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_PCI_SG,
- chip->pci, 64*1024,
128*1024)) < 0)
+ if ((err = snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG,
+ snd_dma_pci_data(chip->pci),
64*1024, 128*1024)) < 0)
return err;
/* PCM #1: DXS3 playback (for spdif) */
@@ -1355,8 +1355,8 @@
/* set up playback */
init_viadev(chip, chip->playback_devno, 0x30, 0);
- if ((err = snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_PCI_SG,
- chip->pci, 64*1024,
128*1024)) < 0)
+ if ((err = snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG,
+ snd_dma_pci_data(chip->pci),
64*1024, 128*1024)) < 0)
return err;
return 0;
@@ -1385,8 +1385,8 @@
init_viadev(chip, 0, VIA_REG_PLAYBACK_STATUS, 0);
init_viadev(chip, 1, VIA_REG_CAPTURE_STATUS, 1);
- if ((err = snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_PCI_SG,
- chip->pci, 64*1024,
128*1024)) < 0)
+ if ((err = snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG,
+ snd_dma_pci_data(chip->pci),
64*1024, 128*1024)) < 0)
return err;
return 0;
@@ -1931,8 +1931,8 @@
chip->irq = -1;
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);
pci_read_config_byte(pci, VIA_FUNC_ENABLE, &chip->old_legacy);
pci_read_config_byte(pci, VIA_PNP_CONTROL, &chip->old_legacy_cfg);
-------------------------------------------------------
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