| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Low-level ALSA driver for the ENSONIQ SoundScape |
|---|
| 3 | 4 | * Copyright (c) by Chris Rankin |
|---|
| 4 | 5 | * |
|---|
| 5 | 6 | * This driver was written in part using information obtained from |
|---|
| 6 | 7 | * 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 |
|---|
| 22 | 8 | */ |
|---|
| 23 | 9 | |
|---|
| 24 | 10 | #include <linux/init.h> |
|---|
| .. | .. |
|---|
| 167 | 153 | * I think this means that the memory has to map to |
|---|
| 168 | 154 | * contiguous pages of physical memory. |
|---|
| 169 | 155 | */ |
|---|
| 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, |
|---|
| 171 | 158 | unsigned long size) |
|---|
| 172 | 159 | { |
|---|
| 173 | 160 | if (buf) { |
|---|
| 174 | 161 | if (snd_dma_alloc_pages_fallback(SNDRV_DMA_TYPE_DEV, |
|---|
| 175 | | - snd_dma_isa_data(), |
|---|
| 162 | + s->chip->card->dev, |
|---|
| 176 | 163 | size, buf) < 0) { |
|---|
| 177 | 164 | snd_printk(KERN_ERR "sscape: Failed to allocate " |
|---|
| 178 | 165 | "%lu bytes for DMA\n", |
|---|
| .. | .. |
|---|
| 321 | 308 | } |
|---|
| 322 | 309 | |
|---|
| 323 | 310 | /* |
|---|
| 324 | | - * This is apparently the standard way to initailise an MPU-401 |
|---|
| 311 | + * This is apparently the standard way to initialise an MPU-401 |
|---|
| 325 | 312 | */ |
|---|
| 326 | 313 | static inline void initialise_mpu401(const struct snd_mpu401 *mpu) |
|---|
| 327 | 314 | { |
|---|
| .. | .. |
|---|
| 352 | 339 | } |
|---|
| 353 | 340 | |
|---|
| 354 | 341 | /* |
|---|
| 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. |
|---|
| 356 | 343 | * All locking issues are left to the caller. |
|---|
| 357 | 344 | */ |
|---|
| 358 | 345 | static void sscape_start_dma_unsafe(unsigned io_base, enum GA_REG reg) |
|---|
| .. | .. |
|---|
| 443 | 430 | int ret; |
|---|
| 444 | 431 | unsigned char val; |
|---|
| 445 | 432 | |
|---|
| 446 | | - if (!get_dmabuf(&dma, PAGE_ALIGN(32 * 1024))) |
|---|
| 433 | + if (!get_dmabuf(s, &dma, PAGE_ALIGN(32 * 1024))) |
|---|
| 447 | 434 | return -ENOMEM; |
|---|
| 448 | 435 | |
|---|
| 449 | 436 | spin_lock_irqsave(&s->lock, flags); |
|---|
| .. | .. |
|---|
| 816 | 803 | } |
|---|
| 817 | 804 | |
|---|
| 818 | 805 | /* |
|---|
| 819 | | - * Initialse an MPU-401 subdevice for MIDI support on the SoundScape. |
|---|
| 806 | + * Initialise an MPU-401 subdevice for MIDI support on the SoundScape. |
|---|
| 820 | 807 | */ |
|---|
| 821 | 808 | static int create_mpu401(struct snd_card *card, int devnum, |
|---|
| 822 | 809 | unsigned long port, int irq) |
|---|