Commit 66f8df6b authored by Takashi Iwai's avatar Takashi Iwai Committed by Jaroslav Kysela

[ALSA] Remove xxx_t typedefs: PCI CS5535

Modules: CS5535 driver

Remove xxx_t typedefs from the PCI CS5535 driver.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent d1fabd9c
......@@ -53,7 +53,7 @@ static struct pci_device_id snd_cs5535audio_ids[] = {
MODULE_DEVICE_TABLE(pci, snd_cs5535audio_ids);
static void wait_till_cmd_acked(cs5535audio_t *cs5535au, unsigned long timeout)
static void wait_till_cmd_acked(struct cs5535audio *cs5535au, unsigned long timeout)
{
unsigned int tmp;
do {
......@@ -66,11 +66,11 @@ static void wait_till_cmd_acked(cs5535audio_t *cs5535au, unsigned long timeout)
snd_printk(KERN_ERR "Failure writing to cs5535 codec\n");
}
static unsigned short snd_cs5535audio_codec_read(cs5535audio_t *cs5535au,
static unsigned short snd_cs5535audio_codec_read(struct cs5535audio *cs5535au,
unsigned short reg)
{
unsigned int regdata;
int timeout;
unsigned int timeout;
unsigned int val;
regdata = ((unsigned int) reg) << 24;
......@@ -93,7 +93,7 @@ static unsigned short snd_cs5535audio_codec_read(cs5535audio_t *cs5535au,
return (unsigned short) val;
}
static void snd_cs5535audio_codec_write(cs5535audio_t *cs5535au,
static void snd_cs5535audio_codec_write(struct cs5535audio *cs5535au,
unsigned short reg, unsigned short val)
{
unsigned int regdata;
......@@ -108,27 +108,27 @@ static void snd_cs5535audio_codec_write(cs5535audio_t *cs5535au,
wait_till_cmd_acked(cs5535au, 50);
}
static void snd_cs5535audio_ac97_codec_write(ac97_t *ac97,
static void snd_cs5535audio_ac97_codec_write(struct snd_ac97 *ac97,
unsigned short reg, unsigned short val)
{
cs5535audio_t *cs5535au = ac97->private_data;
struct cs5535audio *cs5535au = ac97->private_data;
snd_cs5535audio_codec_write(cs5535au, reg, val);
}
static unsigned short snd_cs5535audio_ac97_codec_read(ac97_t *ac97,
static unsigned short snd_cs5535audio_ac97_codec_read(struct snd_ac97 *ac97,
unsigned short reg)
{
cs5535audio_t *cs5535au = ac97->private_data;
struct cs5535audio *cs5535au = ac97->private_data;
return snd_cs5535audio_codec_read(cs5535au, reg);
}
static int snd_cs5535audio_mixer(cs5535audio_t *cs5535au)
static int snd_cs5535audio_mixer(struct cs5535audio *cs5535au)
{
snd_card_t *card = cs5535au->card;
ac97_bus_t *pbus;
ac97_template_t ac97;
struct snd_card *card = cs5535au->card;
struct snd_ac97_bus *pbus;
struct snd_ac97_template ac97;
int err;
static ac97_bus_ops_t ops = {
static struct snd_ac97_bus_ops ops = {
.write = snd_cs5535audio_ac97_codec_write,
.read = snd_cs5535audio_ac97_codec_read,
};
......@@ -149,14 +149,14 @@ static int snd_cs5535audio_mixer(cs5535audio_t *cs5535au)
return 0;
}
static void process_bm0_irq(cs5535audio_t *cs5535au)
static void process_bm0_irq(struct cs5535audio *cs5535au)
{
u8 bm_stat;
spin_lock(&cs5535au->reg_lock);
bm_stat = cs_readb(cs5535au, ACC_BM0_STATUS);
spin_unlock(&cs5535au->reg_lock);
if (bm_stat & EOP) {
cs5535audio_dma_t *dma;
struct cs5535audio_dma *dma;
dma = cs5535au->playback_substream->runtime->private_data;
snd_pcm_period_elapsed(cs5535au->playback_substream);
} else {
......@@ -165,14 +165,14 @@ static void process_bm0_irq(cs5535audio_t *cs5535au)
}
}
static void process_bm1_irq(cs5535audio_t *cs5535au)
static void process_bm1_irq(struct cs5535audio *cs5535au)
{
u8 bm_stat;
spin_lock(&cs5535au->reg_lock);
bm_stat = cs_readb(cs5535au, ACC_BM1_STATUS);
spin_unlock(&cs5535au->reg_lock);
if (bm_stat & EOP) {
cs5535audio_dma_t *dma;
struct cs5535audio_dma *dma;
dma = cs5535au->capture_substream->runtime->private_data;
snd_pcm_period_elapsed(cs5535au->capture_substream);
}
......@@ -184,7 +184,7 @@ static irqreturn_t snd_cs5535audio_interrupt(int irq, void *dev_id,
u16 acc_irq_stat;
u8 bm_stat;
unsigned char count;
cs5535audio_t *cs5535au = dev_id;
struct cs5535audio *cs5535au = dev_id;
if (cs5535au == NULL)
return IRQ_NONE;
......@@ -235,7 +235,7 @@ static irqreturn_t snd_cs5535audio_interrupt(int irq, void *dev_id,
return IRQ_HANDLED;
}
static int snd_cs5535audio_free(cs5535audio_t *cs5535au)
static int snd_cs5535audio_free(struct cs5535audio *cs5535au)
{
synchronize_irq(cs5535au->irq);
pci_set_power_state(cs5535au->pci, 3);
......@@ -249,20 +249,20 @@ static int snd_cs5535audio_free(cs5535audio_t *cs5535au)
return 0;
}
static int snd_cs5535audio_dev_free(snd_device_t *device)
static int snd_cs5535audio_dev_free(struct snd_device *device)
{
cs5535audio_t *cs5535au = device->device_data;
struct cs5535audio *cs5535au = device->device_data;
return snd_cs5535audio_free(cs5535au);
}
static int __devinit snd_cs5535audio_create(snd_card_t *card,
static int __devinit snd_cs5535audio_create(struct snd_card *card,
struct pci_dev *pci,
cs5535audio_t **rcs5535au)
struct cs5535audio **rcs5535au)
{
cs5535audio_t *cs5535au;
struct cs5535audio *cs5535au;
int err;
static snd_device_ops_t ops = {
static struct snd_device_ops ops = {
.dev_free = snd_cs5535audio_dev_free,
};
......@@ -327,8 +327,8 @@ static int __devinit snd_cs5535audio_probe(struct pci_dev *pci,
const struct pci_device_id *pci_id)
{
static int dev;
snd_card_t *card;
cs5535audio_t *cs5535au;
struct snd_card *card;
struct cs5535audio *cs5535au;
int err;
if (dev >= SNDRV_CARDS)
......
......@@ -78,46 +78,46 @@
#define PRD_EOP 0x4000
#define PRD_EOT 0x8000
typedef struct _snd_cs5535audio cs5535audio_t;
typedef struct snd_cs5535audio_dma cs5535audio_dma_t;
typedef struct snd_cs5535audio_dma_ops cs5535audio_dma_ops_t;
enum { CS5535AUDIO_DMA_PLAYBACK, CS5535AUDIO_DMA_CAPTURE, NUM_CS5535AUDIO_DMAS };
struct snd_cs5535audio_dma_ops {
struct cs5535audio;
struct cs5535audio_dma_ops {
int type;
void (*enable_dma)(cs5535audio_t *cs5535au);
void (*disable_dma)(cs5535audio_t *cs5535au);
void (*pause_dma)(cs5535audio_t *cs5535au);
void (*setup_prd)(cs5535audio_t *cs5535au, u32 prd_addr);
u32 (*read_dma_pntr)(cs5535audio_t *cs5535au);
void (*enable_dma)(struct cs5535audio *cs5535au);
void (*disable_dma)(struct cs5535audio *cs5535au);
void (*pause_dma)(struct cs5535audio *cs5535au);
void (*setup_prd)(struct cs5535audio *cs5535au, u32 prd_addr);
u32 (*read_dma_pntr)(struct cs5535audio *cs5535au);
};
typedef struct cs5535audio_dma_desc {
struct cs5535audio_dma_desc {
u32 addr;
u16 size;
u16 ctlreserved;
} cs5535audio_dma_desc_t;
};
struct snd_cs5535audio_dma {
const cs5535audio_dma_ops_t *ops;
struct cs5535audio_dma {
const struct cs5535audio_dma_ops *ops;
struct snd_dma_buffer desc_buf;
snd_pcm_substream_t *substream;
struct snd_pcm_substream *substream;
unsigned int buf_addr, buf_bytes;
unsigned int period_bytes, periods;
};
struct _snd_cs5535audio {
snd_card_t *card;
ac97_t *ac97;
struct cs5535audio {
struct snd_card *card;
struct snd_ac97 *ac97;
int irq;
struct pci_dev *pci;
unsigned long port;
spinlock_t reg_lock;
snd_pcm_substream_t *playback_substream;
snd_pcm_substream_t *capture_substream;
cs5535audio_dma_t dmas[NUM_CS5535AUDIO_DMAS];
struct snd_pcm_substream *playback_substream;
struct snd_pcm_substream *capture_substream;
struct cs5535audio_dma dmas[NUM_CS5535AUDIO_DMAS];
};
int __devinit snd_cs5535audio_pcm(cs5535audio_t *cs5535audio);
int __devinit snd_cs5535audio_pcm(struct cs5535audio *cs5535audio);
#endif /* __SOUND_CS5535AUDIO_H */
This diff is collapsed.
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