diff options
Diffstat (limited to 'sound/pci/emu10k1/emumixer.c')
-rw-r--r-- | sound/pci/emu10k1/emumixer.c | 229 |
1 files changed, 119 insertions, 110 deletions
diff --git a/sound/pci/emu10k1/emumixer.c b/sound/pci/emu10k1/emumixer.c index 7cc831ccd0cb..98fb8139427b 100644 --- a/sound/pci/emu10k1/emumixer.c +++ b/sound/pci/emu10k1/emumixer.c @@ -35,17 +35,17 @@ #define AC97_ID_STAC9758 0x83847658 -static int snd_emu10k1_spdif_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) +static int snd_emu10k1_spdif_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; uinfo->count = 1; return 0; } -static int snd_emu10k1_spdif_get(snd_kcontrol_t * kcontrol, - snd_ctl_elem_value_t * ucontrol) +static int snd_emu10k1_spdif_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) { - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); unsigned int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); unsigned long flags; @@ -58,8 +58,8 @@ static int snd_emu10k1_spdif_get(snd_kcontrol_t * kcontrol, return 0; } -static int snd_emu10k1_spdif_get_mask(snd_kcontrol_t * kcontrol, - snd_ctl_elem_value_t * ucontrol) +static int snd_emu10k1_spdif_get_mask(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) { ucontrol->value.iec958.status[0] = 0xff; ucontrol->value.iec958.status[1] = 0xff; @@ -69,7 +69,7 @@ static int snd_emu10k1_spdif_get_mask(snd_kcontrol_t * kcontrol, } #if 0 -static int snd_audigy_spdif_output_rate_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) +static int snd_audigy_spdif_output_rate_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { static char *texts[] = {"44100", "48000", "96000"}; @@ -82,10 +82,10 @@ static int snd_audigy_spdif_output_rate_info(snd_kcontrol_t *kcontrol, snd_ctl_e return 0; } -static int snd_audigy_spdif_output_rate_get(snd_kcontrol_t * kcontrol, - snd_ctl_elem_value_t * ucontrol) +static int snd_audigy_spdif_output_rate_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) { - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); unsigned int tmp; unsigned long flags; @@ -109,10 +109,10 @@ static int snd_audigy_spdif_output_rate_get(snd_kcontrol_t * kcontrol, return 0; } -static int snd_audigy_spdif_output_rate_put(snd_kcontrol_t * kcontrol, - snd_ctl_elem_value_t * ucontrol) +static int snd_audigy_spdif_output_rate_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) { - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); int change; unsigned int reg, val, tmp; unsigned long flags; @@ -143,7 +143,7 @@ static int snd_audigy_spdif_output_rate_put(snd_kcontrol_t * kcontrol, return change; } -static snd_kcontrol_new_t snd_audigy_spdif_output_rate = +static struct snd_kcontrol_new snd_audigy_spdif_output_rate = { .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, .iface = SNDRV_CTL_ELEM_IFACE_MIXER, @@ -155,10 +155,10 @@ static snd_kcontrol_new_t snd_audigy_spdif_output_rate = }; #endif -static int snd_emu10k1_spdif_put(snd_kcontrol_t * kcontrol, - snd_ctl_elem_value_t * ucontrol) +static int snd_emu10k1_spdif_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) { - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); unsigned int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); int change; unsigned int val; @@ -178,7 +178,7 @@ static int snd_emu10k1_spdif_put(snd_kcontrol_t * kcontrol, return change; } -static snd_kcontrol_new_t snd_emu10k1_spdif_mask_control = +static struct snd_kcontrol_new snd_emu10k1_spdif_mask_control = { .access = SNDRV_CTL_ELEM_ACCESS_READ, .iface = SNDRV_CTL_ELEM_IFACE_PCM, @@ -188,7 +188,7 @@ static snd_kcontrol_new_t snd_emu10k1_spdif_mask_control = .get = snd_emu10k1_spdif_get_mask }; -static snd_kcontrol_new_t snd_emu10k1_spdif_control = +static struct snd_kcontrol_new snd_emu10k1_spdif_control = { .iface = SNDRV_CTL_ELEM_IFACE_PCM, .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT), @@ -199,7 +199,7 @@ static snd_kcontrol_new_t snd_emu10k1_spdif_control = }; -static void update_emu10k1_fxrt(emu10k1_t *emu, int voice, unsigned char *route) +static void update_emu10k1_fxrt(struct snd_emu10k1 *emu, int voice, unsigned char *route) { if (emu->audigy) { snd_emu10k1_ptr_write(emu, A_FXRT1, voice, @@ -212,7 +212,7 @@ static void update_emu10k1_fxrt(emu10k1_t *emu, int voice, unsigned char *route) } } -static void update_emu10k1_send_volume(emu10k1_t *emu, int voice, unsigned char *volume) +static void update_emu10k1_send_volume(struct snd_emu10k1 *emu, int voice, unsigned char *volume) { snd_emu10k1_ptr_write(emu, PTRX_FXSENDAMOUNT_A, voice, volume[0]); snd_emu10k1_ptr_write(emu, PTRX_FXSENDAMOUNT_B, voice, volume[1]); @@ -229,9 +229,9 @@ static void update_emu10k1_send_volume(emu10k1_t *emu, int voice, unsigned char /* PCM stream controls */ -static int snd_emu10k1_send_routing_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) +static int snd_emu10k1_send_routing_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = emu->audigy ? 3*8 : 3*4; uinfo->value.integer.min = 0; @@ -239,12 +239,13 @@ static int snd_emu10k1_send_routing_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_ return 0; } -static int snd_emu10k1_send_routing_get(snd_kcontrol_t * kcontrol, - snd_ctl_elem_value_t * ucontrol) +static int snd_emu10k1_send_routing_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) { unsigned long flags; - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); - emu10k1_pcm_mixer_t *mix = &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)]; + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); + struct snd_emu10k1_pcm_mixer *mix = + &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)]; int voice, idx; int num_efx = emu->audigy ? 8 : 4; int mask = emu->audigy ? 0x3f : 0x0f; @@ -258,12 +259,13 @@ static int snd_emu10k1_send_routing_get(snd_kcontrol_t * kcontrol, return 0; } -static int snd_emu10k1_send_routing_put(snd_kcontrol_t * kcontrol, - snd_ctl_elem_value_t * ucontrol) +static int snd_emu10k1_send_routing_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) { unsigned long flags; - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); - emu10k1_pcm_mixer_t *mix = &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)]; + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); + struct snd_emu10k1_pcm_mixer *mix = + &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)]; int change = 0, voice, idx, val; int num_efx = emu->audigy ? 8 : 4; int mask = emu->audigy ? 0x3f : 0x0f; @@ -292,7 +294,7 @@ static int snd_emu10k1_send_routing_put(snd_kcontrol_t * kcontrol, return change; } -static snd_kcontrol_new_t snd_emu10k1_send_routing_control = +static struct snd_kcontrol_new snd_emu10k1_send_routing_control = { .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE, .iface = SNDRV_CTL_ELEM_IFACE_PCM, @@ -303,9 +305,9 @@ static snd_kcontrol_new_t snd_emu10k1_send_routing_control = .put = snd_emu10k1_send_routing_put }; -static int snd_emu10k1_send_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) +static int snd_emu10k1_send_volume_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = emu->audigy ? 3*8 : 3*4; uinfo->value.integer.min = 0; @@ -313,12 +315,13 @@ static int snd_emu10k1_send_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_i return 0; } -static int snd_emu10k1_send_volume_get(snd_kcontrol_t * kcontrol, - snd_ctl_elem_value_t * ucontrol) +static int snd_emu10k1_send_volume_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) { unsigned long flags; - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); - emu10k1_pcm_mixer_t *mix = &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)]; + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); + struct snd_emu10k1_pcm_mixer *mix = + &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)]; int idx; int num_efx = emu->audigy ? 8 : 4; @@ -329,12 +332,13 @@ static int snd_emu10k1_send_volume_get(snd_kcontrol_t * kcontrol, return 0; } -static int snd_emu10k1_send_volume_put(snd_kcontrol_t * kcontrol, - snd_ctl_elem_value_t * ucontrol) +static int snd_emu10k1_send_volume_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) { unsigned long flags; - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); - emu10k1_pcm_mixer_t *mix = &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)]; + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); + struct snd_emu10k1_pcm_mixer *mix = + &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)]; int change = 0, idx, val; int num_efx = emu->audigy ? 8 : 4; @@ -361,7 +365,7 @@ static int snd_emu10k1_send_volume_put(snd_kcontrol_t * kcontrol, return change; } -static snd_kcontrol_new_t snd_emu10k1_send_volume_control = +static struct snd_kcontrol_new snd_emu10k1_send_volume_control = { .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE, .iface = SNDRV_CTL_ELEM_IFACE_PCM, @@ -372,7 +376,7 @@ static snd_kcontrol_new_t snd_emu10k1_send_volume_control = .put = snd_emu10k1_send_volume_put }; -static int snd_emu10k1_attn_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) +static int snd_emu10k1_attn_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = 3; @@ -381,11 +385,12 @@ static int snd_emu10k1_attn_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * return 0; } -static int snd_emu10k1_attn_get(snd_kcontrol_t * kcontrol, - snd_ctl_elem_value_t * ucontrol) +static int snd_emu10k1_attn_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) { - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); - emu10k1_pcm_mixer_t *mix = &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)]; + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); + struct snd_emu10k1_pcm_mixer *mix = + &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)]; unsigned long flags; int idx; @@ -396,12 +401,13 @@ static int snd_emu10k1_attn_get(snd_kcontrol_t * kcontrol, return 0; } -static int snd_emu10k1_attn_put(snd_kcontrol_t * kcontrol, - snd_ctl_elem_value_t * ucontrol) +static int snd_emu10k1_attn_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) { unsigned long flags; - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); - emu10k1_pcm_mixer_t *mix = &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)]; + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); + struct snd_emu10k1_pcm_mixer *mix = + &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)]; int change = 0, idx, val; spin_lock_irqsave(&emu->reg_lock, flags); @@ -424,7 +430,7 @@ static int snd_emu10k1_attn_put(snd_kcontrol_t * kcontrol, return change; } -static snd_kcontrol_new_t snd_emu10k1_attn_control = +static struct snd_kcontrol_new snd_emu10k1_attn_control = { .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE, .iface = SNDRV_CTL_ELEM_IFACE_PCM, @@ -437,9 +443,9 @@ static snd_kcontrol_new_t snd_emu10k1_attn_control = /* Mutichannel PCM stream controls */ -static int snd_emu10k1_efx_send_routing_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) +static int snd_emu10k1_efx_send_routing_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = emu->audigy ? 8 : 4; uinfo->value.integer.min = 0; @@ -447,12 +453,13 @@ static int snd_emu10k1_efx_send_routing_info(snd_kcontrol_t *kcontrol, snd_ctl_e return 0; } -static int snd_emu10k1_efx_send_routing_get(snd_kcontrol_t * kcontrol, - snd_ctl_elem_value_t * ucontrol) +static int snd_emu10k1_efx_send_routing_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) { unsigned long flags; - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); - emu10k1_pcm_mixer_t *mix = &emu->efx_pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)]; + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); + struct snd_emu10k1_pcm_mixer *mix = + &emu->efx_pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)]; int idx; int num_efx = emu->audigy ? 8 : 4; int mask = emu->audigy ? 0x3f : 0x0f; @@ -465,13 +472,13 @@ static int snd_emu10k1_efx_send_routing_get(snd_kcontrol_t * kcontrol, return 0; } -static int snd_emu10k1_efx_send_routing_put(snd_kcontrol_t * kcontrol, - snd_ctl_elem_value_t * ucontrol) +static int snd_emu10k1_efx_send_routing_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) { unsigned long flags; - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); int ch = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); - emu10k1_pcm_mixer_t *mix = &emu->efx_pcm_mixer[ch]; + struct snd_emu10k1_pcm_mixer *mix = &emu->efx_pcm_mixer[ch]; int change = 0, idx, val; int num_efx = emu->audigy ? 8 : 4; int mask = emu->audigy ? 0x3f : 0x0f; @@ -495,7 +502,7 @@ static int snd_emu10k1_efx_send_routing_put(snd_kcontrol_t * kcontrol, return change; } -static snd_kcontrol_new_t snd_emu10k1_efx_send_routing_control = +static struct snd_kcontrol_new snd_emu10k1_efx_send_routing_control = { .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE, .iface = SNDRV_CTL_ELEM_IFACE_PCM, @@ -506,9 +513,9 @@ static snd_kcontrol_new_t snd_emu10k1_efx_send_routing_control = .put = snd_emu10k1_efx_send_routing_put }; -static int snd_emu10k1_efx_send_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) +static int snd_emu10k1_efx_send_volume_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = emu->audigy ? 8 : 4; uinfo->value.integer.min = 0; @@ -516,12 +523,13 @@ static int snd_emu10k1_efx_send_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_el return 0; } -static int snd_emu10k1_efx_send_volume_get(snd_kcontrol_t * kcontrol, - snd_ctl_elem_value_t * ucontrol) +static int snd_emu10k1_efx_send_volume_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) { unsigned long flags; - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); - emu10k1_pcm_mixer_t *mix = &emu->efx_pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)]; + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); + struct snd_emu10k1_pcm_mixer *mix = + &emu->efx_pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)]; int idx; int num_efx = emu->audigy ? 8 : 4; @@ -532,13 +540,13 @@ static int snd_emu10k1_efx_send_volume_get(snd_kcontrol_t * kcontrol, return 0; } -static int snd_emu10k1_efx_send_volume_put(snd_kcontrol_t * kcontrol, - snd_ctl_elem_value_t * ucontrol) +static int snd_emu10k1_efx_send_volume_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) { unsigned long flags; - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); int ch = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); - emu10k1_pcm_mixer_t *mix = &emu->efx_pcm_mixer[ch]; + struct snd_emu10k1_pcm_mixer *mix = &emu->efx_pcm_mixer[ch]; int change = 0, idx, val; int num_efx = emu->audigy ? 8 : 4; @@ -561,7 +569,7 @@ static int snd_emu10k1_efx_send_volume_put(snd_kcontrol_t * kcontrol, } -static snd_kcontrol_new_t snd_emu10k1_efx_send_volume_control = +static struct snd_kcontrol_new snd_emu10k1_efx_send_volume_control = { .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE, .iface = SNDRV_CTL_ELEM_IFACE_PCM, @@ -572,7 +580,7 @@ static snd_kcontrol_new_t snd_emu10k1_efx_send_volume_control = .put = snd_emu10k1_efx_send_volume_put }; -static int snd_emu10k1_efx_attn_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) +static int snd_emu10k1_efx_attn_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = 1; @@ -581,11 +589,12 @@ static int snd_emu10k1_efx_attn_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info return 0; } -static int snd_emu10k1_efx_attn_get(snd_kcontrol_t * kcontrol, - snd_ctl_elem_value_t * ucontrol) +static int snd_emu10k1_efx_attn_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) { - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); - emu10k1_pcm_mixer_t *mix = &emu->efx_pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)]; + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); + struct snd_emu10k1_pcm_mixer *mix = + &emu->efx_pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)]; unsigned long flags; spin_lock_irqsave(&emu->reg_lock, flags); @@ -594,13 +603,13 @@ static int snd_emu10k1_efx_attn_get(snd_kcontrol_t * kcontrol, return 0; } -static int snd_emu10k1_efx_attn_put(snd_kcontrol_t * kcontrol, - snd_ctl_elem_value_t * ucontrol) +static int snd_emu10k1_efx_attn_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) { unsigned long flags; - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); int ch = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); - emu10k1_pcm_mixer_t *mix = &emu->efx_pcm_mixer[ch]; + struct snd_emu10k1_pcm_mixer *mix = &emu->efx_pcm_mixer[ch]; int change = 0, val; spin_lock_irqsave(&emu->reg_lock, flags); @@ -618,7 +627,7 @@ static int snd_emu10k1_efx_attn_put(snd_kcontrol_t * kcontrol, return change; } -static snd_kcontrol_new_t snd_emu10k1_efx_attn_control = +static struct snd_kcontrol_new snd_emu10k1_efx_attn_control = { .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE, .iface = SNDRV_CTL_ELEM_IFACE_PCM, @@ -629,7 +638,7 @@ static snd_kcontrol_new_t snd_emu10k1_efx_attn_control = .put = snd_emu10k1_efx_attn_put }; -static int snd_emu10k1_shared_spdif_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) +static int snd_emu10k1_shared_spdif_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; uinfo->count = 1; @@ -638,10 +647,10 @@ static int snd_emu10k1_shared_spdif_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_ return 0; } -static int snd_emu10k1_shared_spdif_get(snd_kcontrol_t * kcontrol, - snd_ctl_elem_value_t * ucontrol) +static int snd_emu10k1_shared_spdif_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) { - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); if (emu->audigy) ucontrol->value.integer.value[0] = inl(emu->port + A_IOCFG) & A_IOCFG_GPOUT0 ? 1 : 0; @@ -650,11 +659,11 @@ static int snd_emu10k1_shared_spdif_get(snd_kcontrol_t * kcontrol, return 0; } -static int snd_emu10k1_shared_spdif_put(snd_kcontrol_t * kcontrol, - snd_ctl_elem_value_t * ucontrol) +static int snd_emu10k1_shared_spdif_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) { unsigned long flags; - emu10k1_t *emu = snd_kcontrol_chip(kcontrol); + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); unsigned int reg, val; int change = 0; @@ -681,7 +690,7 @@ static int snd_emu10k1_shared_spdif_put(snd_kcontrol_t * kcontrol, return change; } -static snd_kcontrol_new_t snd_emu10k1_shared_spdif __devinitdata = +static struct snd_kcontrol_new snd_emu10k1_shared_spdif __devinitdata = { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = "SB Live Analog/Digital Output Jack", @@ -690,7 +699,7 @@ static snd_kcontrol_new_t snd_emu10k1_shared_spdif __devinitdata = .put = snd_emu10k1_shared_spdif_put }; -static snd_kcontrol_new_t snd_audigy_shared_spdif __devinitdata = +static struct snd_kcontrol_new snd_audigy_shared_spdif __devinitdata = { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = "Audigy Analog/Digital Output Jack", @@ -701,35 +710,35 @@ static snd_kcontrol_new_t snd_audigy_shared_spdif __devinitdata = /* */ -static void snd_emu10k1_mixer_free_ac97(ac97_t *ac97) +static void snd_emu10k1_mixer_free_ac97(struct snd_ac97 *ac97) { - emu10k1_t *emu = ac97->private_data; + struct snd_emu10k1 *emu = ac97->private_data; emu->ac97 = NULL; } /* */ -static int remove_ctl(snd_card_t *card, const char *name) +static int remove_ctl(struct snd_card *card, const char *name) { - snd_ctl_elem_id_t id; + struct snd_ctl_elem_id id; memset(&id, 0, sizeof(id)); strcpy(id.name, name); id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; return snd_ctl_remove_id(card, &id); } -static snd_kcontrol_t *ctl_find(snd_card_t *card, const char *name) +static struct snd_kcontrol *ctl_find(struct snd_card *card, const char *name) { - snd_ctl_elem_id_t sid; + struct snd_ctl_elem_id sid; memset(&sid, 0, sizeof(sid)); strcpy(sid.name, name); sid.iface = SNDRV_CTL_ELEM_IFACE_MIXER; return snd_ctl_find_id(card, &sid); } -static int rename_ctl(snd_card_t *card, const char *src, const char *dst) +static int rename_ctl(struct snd_card *card, const char *src, const char *dst) { - snd_kcontrol_t *kctl = ctl_find(card, src); + struct snd_kcontrol *kctl = ctl_find(card, src); if (kctl) { strcpy(kctl->id.name, dst); return 0; @@ -737,12 +746,12 @@ static int rename_ctl(snd_card_t *card, const char *src, const char *dst) return -ENOENT; } -int __devinit snd_emu10k1_mixer(emu10k1_t *emu, +int __devinit snd_emu10k1_mixer(struct snd_emu10k1 *emu, int pcm_device, int multi_device) { int err, pcm; - snd_kcontrol_t *kctl; - snd_card_t *card = emu->card; + struct snd_kcontrol *kctl; + struct snd_card *card = emu->card; char **c; static char *emu10k1_remove_ctls[] = { /* no AC97 mono, surround, center/lfe */ @@ -795,9 +804,9 @@ int __devinit snd_emu10k1_mixer(emu10k1_t *emu, }; if (emu->card_capabilities->ac97_chip) { - ac97_bus_t *pbus; - ac97_template_t ac97; - static ac97_bus_ops_t ops = { + struct snd_ac97_bus *pbus; + struct snd_ac97_template ac97; + static struct snd_ac97_bus_ops ops = { .write = snd_emu10k1_ac97_write, .read = snd_emu10k1_ac97_read, }; @@ -894,7 +903,7 @@ int __devinit snd_emu10k1_mixer(emu10k1_t *emu, /* initialize the routing and volume table for each pcm playback stream */ for (pcm = 0; pcm < 32; pcm++) { - emu10k1_pcm_mixer_t *mix; + struct snd_emu10k1_pcm_mixer *mix; int v; mix = &emu->pcm_mixer[pcm]; @@ -914,7 +923,7 @@ int __devinit snd_emu10k1_mixer(emu10k1_t *emu, /* initialize the routing and volume table for the multichannel playback stream */ for (pcm = 0; pcm < NUM_EFX_PLAYBACK; pcm++) { - emu10k1_pcm_mixer_t *mix; + struct snd_emu10k1_pcm_mixer *mix; int v; mix = &emu->efx_pcm_mixer[pcm]; |