aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/ctxfi/ctatc.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/ctxfi/ctatc.c')
-rw-r--r--sound/pci/ctxfi/ctatc.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/sound/pci/ctxfi/ctatc.c b/sound/pci/ctxfi/ctatc.c
index ead104ea1e35..1a4bb357eaef 100644
--- a/sound/pci/ctxfi/ctatc.c
+++ b/sound/pci/ctxfi/ctatc.c
@@ -119,7 +119,6 @@ atc_pcm_release_resources(struct ct_atc *atc, struct ct_atc_pcm *apcm);
119 119
120static int ct_map_audio_buffer(struct ct_atc *atc, struct ct_atc_pcm *apcm) 120static int ct_map_audio_buffer(struct ct_atc *atc, struct ct_atc_pcm *apcm)
121{ 121{
122 unsigned long flags;
123 struct snd_pcm_runtime *runtime; 122 struct snd_pcm_runtime *runtime;
124 struct ct_vm *vm; 123 struct ct_vm *vm;
125 124
@@ -129,9 +128,7 @@ static int ct_map_audio_buffer(struct ct_atc *atc, struct ct_atc_pcm *apcm)
129 runtime = apcm->substream->runtime; 128 runtime = apcm->substream->runtime;
130 vm = atc->vm; 129 vm = atc->vm;
131 130
132 spin_lock_irqsave(&atc->vm_lock, flags);
133 apcm->vm_block = vm->map(vm, runtime->dma_area, runtime->dma_bytes); 131 apcm->vm_block = vm->map(vm, runtime->dma_area, runtime->dma_bytes);
134 spin_unlock_irqrestore(&atc->vm_lock, flags);
135 132
136 if (NULL == apcm->vm_block) 133 if (NULL == apcm->vm_block)
137 return -ENOENT; 134 return -ENOENT;
@@ -141,7 +138,6 @@ static int ct_map_audio_buffer(struct ct_atc *atc, struct ct_atc_pcm *apcm)
141 138
142static void ct_unmap_audio_buffer(struct ct_atc *atc, struct ct_atc_pcm *apcm) 139static void ct_unmap_audio_buffer(struct ct_atc *atc, struct ct_atc_pcm *apcm)
143{ 140{
144 unsigned long flags;
145 struct ct_vm *vm; 141 struct ct_vm *vm;
146 142
147 if (NULL == apcm->vm_block) 143 if (NULL == apcm->vm_block)
@@ -149,9 +145,7 @@ static void ct_unmap_audio_buffer(struct ct_atc *atc, struct ct_atc_pcm *apcm)
149 145
150 vm = atc->vm; 146 vm = atc->vm;
151 147
152 spin_lock_irqsave(&atc->vm_lock, flags);
153 vm->unmap(vm, apcm->vm_block); 148 vm->unmap(vm, apcm->vm_block);
154 spin_unlock_irqrestore(&atc->vm_lock, flags);
155 149
156 apcm->vm_block = NULL; 150 apcm->vm_block = NULL;
157} 151}
@@ -161,9 +155,7 @@ static unsigned long atc_get_ptp_phys(struct ct_atc *atc, int index)
161 struct ct_vm *vm; 155 struct ct_vm *vm;
162 void *kvirt_addr; 156 void *kvirt_addr;
163 unsigned long phys_addr; 157 unsigned long phys_addr;
164 unsigned long flags;
165 158
166 spin_lock_irqsave(&atc->vm_lock, flags);
167 vm = atc->vm; 159 vm = atc->vm;
168 kvirt_addr = vm->get_ptp_virt(vm, index); 160 kvirt_addr = vm->get_ptp_virt(vm, index);
169 if (kvirt_addr == NULL) 161 if (kvirt_addr == NULL)
@@ -171,8 +163,6 @@ static unsigned long atc_get_ptp_phys(struct ct_atc *atc, int index)
171 else 163 else
172 phys_addr = virt_to_phys(kvirt_addr); 164 phys_addr = virt_to_phys(kvirt_addr);
173 165
174 spin_unlock_irqrestore(&atc->vm_lock, flags);
175
176 return phys_addr; 166 return phys_addr;
177} 167}
178 168
@@ -1562,7 +1552,6 @@ int ct_atc_create(struct snd_card *card, struct pci_dev *pci,
1562 atc_set_ops(atc); 1552 atc_set_ops(atc);
1563 1553
1564 spin_lock_init(&atc->atc_lock); 1554 spin_lock_init(&atc->atc_lock);
1565 spin_lock_init(&atc->vm_lock);
1566 1555
1567 /* Find card model */ 1556 /* Find card model */
1568 err = atc_identify_card(atc); 1557 err = atc_identify_card(atc);