diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-23 23:44:19 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-23 23:44:19 -0500 |
commit | 1ebbe2b20091d306453a5cf480a87e6cd28ae76f (patch) | |
tree | f5cd7a0fa69b8b1938cb5a0faed2e7b0628072a5 /sound/pci/ice1712/phase.c | |
parent | ac58c9059da8886b5e8cde012a80266b18ca146e (diff) | |
parent | 674a396c6d2ba0341ebdd7c1c9950f32f018e2dd (diff) |
Merge branch 'linus'
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 | ||