summaryrefslogtreecommitdiff
path: root/sound/drivers/vx
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-01-16 16:31:42 +0100
committerJaroslav Kysela <perex@suse.cz>2006-03-22 10:24:57 +0100
commitef9f0a42db987e7e2df72289fb4522d24027786b (patch)
tree34f3ad0c1abdbeb6df5a1d5137db6b4f34695f5a /sound/drivers/vx
parent1a60d4c5a0c4028559585a74e48593b16e1ca9b2 (diff)
downloadlinux-stable-ef9f0a42db987e7e2df72289fb4522d24027786b.tar.gz
linux-stable-ef9f0a42db987e7e2df72289fb4522d24027786b.tar.bz2
linux-stable-ef9f0a42db987e7e2df72289fb4522d24027786b.zip
[ALSA] semaphore -> mutex (driver 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>
Diffstat (limited to 'sound/drivers/vx')
-rw-r--r--sound/drivers/vx/vx_core.c2
-rw-r--r--sound/drivers/vx/vx_mixer.c72
2 files changed, 37 insertions, 37 deletions
diff --git a/sound/drivers/vx/vx_core.c b/sound/drivers/vx/vx_core.c
index 43f615d7a545..fa4a2b5c2d8d 100644
--- a/sound/drivers/vx/vx_core.c
+++ b/sound/drivers/vx/vx_core.c
@@ -778,7 +778,7 @@ struct vx_core *snd_vx_create(struct snd_card *card, struct snd_vx_hardware *hw,
chip->type = hw->type;
chip->ops = ops;
tasklet_init(&chip->tq, vx_interrupt, (unsigned long)chip);
- init_MUTEX(&chip->mixer_mutex);
+ mutex_init(&chip->mixer_mutex);
chip->card = card;
card->private_data = chip;
diff --git a/sound/drivers/vx/vx_mixer.c b/sound/drivers/vx/vx_mixer.c
index 8ec2c605d2f0..c1d7fcdd1973 100644
--- a/sound/drivers/vx/vx_mixer.c
+++ b/sound/drivers/vx/vx_mixer.c
@@ -427,10 +427,10 @@ static int vx_output_level_get(struct snd_kcontrol *kcontrol, struct snd_ctl_ele
{
struct vx_core *chip = snd_kcontrol_chip(kcontrol);
int codec = kcontrol->id.index;
- down(&chip->mixer_mutex);
+ mutex_lock(&chip->mixer_mutex);
ucontrol->value.integer.value[0] = chip->output_level[codec][0];
ucontrol->value.integer.value[1] = chip->output_level[codec][1];
- up(&chip->mixer_mutex);
+ mutex_unlock(&chip->mixer_mutex);
return 0;
}
@@ -438,7 +438,7 @@ static int vx_output_level_put(struct snd_kcontrol *kcontrol, struct snd_ctl_ele
{
struct vx_core *chip = snd_kcontrol_chip(kcontrol);
int codec = kcontrol->id.index;
- down(&chip->mixer_mutex);
+ mutex_lock(&chip->mixer_mutex);
if (ucontrol->value.integer.value[0] != chip->output_level[codec][0] ||
ucontrol->value.integer.value[1] != chip->output_level[codec][1]) {
vx_set_analog_output_level(chip, codec,
@@ -446,10 +446,10 @@ static int vx_output_level_put(struct snd_kcontrol *kcontrol, struct snd_ctl_ele
ucontrol->value.integer.value[1]);
chip->output_level[codec][0] = ucontrol->value.integer.value[0];
chip->output_level[codec][1] = ucontrol->value.integer.value[1];
- up(&chip->mixer_mutex);
+ mutex_unlock(&chip->mixer_mutex);
return 1;
}
- up(&chip->mixer_mutex);
+ mutex_unlock(&chip->mixer_mutex);
return 0;
}
@@ -502,14 +502,14 @@ static int vx_audio_src_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_v
static int vx_audio_src_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
struct vx_core *chip = snd_kcontrol_chip(kcontrol);
- down(&chip->mixer_mutex);
+ mutex_lock(&chip->mixer_mutex);
if (chip->audio_source_target != ucontrol->value.enumerated.item[0]) {
chip->audio_source_target = ucontrol->value.enumerated.item[0];
vx_sync_audio_source(chip);
- up(&chip->mixer_mutex);
+ mutex_unlock(&chip->mixer_mutex);
return 1;
}
- up(&chip->mixer_mutex);
+ mutex_unlock(&chip->mixer_mutex);
return 0;
}
@@ -550,14 +550,14 @@ static int vx_clock_mode_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_
static int vx_clock_mode_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
struct vx_core *chip = snd_kcontrol_chip(kcontrol);
- down(&chip->mixer_mutex);
+ mutex_lock(&chip->mixer_mutex);
if (chip->clock_mode != ucontrol->value.enumerated.item[0]) {
chip->clock_mode = ucontrol->value.enumerated.item[0];
vx_set_clock(chip, chip->freq);
- up(&chip->mixer_mutex);
+ mutex_unlock(&chip->mixer_mutex);
return 1;
}
- up(&chip->mixer_mutex);
+ mutex_unlock(&chip->mixer_mutex);
return 0;
}
@@ -587,10 +587,10 @@ static int vx_audio_gain_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_
int audio = kcontrol->private_value & 0xff;
int capture = (kcontrol->private_value >> 8) & 1;
- down(&chip->mixer_mutex);
+ mutex_lock(&chip->mixer_mutex);
ucontrol->value.integer.value[0] = chip->audio_gain[capture][audio];
ucontrol->value.integer.value[1] = chip->audio_gain[capture][audio+1];
- up(&chip->mixer_mutex);
+ mutex_unlock(&chip->mixer_mutex);
return 0;
}
@@ -600,15 +600,15 @@ static int vx_audio_gain_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_
int audio = kcontrol->private_value & 0xff;
int capture = (kcontrol->private_value >> 8) & 1;
- down(&chip->mixer_mutex);
+ mutex_lock(&chip->mixer_mutex);
if (ucontrol->value.integer.value[0] != chip->audio_gain[capture][audio] ||
ucontrol->value.integer.value[1] != chip->audio_gain[capture][audio+1]) {
vx_set_audio_gain(chip, audio, capture, ucontrol->value.integer.value[0]);
vx_set_audio_gain(chip, audio+1, capture, ucontrol->value.integer.value[1]);
- up(&chip->mixer_mutex);
+ mutex_unlock(&chip->mixer_mutex);
return 1;
}
- up(&chip->mixer_mutex);
+ mutex_unlock(&chip->mixer_mutex);
return 0;
}
@@ -617,10 +617,10 @@ static int vx_audio_monitor_get(struct snd_kcontrol *kcontrol, struct snd_ctl_el
struct vx_core *chip = snd_kcontrol_chip(kcontrol);
int audio = kcontrol->private_value & 0xff;
- down(&chip->mixer_mutex);
+ mutex_lock(&chip->mixer_mutex);
ucontrol->value.integer.value[0] = chip->audio_monitor[audio];
ucontrol->value.integer.value[1] = chip->audio_monitor[audio+1];
- up(&chip->mixer_mutex);
+ mutex_unlock(&chip->mixer_mutex);
return 0;
}
@@ -629,17 +629,17 @@ static int vx_audio_monitor_put(struct snd_kcontrol *kcontrol, struct snd_ctl_el
struct vx_core *chip = snd_kcontrol_chip(kcontrol);
int audio = kcontrol->private_value & 0xff;
- down(&chip->mixer_mutex);
+ mutex_lock(&chip->mixer_mutex);
if (ucontrol->value.integer.value[0] != chip->audio_monitor[audio] ||
ucontrol->value.integer.value[1] != chip->audio_monitor[audio+1]) {
vx_set_monitor_level(chip, audio, ucontrol->value.integer.value[0],
chip->audio_monitor_active[audio]);
vx_set_monitor_level(chip, audio+1, ucontrol->value.integer.value[1],
chip->audio_monitor_active[audio+1]);
- up(&chip->mixer_mutex);
+ mutex_unlock(&chip->mixer_mutex);
return 1;
}
- up(&chip->mixer_mutex);
+ mutex_unlock(&chip->mixer_mutex);
return 0;
}
@@ -657,10 +657,10 @@ static int vx_audio_sw_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_va
struct vx_core *chip = snd_kcontrol_chip(kcontrol);
int audio = kcontrol->private_value & 0xff;
- down(&chip->mixer_mutex);
+ mutex_lock(&chip->mixer_mutex);
ucontrol->value.integer.value[0] = chip->audio_active[audio];
ucontrol->value.integer.value[1] = chip->audio_active[audio+1];
- up(&chip->mixer_mutex);
+ mutex_unlock(&chip->mixer_mutex);
return 0;
}
@@ -669,15 +669,15 @@ static int vx_audio_sw_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_va
struct vx_core *chip = snd_kcontrol_chip(kcontrol);
int audio = kcontrol->private_value & 0xff;
- down(&chip->mixer_mutex);
+ mutex_lock(&chip->mixer_mutex);
if (ucontrol->value.integer.value[0] != chip->audio_active[audio] ||
ucontrol->value.integer.value[1] != chip->audio_active[audio+1]) {
vx_set_audio_switch(chip, audio, ucontrol->value.integer.value[0]);
vx_set_audio_switch(chip, audio+1, ucontrol->value.integer.value[1]);
- up(&chip->mixer_mutex);
+ mutex_unlock(&chip->mixer_mutex);
return 1;
}
- up(&chip->mixer_mutex);
+ mutex_unlock(&chip->mixer_mutex);
return 0;
}
@@ -686,10 +686,10 @@ static int vx_monitor_sw_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_
struct vx_core *chip = snd_kcontrol_chip(kcontrol);
int audio = kcontrol->private_value & 0xff;
- down(&chip->mixer_mutex);
+ mutex_lock(&chip->mixer_mutex);
ucontrol->value.integer.value[0] = chip->audio_monitor_active[audio];
ucontrol->value.integer.value[1] = chip->audio_monitor_active[audio+1];
- up(&chip->mixer_mutex);
+ mutex_unlock(&chip->mixer_mutex);
return 0;
}
@@ -698,17 +698,17 @@ static int vx_monitor_sw_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_
struct vx_core *chip = snd_kcontrol_chip(kcontrol);
int audio = kcontrol->private_value & 0xff;
- down(&chip->mixer_mutex);
+ mutex_lock(&chip->mixer_mutex);
if (ucontrol->value.integer.value[0] != chip->audio_monitor_active[audio] ||
ucontrol->value.integer.value[1] != chip->audio_monitor_active[audio+1]) {
vx_set_monitor_level(chip, audio, chip->audio_monitor[audio],
ucontrol->value.integer.value[0]);
vx_set_monitor_level(chip, audio+1, chip->audio_monitor[audio+1],
ucontrol->value.integer.value[1]);
- up(&chip->mixer_mutex);
+ mutex_unlock(&chip->mixer_mutex);
return 1;
}
- up(&chip->mixer_mutex);
+ mutex_unlock(&chip->mixer_mutex);
return 0;
}
@@ -756,12 +756,12 @@ static int vx_iec958_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_valu
{
struct vx_core *chip = snd_kcontrol_chip(kcontrol);
- down(&chip->mixer_mutex);
+ mutex_lock(&chip->mixer_mutex);
ucontrol->value.iec958.status[0] = (chip->uer_bits >> 0) & 0xff;
ucontrol->value.iec958.status[1] = (chip->uer_bits >> 8) & 0xff;
ucontrol->value.iec958.status[2] = (chip->uer_bits >> 16) & 0xff;
ucontrol->value.iec958.status[3] = (chip->uer_bits >> 24) & 0xff;
- up(&chip->mixer_mutex);
+ mutex_unlock(&chip->mixer_mutex);
return 0;
}
@@ -783,14 +783,14 @@ static int vx_iec958_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_valu
(ucontrol->value.iec958.status[1] << 8) |
(ucontrol->value.iec958.status[2] << 16) |
(ucontrol->value.iec958.status[3] << 24);
- down(&chip->mixer_mutex);
+ mutex_lock(&chip->mixer_mutex);
if (chip->uer_bits != val) {
chip->uer_bits = val;
vx_set_iec958_status(chip, val);
- up(&chip->mixer_mutex);
+ mutex_unlock(&chip->mixer_mutex);
return 1;
}
- up(&chip->mixer_mutex);
+ mutex_unlock(&chip->mixer_mutex);
return 0;
}