提交 2fd16874 编写于 作者: T Takashi Iwai 提交者: Jaroslav Kysela

[ALSA] Remove xxx_t typedefs: PCI AU88x0

Modules: au88x0 driver

Remove xxx_t typedefs from the PCI AU88x0 drivers.
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 208a1b4c
...@@ -118,7 +118,7 @@ static void __devinit snd_vortex_workaround(struct pci_dev *vortex, int fix) ...@@ -118,7 +118,7 @@ static void __devinit snd_vortex_workaround(struct pci_dev *vortex, int fix)
// component-destructor // component-destructor
// (see "Management of Cards and Components") // (see "Management of Cards and Components")
static int snd_vortex_dev_free(snd_device_t * device) static int snd_vortex_dev_free(struct snd_device *device)
{ {
vortex_t *vortex = device->device_data; vortex_t *vortex = device->device_data;
...@@ -137,11 +137,11 @@ static int snd_vortex_dev_free(snd_device_t * device) ...@@ -137,11 +137,11 @@ static int snd_vortex_dev_free(snd_device_t * device)
// chip-specific constructor // chip-specific constructor
// (see "Management of Cards and Components") // (see "Management of Cards and Components")
static int __devinit static int __devinit
snd_vortex_create(snd_card_t * card, struct pci_dev *pci, vortex_t ** rchip) snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip)
{ {
vortex_t *chip; vortex_t *chip;
int err; int err;
static snd_device_ops_t ops = { static struct snd_device_ops ops = {
.dev_free = snd_vortex_dev_free, .dev_free = snd_vortex_dev_free,
}; };
...@@ -233,7 +233,7 @@ static int __devinit ...@@ -233,7 +233,7 @@ static int __devinit
snd_vortex_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) snd_vortex_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
{ {
static int dev; static int dev;
snd_card_t *card; struct snd_card *card;
vortex_t *chip; vortex_t *chip;
int err; int err;
......
...@@ -129,21 +129,21 @@ typedef struct { ...@@ -129,21 +129,21 @@ typedef struct {
/* Virtual page extender stuff */ /* Virtual page extender stuff */
int nr_periods; int nr_periods;
int period_bytes; 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_real;
int period_virt; int period_virt;
snd_pcm_substream_t *substream; struct snd_pcm_substream *substream;
} stream_t; } stream_t;
typedef struct snd_vortex vortex_t; typedef struct snd_vortex vortex_t;
struct snd_vortex { struct snd_vortex {
/* ALSA structs. */ /* ALSA structs. */
snd_card_t *card; struct snd_card *card;
snd_pcm_t *pcm[VORTEX_PCM_LAST]; struct snd_pcm *pcm[VORTEX_PCM_LAST];
snd_rawmidi_t *rmidi; /* Legacy Midi interface. */ struct snd_rawmidi *rmidi; /* Legacy Midi interface. */
ac97_t *codec; struct snd_ac97 *codec;
/* Stream structs. */ /* Stream structs. */
stream_t dma_adb[NR_ADB]; stream_t dma_adb[NR_ADB];
...@@ -199,7 +199,7 @@ static void vortex_adb_setsrc(vortex_t * vortex, int adbdma, ...@@ -199,7 +199,7 @@ static void vortex_adb_setsrc(vortex_t * vortex, int adbdma,
/* DMA Engines. */ /* DMA Engines. */
static void vortex_adbdma_setbuffers(vortex_t * vortex, int adbdma, 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); int count);
static void vortex_adbdma_setmode(vortex_t * vortex, int adbdma, int ie, static void vortex_adbdma_setmode(vortex_t * vortex, int adbdma, int ie,
int dir, int fmt, int d, int dir, int fmt, int d,
...@@ -207,7 +207,7 @@ static void vortex_adbdma_setmode(vortex_t * vortex, int adbdma, int ie, ...@@ -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); static void vortex_adbdma_setstartbuffer(vortex_t * vortex, int adbdma, int sb);
#ifndef CHIP_AU8810 #ifndef CHIP_AU8810
static void vortex_wtdma_setbuffers(vortex_t * vortex, int wtdma, 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); int count);
static void vortex_wtdma_setmode(vortex_t * vortex, int wtdma, int ie, int fmt, int d, /*int e, */ static void vortex_wtdma_setmode(vortex_t * vortex, int wtdma, int ie, int fmt, int d, /*int e, */
unsigned long offset); unsigned long offset);
...@@ -231,9 +231,9 @@ static int inline vortex_wtdma_getlinearpos(vortex_t * vortex, int wtdma); ...@@ -231,9 +231,9 @@ static int inline vortex_wtdma_getlinearpos(vortex_t * vortex, int wtdma);
/* global stuff. */ /* global stuff. */
static void vortex_codec_init(vortex_t * vortex); 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); 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 void vortex_spdif_init(vortex_t * vortex, int spdif_sr, int spdif_mode);
static int vortex_core_init(vortex_t * card); static int vortex_core_init(vortex_t * card);
......
...@@ -725,7 +725,7 @@ static void vortex_a3d_translate_filter(a3d_atmos_t filter, int *params) ...@@ -725,7 +725,7 @@ static void vortex_a3d_translate_filter(a3d_atmos_t filter, int *params)
/* ALSA control interface. */ /* ALSA control interface. */
static int static int
snd_vortex_a3d_hrtf_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo) snd_vortex_a3d_hrtf_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{ {
uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
uinfo->count = 6; uinfo->count = 6;
...@@ -734,7 +734,7 @@ snd_vortex_a3d_hrtf_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo) ...@@ -734,7 +734,7 @@ snd_vortex_a3d_hrtf_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo)
return 0; return 0;
} }
static int static int
snd_vortex_a3d_itd_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo) snd_vortex_a3d_itd_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{ {
uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
uinfo->count = 2; uinfo->count = 2;
...@@ -743,7 +743,7 @@ snd_vortex_a3d_itd_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo) ...@@ -743,7 +743,7 @@ snd_vortex_a3d_itd_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo)
return 0; return 0;
} }
static int static int
snd_vortex_a3d_ild_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo) snd_vortex_a3d_ild_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{ {
uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
uinfo->count = 2; uinfo->count = 2;
...@@ -752,8 +752,8 @@ snd_vortex_a3d_ild_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo) ...@@ -752,8 +752,8 @@ snd_vortex_a3d_ild_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo)
return 0; return 0;
} }
static int static int
snd_vortex_a3d_filter_info(snd_kcontrol_t * snd_vortex_a3d_filter_info(struct snd_kcontrol *kcontrol,
kcontrol, snd_ctl_elem_info_t * uinfo) struct snd_ctl_elem_info *uinfo)
{ {
uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
uinfo->count = 4; uinfo->count = 4;
...@@ -763,7 +763,7 @@ snd_vortex_a3d_filter_info(snd_kcontrol_t * ...@@ -763,7 +763,7 @@ snd_vortex_a3d_filter_info(snd_kcontrol_t *
} }
static int static int
snd_vortex_a3d_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) snd_vortex_a3d_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ {
//a3dsrc_t *a = kcontrol->private_data; //a3dsrc_t *a = kcontrol->private_data;
/* No read yet. Would this be really useable/needed ? */ /* No read yet. Would this be really useable/needed ? */
...@@ -772,8 +772,8 @@ snd_vortex_a3d_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) ...@@ -772,8 +772,8 @@ snd_vortex_a3d_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
} }
static int static int
snd_vortex_a3d_hrtf_put(snd_kcontrol_t * snd_vortex_a3d_hrtf_put(struct snd_kcontrol *kcontrol,
kcontrol, snd_ctl_elem_value_t * ucontrol) struct snd_ctl_elem_value *ucontrol)
{ {
a3dsrc_t *a = kcontrol->private_data; a3dsrc_t *a = kcontrol->private_data;
int changed = 1, i; int changed = 1, i;
...@@ -789,8 +789,8 @@ snd_vortex_a3d_hrtf_put(snd_kcontrol_t * ...@@ -789,8 +789,8 @@ snd_vortex_a3d_hrtf_put(snd_kcontrol_t *
} }
static int static int
snd_vortex_a3d_itd_put(snd_kcontrol_t * snd_vortex_a3d_itd_put(struct snd_kcontrol *kcontrol,
kcontrol, snd_ctl_elem_value_t * ucontrol) struct snd_ctl_elem_value *ucontrol)
{ {
a3dsrc_t *a = kcontrol->private_data; a3dsrc_t *a = kcontrol->private_data;
int coord[6]; int coord[6];
...@@ -808,8 +808,8 @@ snd_vortex_a3d_itd_put(snd_kcontrol_t * ...@@ -808,8 +808,8 @@ snd_vortex_a3d_itd_put(snd_kcontrol_t *
} }
static int static int
snd_vortex_a3d_ild_put(snd_kcontrol_t * snd_vortex_a3d_ild_put(struct snd_kcontrol *kcontrol,
kcontrol, snd_ctl_elem_value_t * ucontrol) struct snd_ctl_elem_value *ucontrol)
{ {
a3dsrc_t *a = kcontrol->private_data; a3dsrc_t *a = kcontrol->private_data;
int changed = 1; int changed = 1;
...@@ -825,8 +825,8 @@ snd_vortex_a3d_ild_put(snd_kcontrol_t * ...@@ -825,8 +825,8 @@ snd_vortex_a3d_ild_put(snd_kcontrol_t *
} }
static int static int
snd_vortex_a3d_filter_put(snd_kcontrol_t snd_vortex_a3d_filter_put(struct snd_kcontrol *kcontrol,
* kcontrol, snd_ctl_elem_value_t * ucontrol) struct snd_ctl_elem_value *ucontrol)
{ {
a3dsrc_t *a = kcontrol->private_data; a3dsrc_t *a = kcontrol->private_data;
int i, changed = 1; int i, changed = 1;
...@@ -845,7 +845,7 @@ snd_vortex_a3d_filter_put(snd_kcontrol_t ...@@ -845,7 +845,7 @@ snd_vortex_a3d_filter_put(snd_kcontrol_t
return changed; return changed;
} }
static snd_kcontrol_new_t vortex_a3d_kcontrol __devinitdata = { static struct snd_kcontrol_new vortex_a3d_kcontrol __devinitdata = {
.iface = SNDRV_CTL_ELEM_IFACE_PCM, .iface = SNDRV_CTL_ELEM_IFACE_PCM,
.name = "Playback PCM advanced processing", .name = "Playback PCM advanced processing",
.access = SNDRV_CTL_ELEM_ACCESS_READWRITE, .access = SNDRV_CTL_ELEM_ACCESS_READWRITE,
...@@ -857,7 +857,7 @@ static snd_kcontrol_new_t vortex_a3d_kcontrol __devinitdata = { ...@@ -857,7 +857,7 @@ static snd_kcontrol_new_t vortex_a3d_kcontrol __devinitdata = {
/* Control (un)registration. */ /* Control (un)registration. */
static int vortex_a3d_register_controls(vortex_t * vortex) static int vortex_a3d_register_controls(vortex_t * vortex)
{ {
snd_kcontrol_t *kcontrol; struct snd_kcontrol *kcontrol;
int err, i; int err, i;
/* HRTF controls. */ /* HRTF controls. */
for (i = 0; i < NR_A3D; i++) { for (i = 0; i < NR_A3D; i++) {
......
...@@ -1097,7 +1097,7 @@ static void vortex_adbdma_setstartbuffer(vortex_t * vortex, int adbdma, int sb) ...@@ -1097,7 +1097,7 @@ static void vortex_adbdma_setstartbuffer(vortex_t * vortex, int adbdma, int sb)
static void static void
vortex_adbdma_setbuffers(vortex_t * vortex, int adbdma, vortex_adbdma_setbuffers(vortex_t * vortex, int adbdma,
snd_pcm_sgbuf_t * sgbuf, int psize, int count) struct snd_sg_buf * sgbuf, int psize, int count)
{ {
stream_t *dma = &vortex->dma_adb[adbdma]; stream_t *dma = &vortex->dma_adb[adbdma];
...@@ -1367,7 +1367,7 @@ static void vortex_wtdma_setstartbuffer(vortex_t * vortex, int wtdma, int sb) ...@@ -1367,7 +1367,7 @@ static void vortex_wtdma_setstartbuffer(vortex_t * vortex, int wtdma, int sb)
static void static void
vortex_wtdma_setbuffers(vortex_t * vortex, int wtdma, vortex_wtdma_setbuffers(vortex_t * vortex, int wtdma,
snd_pcm_sgbuf_t * sgbuf, int psize, int count) struct snd_sg_buf * sgbuf, int psize, int count)
{ {
stream_t *dma = &vortex->dma_wt[wtdma]; stream_t *dma = &vortex->dma_wt[wtdma];
...@@ -2514,7 +2514,7 @@ static void vortex_codec_init(vortex_t * vortex) ...@@ -2514,7 +2514,7 @@ static void vortex_codec_init(vortex_t * vortex)
} }
static void static void
vortex_codec_write(ac97_t * codec, unsigned short addr, unsigned short data) vortex_codec_write(struct snd_ac97 * codec, unsigned short addr, unsigned short data)
{ {
vortex_t *card = (vortex_t *) codec->private_data; vortex_t *card = (vortex_t *) codec->private_data;
...@@ -2539,7 +2539,7 @@ vortex_codec_write(ac97_t * codec, unsigned short addr, unsigned short data) ...@@ -2539,7 +2539,7 @@ vortex_codec_write(ac97_t * codec, unsigned short addr, unsigned short data)
hwread(card->mmio, VORTEX_CODEC_IO); hwread(card->mmio, VORTEX_CODEC_IO);
} }
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)
{ {
vortex_t *card = (vortex_t *) codec->private_data; vortex_t *card = (vortex_t *) codec->private_data;
......
...@@ -730,7 +730,7 @@ static void vortex_Eqlzr_shutdown(vortex_t * vortex) ...@@ -730,7 +730,7 @@ static void vortex_Eqlzr_shutdown(vortex_t * vortex)
/* Control interface */ /* Control interface */
static int static int
snd_vortex_eqtoggle_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo) snd_vortex_eqtoggle_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{ {
uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
uinfo->count = 1; uinfo->count = 1;
...@@ -740,8 +740,8 @@ snd_vortex_eqtoggle_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo) ...@@ -740,8 +740,8 @@ snd_vortex_eqtoggle_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo)
} }
static int static int
snd_vortex_eqtoggle_get(snd_kcontrol_t * kcontrol, snd_vortex_eqtoggle_get(struct snd_kcontrol *kcontrol,
snd_ctl_elem_value_t * ucontrol) struct snd_ctl_elem_value *ucontrol)
{ {
vortex_t *vortex = snd_kcontrol_chip(kcontrol); vortex_t *vortex = snd_kcontrol_chip(kcontrol);
eqlzr_t *eq = &(vortex->eq); eqlzr_t *eq = &(vortex->eq);
...@@ -753,8 +753,8 @@ snd_vortex_eqtoggle_get(snd_kcontrol_t * kcontrol, ...@@ -753,8 +753,8 @@ snd_vortex_eqtoggle_get(snd_kcontrol_t * kcontrol,
} }
static int static int
snd_vortex_eqtoggle_put(snd_kcontrol_t * kcontrol, snd_vortex_eqtoggle_put(struct snd_kcontrol *kcontrol,
snd_ctl_elem_value_t * ucontrol) struct snd_ctl_elem_value *ucontrol)
{ {
vortex_t *vortex = snd_kcontrol_chip(kcontrol); vortex_t *vortex = snd_kcontrol_chip(kcontrol);
eqlzr_t *eq = &(vortex->eq); eqlzr_t *eq = &(vortex->eq);
...@@ -766,7 +766,7 @@ snd_vortex_eqtoggle_put(snd_kcontrol_t * kcontrol, ...@@ -766,7 +766,7 @@ snd_vortex_eqtoggle_put(snd_kcontrol_t * kcontrol,
return 1; /* Allways changes */ return 1; /* Allways changes */
} }
static snd_kcontrol_new_t vortex_eqtoggle_kcontrol __devinitdata = { static struct snd_kcontrol_new vortex_eqtoggle_kcontrol __devinitdata = {
.iface = SNDRV_CTL_ELEM_IFACE_MIXER, .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "EQ Enable", .name = "EQ Enable",
.index = 0, .index = 0,
...@@ -778,7 +778,7 @@ static snd_kcontrol_new_t vortex_eqtoggle_kcontrol __devinitdata = { ...@@ -778,7 +778,7 @@ static snd_kcontrol_new_t vortex_eqtoggle_kcontrol __devinitdata = {
}; };
static int static int
snd_vortex_eq_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo) snd_vortex_eq_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{ {
uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
uinfo->count = 2; uinfo->count = 2;
...@@ -788,7 +788,7 @@ snd_vortex_eq_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo) ...@@ -788,7 +788,7 @@ snd_vortex_eq_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo)
} }
static int static int
snd_vortex_eq_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) snd_vortex_eq_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ {
vortex_t *vortex = snd_kcontrol_chip(kcontrol); vortex_t *vortex = snd_kcontrol_chip(kcontrol);
int i = kcontrol->private_value; int i = kcontrol->private_value;
...@@ -802,7 +802,7 @@ snd_vortex_eq_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) ...@@ -802,7 +802,7 @@ snd_vortex_eq_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
} }
static int static int
snd_vortex_eq_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) snd_vortex_eq_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ {
vortex_t *vortex = snd_kcontrol_chip(kcontrol); vortex_t *vortex = snd_kcontrol_chip(kcontrol);
int changed = 0, i = kcontrol->private_value; int changed = 0, i = kcontrol->private_value;
...@@ -824,7 +824,7 @@ snd_vortex_eq_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) ...@@ -824,7 +824,7 @@ snd_vortex_eq_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
return changed; return changed;
} }
static snd_kcontrol_new_t vortex_eq_kcontrol __devinitdata = { static struct snd_kcontrol_new vortex_eq_kcontrol __devinitdata = {
.iface = SNDRV_CTL_ELEM_IFACE_MIXER, .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = " .", .name = " .",
.index = 0, .index = 0,
...@@ -836,7 +836,7 @@ static snd_kcontrol_new_t vortex_eq_kcontrol __devinitdata = { ...@@ -836,7 +836,7 @@ static snd_kcontrol_new_t vortex_eq_kcontrol __devinitdata = {
}; };
static int static int
snd_vortex_peaks_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo) snd_vortex_peaks_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{ {
uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
uinfo->count = 20; uinfo->count = 20;
...@@ -846,7 +846,7 @@ snd_vortex_peaks_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo) ...@@ -846,7 +846,7 @@ snd_vortex_peaks_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo)
} }
static int static int
snd_vortex_peaks_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) snd_vortex_peaks_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ {
vortex_t *vortex = snd_kcontrol_chip(kcontrol); vortex_t *vortex = snd_kcontrol_chip(kcontrol);
int i, count; int i, count;
...@@ -863,7 +863,7 @@ snd_vortex_peaks_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) ...@@ -863,7 +863,7 @@ snd_vortex_peaks_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
return 0; return 0;
} }
static snd_kcontrol_new_t vortex_levels_kcontrol __devinitdata = { static struct snd_kcontrol_new vortex_levels_kcontrol __devinitdata = {
.iface = SNDRV_CTL_ELEM_IFACE_MIXER, .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "EQ Peaks", .name = "EQ Peaks",
.access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,
...@@ -888,7 +888,7 @@ static char *EqBandLabels[10] __devinitdata = { ...@@ -888,7 +888,7 @@ static char *EqBandLabels[10] __devinitdata = {
/* ALSA driver entry points. Init and exit. */ /* ALSA driver entry points. Init and exit. */
static int vortex_eq_init(vortex_t * vortex) static int vortex_eq_init(vortex_t * vortex)
{ {
snd_kcontrol_t *kcontrol; struct snd_kcontrol *kcontrol;
int err, i; int err, i;
vortex_Eqlzr_init(vortex); vortex_Eqlzr_init(vortex);
......
...@@ -13,10 +13,10 @@ ...@@ -13,10 +13,10 @@
static int __devinit snd_vortex_mixer(vortex_t * vortex) static int __devinit snd_vortex_mixer(vortex_t * vortex)
{ {
ac97_bus_t *pbus; struct snd_ac97_bus *pbus;
ac97_template_t ac97; struct snd_ac97_template ac97;
int err; int err;
static ac97_bus_ops_t ops = { static struct snd_ac97_bus_ops ops = {
.write = vortex_codec_write, .write = vortex_codec_write,
.read = vortex_codec_read, .read = vortex_codec_read,
}; };
......
...@@ -44,9 +44,9 @@ ...@@ -44,9 +44,9 @@
static int __devinit snd_vortex_midi(vortex_t * vortex) static int __devinit snd_vortex_midi(vortex_t * vortex)
{ {
snd_rawmidi_t *rmidi; struct snd_rawmidi *rmidi;
int temp, mode; int temp, mode;
mpu401_t *mpu; struct snd_mpu401 *mpu;
int port; int port;
#ifdef VORTEX_MPU401_LEGACY #ifdef VORTEX_MPU401_LEGACY
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#define VORTEX_PCM_TYPE(x) (x->name[40]) #define VORTEX_PCM_TYPE(x) (x->name[40])
/* hardware definition */ /* hardware definition */
static snd_pcm_hardware_t snd_vortex_playback_hw_adb = { static struct snd_pcm_hardware snd_vortex_playback_hw_adb = {
.info = .info =
(SNDRV_PCM_INFO_MMAP | /* SNDRV_PCM_INFO_RESUME | */ (SNDRV_PCM_INFO_MMAP | /* SNDRV_PCM_INFO_RESUME | */
SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_INTERLEAVED |
...@@ -56,7 +56,7 @@ static snd_pcm_hardware_t snd_vortex_playback_hw_adb = { ...@@ -56,7 +56,7 @@ static snd_pcm_hardware_t snd_vortex_playback_hw_adb = {
}; };
#ifndef CHIP_AU8820 #ifndef CHIP_AU8820
static snd_pcm_hardware_t snd_vortex_playback_hw_a3d = { static struct snd_pcm_hardware snd_vortex_playback_hw_a3d = {
.info = .info =
(SNDRV_PCM_INFO_MMAP | /* SNDRV_PCM_INFO_RESUME | */ (SNDRV_PCM_INFO_MMAP | /* SNDRV_PCM_INFO_RESUME | */
SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_INTERLEAVED |
...@@ -76,7 +76,7 @@ static snd_pcm_hardware_t snd_vortex_playback_hw_a3d = { ...@@ -76,7 +76,7 @@ static snd_pcm_hardware_t snd_vortex_playback_hw_a3d = {
.periods_max = 64, .periods_max = 64,
}; };
#endif #endif
static snd_pcm_hardware_t snd_vortex_playback_hw_spdif = { static struct snd_pcm_hardware snd_vortex_playback_hw_spdif = {
.info = .info =
(SNDRV_PCM_INFO_MMAP | /* SNDRV_PCM_INFO_RESUME | */ (SNDRV_PCM_INFO_MMAP | /* SNDRV_PCM_INFO_RESUME | */
SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_INTERLEAVED |
...@@ -99,7 +99,7 @@ static snd_pcm_hardware_t snd_vortex_playback_hw_spdif = { ...@@ -99,7 +99,7 @@ static snd_pcm_hardware_t snd_vortex_playback_hw_spdif = {
}; };
#ifndef CHIP_AU8810 #ifndef CHIP_AU8810
static snd_pcm_hardware_t snd_vortex_playback_hw_wt = { static struct snd_pcm_hardware snd_vortex_playback_hw_wt = {
.info = (SNDRV_PCM_INFO_MMAP | .info = (SNDRV_PCM_INFO_MMAP |
SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_BLOCK_TRANSFER | SNDRV_PCM_INFO_MMAP_VALID), SNDRV_PCM_INFO_BLOCK_TRANSFER | SNDRV_PCM_INFO_MMAP_VALID),
...@@ -117,10 +117,10 @@ static snd_pcm_hardware_t snd_vortex_playback_hw_wt = { ...@@ -117,10 +117,10 @@ static snd_pcm_hardware_t snd_vortex_playback_hw_wt = {
}; };
#endif #endif
/* open callback */ /* open callback */
static int snd_vortex_pcm_open(snd_pcm_substream_t * substream) static int snd_vortex_pcm_open(struct snd_pcm_substream *substream)
{ {
vortex_t *vortex = snd_pcm_substream_chip(substream); vortex_t *vortex = snd_pcm_substream_chip(substream);
snd_pcm_runtime_t *runtime = substream->runtime; struct snd_pcm_runtime *runtime = substream->runtime;
int err; int err;
/* Force equal size periods */ /* Force equal size periods */
...@@ -169,7 +169,7 @@ static int snd_vortex_pcm_open(snd_pcm_substream_t * substream) ...@@ -169,7 +169,7 @@ static int snd_vortex_pcm_open(snd_pcm_substream_t * substream)
} }
/* close callback */ /* close callback */
static int snd_vortex_pcm_close(snd_pcm_substream_t * substream) static int snd_vortex_pcm_close(struct snd_pcm_substream *substream)
{ {
//vortex_t *chip = snd_pcm_substream_chip(substream); //vortex_t *chip = snd_pcm_substream_chip(substream);
stream_t *stream = (stream_t *) substream->runtime->private_data; stream_t *stream = (stream_t *) substream->runtime->private_data;
...@@ -185,12 +185,12 @@ static int snd_vortex_pcm_close(snd_pcm_substream_t * substream) ...@@ -185,12 +185,12 @@ static int snd_vortex_pcm_close(snd_pcm_substream_t * substream)
/* hw_params callback */ /* hw_params callback */
static int static int
snd_vortex_pcm_hw_params(snd_pcm_substream_t * substream, snd_vortex_pcm_hw_params(struct snd_pcm_substream *substream,
snd_pcm_hw_params_t * hw_params) struct snd_pcm_hw_params *hw_params)
{ {
vortex_t *chip = snd_pcm_substream_chip(substream); vortex_t *chip = snd_pcm_substream_chip(substream);
stream_t *stream = (stream_t *) (substream->runtime->private_data); stream_t *stream = (stream_t *) (substream->runtime->private_data);
snd_pcm_sgbuf_t *sgbuf; struct snd_sg_buf *sgbuf;
int err; int err;
// Alloc buffer memory. // Alloc buffer memory.
...@@ -200,7 +200,7 @@ snd_vortex_pcm_hw_params(snd_pcm_substream_t * substream, ...@@ -200,7 +200,7 @@ snd_vortex_pcm_hw_params(snd_pcm_substream_t * substream,
printk(KERN_ERR "Vortex: pcm page alloc failed!\n"); printk(KERN_ERR "Vortex: pcm page alloc failed!\n");
return err; return err;
} }
//sgbuf = (snd_pcm_sgbuf_t *) substream->runtime->dma_private; //sgbuf = (struct snd_sg_buf *) substream->runtime->dma_private;
sgbuf = snd_pcm_substream_sgbuf(substream); sgbuf = snd_pcm_substream_sgbuf(substream);
/* /*
printk(KERN_INFO "Vortex: periods %d, period_bytes %d, channels = %d\n", params_periods(hw_params), printk(KERN_INFO "Vortex: periods %d, period_bytes %d, channels = %d\n", params_periods(hw_params),
...@@ -251,7 +251,7 @@ snd_vortex_pcm_hw_params(snd_pcm_substream_t * substream, ...@@ -251,7 +251,7 @@ snd_vortex_pcm_hw_params(snd_pcm_substream_t * substream,
} }
/* hw_free callback */ /* hw_free callback */
static int snd_vortex_pcm_hw_free(snd_pcm_substream_t * substream) static int snd_vortex_pcm_hw_free(struct snd_pcm_substream *substream)
{ {
vortex_t *chip = snd_pcm_substream_chip(substream); vortex_t *chip = snd_pcm_substream_chip(substream);
stream_t *stream = (stream_t *) (substream->runtime->private_data); stream_t *stream = (stream_t *) (substream->runtime->private_data);
...@@ -277,10 +277,10 @@ static int snd_vortex_pcm_hw_free(snd_pcm_substream_t * substream) ...@@ -277,10 +277,10 @@ static int snd_vortex_pcm_hw_free(snd_pcm_substream_t * substream)
} }
/* prepare callback */ /* prepare callback */
static int snd_vortex_pcm_prepare(snd_pcm_substream_t * substream) static int snd_vortex_pcm_prepare(struct snd_pcm_substream *substream)
{ {
vortex_t *chip = snd_pcm_substream_chip(substream); vortex_t *chip = snd_pcm_substream_chip(substream);
snd_pcm_runtime_t *runtime = substream->runtime; struct snd_pcm_runtime *runtime = substream->runtime;
stream_t *stream = (stream_t *) substream->runtime->private_data; stream_t *stream = (stream_t *) substream->runtime->private_data;
int dma = stream->dma, fmt, dir; int dma = stream->dma, fmt, dir;
...@@ -310,7 +310,7 @@ static int snd_vortex_pcm_prepare(snd_pcm_substream_t * substream) ...@@ -310,7 +310,7 @@ static int snd_vortex_pcm_prepare(snd_pcm_substream_t * substream)
} }
/* trigger callback */ /* trigger callback */
static int snd_vortex_pcm_trigger(snd_pcm_substream_t * substream, int cmd) static int snd_vortex_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
{ {
vortex_t *chip = snd_pcm_substream_chip(substream); vortex_t *chip = snd_pcm_substream_chip(substream);
stream_t *stream = (stream_t *) substream->runtime->private_data; stream_t *stream = (stream_t *) substream->runtime->private_data;
...@@ -374,7 +374,7 @@ static int snd_vortex_pcm_trigger(snd_pcm_substream_t * substream, int cmd) ...@@ -374,7 +374,7 @@ static int snd_vortex_pcm_trigger(snd_pcm_substream_t * substream, int cmd)
} }
/* pointer callback */ /* pointer callback */
static snd_pcm_uframes_t snd_vortex_pcm_pointer(snd_pcm_substream_t * substream) static snd_pcm_uframes_t snd_vortex_pcm_pointer(struct snd_pcm_substream *substream)
{ {
vortex_t *chip = snd_pcm_substream_chip(substream); vortex_t *chip = snd_pcm_substream_chip(substream);
stream_t *stream = (stream_t *) substream->runtime->private_data; stream_t *stream = (stream_t *) substream->runtime->private_data;
...@@ -395,13 +395,13 @@ static snd_pcm_uframes_t snd_vortex_pcm_pointer(snd_pcm_substream_t * substream) ...@@ -395,13 +395,13 @@ static snd_pcm_uframes_t snd_vortex_pcm_pointer(snd_pcm_substream_t * substream)
/* Page callback. */ /* Page callback. */
/* /*
static struct page *snd_pcm_sgbuf_ops_page(snd_pcm_substream_t *substream, unsigned long offset) { static struct page *snd_pcm_sgbuf_ops_page(struct snd_pcm_substream *substream, unsigned long offset) {
} }
*/ */
/* operators */ /* operators */
static snd_pcm_ops_t snd_vortex_playback_ops = { static struct snd_pcm_ops snd_vortex_playback_ops = {
.open = snd_vortex_pcm_open, .open = snd_vortex_pcm_open,
.close = snd_vortex_pcm_close, .close = snd_vortex_pcm_close,
.ioctl = snd_pcm_lib_ioctl, .ioctl = snd_pcm_lib_ioctl,
...@@ -434,14 +434,14 @@ static char *vortex_pcm_name[VORTEX_PCM_LAST] = { ...@@ -434,14 +434,14 @@ static char *vortex_pcm_name[VORTEX_PCM_LAST] = {
/* SPDIF kcontrol */ /* SPDIF kcontrol */
static int snd_vortex_spdif_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) static int snd_vortex_spdif_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{ {
uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
uinfo->count = 1; uinfo->count = 1;
return 0; return 0;
} }
static int snd_vortex_spdif_mask_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) static int snd_vortex_spdif_mask_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ {
ucontrol->value.iec958.status[0] = 0xff; ucontrol->value.iec958.status[0] = 0xff;
ucontrol->value.iec958.status[1] = 0xff; ucontrol->value.iec958.status[1] = 0xff;
...@@ -450,7 +450,7 @@ static int snd_vortex_spdif_mask_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_val ...@@ -450,7 +450,7 @@ static int snd_vortex_spdif_mask_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_val
return 0; return 0;
} }
static int snd_vortex_spdif_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) static int snd_vortex_spdif_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ {
vortex_t *vortex = snd_kcontrol_chip(kcontrol); vortex_t *vortex = snd_kcontrol_chip(kcontrol);
ucontrol->value.iec958.status[0] = 0x00; ucontrol->value.iec958.status[0] = 0x00;
...@@ -464,7 +464,7 @@ static int snd_vortex_spdif_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t ...@@ -464,7 +464,7 @@ static int snd_vortex_spdif_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
return 0; return 0;
} }
static int snd_vortex_spdif_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) static int snd_vortex_spdif_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ {
vortex_t *vortex = snd_kcontrol_chip(kcontrol); vortex_t *vortex = snd_kcontrol_chip(kcontrol);
int spdif_sr = 48000; int spdif_sr = 48000;
...@@ -481,7 +481,7 @@ static int snd_vortex_spdif_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t ...@@ -481,7 +481,7 @@ static int snd_vortex_spdif_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
} }
/* spdif controls */ /* spdif controls */
static snd_kcontrol_new_t snd_vortex_mixer_spdif[] __devinitdata = { static struct snd_kcontrol_new snd_vortex_mixer_spdif[] __devinitdata = {
{ {
.iface = SNDRV_CTL_ELEM_IFACE_PCM, .iface = SNDRV_CTL_ELEM_IFACE_PCM,
.name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT), .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT),
...@@ -501,8 +501,8 @@ static snd_kcontrol_new_t snd_vortex_mixer_spdif[] __devinitdata = { ...@@ -501,8 +501,8 @@ static snd_kcontrol_new_t snd_vortex_mixer_spdif[] __devinitdata = {
/* create a pcm device */ /* create a pcm device */
static int __devinit snd_vortex_new_pcm(vortex_t * chip, int idx, int nr) static int __devinit snd_vortex_new_pcm(vortex_t * chip, int idx, int nr)
{ {
snd_pcm_t *pcm; struct snd_pcm *pcm;
snd_kcontrol_t *kctl; struct snd_kcontrol *kctl;
int i; int i;
int err, nr_capt; int err, nr_capt;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册