X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sound%2Fpcmcia%2Fvx%2Fvxp_mixer.c;h=e237f6c2018f0b545ba11ad60ca74e3d12194f71;hb=43bc926fffd92024b46cafaf7350d669ba9ca884;hp=aeaef3d81801ea9f1272dba133023c58b589db70;hpb=cee37fe97739d85991964371c1f3a745c00dd236;p=linux-2.6.git diff --git a/sound/pcmcia/vx/vxp_mixer.c b/sound/pcmcia/vx/vxp_mixer.c index aeaef3d81..e237f6c20 100644 --- a/sound/pcmcia/vx/vxp_mixer.c +++ b/sound/pcmcia/vx/vxp_mixer.c @@ -31,7 +31,7 @@ /* * mic level control (for VXPocket) */ -static int vx_mic_level_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) +static int vx_mic_level_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = 1; @@ -40,30 +40,30 @@ static int vx_mic_level_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinf return 0; } -static int vx_mic_level_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +static int vx_mic_level_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - vx_core_t *_chip = snd_kcontrol_chip(kcontrol); + struct vx_core *_chip = snd_kcontrol_chip(kcontrol); struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; ucontrol->value.integer.value[0] = chip->mic_level; return 0; } -static int vx_mic_level_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +static int vx_mic_level_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - vx_core_t *_chip = snd_kcontrol_chip(kcontrol); + struct vx_core *_chip = snd_kcontrol_chip(kcontrol); struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; - down(&_chip->mixer_mutex); + mutex_lock(&_chip->mixer_mutex); if (chip->mic_level != ucontrol->value.integer.value[0]) { vx_set_mic_level(_chip, ucontrol->value.integer.value[0]); chip->mic_level = ucontrol->value.integer.value[0]; - up(&_chip->mixer_mutex); + mutex_unlock(&_chip->mixer_mutex); return 1; } - up(&_chip->mixer_mutex); + mutex_unlock(&_chip->mixer_mutex); return 0; } -static snd_kcontrol_new_t vx_control_mic_level = { +static struct snd_kcontrol_new vx_control_mic_level = { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = "Mic Capture Volume", .info = vx_mic_level_info, @@ -74,7 +74,7 @@ static snd_kcontrol_new_t vx_control_mic_level = { /* * mic boost level control (for VXP440) */ -static int vx_mic_boost_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) +static int vx_mic_boost_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; uinfo->count = 1; @@ -83,30 +83,30 @@ static int vx_mic_boost_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinf return 0; } -static int vx_mic_boost_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +static int vx_mic_boost_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - vx_core_t *_chip = snd_kcontrol_chip(kcontrol); + struct vx_core *_chip = snd_kcontrol_chip(kcontrol); struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; ucontrol->value.integer.value[0] = chip->mic_level; return 0; } -static int vx_mic_boost_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +static int vx_mic_boost_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - vx_core_t *_chip = snd_kcontrol_chip(kcontrol); + struct vx_core *_chip = snd_kcontrol_chip(kcontrol); struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; - down(&_chip->mixer_mutex); + mutex_lock(&_chip->mixer_mutex); if (chip->mic_level != ucontrol->value.integer.value[0]) { vx_set_mic_boost(_chip, ucontrol->value.integer.value[0]); chip->mic_level = ucontrol->value.integer.value[0]; - up(&_chip->mixer_mutex); + mutex_unlock(&_chip->mixer_mutex); return 1; } - up(&_chip->mixer_mutex); + mutex_unlock(&_chip->mixer_mutex); return 0; } -static snd_kcontrol_new_t vx_control_mic_boost = { +static struct snd_kcontrol_new vx_control_mic_boost = { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = "Mic Boost", .info = vx_mic_boost_info, @@ -115,7 +115,7 @@ static snd_kcontrol_new_t vx_control_mic_boost = { }; -int vxp_add_mic_controls(vx_core_t *_chip) +int vxp_add_mic_controls(struct vx_core *_chip) { struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; int err;