From 2fd16874aa6322e8b61879a78f3b485999506833 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 17 Nov 2005 14:55:19 +0100 Subject: [ALSA] Remove xxx_t typedefs: PCI AU88x0 Modules: au88x0 driver Remove xxx_t typedefs from the PCI AU88x0 drivers. Signed-off-by: Takashi Iwai --- sound/pci/au88x0/au88x0.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'sound/pci/au88x0/au88x0.h') diff --git a/sound/pci/au88x0/au88x0.h b/sound/pci/au88x0/au88x0.h index b1197cfab3f..745f995a20d 100644 --- a/sound/pci/au88x0/au88x0.h +++ b/sound/pci/au88x0/au88x0.h @@ -129,21 +129,21 @@ typedef struct { /* Virtual page extender stuff */ int nr_periods; int period_bytes; - snd_pcm_sgbuf_t *sgbuf; /* DMA Scatter Gather struct */ + struct snd_sg_buf *sgbuf; /* DMA Scatter Gather struct */ int period_real; int period_virt; - snd_pcm_substream_t *substream; + struct snd_pcm_substream *substream; } stream_t; typedef struct snd_vortex vortex_t; struct snd_vortex { /* ALSA structs. */ - snd_card_t *card; - snd_pcm_t *pcm[VORTEX_PCM_LAST]; + struct snd_card *card; + struct snd_pcm *pcm[VORTEX_PCM_LAST]; - snd_rawmidi_t *rmidi; /* Legacy Midi interface. */ - ac97_t *codec; + struct snd_rawmidi *rmidi; /* Legacy Midi interface. */ + struct snd_ac97 *codec; /* Stream structs. */ stream_t dma_adb[NR_ADB]; @@ -199,7 +199,7 @@ static void vortex_adb_setsrc(vortex_t * vortex, int adbdma, /* DMA Engines. */ static void vortex_adbdma_setbuffers(vortex_t * vortex, int adbdma, - snd_pcm_sgbuf_t * sgbuf, int size, + struct snd_sg_buf * sgbuf, int size, int count); static void vortex_adbdma_setmode(vortex_t * vortex, int adbdma, int ie, int dir, int fmt, int d, @@ -207,7 +207,7 @@ static void vortex_adbdma_setmode(vortex_t * vortex, int adbdma, int ie, static void vortex_adbdma_setstartbuffer(vortex_t * vortex, int adbdma, int sb); #ifndef CHIP_AU8810 static void vortex_wtdma_setbuffers(vortex_t * vortex, int wtdma, - snd_pcm_sgbuf_t * sgbuf, int size, + struct snd_sg_buf * sgbuf, int size, int count); static void vortex_wtdma_setmode(vortex_t * vortex, int wtdma, int ie, int fmt, int d, /*int e, */ unsigned long offset); @@ -231,9 +231,9 @@ static int inline vortex_wtdma_getlinearpos(vortex_t * vortex, int wtdma); /* global stuff. */ static void vortex_codec_init(vortex_t * vortex); -static void vortex_codec_write(ac97_t * codec, unsigned short addr, +static void vortex_codec_write(struct snd_ac97 * codec, unsigned short addr, unsigned short data); -static unsigned short vortex_codec_read(ac97_t * codec, unsigned short addr); +static unsigned short vortex_codec_read(struct snd_ac97 * codec, unsigned short addr); static void vortex_spdif_init(vortex_t * vortex, int spdif_sr, int spdif_mode); static int vortex_core_init(vortex_t * card); -- cgit v1.2.3-70-g09d2 From 58da3a23fe12b1c4730cb85af203950c7707220c Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Thu, 1 Dec 2005 11:14:00 +0100 Subject: [ALSA] au88x0: Remove unneeded call to pci_dma_supported() Modules: au88x0 driver pci_dma_supported() is called right before pci_set_dma_mask() which already calls pci_dma_supported(). The attached patch removes the unneeded call to pci_dma_supported() Additionally the custom VORTEX_DMA_MASK macro is replaced by DMA_32BIT_MASK from linux/dma-mapping.h Signed-off-by: Tobias Klauser Signed-off-by: Andrew Morton Signed-off-by: Takashi Iwai --- sound/pci/au88x0/au88x0.c | 4 ++-- sound/pci/au88x0/au88x0.h | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'sound/pci/au88x0/au88x0.h') diff --git a/sound/pci/au88x0/au88x0.c b/sound/pci/au88x0/au88x0.c index 7c547859ae0..7d9184f7367 100644 --- a/sound/pci/au88x0/au88x0.c +++ b/sound/pci/au88x0/au88x0.c @@ -20,6 +20,7 @@ #include #include #include +#include #include // module parameters (see "Module Parameters") @@ -150,11 +151,10 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip) // check PCI availability (DMA). if ((err = pci_enable_device(pci)) < 0) return err; - if (!pci_dma_supported(pci, VORTEX_DMA_MASK)) { + if (pci_set_dma_mask(pci, DMA_32BIT_MASK)) { printk(KERN_ERR "error to set DMA mask\n"); return -ENXIO; } - pci_set_dma_mask(pci, VORTEX_DMA_MASK); chip = kzalloc(sizeof(*chip), GFP_KERNEL); if (chip == NULL) diff --git a/sound/pci/au88x0/au88x0.h b/sound/pci/au88x0/au88x0.h index 745f995a20d..c2ad2674bea 100644 --- a/sound/pci/au88x0/au88x0.h +++ b/sound/pci/au88x0/au88x0.h @@ -39,8 +39,6 @@ #include "au88x0_wt.h" #endif -#define VORTEX_DMA_MASK 0xffffffff - #define hwread(x,y) readl((x)+((y)>>2)) #define hwwrite(x,y,z) writel((z),(x)+((y)>>2)) -- cgit v1.2.3-70-g09d2