diff options
Diffstat (limited to 'sound/pci/vx222/vx222_ops.c')
-rw-r--r-- | sound/pci/vx222/vx222_ops.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/sound/pci/vx222/vx222_ops.c b/sound/pci/vx222/vx222_ops.c index c705af409b0f..9b6d345b83a6 100644 --- a/sound/pci/vx222/vx222_ops.c +++ b/sound/pci/vx222/vx222_ops.c @@ -24,6 +24,8 @@ #include <linux/delay.h> #include <linux/device.h> #include <linux/firmware.h> +#include <linux/mutex.h> + #include <sound/core.h> #include <sound/control.h> #include <asm/io.h> @@ -861,10 +863,10 @@ static int vx_input_level_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem { struct vx_core *_chip = snd_kcontrol_chip(kcontrol); struct snd_vx222 *chip = (struct snd_vx222 *)_chip; - down(&_chip->mixer_mutex); + mutex_lock(&_chip->mixer_mutex); ucontrol->value.integer.value[0] = chip->input_level[0]; ucontrol->value.integer.value[1] = chip->input_level[1]; - up(&_chip->mixer_mutex); + mutex_unlock(&_chip->mixer_mutex); return 0; } @@ -872,16 +874,16 @@ static int vx_input_level_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem { struct vx_core *_chip = snd_kcontrol_chip(kcontrol); struct snd_vx222 *chip = (struct snd_vx222 *)_chip; - down(&_chip->mixer_mutex); + mutex_lock(&_chip->mixer_mutex); if (chip->input_level[0] != ucontrol->value.integer.value[0] || chip->input_level[1] != ucontrol->value.integer.value[1]) { chip->input_level[0] = ucontrol->value.integer.value[0]; chip->input_level[1] = ucontrol->value.integer.value[1]; vx2_set_input_level(chip); - up(&_chip->mixer_mutex); + mutex_unlock(&_chip->mixer_mutex); return 1; } - up(&_chip->mixer_mutex); + mutex_unlock(&_chip->mixer_mutex); return 0; } @@ -907,14 +909,14 @@ static int vx_mic_level_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_v { struct vx_core *_chip = snd_kcontrol_chip(kcontrol); struct snd_vx222 *chip = (struct snd_vx222 *)_chip; - down(&_chip->mixer_mutex); + mutex_lock(&_chip->mixer_mutex); if (chip->mic_level != ucontrol->value.integer.value[0]) { chip->mic_level = ucontrol->value.integer.value[0]; vx2_set_input_level(chip); - up(&_chip->mixer_mutex); + mutex_unlock(&_chip->mixer_mutex); return 1; } - up(&_chip->mixer_mutex); + mutex_unlock(&_chip->mixer_mutex); return 0; } |