diff options
Diffstat (limited to 'sound/oss/dmabuf.c')
-rw-r--r-- | sound/oss/dmabuf.c | 42 |
1 files changed, 5 insertions, 37 deletions
diff --git a/sound/oss/dmabuf.c b/sound/oss/dmabuf.c index 15ce7119c5f4..b256c0401161 100644 --- a/sound/oss/dmabuf.c +++ b/sound/oss/dmabuf.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * sound/dmabuf.c | 2 | * sound/oss/dmabuf.c |
3 | * | 3 | * |
4 | * The DMA buffer manager for digitized voice applications | 4 | * The DMA buffer manager for digitized voice applications |
5 | */ | 5 | */ |
@@ -926,6 +926,7 @@ int DMAbuf_start_dma(int dev, unsigned long physaddr, int count, int dma_mode) | |||
926 | sound_start_dma(dmap, physaddr, count, dma_mode); | 926 | sound_start_dma(dmap, physaddr, count, dma_mode); |
927 | return count; | 927 | return count; |
928 | } | 928 | } |
929 | EXPORT_SYMBOL(DMAbuf_start_dma); | ||
929 | 930 | ||
930 | static int local_start_dma(struct audio_operations *adev, unsigned long physaddr, int count, int dma_mode) | 931 | static int local_start_dma(struct audio_operations *adev, unsigned long physaddr, int count, int dma_mode) |
931 | { | 932 | { |
@@ -1055,6 +1056,8 @@ void DMAbuf_outputintr(int dev, int notify_only) | |||
1055 | do_outputintr(dev, notify_only); | 1056 | do_outputintr(dev, notify_only); |
1056 | spin_unlock_irqrestore(&dmap->lock,flags); | 1057 | spin_unlock_irqrestore(&dmap->lock,flags); |
1057 | } | 1058 | } |
1059 | EXPORT_SYMBOL(DMAbuf_outputintr); | ||
1060 | |||
1058 | /* called with dmap->lock held in irq context */ | 1061 | /* called with dmap->lock held in irq context */ |
1059 | static void do_inputintr(int dev) | 1062 | static void do_inputintr(int dev) |
1060 | { | 1063 | { |
@@ -1154,36 +1157,7 @@ void DMAbuf_inputintr(int dev) | |||
1154 | do_inputintr(dev); | 1157 | do_inputintr(dev); |
1155 | spin_unlock_irqrestore(&dmap->lock,flags); | 1158 | spin_unlock_irqrestore(&dmap->lock,flags); |
1156 | } | 1159 | } |
1157 | 1160 | EXPORT_SYMBOL(DMAbuf_inputintr); | |
1158 | int DMAbuf_open_dma(int dev) | ||
1159 | { | ||
1160 | /* | ||
1161 | * NOTE! This routine opens only the primary DMA channel (output). | ||
1162 | */ | ||
1163 | struct audio_operations *adev = audio_devs[dev]; | ||
1164 | int err; | ||
1165 | |||
1166 | if ((err = open_dmap(adev, OPEN_READWRITE, adev->dmap_out)) < 0) | ||
1167 | return -EBUSY; | ||
1168 | dma_init_buffers(adev->dmap_out); | ||
1169 | adev->dmap_out->flags |= DMA_ALLOC_DONE; | ||
1170 | adev->dmap_out->fragment_size = adev->dmap_out->buffsize; | ||
1171 | |||
1172 | if (adev->dmap_out->dma >= 0) { | ||
1173 | unsigned long flags; | ||
1174 | |||
1175 | flags=claim_dma_lock(); | ||
1176 | clear_dma_ff(adev->dmap_out->dma); | ||
1177 | disable_dma(adev->dmap_out->dma); | ||
1178 | release_dma_lock(flags); | ||
1179 | } | ||
1180 | return 0; | ||
1181 | } | ||
1182 | |||
1183 | void DMAbuf_close_dma(int dev) | ||
1184 | { | ||
1185 | close_dmap(audio_devs[dev], audio_devs[dev]->dmap_out); | ||
1186 | } | ||
1187 | 1161 | ||
1188 | void DMAbuf_init(int dev, int dma1, int dma2) | 1162 | void DMAbuf_init(int dev, int dma1, int dma2) |
1189 | { | 1163 | { |
@@ -1192,12 +1166,6 @@ void DMAbuf_init(int dev, int dma1, int dma2) | |||
1192 | * NOTE! This routine could be called several times. | 1166 | * NOTE! This routine could be called several times. |
1193 | */ | 1167 | */ |
1194 | 1168 | ||
1195 | /* drag in audio_syms.o */ | ||
1196 | { | ||
1197 | extern char audio_syms_symbol; | ||
1198 | audio_syms_symbol = 0; | ||
1199 | } | ||
1200 | |||
1201 | if (adev && adev->dmap_out == NULL) { | 1169 | if (adev && adev->dmap_out == NULL) { |
1202 | if (adev->d == NULL) | 1170 | if (adev->d == NULL) |
1203 | panic("OSS: audio_devs[%d]->d == NULL\n", dev); | 1171 | panic("OSS: audio_devs[%d]->d == NULL\n", dev); |