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

[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 @@
#define CS4231_HWSHARE_DMA1 (1<<1)
#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 */
struct resource *res_port;
unsigned long cport; /* control base i/o port (CS4236) */
......@@ -234,11 +232,11 @@ struct _snd_cs4231 {
unsigned short single_dma:1, /* forced single DMA mode (GUS 16-bit daughter board) or dma1 == dma2 */
ebus_flag:1; /* SPARC: EBUS present */
snd_card_t *card;
snd_pcm_t *pcm;
snd_pcm_substream_t *playback_substream;
snd_pcm_substream_t *capture_substream;
snd_timer_t *timer;
struct snd_card *card;
struct snd_pcm *pcm;
struct snd_pcm_substream *playback_substream;
struct snd_pcm_substream *capture_substream;
struct snd_timer *timer;
unsigned char image[32]; /* registers image */
unsigned char eimage[32]; /* extended registers image */
......@@ -253,52 +251,52 @@ struct _snd_cs4231 {
struct semaphore mce_mutex;
struct semaphore open_mutex;
int (*rate_constraint) (snd_pcm_runtime_t *runtime);
void (*set_playback_format) (cs4231_t *chip, snd_pcm_hw_params_t *hw_params, unsigned char pdfr);
void (*set_capture_format) (cs4231_t *chip, snd_pcm_hw_params_t *hw_params, unsigned char cdfr);
void (*trigger) (cs4231_t *chip, unsigned int what, int start);
int (*rate_constraint) (struct snd_pcm_runtime *runtime);
void (*set_playback_format) (struct snd_cs4231 *chip, struct snd_pcm_hw_params *hw_params, unsigned char pdfr);
void (*set_capture_format) (struct snd_cs4231 *chip, struct snd_pcm_hw_params *hw_params, unsigned char cdfr);
void (*trigger) (struct snd_cs4231 *chip, unsigned int what, int start);
#ifdef CONFIG_PM
void (*suspend) (cs4231_t *chip);
void (*resume) (cs4231_t *chip);
void (*suspend) (struct snd_cs4231 *chip);
void (*resume) (struct snd_cs4231 *chip);
#endif
void *dma_private_data;
int (*claim_dma) (cs4231_t *chip, void *dma_private_data, int dma);
int (*release_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) (struct snd_cs4231 *chip, void *dma_private_data, int dma);
};
/* exported functions */
void snd_cs4231_out(cs4231_t *chip, unsigned char reg, unsigned char val);
unsigned char snd_cs4231_in(cs4231_t *chip, unsigned char reg);
void snd_cs4236_ext_out(cs4231_t *chip, unsigned char reg, unsigned char val);
unsigned char snd_cs4236_ext_in(cs4231_t *chip, unsigned char reg);
void snd_cs4231_mce_up(cs4231_t *chip);
void snd_cs4231_mce_down(cs4231_t *chip);
void snd_cs4231_out(struct snd_cs4231 *chip, unsigned char reg, unsigned char val);
unsigned char snd_cs4231_in(struct snd_cs4231 *chip, unsigned char reg);
void snd_cs4236_ext_out(struct snd_cs4231 *chip, unsigned char reg, unsigned char val);
unsigned char snd_cs4236_ext_in(struct snd_cs4231 *chip, unsigned char reg);
void snd_cs4231_mce_up(struct snd_cs4231 *chip);
void snd_cs4231_mce_down(struct snd_cs4231 *chip);
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 cport,
int irq, int dma1, int dma2,
unsigned short hardware,
unsigned short hwshare,
cs4231_t ** rchip);
int snd_cs4231_pcm(cs4231_t * chip, int device, snd_pcm_t **rpcm);
int snd_cs4231_timer(cs4231_t * chip, int device, snd_timer_t **rtimer);
int snd_cs4231_mixer(cs4231_t * chip);
struct snd_cs4231 ** rchip);
int snd_cs4231_pcm(struct snd_cs4231 * chip, int device, struct snd_pcm **rpcm);
int snd_cs4231_timer(struct snd_cs4231 * chip, int device, struct snd_timer **rtimer);
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 cport,
int irq, int dma1, int dma2,
unsigned short hardware,
unsigned short hwshare,
cs4231_t ** rchip);
int snd_cs4236_pcm(cs4231_t * chip, int device, snd_pcm_t **rpcm);
int snd_cs4236_mixer(cs4231_t * chip);
struct snd_cs4231 ** rchip);
int snd_cs4236_pcm(struct snd_cs4231 * chip, int device, struct snd_pcm **rpcm);
int snd_cs4236_mixer(struct snd_cs4231 * chip);
/*
* mixer library
......@@ -310,9 +308,9 @@ int snd_cs4236_mixer(cs4231_t * chip);
.get = snd_cs4231_get_single, .put = snd_cs4231_put_single, \
.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_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol);
int snd_cs4231_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol);
int snd_cs4231_info_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo);
int snd_cs4231_get_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *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) \
{ .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
.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) }
int snd_cs4231_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo);
int snd_cs4231_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol);
int snd_cs4231_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol);
int snd_cs4231_info_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo);
int snd_cs4231_get_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol);
int snd_cs4231_put_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol);
#endif /* __SOUND_CS4231_H */
......@@ -64,15 +64,15 @@ MODULE_PARM_DESC(dma1, "DMA1 # for CS4231 driver.");
module_param_array(dma2, int, NULL, 0444);
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)
{
snd_card_t *card;
struct snd_card *card;
struct snd_card_cs4231 *acard;
snd_pcm_t *pcm = NULL;
cs4231_t *chip;
struct snd_pcm *pcm = NULL;
struct snd_cs4231 *chip;
int err;
if (port[dev] == SNDRV_AUTO_PORT) {
......
This diff is collapsed.
......@@ -131,7 +131,7 @@ struct snd_card_cs4236 {
#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
......@@ -375,7 +375,7 @@ static int __devinit snd_card_cs4236_pnp(int dev, struct snd_card_cs4236 *acard,
}
#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;
......@@ -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,
const struct pnp_card_device_id *pid)
{
snd_card_t *card;
struct snd_card *card;
struct snd_card_cs4236 *acard;
snd_pcm_t *pcm = NULL;
cs4231_t *chip;
opl3_t *opl3;
struct snd_pcm *pcm = NULL;
struct snd_cs4231 *chip;
struct snd_opl3 *opl3;
int err;
if (! is_isapnp_selected(dev)) {
......@@ -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)
{
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_free_in_thread(card);
......
......@@ -122,13 +122,13 @@ static unsigned char snd_cs4236_ext_map[18] = {
*
*/
static void snd_cs4236_ctrl_out(cs4231_t *chip, unsigned char reg, unsigned char val)
static void snd_cs4236_ctrl_out(struct snd_cs4231 *chip, unsigned char reg, unsigned char val)
{
outb(reg, chip->cport + 3);
outb(chip->cimage[reg] = val, chip->cport + 4);
}
static unsigned char snd_cs4236_ctrl_in(cs4231_t *chip, unsigned char reg)
static unsigned char snd_cs4236_ctrl_in(struct snd_cs4231 *chip, unsigned char reg)
{
outb(reg, chip->cport + 3);
return inb(chip->cport + 4);
......@@ -140,7 +140,7 @@ static unsigned char snd_cs4236_ctrl_in(cs4231_t *chip, unsigned char reg)
#define CLOCKS 8
static ratnum_t clocks[CLOCKS] = {
static struct snd_ratnum clocks[CLOCKS] = {
{ .num = 16934400, .den_min = 353, .den_max = 353, .den_step = 1 },
{ .num = 16934400, .den_min = 529, .den_max = 529, .den_step = 1 },
{ .num = 16934400, .den_min = 617, .den_max = 617, .den_step = 1 },
......@@ -151,12 +151,12 @@ static ratnum_t clocks[CLOCKS] = {
{ .num = 16934400/16, .den_min = 21, .den_max = 192, .den_step = 1 }
};
static snd_pcm_hw_constraint_ratnums_t hw_constraints_clocks = {
static struct snd_pcm_hw_constraint_ratnums hw_constraints_clocks = {
.nrats = CLOCKS,
.rats = clocks,
};
static int snd_cs4236_xrate(snd_pcm_runtime_t *runtime)
static int snd_cs4236_xrate(struct snd_pcm_runtime *runtime)
{
return snd_pcm_hw_constraint_ratnums(runtime, 0, SNDRV_PCM_HW_PARAM_RATE,
&hw_constraints_clocks);
......@@ -181,7 +181,7 @@ static unsigned char divisor_to_rate_register(unsigned int divisor)
}
}
static void snd_cs4236_playback_format(cs4231_t *chip, snd_pcm_hw_params_t *params, unsigned char pdfr)
static void snd_cs4236_playback_format(struct snd_cs4231 *chip, struct snd_pcm_hw_params *params, unsigned char pdfr)
{
unsigned long flags;
unsigned char rate = divisor_to_rate_register(params->rate_den);
......@@ -195,7 +195,7 @@ static void snd_cs4236_playback_format(cs4231_t *chip, snd_pcm_hw_params_t *para
spin_unlock_irqrestore(&chip->reg_lock, flags);
}
static void snd_cs4236_capture_format(cs4231_t *chip, snd_pcm_hw_params_t *params, unsigned char cdfr)
static void snd_cs4236_capture_format(struct snd_cs4231 *chip, struct snd_pcm_hw_params *params, unsigned char cdfr)
{
unsigned long flags;
unsigned char rate = divisor_to_rate_register(params->rate_den);
......@@ -211,7 +211,7 @@ static void snd_cs4236_capture_format(cs4231_t *chip, snd_pcm_hw_params_t *param
#ifdef CONFIG_PM
static void snd_cs4236_suspend(cs4231_t *chip)
static void snd_cs4236_suspend(struct snd_cs4231 *chip)
{
int reg;
unsigned long flags;
......@@ -226,7 +226,7 @@ static void snd_cs4236_suspend(cs4231_t *chip)
spin_unlock_irqrestore(&chip->reg_lock, flags);
}
static void snd_cs4236_resume(cs4231_t *chip)
static void snd_cs4236_resume(struct snd_cs4231 *chip)
{
int reg;
unsigned long flags;
......@@ -261,15 +261,15 @@ static void snd_cs4236_resume(cs4231_t *chip)
#endif /* CONFIG_PM */
int snd_cs4236_create(snd_card_t * card,
int snd_cs4236_create(struct snd_card *card,
unsigned long port,
unsigned long cport,
int irq, int dma1, int dma2,
unsigned short hardware,
unsigned short hwshare,
cs4231_t ** rchip)
struct snd_cs4231 ** rchip)
{
cs4231_t *chip;
struct snd_cs4231 *chip;
unsigned char ver1, ver2;
unsigned int reg;
int err;
......@@ -352,9 +352,9 @@ int snd_cs4236_create(snd_card_t * card,
return 0;
}
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)
{
snd_pcm_t *pcm;
struct snd_pcm *pcm;
int err;
if ((err = snd_cs4231_pcm(chip, device, &pcm)) < 0)
......@@ -375,7 +375,7 @@ int snd_cs4236_pcm(cs4231_t *chip, int device, snd_pcm_t **rpcm)
.get = snd_cs4236_get_single, .put = snd_cs4236_put_single, \
.private_value = reg | (shift << 8) | (mask << 16) | (invert << 24) }
static int snd_cs4236_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
static int snd_cs4236_info_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{
int mask = (kcontrol->private_value >> 16) & 0xff;
......@@ -386,9 +386,9 @@ static int snd_cs4236_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
return 0;
}
static int snd_cs4236_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
static int snd_cs4236_get_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
cs4231_t *chip = snd_kcontrol_chip(kcontrol);
struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
unsigned long flags;
int reg = kcontrol->private_value & 0xff;
int shift = (kcontrol->private_value >> 8) & 0xff;
......@@ -403,9 +403,9 @@ static int snd_cs4236_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
return 0;
}
static int snd_cs4236_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
static int snd_cs4236_put_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
cs4231_t *chip = snd_kcontrol_chip(kcontrol);
struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
unsigned long flags;
int reg = kcontrol->private_value & 0xff;
int shift = (kcontrol->private_value >> 8) & 0xff;
......@@ -432,9 +432,9 @@ static int snd_cs4236_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
.get = snd_cs4236_get_singlec, .put = snd_cs4236_put_singlec, \
.private_value = reg | (shift << 8) | (mask << 16) | (invert << 24) }
static int snd_cs4236_get_singlec(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
static int snd_cs4236_get_singlec(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
cs4231_t *chip = snd_kcontrol_chip(kcontrol);
struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
unsigned long flags;
int reg = kcontrol->private_value & 0xff;
int shift = (kcontrol->private_value >> 8) & 0xff;
......@@ -449,9 +449,9 @@ static int snd_cs4236_get_singlec(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
return 0;
}
static int snd_cs4236_put_singlec(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
static int snd_cs4236_put_singlec(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
cs4231_t *chip = snd_kcontrol_chip(kcontrol);
struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
unsigned long flags;
int reg = kcontrol->private_value & 0xff;
int shift = (kcontrol->private_value >> 8) & 0xff;
......@@ -478,7 +478,7 @@ static int snd_cs4236_put_singlec(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
.get = snd_cs4236_get_double, .put = snd_cs4236_put_double, \
.private_value = left_reg | (right_reg << 8) | (shift_left << 16) | (shift_right << 19) | (mask << 24) | (invert << 22) }
static int snd_cs4236_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
static int snd_cs4236_info_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{
int mask = (kcontrol->private_value >> 24) & 0xff;
......@@ -489,9 +489,9 @@ static int snd_cs4236_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
return 0;
}
static int snd_cs4236_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
static int snd_cs4236_get_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
cs4231_t *chip = snd_kcontrol_chip(kcontrol);
struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
unsigned long flags;
int left_reg = kcontrol->private_value & 0xff;
int right_reg = (kcontrol->private_value >> 8) & 0xff;
......@@ -511,9 +511,9 @@ static int snd_cs4236_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
return 0;
}
static int snd_cs4236_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
static int snd_cs4236_put_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
cs4231_t *chip = snd_kcontrol_chip(kcontrol);
struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
unsigned long flags;
int left_reg = kcontrol->private_value & 0xff;
int right_reg = (kcontrol->private_value >> 8) & 0xff;
......@@ -554,9 +554,9 @@ static int snd_cs4236_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
.get = snd_cs4236_get_double1, .put = snd_cs4236_put_double1, \
.private_value = left_reg | (right_reg << 8) | (shift_left << 16) | (shift_right << 19) | (mask << 24) | (invert << 22) }
static int snd_cs4236_get_double1(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
static int snd_cs4236_get_double1(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
cs4231_t *chip = snd_kcontrol_chip(kcontrol);
struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
unsigned long flags;
int left_reg = kcontrol->private_value & 0xff;
int right_reg = (kcontrol->private_value >> 8) & 0xff;
......@@ -576,9 +576,9 @@ static int snd_cs4236_get_double1(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
return 0;
}
static int snd_cs4236_put_double1(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
static int snd_cs4236_put_double1(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
cs4231_t *chip = snd_kcontrol_chip(kcontrol);
struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
unsigned long flags;
int left_reg = kcontrol->private_value & 0xff;
int right_reg = (kcontrol->private_value >> 8) & 0xff;
......@@ -618,9 +618,9 @@ static inline int snd_cs4236_mixer_master_digital_invert_volume(int vol)
return (vol < 64) ? 63 - vol : 64 + (71 - vol);
}
static int snd_cs4236_get_master_digital(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
static int snd_cs4236_get_master_digital(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
cs4231_t *chip = snd_kcontrol_chip(kcontrol);
struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
unsigned long flags;
spin_lock_irqsave(&chip->reg_lock, flags);
......@@ -630,9 +630,9 @@ static int snd_cs4236_get_master_digital(snd_kcontrol_t * kcontrol, snd_ctl_elem
return 0;
}
static int snd_cs4236_put_master_digital(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
static int snd_cs4236_put_master_digital(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
cs4231_t *chip = snd_kcontrol_chip(kcontrol);
struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
unsigned long flags;
int change;
unsigned short val1, val2;
......@@ -677,9 +677,9 @@ static inline int snd_cs4235_mixer_output_accu_set_volume(int vol)
return 1 << 5;
}
static int snd_cs4235_get_output_accu(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
static int snd_cs4235_get_output_accu(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
cs4231_t *chip = snd_kcontrol_chip(kcontrol);
struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
unsigned long flags;
spin_lock_irqsave(&chip->reg_lock, flags);
......@@ -689,9 +689,9 @@ static int snd_cs4235_get_output_accu(snd_kcontrol_t * kcontrol, snd_ctl_elem_va
return 0;
}
static int snd_cs4235_put_output_accu(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
static int snd_cs4235_put_output_accu(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
cs4231_t *chip = snd_kcontrol_chip(kcontrol);
struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
unsigned long flags;
int change;
unsigned short val1, val2;
......@@ -708,7 +708,7 @@ static int snd_cs4235_put_output_accu(snd_kcontrol_t * kcontrol, snd_ctl_elem_va
return change;
}
static snd_kcontrol_new_t snd_cs4236_controls[] = {
static struct snd_kcontrol_new snd_cs4236_controls[] = {
CS4236_DOUBLE("Master Digital Playback Switch", 0, CS4236_LEFT_MASTER, CS4236_RIGHT_MASTER, 7, 7, 1, 1),
CS4236_DOUBLE("Master Digital Capture Switch", 0, CS4236_DAC_MUTE, CS4236_DAC_MUTE, 7, 6, 1, 1),
......@@ -759,7 +759,7 @@ CS4231_SINGLE("Digital Loopback Playback Switch", 0, CS4231_LOOPBACK, 0, 1, 0),
CS4236_DOUBLE1("Digital Loopback Playback Volume", 0, CS4231_LOOPBACK, CS4236_RIGHT_LOOPBACK, 2, 0, 63, 1)
};
static snd_kcontrol_new_t snd_cs4235_controls[] = {
static struct snd_kcontrol_new snd_cs4235_controls[] = {
CS4231_DOUBLE("Master Switch", 0, CS4235_LEFT_MASTER, CS4235_RIGHT_MASTER, 7, 7, 1, 1),
CS4231_DOUBLE("Master Volume", 0, CS4235_LEFT_MASTER, CS4235_RIGHT_MASTER, 0, 0, 31, 1),
......@@ -812,9 +812,9 @@ CS4231_DOUBLE("Analog Loopback Switch", 0, CS4231_LEFT_INPUT, CS4231_RIGHT_INPUT
.get = snd_cs4236_get_iec958_switch, .put = snd_cs4236_put_iec958_switch, \
.private_value = 1 << 16 }
static int snd_cs4236_get_iec958_switch(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
static int snd_cs4236_get_iec958_switch(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
cs4231_t *chip = snd_kcontrol_chip(kcontrol);
struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
unsigned long flags;
spin_lock_irqsave(&chip->reg_lock, flags);
......@@ -832,9 +832,9 @@ static int snd_cs4236_get_iec958_switch(snd_kcontrol_t * kcontrol, snd_ctl_elem_
return 0;
}
static int snd_cs4236_put_iec958_switch(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
static int snd_cs4236_put_iec958_switch(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
cs4231_t *chip = snd_kcontrol_chip(kcontrol);
struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
unsigned long flags;
int change;
unsigned short enable, val;
......@@ -868,7 +868,7 @@ static int snd_cs4236_put_iec958_switch(snd_kcontrol_t * kcontrol, snd_ctl_elem_
return change;
}
static snd_kcontrol_new_t snd_cs4236_iec958_controls[] = {
static struct snd_kcontrol_new snd_cs4236_iec958_controls[] = {
CS4236_IEC958_ENABLE("IEC958 Output Enable", 0),
CS4236_SINGLEC("IEC958 Output Validity", 0, 4, 4, 1, 0),
CS4236_SINGLEC("IEC958 Output User", 0, 4, 5, 1, 0),
......@@ -877,12 +877,12 @@ CS4236_SINGLEC("IEC958 Output Channel Status Low", 0, 5, 1, 127, 0),
CS4236_SINGLEC("IEC958 Output Channel Status High", 0, 6, 0, 255, 0)
};
static snd_kcontrol_new_t snd_cs4236_3d_controls_cs4235[] = {
static struct snd_kcontrol_new snd_cs4236_3d_controls_cs4235[] = {
CS4236_SINGLEC("3D Control - Switch", 0, 3, 4, 1, 0),
CS4236_SINGLEC("3D Control - Space", 0, 2, 4, 15, 1)
};
static snd_kcontrol_new_t snd_cs4236_3d_controls_cs4237[] = {
static struct snd_kcontrol_new snd_cs4236_3d_controls_cs4237[] = {
CS4236_SINGLEC("3D Control - Switch", 0, 3, 7, 1, 0),
CS4236_SINGLEC("3D Control - Space", 0, 2, 4, 15, 1),
CS4236_SINGLEC("3D Control - Center", 0, 2, 0, 15, 1),
......@@ -890,19 +890,19 @@ CS4236_SINGLEC("3D Control - Mono", 0, 3, 6, 1, 0),
CS4236_SINGLEC("3D Control - IEC958", 0, 3, 5, 1, 0)
};
static snd_kcontrol_new_t snd_cs4236_3d_controls_cs4238[] = {
static struct snd_kcontrol_new snd_cs4236_3d_controls_cs4238[] = {
CS4236_SINGLEC("3D Control - Switch", 0, 3, 4, 1, 0),
CS4236_SINGLEC("3D Control - Space", 0, 2, 4, 15, 1),
CS4236_SINGLEC("3D Control - Volume", 0, 2, 0, 15, 1),
CS4236_SINGLEC("3D Control - IEC958", 0, 3, 5, 1, 0)
};
int snd_cs4236_mixer(cs4231_t *chip)
int snd_cs4236_mixer(struct snd_cs4231 *chip)
{
snd_card_t *card;
struct snd_card *card;
unsigned int idx, count;
int err;
snd_kcontrol_new_t *kcontrol;
struct snd_kcontrol_new *kcontrol;
snd_assert(chip != NULL && chip->card != NULL, return -EINVAL);
card = chip->card;
......
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