Commit ba2375a4 authored by Takashi Iwai's avatar Takashi Iwai Committed by Jaroslav Kysela

[ALSA] Remove xxx_t typedefs: ISA CS423x

Modules: CS4231 driver,CS4236+ driver

Remove xxx_t typedefs from the ISA CS423x drivers.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent c8ff6647
...@@ -217,9 +217,7 @@ ...@@ -217,9 +217,7 @@
#define CS4231_HWSHARE_DMA1 (1<<1) #define CS4231_HWSHARE_DMA1 (1<<1)
#define CS4231_HWSHARE_DMA2 (1<<2) #define CS4231_HWSHARE_DMA2 (1<<2)
typedef struct _snd_cs4231 cs4231_t; struct snd_cs4231 {
struct _snd_cs4231 {
unsigned long port; /* base i/o port */ unsigned long port; /* base i/o port */
struct resource *res_port; struct resource *res_port;
unsigned long cport; /* control base i/o port (CS4236) */ unsigned long cport; /* control base i/o port (CS4236) */
...@@ -234,11 +232,11 @@ struct _snd_cs4231 { ...@@ -234,11 +232,11 @@ struct _snd_cs4231 {
unsigned short single_dma:1, /* forced single DMA mode (GUS 16-bit daughter board) or dma1 == dma2 */ unsigned short single_dma:1, /* forced single DMA mode (GUS 16-bit daughter board) or dma1 == dma2 */
ebus_flag:1; /* SPARC: EBUS present */ ebus_flag:1; /* SPARC: EBUS present */
snd_card_t *card; struct snd_card *card;
snd_pcm_t *pcm; struct snd_pcm *pcm;
snd_pcm_substream_t *playback_substream; struct snd_pcm_substream *playback_substream;
snd_pcm_substream_t *capture_substream; struct snd_pcm_substream *capture_substream;
snd_timer_t *timer; struct snd_timer *timer;
unsigned char image[32]; /* registers image */ unsigned char image[32]; /* registers image */
unsigned char eimage[32]; /* extended registers image */ unsigned char eimage[32]; /* extended registers image */
...@@ -253,52 +251,52 @@ struct _snd_cs4231 { ...@@ -253,52 +251,52 @@ struct _snd_cs4231 {
struct semaphore mce_mutex; struct semaphore mce_mutex;
struct semaphore open_mutex; struct semaphore open_mutex;
int (*rate_constraint) (snd_pcm_runtime_t *runtime); int (*rate_constraint) (struct snd_pcm_runtime *runtime);
void (*set_playback_format) (cs4231_t *chip, snd_pcm_hw_params_t *hw_params, unsigned char pdfr); void (*set_playback_format) (struct snd_cs4231 *chip, struct snd_pcm_hw_params *hw_params, unsigned char pdfr);
void (*set_capture_format) (cs4231_t *chip, snd_pcm_hw_params_t *hw_params, unsigned char cdfr); void (*set_capture_format) (struct snd_cs4231 *chip, struct snd_pcm_hw_params *hw_params, unsigned char cdfr);
void (*trigger) (cs4231_t *chip, unsigned int what, int start); void (*trigger) (struct snd_cs4231 *chip, unsigned int what, int start);
#ifdef CONFIG_PM #ifdef CONFIG_PM
void (*suspend) (cs4231_t *chip); void (*suspend) (struct snd_cs4231 *chip);
void (*resume) (cs4231_t *chip); void (*resume) (struct snd_cs4231 *chip);
#endif #endif
void *dma_private_data; void *dma_private_data;
int (*claim_dma) (cs4231_t *chip, void *dma_private_data, int dma); int (*claim_dma) (struct snd_cs4231 *chip, void *dma_private_data, int dma);
int (*release_dma) (cs4231_t *chip, void *dma_private_data, int dma); int (*release_dma) (struct snd_cs4231 *chip, void *dma_private_data, int dma);
}; };
/* exported functions */ /* exported functions */
void snd_cs4231_out(cs4231_t *chip, unsigned char reg, unsigned char val); void snd_cs4231_out(struct snd_cs4231 *chip, unsigned char reg, unsigned char val);
unsigned char snd_cs4231_in(cs4231_t *chip, unsigned char reg); unsigned char snd_cs4231_in(struct snd_cs4231 *chip, unsigned char reg);
void snd_cs4236_ext_out(cs4231_t *chip, unsigned char reg, unsigned char val); void snd_cs4236_ext_out(struct snd_cs4231 *chip, unsigned char reg, unsigned char val);
unsigned char snd_cs4236_ext_in(cs4231_t *chip, unsigned char reg); unsigned char snd_cs4236_ext_in(struct snd_cs4231 *chip, unsigned char reg);
void snd_cs4231_mce_up(cs4231_t *chip); void snd_cs4231_mce_up(struct snd_cs4231 *chip);
void snd_cs4231_mce_down(cs4231_t *chip); void snd_cs4231_mce_down(struct snd_cs4231 *chip);
irqreturn_t snd_cs4231_interrupt(int irq, void *dev_id, struct pt_regs *regs); irqreturn_t snd_cs4231_interrupt(int irq, void *dev_id, struct pt_regs *regs);
const char *snd_cs4231_chip_id(cs4231_t *chip); const char *snd_cs4231_chip_id(struct snd_cs4231 *chip);
int snd_cs4231_create(snd_card_t * card, int snd_cs4231_create(struct snd_card *card,
unsigned long port, unsigned long port,
unsigned long cport, unsigned long cport,
int irq, int dma1, int dma2, int irq, int dma1, int dma2,
unsigned short hardware, unsigned short hardware,
unsigned short hwshare, unsigned short hwshare,
cs4231_t ** rchip); struct snd_cs4231 ** rchip);
int snd_cs4231_pcm(cs4231_t * chip, int device, snd_pcm_t **rpcm); int snd_cs4231_pcm(struct snd_cs4231 * chip, int device, struct snd_pcm **rpcm);
int snd_cs4231_timer(cs4231_t * chip, int device, snd_timer_t **rtimer); int snd_cs4231_timer(struct snd_cs4231 * chip, int device, struct snd_timer **rtimer);
int snd_cs4231_mixer(cs4231_t * chip); int snd_cs4231_mixer(struct snd_cs4231 * chip);
int snd_cs4236_create(snd_card_t * card, int snd_cs4236_create(struct snd_card *card,
unsigned long port, unsigned long port,
unsigned long cport, unsigned long cport,
int irq, int dma1, int dma2, int irq, int dma1, int dma2,
unsigned short hardware, unsigned short hardware,
unsigned short hwshare, unsigned short hwshare,
cs4231_t ** rchip); struct snd_cs4231 ** rchip);
int snd_cs4236_pcm(cs4231_t * chip, int device, snd_pcm_t **rpcm); int snd_cs4236_pcm(struct snd_cs4231 * chip, int device, struct snd_pcm **rpcm);
int snd_cs4236_mixer(cs4231_t * chip); int snd_cs4236_mixer(struct snd_cs4231 * chip);
/* /*
* mixer library * mixer library
...@@ -310,9 +308,9 @@ int snd_cs4236_mixer(cs4231_t * chip); ...@@ -310,9 +308,9 @@ int snd_cs4236_mixer(cs4231_t * chip);
.get = snd_cs4231_get_single, .put = snd_cs4231_put_single, \ .get = snd_cs4231_get_single, .put = snd_cs4231_put_single, \
.private_value = reg | (shift << 8) | (mask << 16) | (invert << 24) } .private_value = reg | (shift << 8) | (mask << 16) | (invert << 24) }
int snd_cs4231_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo); int snd_cs4231_info_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo);
int snd_cs4231_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol); int snd_cs4231_get_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol);
int snd_cs4231_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol); int snd_cs4231_put_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol);
#define CS4231_DOUBLE(xname, xindex, left_reg, right_reg, shift_left, shift_right, mask, invert) \ #define CS4231_DOUBLE(xname, xindex, left_reg, right_reg, shift_left, shift_right, mask, invert) \
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xindex, \ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xindex, \
...@@ -320,8 +318,8 @@ int snd_cs4231_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucon ...@@ -320,8 +318,8 @@ int snd_cs4231_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucon
.get = snd_cs4231_get_double, .put = snd_cs4231_put_double, \ .get = snd_cs4231_get_double, .put = snd_cs4231_put_double, \
.private_value = left_reg | (right_reg << 8) | (shift_left << 16) | (shift_right << 19) | (mask << 24) | (invert << 22) } .private_value = left_reg | (right_reg << 8) | (shift_left << 16) | (shift_right << 19) | (mask << 24) | (invert << 22) }
int snd_cs4231_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo); int snd_cs4231_info_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo);
int snd_cs4231_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol); int snd_cs4231_get_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol);
int snd_cs4231_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol); int snd_cs4231_put_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol);
#endif /* __SOUND_CS4231_H */ #endif /* __SOUND_CS4231_H */
...@@ -64,15 +64,15 @@ MODULE_PARM_DESC(dma1, "DMA1 # for CS4231 driver."); ...@@ -64,15 +64,15 @@ MODULE_PARM_DESC(dma1, "DMA1 # for CS4231 driver.");
module_param_array(dma2, int, NULL, 0444); module_param_array(dma2, int, NULL, 0444);
MODULE_PARM_DESC(dma2, "DMA2 # for CS4231 driver."); MODULE_PARM_DESC(dma2, "DMA2 # for CS4231 driver.");
static snd_card_t *snd_cs4231_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; static struct snd_card *snd_cs4231_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
static int __init snd_card_cs4231_probe(int dev) static int __init snd_card_cs4231_probe(int dev)
{ {
snd_card_t *card; struct snd_card *card;
struct snd_card_cs4231 *acard; struct snd_card_cs4231 *acard;
snd_pcm_t *pcm = NULL; struct snd_pcm *pcm = NULL;
cs4231_t *chip; struct snd_cs4231 *chip;
int err; int err;
if (port[dev] == SNDRV_AUTO_PORT) { if (port[dev] == SNDRV_AUTO_PORT) {
......
This diff is collapsed.
...@@ -131,7 +131,7 @@ struct snd_card_cs4236 { ...@@ -131,7 +131,7 @@ struct snd_card_cs4236 {
#endif #endif
}; };
static snd_card_t *snd_cs4236_legacy[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; static struct snd_card *snd_cs4236_legacy[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
#ifdef CONFIG_PNP #ifdef CONFIG_PNP
...@@ -375,7 +375,7 @@ static int __devinit snd_card_cs4236_pnp(int dev, struct snd_card_cs4236 *acard, ...@@ -375,7 +375,7 @@ static int __devinit snd_card_cs4236_pnp(int dev, struct snd_card_cs4236 *acard,
} }
#endif /* CONFIG_PNP */ #endif /* CONFIG_PNP */
static void snd_card_cs4236_free(snd_card_t *card) static void snd_card_cs4236_free(struct snd_card *card)
{ {
struct snd_card_cs4236 *acard = (struct snd_card_cs4236 *)card->private_data; struct snd_card_cs4236 *acard = (struct snd_card_cs4236 *)card->private_data;
...@@ -392,11 +392,11 @@ static void snd_card_cs4236_free(snd_card_t *card) ...@@ -392,11 +392,11 @@ static void snd_card_cs4236_free(snd_card_t *card)
static int __devinit snd_card_cs423x_probe(int dev, struct pnp_card_link *pcard, static int __devinit snd_card_cs423x_probe(int dev, struct pnp_card_link *pcard,
const struct pnp_card_device_id *pid) const struct pnp_card_device_id *pid)
{ {
snd_card_t *card; struct snd_card *card;
struct snd_card_cs4236 *acard; struct snd_card_cs4236 *acard;
snd_pcm_t *pcm = NULL; struct snd_pcm *pcm = NULL;
cs4231_t *chip; struct snd_cs4231 *chip;
opl3_t *opl3; struct snd_opl3 *opl3;
int err; int err;
if (! is_isapnp_selected(dev)) { if (! is_isapnp_selected(dev)) {
...@@ -538,7 +538,7 @@ static int __devinit snd_cs423x_pnp_detect(struct pnp_card_link *card, ...@@ -538,7 +538,7 @@ static int __devinit snd_cs423x_pnp_detect(struct pnp_card_link *card,
static void __devexit snd_cs423x_pnp_remove(struct pnp_card_link * pcard) static void __devexit snd_cs423x_pnp_remove(struct pnp_card_link * pcard)
{ {
snd_card_t *card = (snd_card_t *) pnp_get_card_drvdata(pcard); struct snd_card *card = (struct snd_card *) pnp_get_card_drvdata(pcard);
snd_card_disconnect(card); snd_card_disconnect(card);
snd_card_free_in_thread(card); snd_card_free_in_thread(card);
......
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