aboutsummaryrefslogtreecommitdiff
path: root/sound/pci/ice1712/aureon.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-01-16 16:34:20 +0100
committerJaroslav Kysela <perex@suse.cz>2006-03-22 10:25:29 +0100
commit62932df8fb20ba2fb53a95fa52445eba22e821fe (patch)
tree335178d7438395a68a453a9c23624b3e9fc5ec40 /sound/pci/ice1712/aureon.c
parent8b7547f95cbe8a5940df62ed730646fdfcba5fda (diff)
[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>
Diffstat (limited to 'sound/pci/ice1712/aureon.c')
-rw-r--r--sound/pci/ice1712/aureon.c38
1 files changed, 20 insertions, 18 deletions
diff --git a/sound/pci/ice1712/aureon.c b/sound/pci/ice1712/aureon.c
index 2175f672134..0f7f4d8263c 100644
--- a/sound/pci/ice1712/aureon.c
+++ b/sound/pci/ice1712/aureon.c
@@ -53,6 +53,8 @@
#include <linux/interrupt.h>
#include <linux/init.h>
#include <linux/slab.h>
+#include <linux/mutex.h>
+
#include <sound/core.h>
#include "ice1712.h"
@@ -210,14 +212,14 @@ static int aureon_ac97_vol_get(struct snd_kcontrol *kcontrol, struct snd_ctl_ele
struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
unsigned short vol;
- down(&ice->gpio_mutex);
+ mutex_lock(&ice->gpio_mutex);
vol = aureon_ac97_read(ice, kcontrol->private_value & 0x7F);
ucontrol->value.integer.value[0] = 0x1F - (vol & 0x1F);
if (kcontrol->private_value & AUREON_AC97_STEREO)
ucontrol->value.integer.value[1] = 0x1F - ((vol >> 8) & 0x1F);
- up(&ice->gpio_mutex);
+ mutex_unlock(&ice->gpio_mutex);
return 0;
}
@@ -252,11 +254,11 @@ static int aureon_ac97_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_el
{
struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
- down(&ice->gpio_mutex);
+ mutex_lock(&ice->gpio_mutex);
ucontrol->value.integer.value[0] = aureon_ac97_read(ice, kcontrol->private_value & 0x7F) & 0x8000 ? 0 : 1;
- up(&ice->gpio_mutex);
+ mutex_unlock(&ice->gpio_mutex);
return 0;
}
@@ -288,11 +290,11 @@ static int aureon_ac97_micboost_get(struct snd_kcontrol *kcontrol, struct snd_ct
{
struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
- down(&ice->gpio_mutex);
+ mutex_lock(&ice->gpio_mutex);
ucontrol->value.integer.value[0] = aureon_ac97_read(ice, AC97_MIC) & 0x0020 ? 0 : 1;
- up(&ice->gpio_mutex);
+ mutex_unlock(&ice->gpio_mutex);
return 0;
}
@@ -488,11 +490,11 @@ static int aureon_ac97_mmute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_e
{
struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
- down(&ice->gpio_mutex);
+ mutex_lock(&ice->gpio_mutex);
ucontrol->value.integer.value[0] = (wm_get(ice, WM_OUT_MUX1) >> 1) & 0x01;
- up(&ice->gpio_mutex);
+ mutex_unlock(&ice->gpio_mutex);
return 0;
}
@@ -557,9 +559,9 @@ static int wm_pcm_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_va
{
struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
- down(&ice->gpio_mutex);
+ mutex_lock(&ice->gpio_mutex);
ucontrol->value.integer.value[0] = (wm_get(ice, WM_MUTE) & 0x10) ? 0 : 1;
- up(&ice->gpio_mutex);
+ mutex_unlock(&ice->gpio_mutex);
return 0;
}
@@ -782,11 +784,11 @@ static int wm_pcm_vol_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_val
struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
unsigned short val;
- down(&ice->gpio_mutex);
+ mutex_lock(&ice->gpio_mutex);
val = wm_get(ice, WM_DAC_DIG_MASTER_ATTEN) & 0xff;
val = val > PCM_MIN ? (val - PCM_MIN) : 0;
ucontrol->value.integer.value[0] = val;
- up(&ice->gpio_mutex);
+ mutex_unlock(&ice->gpio_mutex);
return 0;
}
@@ -827,12 +829,12 @@ static int wm_adc_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_va
unsigned short val;
int i;
- down(&ice->gpio_mutex);
+ mutex_lock(&ice->gpio_mutex);
for (i = 0; i < 2; i++) {
val = wm_get(ice, WM_ADC_GAIN + i);
ucontrol->value.integer.value[i] = ~val>>5 & 0x1;
}
- up(&ice->gpio_mutex);
+ mutex_unlock(&ice->gpio_mutex);
return 0;
}
@@ -874,13 +876,13 @@ static int wm_adc_vol_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_val
int i, idx;
unsigned short vol;
- down(&ice->gpio_mutex);
+ mutex_lock(&ice->gpio_mutex);
for (i = 0; i < 2; i++) {
idx = WM_ADC_GAIN + i;
vol = wm_get(ice, idx) & 0x1f;
ucontrol->value.integer.value[i] = vol;
}
- up(&ice->gpio_mutex);
+ mutex_unlock(&ice->gpio_mutex);
return 0;
}
@@ -951,11 +953,11 @@ static int wm_adc_mux_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_val
struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
unsigned short val;
- down(&ice->gpio_mutex);
+ mutex_lock(&ice->gpio_mutex);
val = wm_get(ice, WM_ADC_MUX);
ucontrol->value.integer.value[0] = val & 7;
ucontrol->value.integer.value[1] = (val >> 4) & 7;
- up(&ice->gpio_mutex);
+ mutex_unlock(&ice->gpio_mutex);
return 0;
}