Commit 02c2de69 authored by Takashi Iwai's avatar Takashi Iwai Committed by Jaroslav Kysela

[ALSA] Remove xxx_t typedefs: PCI AD1889

Modules: AD1889 driver

Remove xxx_t typedefs from the PCI AD1889 driver.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 10754f53
...@@ -87,20 +87,20 @@ struct ad1889_register_state { ...@@ -87,20 +87,20 @@ struct ad1889_register_state {
}; };
struct snd_ad1889 { struct snd_ad1889 {
snd_card_t *card; struct snd_card *card;
struct pci_dev *pci; struct pci_dev *pci;
int irq; int irq;
unsigned long bar; unsigned long bar;
void __iomem *iobase; void __iomem *iobase;
ac97_t *ac97; struct snd_ac97 *ac97;
ac97_bus_t *ac97_bus; struct snd_ac97_bus *ac97_bus;
snd_pcm_t *pcm; struct snd_pcm *pcm;
snd_info_entry_t *proc; struct snd_info_entry *proc;
snd_pcm_substream_t *psubs; struct snd_pcm_substream *psubs;
snd_pcm_substream_t *csubs; struct snd_pcm_substream *csubs;
/* playback register state */ /* playback register state */
struct ad1889_register_state wave; struct ad1889_register_state wave;
...@@ -241,14 +241,14 @@ ad1889_channel_reset(struct snd_ad1889 *chip, unsigned int channel) ...@@ -241,14 +241,14 @@ ad1889_channel_reset(struct snd_ad1889 *chip, unsigned int channel)
} }
static inline u16 static inline u16
snd_ad1889_ac97_read(ac97_t *ac97, unsigned short reg) snd_ad1889_ac97_read(struct snd_ac97 *ac97, unsigned short reg)
{ {
struct snd_ad1889 *chip = ac97->private_data; struct snd_ad1889 *chip = ac97->private_data;
return ad1889_readw(chip, AD_AC97_BASE + reg); return ad1889_readw(chip, AD_AC97_BASE + reg);
} }
static inline void static inline void
snd_ad1889_ac97_write(ac97_t *ac97, unsigned short reg, unsigned short val) snd_ad1889_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short val)
{ {
struct snd_ad1889 *chip = ac97->private_data; struct snd_ad1889 *chip = ac97->private_data;
ad1889_writew(chip, AD_AC97_BASE + reg, val); ad1889_writew(chip, AD_AC97_BASE + reg, val);
...@@ -273,20 +273,20 @@ snd_ad1889_ac97_ready(struct snd_ad1889 *chip) ...@@ -273,20 +273,20 @@ snd_ad1889_ac97_ready(struct snd_ad1889 *chip)
} }
static int static int
snd_ad1889_hw_params(snd_pcm_substream_t *substream, snd_ad1889_hw_params(struct snd_pcm_substream *substream,
snd_pcm_hw_params_t *hw_params) struct snd_pcm_hw_params *hw_params)
{ {
return snd_pcm_lib_malloc_pages(substream, return snd_pcm_lib_malloc_pages(substream,
params_buffer_bytes(hw_params)); params_buffer_bytes(hw_params));
} }
static int static int
snd_ad1889_hw_free(snd_pcm_substream_t *substream) snd_ad1889_hw_free(struct snd_pcm_substream *substream)
{ {
return snd_pcm_lib_free_pages(substream); return snd_pcm_lib_free_pages(substream);
} }
static snd_pcm_hardware_t snd_ad1889_playback_hw = { static struct snd_pcm_hardware snd_ad1889_playback_hw = {
.info = SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | .info = SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_BLOCK_TRANSFER, SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_BLOCK_TRANSFER,
.formats = SNDRV_PCM_FMTBIT_S16_LE, .formats = SNDRV_PCM_FMTBIT_S16_LE,
...@@ -303,7 +303,7 @@ static snd_pcm_hardware_t snd_ad1889_playback_hw = { ...@@ -303,7 +303,7 @@ static snd_pcm_hardware_t snd_ad1889_playback_hw = {
/*.fifo_size = 0,*/ /*.fifo_size = 0,*/
}; };
static snd_pcm_hardware_t snd_ad1889_capture_hw = { static struct snd_pcm_hardware snd_ad1889_capture_hw = {
.info = SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | .info = SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_BLOCK_TRANSFER, SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_BLOCK_TRANSFER,
.formats = SNDRV_PCM_FMTBIT_S16_LE, .formats = SNDRV_PCM_FMTBIT_S16_LE,
...@@ -321,10 +321,10 @@ static snd_pcm_hardware_t snd_ad1889_capture_hw = { ...@@ -321,10 +321,10 @@ static snd_pcm_hardware_t snd_ad1889_capture_hw = {
}; };
static int static int
snd_ad1889_playback_open(snd_pcm_substream_t *ss) snd_ad1889_playback_open(struct snd_pcm_substream *ss)
{ {
struct snd_ad1889 *chip = snd_pcm_substream_chip(ss); struct snd_ad1889 *chip = snd_pcm_substream_chip(ss);
snd_pcm_runtime_t *rt = ss->runtime; struct snd_pcm_runtime *rt = ss->runtime;
chip->psubs = ss; chip->psubs = ss;
rt->hw = snd_ad1889_playback_hw; rt->hw = snd_ad1889_playback_hw;
...@@ -333,10 +333,10 @@ snd_ad1889_playback_open(snd_pcm_substream_t *ss) ...@@ -333,10 +333,10 @@ snd_ad1889_playback_open(snd_pcm_substream_t *ss)
} }
static int static int
snd_ad1889_capture_open(snd_pcm_substream_t *ss) snd_ad1889_capture_open(struct snd_pcm_substream *ss)
{ {
struct snd_ad1889 *chip = snd_pcm_substream_chip(ss); struct snd_ad1889 *chip = snd_pcm_substream_chip(ss);
snd_pcm_runtime_t *rt = ss->runtime; struct snd_pcm_runtime *rt = ss->runtime;
chip->csubs = ss; chip->csubs = ss;
rt->hw = snd_ad1889_capture_hw; rt->hw = snd_ad1889_capture_hw;
...@@ -345,7 +345,7 @@ snd_ad1889_capture_open(snd_pcm_substream_t *ss) ...@@ -345,7 +345,7 @@ snd_ad1889_capture_open(snd_pcm_substream_t *ss)
} }
static int static int
snd_ad1889_playback_close(snd_pcm_substream_t *ss) snd_ad1889_playback_close(struct snd_pcm_substream *ss)
{ {
struct snd_ad1889 *chip = snd_pcm_substream_chip(ss); struct snd_ad1889 *chip = snd_pcm_substream_chip(ss);
chip->psubs = NULL; chip->psubs = NULL;
...@@ -353,7 +353,7 @@ snd_ad1889_playback_close(snd_pcm_substream_t *ss) ...@@ -353,7 +353,7 @@ snd_ad1889_playback_close(snd_pcm_substream_t *ss)
} }
static int static int
snd_ad1889_capture_close(snd_pcm_substream_t *ss) snd_ad1889_capture_close(struct snd_pcm_substream *ss)
{ {
struct snd_ad1889 *chip = snd_pcm_substream_chip(ss); struct snd_ad1889 *chip = snd_pcm_substream_chip(ss);
chip->csubs = NULL; chip->csubs = NULL;
...@@ -361,10 +361,10 @@ snd_ad1889_capture_close(snd_pcm_substream_t *ss) ...@@ -361,10 +361,10 @@ snd_ad1889_capture_close(snd_pcm_substream_t *ss)
} }
static int static int
snd_ad1889_playback_prepare(snd_pcm_substream_t *ss) snd_ad1889_playback_prepare(struct snd_pcm_substream *ss)
{ {
struct snd_ad1889 *chip = snd_pcm_substream_chip(ss); struct snd_ad1889 *chip = snd_pcm_substream_chip(ss);
snd_pcm_runtime_t *rt = ss->runtime; struct snd_pcm_runtime *rt = ss->runtime;
unsigned int size = snd_pcm_lib_buffer_bytes(ss); unsigned int size = snd_pcm_lib_buffer_bytes(ss);
unsigned int count = snd_pcm_lib_period_bytes(ss); unsigned int count = snd_pcm_lib_period_bytes(ss);
u16 reg; u16 reg;
...@@ -411,10 +411,10 @@ snd_ad1889_playback_prepare(snd_pcm_substream_t *ss) ...@@ -411,10 +411,10 @@ snd_ad1889_playback_prepare(snd_pcm_substream_t *ss)
} }
static int static int
snd_ad1889_capture_prepare(snd_pcm_substream_t *ss) snd_ad1889_capture_prepare(struct snd_pcm_substream *ss)
{ {
struct snd_ad1889 *chip = snd_pcm_substream_chip(ss); struct snd_ad1889 *chip = snd_pcm_substream_chip(ss);
snd_pcm_runtime_t *rt = ss->runtime; struct snd_pcm_runtime *rt = ss->runtime;
unsigned int size = snd_pcm_lib_buffer_bytes(ss); unsigned int size = snd_pcm_lib_buffer_bytes(ss);
unsigned int count = snd_pcm_lib_period_bytes(ss); unsigned int count = snd_pcm_lib_period_bytes(ss);
u16 reg; u16 reg;
...@@ -462,7 +462,7 @@ snd_ad1889_capture_prepare(snd_pcm_substream_t *ss) ...@@ -462,7 +462,7 @@ snd_ad1889_capture_prepare(snd_pcm_substream_t *ss)
DMA should be *triggered* by this call. DMA should be *triggered* by this call.
The WSMC "WAEN" bit triggers DMA Wave On/Off */ The WSMC "WAEN" bit triggers DMA Wave On/Off */
static int static int
snd_ad1889_playback_trigger(snd_pcm_substream_t *ss, int cmd) snd_ad1889_playback_trigger(struct snd_pcm_substream *ss, int cmd)
{ {
u16 wsmc; u16 wsmc;
struct snd_ad1889 *chip = snd_pcm_substream_chip(ss); struct snd_ad1889 *chip = snd_pcm_substream_chip(ss);
...@@ -503,7 +503,7 @@ snd_ad1889_playback_trigger(snd_pcm_substream_t *ss, int cmd) ...@@ -503,7 +503,7 @@ snd_ad1889_playback_trigger(snd_pcm_substream_t *ss, int cmd)
DMA should be *triggered* by this call. DMA should be *triggered* by this call.
The RAMC "ADEN" bit triggers DMA ADC On/Off */ The RAMC "ADEN" bit triggers DMA ADC On/Off */
static int static int
snd_ad1889_capture_trigger(snd_pcm_substream_t *ss, int cmd) snd_ad1889_capture_trigger(struct snd_pcm_substream *ss, int cmd)
{ {
u16 ramc; u16 ramc;
struct snd_ad1889 *chip = snd_pcm_substream_chip(ss); struct snd_ad1889 *chip = snd_pcm_substream_chip(ss);
...@@ -538,7 +538,7 @@ snd_ad1889_capture_trigger(snd_pcm_substream_t *ss, int cmd) ...@@ -538,7 +538,7 @@ snd_ad1889_capture_trigger(snd_pcm_substream_t *ss, int cmd)
/* Called in atomic context with IRQ disabled */ /* Called in atomic context with IRQ disabled */
static snd_pcm_uframes_t static snd_pcm_uframes_t
snd_ad1889_playback_pointer(snd_pcm_substream_t *ss) snd_ad1889_playback_pointer(struct snd_pcm_substream *ss)
{ {
size_t ptr = 0; size_t ptr = 0;
struct snd_ad1889 *chip = snd_pcm_substream_chip(ss); struct snd_ad1889 *chip = snd_pcm_substream_chip(ss);
...@@ -556,7 +556,7 @@ snd_ad1889_playback_pointer(snd_pcm_substream_t *ss) ...@@ -556,7 +556,7 @@ snd_ad1889_playback_pointer(snd_pcm_substream_t *ss)
/* Called in atomic context with IRQ disabled */ /* Called in atomic context with IRQ disabled */
static snd_pcm_uframes_t static snd_pcm_uframes_t
snd_ad1889_capture_pointer(snd_pcm_substream_t *ss) snd_ad1889_capture_pointer(struct snd_pcm_substream *ss)
{ {
size_t ptr = 0; size_t ptr = 0;
struct snd_ad1889 *chip = snd_pcm_substream_chip(ss); struct snd_ad1889 *chip = snd_pcm_substream_chip(ss);
...@@ -572,7 +572,7 @@ snd_ad1889_capture_pointer(snd_pcm_substream_t *ss) ...@@ -572,7 +572,7 @@ snd_ad1889_capture_pointer(snd_pcm_substream_t *ss)
return bytes_to_frames(ss->runtime, ptr); return bytes_to_frames(ss->runtime, ptr);
} }
static snd_pcm_ops_t snd_ad1889_playback_ops = { static struct snd_pcm_ops snd_ad1889_playback_ops = {
.open = snd_ad1889_playback_open, .open = snd_ad1889_playback_open,
.close = snd_ad1889_playback_close, .close = snd_ad1889_playback_close,
.ioctl = snd_pcm_lib_ioctl, .ioctl = snd_pcm_lib_ioctl,
...@@ -583,7 +583,7 @@ static snd_pcm_ops_t snd_ad1889_playback_ops = { ...@@ -583,7 +583,7 @@ static snd_pcm_ops_t snd_ad1889_playback_ops = {
.pointer = snd_ad1889_playback_pointer, .pointer = snd_ad1889_playback_pointer,
}; };
static snd_pcm_ops_t snd_ad1889_capture_ops = { static struct snd_pcm_ops snd_ad1889_capture_ops = {
.open = snd_ad1889_capture_open, .open = snd_ad1889_capture_open,
.close = snd_ad1889_capture_close, .close = snd_ad1889_capture_close,
.ioctl = snd_pcm_lib_ioctl, .ioctl = snd_pcm_lib_ioctl,
...@@ -624,10 +624,10 @@ snd_ad1889_interrupt(int irq, ...@@ -624,10 +624,10 @@ snd_ad1889_interrupt(int irq,
} }
static int __devinit static int __devinit
snd_ad1889_pcm_init(struct snd_ad1889 *chip, int device, snd_pcm_t **rpcm) snd_ad1889_pcm_init(struct snd_ad1889 *chip, int device, struct snd_pcm **rpcm)
{ {
int err; int err;
snd_pcm_t *pcm; struct snd_pcm *pcm;
if (rpcm) if (rpcm)
*rpcm = NULL; *rpcm = NULL;
...@@ -666,7 +666,7 @@ snd_ad1889_pcm_init(struct snd_ad1889 *chip, int device, snd_pcm_t **rpcm) ...@@ -666,7 +666,7 @@ snd_ad1889_pcm_init(struct snd_ad1889 *chip, int device, snd_pcm_t **rpcm)
} }
static void static void
snd_ad1889_proc_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer) snd_ad1889_proc_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
{ {
struct snd_ad1889 *chip = entry->private_data; struct snd_ad1889 *chip = entry->private_data;
u16 reg; u16 reg;
...@@ -749,7 +749,7 @@ snd_ad1889_proc_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer) ...@@ -749,7 +749,7 @@ snd_ad1889_proc_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer)
static void __devinit static void __devinit
snd_ad1889_proc_init(struct snd_ad1889 *chip) snd_ad1889_proc_init(struct snd_ad1889 *chip)
{ {
snd_info_entry_t *entry; struct snd_info_entry *entry;
if (!snd_card_proc_new(chip->card, chip->card->driver, &entry)) if (!snd_card_proc_new(chip->card, chip->card->driver, &entry))
snd_info_set_text_ops(entry, chip, 1024, snd_ad1889_proc_read); snd_info_set_text_ops(entry, chip, 1024, snd_ad1889_proc_read);
...@@ -791,14 +791,14 @@ snd_ad1889_ac97_xinit(struct snd_ad1889 *chip) ...@@ -791,14 +791,14 @@ snd_ad1889_ac97_xinit(struct snd_ad1889 *chip)
} }
static void static void
snd_ad1889_ac97_bus_free(ac97_bus_t *bus) snd_ad1889_ac97_bus_free(struct snd_ac97_bus *bus)
{ {
struct snd_ad1889 *chip = bus->private_data; struct snd_ad1889 *chip = bus->private_data;
chip->ac97_bus = NULL; chip->ac97_bus = NULL;
} }
static void static void
snd_ad1889_ac97_free(ac97_t *ac97) snd_ad1889_ac97_free(struct snd_ac97 *ac97)
{ {
struct snd_ad1889 *chip = ac97->private_data; struct snd_ad1889 *chip = ac97->private_data;
chip->ac97 = NULL; chip->ac97 = NULL;
...@@ -808,8 +808,8 @@ static int __devinit ...@@ -808,8 +808,8 @@ static int __devinit
snd_ad1889_ac97_init(struct snd_ad1889 *chip, const char *quirk_override) snd_ad1889_ac97_init(struct snd_ad1889 *chip, const char *quirk_override)
{ {
int err; int err;
ac97_template_t ac97; struct snd_ac97_template ac97;
static ac97_bus_ops_t ops = { static struct snd_ac97_bus_ops ops = {
.write = snd_ad1889_ac97_write, .write = snd_ad1889_ac97_write,
.read = snd_ad1889_ac97_read, .read = snd_ad1889_ac97_read,
}; };
...@@ -873,7 +873,7 @@ snd_ad1889_free(struct snd_ad1889 *chip) ...@@ -873,7 +873,7 @@ snd_ad1889_free(struct snd_ad1889 *chip)
} }
static inline int static inline int
snd_ad1889_dev_free(snd_device_t *device) snd_ad1889_dev_free(struct snd_device *device)
{ {
struct snd_ad1889 *chip = device->device_data; struct snd_ad1889 *chip = device->device_data;
return snd_ad1889_free(chip); return snd_ad1889_free(chip);
...@@ -894,14 +894,14 @@ snd_ad1889_init(struct snd_ad1889 *chip) ...@@ -894,14 +894,14 @@ snd_ad1889_init(struct snd_ad1889 *chip)
} }
static int __devinit static int __devinit
snd_ad1889_create(snd_card_t *card, snd_ad1889_create(struct snd_card *card,
struct pci_dev *pci, struct pci_dev *pci,
struct snd_ad1889 **rchip) struct snd_ad1889 **rchip)
{ {
int err; int err;
struct snd_ad1889 *chip; struct snd_ad1889 *chip;
static snd_device_ops_t ops = { static struct snd_device_ops ops = {
.dev_free = snd_ad1889_dev_free, .dev_free = snd_ad1889_dev_free,
}; };
...@@ -985,7 +985,7 @@ snd_ad1889_probe(struct pci_dev *pci, ...@@ -985,7 +985,7 @@ snd_ad1889_probe(struct pci_dev *pci,
{ {
int err; int err;
static int devno; static int devno;
snd_card_t *card; struct snd_card *card;
struct snd_ad1889 *chip; struct snd_ad1889 *chip;
/* (1) */ /* (1) */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment