diff options
Diffstat (limited to 'sound/pci/ice1712/phase.c')
-rw-r--r-- | sound/pci/ice1712/phase.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sound/pci/ice1712/phase.c b/sound/pci/ice1712/phase.c index ec3757834b93..502da1c8b5f7 100644 --- a/sound/pci/ice1712/phase.c +++ b/sound/pci/ice1712/phase.c | |||
@@ -39,6 +39,8 @@ | |||
39 | #include <linux/interrupt.h> | 39 | #include <linux/interrupt.h> |
40 | #include <linux/init.h> | 40 | #include <linux/init.h> |
41 | #include <linux/slab.h> | 41 | #include <linux/slab.h> |
42 | #include <linux/mutex.h> | ||
43 | |||
42 | #include <sound/core.h> | 44 | #include <sound/core.h> |
43 | 45 | ||
44 | #include "ice1712.h" | 46 | #include "ice1712.h" |
@@ -273,9 +275,9 @@ static int wm_pcm_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_va | |||
273 | { | 275 | { |
274 | struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); | 276 | struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); |
275 | 277 | ||
276 | down(&ice->gpio_mutex); | 278 | mutex_lock(&ice->gpio_mutex); |
277 | ucontrol->value.integer.value[0] = (wm_get(ice, WM_MUTE) & 0x10) ? 0 : 1; | 279 | ucontrol->value.integer.value[0] = (wm_get(ice, WM_MUTE) & 0x10) ? 0 : 1; |
278 | up(&ice->gpio_mutex); | 280 | mutex_unlock(&ice->gpio_mutex); |
279 | return 0; | 281 | return 0; |
280 | } | 282 | } |
281 | 283 | ||
@@ -584,11 +586,11 @@ static int wm_pcm_vol_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_val | |||
584 | struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); | 586 | struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); |
585 | unsigned short val; | 587 | unsigned short val; |
586 | 588 | ||
587 | down(&ice->gpio_mutex); | 589 | mutex_lock(&ice->gpio_mutex); |
588 | val = wm_get(ice, WM_DAC_DIG_MASTER_ATTEN) & 0xff; | 590 | val = wm_get(ice, WM_DAC_DIG_MASTER_ATTEN) & 0xff; |
589 | val = val > PCM_MIN ? (val - PCM_MIN) : 0; | 591 | val = val > PCM_MIN ? (val - PCM_MIN) : 0; |
590 | ucontrol->value.integer.value[0] = val; | 592 | ucontrol->value.integer.value[0] = val; |
591 | up(&ice->gpio_mutex); | 593 | mutex_unlock(&ice->gpio_mutex); |
592 | return 0; | 594 | return 0; |
593 | } | 595 | } |
594 | 596 | ||