aboutsummaryrefslogtreecommitdiffstats
path: root/sound/arm/pxa2xx-ac97.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-03-22 13:59:20 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-22 13:59:20 -0500
commit1c2e02750b992703a8a18634e08b04353face243 (patch)
tree5dc2d10bad329eeb73b9e219e237662a8383f971 /sound/arm/pxa2xx-ac97.c
parent8b4b6707ee32f929846d947d18b1b9bf42e988aa (diff)
parenta3c44854a59f7e983c867060aa906bbf5befb1ef (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/perex/alsa
* git://git.kernel.org/pub/scm/linux/kernel/git/perex/alsa: (124 commits) [ALSA] version 1.0.11rc4 [PATCH] Intruduce DMA_28BIT_MASK [ALSA] hda-codec - Add support for ASUS P4GPL-X [ALSA] hda-codec - Add support for HP nx9420 laptop [ALSA] Fix memory leaks in error path of control.c [ALSA] AMD Au1x00: AC'97 controller is memory mapped [ALSA] AMD Au1x00: fix DMA init/cleanup [ALSA] hda-codec - Fix generic auto-configurator [ALSA] hda-codec - Fix BIOS auto-configuration [ALSA] Fixes typos in Audiophile-USB.txt [ALSA] ice1712 - typo fixes for dxr_enable module option [ALSA] AMD Au1x00: make driver build after cleanup [ALSA] ice1712 - Fix wrong value types for enum items [ALSA] fix resource leak in usbmixer [ALSA] Fix gus_pcm dereference before NULL [ALSA] Fix seq_clientmgr dereferences before NULL check [ALSA] hda-codec - Fix for Samsung R65 and ASUS A6J [ALSA] hda-codec - Add support for VAIO FE550G and SZ110 [ALSA] usb-audio: add Maya44 mixer control names [ALSA] usb-audio: add Casio PL-40R support ...
Diffstat (limited to 'sound/arm/pxa2xx-ac97.c')
-rw-r--r--sound/arm/pxa2xx-ac97.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sound/arm/pxa2xx-ac97.c b/sound/arm/pxa2xx-ac97.c
index 3acbc6023d19..599aff8290e8 100644
--- a/sound/arm/pxa2xx-ac97.c
+++ b/sound/arm/pxa2xx-ac97.c
@@ -25,7 +25,7 @@
25#include <sound/initval.h> 25#include <sound/initval.h>
26 26
27#include <asm/irq.h> 27#include <asm/irq.h>
28#include <asm/semaphore.h> 28#include <linux/mutex.h>
29#include <asm/hardware.h> 29#include <asm/hardware.h>
30#include <asm/arch/pxa-regs.h> 30#include <asm/arch/pxa-regs.h>
31#include <asm/arch/audio.h> 31#include <asm/arch/audio.h>
@@ -33,7 +33,7 @@
33#include "pxa2xx-pcm.h" 33#include "pxa2xx-pcm.h"
34 34
35 35
36static DECLARE_MUTEX(car_mutex); 36static DEFINE_MUTEX(car_mutex);
37static DECLARE_WAIT_QUEUE_HEAD(gsr_wq); 37static DECLARE_WAIT_QUEUE_HEAD(gsr_wq);
38static volatile long gsr_bits; 38static volatile long gsr_bits;
39 39
@@ -52,7 +52,7 @@ static unsigned short pxa2xx_ac97_read(struct snd_ac97 *ac97, unsigned short reg
52 unsigned short val = -1; 52 unsigned short val = -1;
53 volatile u32 *reg_addr; 53 volatile u32 *reg_addr;
54 54
55 down(&car_mutex); 55 mutex_lock(&car_mutex);
56 56
57 /* set up primary or secondary codec space */ 57 /* set up primary or secondary codec space */
58 reg_addr = (ac97->num & 1) ? &SAC_REG_BASE : &PAC_REG_BASE; 58 reg_addr = (ac97->num & 1) ? &SAC_REG_BASE : &PAC_REG_BASE;
@@ -79,7 +79,7 @@ static unsigned short pxa2xx_ac97_read(struct snd_ac97 *ac97, unsigned short reg
79 /* but we've just started another cycle... */ 79 /* but we've just started another cycle... */
80 wait_event_timeout(gsr_wq, (GSR | gsr_bits) & GSR_SDONE, 1); 80 wait_event_timeout(gsr_wq, (GSR | gsr_bits) & GSR_SDONE, 1);
81 81
82out: up(&car_mutex); 82out: mutex_unlock(&car_mutex);
83 return val; 83 return val;
84} 84}
85 85
@@ -87,7 +87,7 @@ static void pxa2xx_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigne
87{ 87{
88 volatile u32 *reg_addr; 88 volatile u32 *reg_addr;
89 89
90 down(&car_mutex); 90 mutex_lock(&car_mutex);
91 91
92 /* set up primary or secondary codec space */ 92 /* set up primary or secondary codec space */
93 reg_addr = (ac97->num & 1) ? &SAC_REG_BASE : &PAC_REG_BASE; 93 reg_addr = (ac97->num & 1) ? &SAC_REG_BASE : &PAC_REG_BASE;
@@ -101,7 +101,7 @@ static void pxa2xx_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigne
101 printk(KERN_ERR "%s: write error (ac97_reg=%d GSR=%#lx)\n", 101 printk(KERN_ERR "%s: write error (ac97_reg=%d GSR=%#lx)\n",
102 __FUNCTION__, reg, GSR | gsr_bits); 102 __FUNCTION__, reg, GSR | gsr_bits);
103 103
104 up(&car_mutex); 104 mutex_unlock(&car_mutex);
105} 105}
106 106
107static void pxa2xx_ac97_reset(struct snd_ac97 *ac97) 107static void pxa2xx_ac97_reset(struct snd_ac97 *ac97)