[ALSA] semaphore -> mutex (PCI part)
Semaphore to mutex conversion. The conversion was generated via scripts, and the result was validated automatically via a script as well. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:

committed by
Jaroslav Kysela

szülő
8b7547f95c
commit
62932df8fb
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user