Update of /cvsroot/alsa/alsa-kernel/include
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23362/include
Modified Files:
memalloc.h pcm.h
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: memalloc.h
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/include/memalloc.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- memalloc.h 2 Mar 2004 18:06:50 -0000 1.4
+++ memalloc.h 6 Mar 2004 16:51:29 -0000 1.5
@@ -24,11 +24,6 @@
#ifndef __SOUND_MEMALLOC_H
#define __SOUND_MEMALLOC_H
-#include <linux/pci.h>
-#ifdef CONFIG_SBUS
-#include <asm/sbus.h>
-#endif
-
struct device;
/*
@@ -36,29 +31,26 @@
*/
struct snd_dma_device {
int type; /* SNDRV_MEM_TYPE_XXX */
- union {
- void *data;
- struct device *dev; /* generic device */
- struct pci_dev *pci; /* PCI device */
- unsigned int flags; /* GFP_XXX for continous and ISA types */
-#ifdef CONFIG_SBUS
- struct sbus_dev *sbus; /* for SBUS type */
-#endif
- } dev;
+ struct device *dev; /* generic device */
unsigned int id; /* a unique ID */
};
+#ifndef snd_dma_pci_data
+#define snd_dma_pci_data(pci) (&(pci)->dev)
+#define snd_dma_isa_data() NULL
+#define snd_dma_sbus_data(sbus) ((struct device *)(sbus))
+#define snd_dma_continuous_data(x) ((struct device *)(unsigned long)(x))
+#endif
+
+
/*
* buffer types
*/
#define SNDRV_DMA_TYPE_UNKNOWN 0 /* not defined */
#define SNDRV_DMA_TYPE_CONTINUOUS 1 /* continuous no-DMA memory */
-#define SNDRV_DMA_TYPE_ISA 2 /* ISA continuous */
-#define SNDRV_DMA_TYPE_PCI 3 /* PCI continuous */
-#define SNDRV_DMA_TYPE_PCI_SG 4 /* PCI SG-buffer */
-#define SNDRV_DMA_TYPE_DEV 5 /* generic device continuous */
-#define SNDRV_DMA_TYPE_DEV_SG 6 /* generic device SG-buffer */
-#define SNDRV_DMA_TYPE_SBUS 7 /* SBUS continuous */
+#define SNDRV_DMA_TYPE_DEV 2 /* generic device continuous */
+#define SNDRV_DMA_TYPE_DEV_SG 3 /* generic device SG-buffer */
+#define SNDRV_DMA_TYPE_SBUS 4 /* SBUS continuous */
/*
* info for buffer allocation
Index: pcm.h
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/include/pcm.h,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- pcm.h 2 Mar 2004 15:32:36 -0000 1.38
+++ pcm.h 6 Mar 2004 16:51:29 -0000 1.39
@@ -904,12 +904,10 @@
* Memory
*/
-#define snd_pcm_dma_flags(x) ((void *)(unsigned long)(x))
-
int snd_pcm_lib_preallocate_free(snd_pcm_substream_t *substream);
int snd_pcm_lib_preallocate_free_for_all(snd_pcm_t *pcm);
int snd_pcm_lib_preallocate_pages(snd_pcm_substream_t *substream,
- int type, void *data,
+ int type, struct device *data,
size_t size, size_t max);
int snd_pcm_lib_preallocate_pages_for_all(snd_pcm_t *pcm,
int type, void *data,
-------------------------------------------------------
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