hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/sound/isa/sscape.c
....@@ -1,24 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Low-level ALSA driver for the ENSONIQ SoundScape
34 * Copyright (c) by Chris Rankin
45 *
56 * This driver was written in part using information obtained from
67 * the OSS/Free SoundScape driver, written by Hannu Savolainen.
7
- *
8
- *
9
- * This program is free software; you can redistribute it and/or modify
10
- * it under the terms of the GNU General Public License as published by
11
- * the Free Software Foundation; either version 2 of the License, or
12
- * (at your option) any later version.
13
- *
14
- * This program is distributed in the hope that it will be useful,
15
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
- * GNU General Public License for more details.
18
- *
19
- * You should have received a copy of the GNU General Public License
20
- * along with this program; if not, write to the Free Software
21
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
228 */
239
2410 #include <linux/init.h>
....@@ -167,12 +153,13 @@
167153 * I think this means that the memory has to map to
168154 * contiguous pages of physical memory.
169155 */
170
-static struct snd_dma_buffer *get_dmabuf(struct snd_dma_buffer *buf,
156
+static struct snd_dma_buffer *get_dmabuf(struct soundscape *s,
157
+ struct snd_dma_buffer *buf,
171158 unsigned long size)
172159 {
173160 if (buf) {
174161 if (snd_dma_alloc_pages_fallback(SNDRV_DMA_TYPE_DEV,
175
- snd_dma_isa_data(),
162
+ s->chip->card->dev,
176163 size, buf) < 0) {
177164 snd_printk(KERN_ERR "sscape: Failed to allocate "
178165 "%lu bytes for DMA\n",
....@@ -321,7 +308,7 @@
321308 }
322309
323310 /*
324
- * This is apparently the standard way to initailise an MPU-401
311
+ * This is apparently the standard way to initialise an MPU-401
325312 */
326313 static inline void initialise_mpu401(const struct snd_mpu401 *mpu)
327314 {
....@@ -352,7 +339,7 @@
352339 }
353340
354341 /*
355
- * Tell the SoundScape to begin a DMA tranfer using the given channel.
342
+ * Tell the SoundScape to begin a DMA transfer using the given channel.
356343 * All locking issues are left to the caller.
357344 */
358345 static void sscape_start_dma_unsafe(unsigned io_base, enum GA_REG reg)
....@@ -443,7 +430,7 @@
443430 int ret;
444431 unsigned char val;
445432
446
- if (!get_dmabuf(&dma, PAGE_ALIGN(32 * 1024)))
433
+ if (!get_dmabuf(s, &dma, PAGE_ALIGN(32 * 1024)))
447434 return -ENOMEM;
448435
449436 spin_lock_irqsave(&s->lock, flags);
....@@ -816,7 +803,7 @@
816803 }
817804
818805 /*
819
- * Initialse an MPU-401 subdevice for MIDI support on the SoundScape.
806
+ * Initialise an MPU-401 subdevice for MIDI support on the SoundScape.
820807 */
821808 static int create_mpu401(struct snd_card *card, int devnum,
822809 unsigned long port, int irq)