Skip to content

Commit 759ee81

Browse files
committed
alsa: Remove special SBUS dma support code.
No longer used. Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 12b1c03 commit 759ee81

4 files changed

Lines changed: 2 additions & 56 deletions

File tree

‎Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5073,8 +5073,7 @@ struct _snd_pcm_runtime {
50735073
with <constant>SNDRV_DMA_TYPE_CONTINUOUS</constant> type and the
50745074
<function>snd_dma_continuous_data(GFP_KERNEL)</function> device pointer,
50755075
where <constant>GFP_KERNEL</constant> is the kernel allocation flag to
5076-
use. For the SBUS, <constant>SNDRV_DMA_TYPE_SBUS</constant> and
5077-
<function>snd_dma_sbus_data(sbus_dev)</function> are used instead.
5076+
use.
50785077
For the PCI scatter-gather buffers, use
50795078
<constant>SNDRV_DMA_TYPE_DEV_SG</constant> with
50805079
<function>snd_dma_pci_data(pci)</function>

‎include/sound/core.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@
4242
#ifdef CONFIG_PCI
4343
struct pci_dev;
4444
#endif
45-
#ifdef CONFIG_SBUS
46-
struct sbus_dev;
47-
#endif
4845

4946
/* device allocation stuff */
5047

‎include/sound/memalloc.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ struct snd_dma_device {
3737
#ifndef snd_dma_pci_data
3838
#define snd_dma_pci_data(pci) (&(pci)->dev)
3939
#define snd_dma_isa_data() NULL
40-
#define snd_dma_sbus_data(sbus) ((struct device *)(sbus))
4140
#define snd_dma_continuous_data(x) ((struct device *)(unsigned long)(x))
4241
#endif
4342

@@ -49,7 +48,6 @@ struct snd_dma_device {
4948
#define SNDRV_DMA_TYPE_CONTINUOUS 1 /* continuous no-DMA memory */
5049
#define SNDRV_DMA_TYPE_DEV 2 /* generic device continuous */
5150
#define SNDRV_DMA_TYPE_DEV_SG 3 /* generic device SG-buffer */
52-
#define SNDRV_DMA_TYPE_SBUS 4 /* SBUS continuous */
5351

5452
/*
5553
* info for buffer allocation

‎sound/core/memalloc.c‎

Lines changed: 1 addition & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@
3333
#include <linux/moduleparam.h>
3434
#include <linux/mutex.h>
3535
#include <sound/memalloc.h>
36-
#ifdef CONFIG_SBUS
37-
#include <asm/sbus.h>
38-
#endif
3936

4037

4138
MODULE_AUTHOR("Takashi Iwai <tiwai@suse.de>, Jaroslav Kysela <perex@perex.cz>");
@@ -180,41 +177,6 @@ static void snd_free_dev_pages(struct device *dev, size_t size, void *ptr,
180177
}
181178
#endif /* CONFIG_HAS_DMA */
182179

183-
#ifdef CONFIG_SBUS
184-
185-
static void *snd_malloc_sbus_pages(struct device *dev, size_t size,
186-
dma_addr_t *dma_addr)
187-
{
188-
struct sbus_dev *sdev = (struct sbus_dev *)dev;
189-
int pg;
190-
void *res;
191-
192-
snd_assert(size > 0, return NULL);
193-
snd_assert(dma_addr != NULL, return NULL);
194-
pg = get_order(size);
195-
res = dma_alloc_coherent(&sdev->ofdev.dev, PAGE_SIZE * (1 << pg),
196-
dma_addr, GFP_ATOMIC);
197-
if (res != NULL)
198-
inc_snd_pages(pg);
199-
return res;
200-
}
201-
202-
static void snd_free_sbus_pages(struct device *dev, size_t size,
203-
void *ptr, dma_addr_t dma_addr)
204-
{
205-
struct sbus_dev *sdev = (struct sbus_dev *)dev;
206-
int pg;
207-
208-
if (ptr == NULL)
209-
return;
210-
pg = get_order(size);
211-
dec_snd_pages(pg);
212-
dma_free_coherent(&sdev->ofdev.dev, PAGE_SIZE * (1 << pg),
213-
ptr, dma_addr);
214-
}
215-
216-
#endif /* CONFIG_SBUS */
217-
218180
/*
219181
*
220182
* ALSA generic memory management
@@ -249,11 +211,6 @@ int snd_dma_alloc_pages(int type, struct device *device, size_t size,
249211
dmab->area = snd_malloc_pages(size, (unsigned long)device);
250212
dmab->addr = 0;
251213
break;
252-
#ifdef CONFIG_SBUS
253-
case SNDRV_DMA_TYPE_SBUS:
254-
dmab->area = snd_malloc_sbus_pages(device, size, &dmab->addr);
255-
break;
256-
#endif
257214
#ifdef CONFIG_HAS_DMA
258215
case SNDRV_DMA_TYPE_DEV:
259216
dmab->area = snd_malloc_dev_pages(device, size, &dmab->addr);
@@ -322,11 +279,6 @@ void snd_dma_free_pages(struct snd_dma_buffer *dmab)
322279
case SNDRV_DMA_TYPE_CONTINUOUS:
323280
snd_free_pages(dmab->area, dmab->bytes);
324281
break;
325-
#ifdef CONFIG_SBUS
326-
case SNDRV_DMA_TYPE_SBUS:
327-
snd_free_sbus_pages(dmab->dev.dev, dmab->bytes, dmab->area, dmab->addr);
328-
break;
329-
#endif
330282
#ifdef CONFIG_HAS_DMA
331283
case SNDRV_DMA_TYPE_DEV:
332284
snd_free_dev_pages(dmab->dev.dev, dmab->bytes, dmab->area, dmab->addr);
@@ -433,7 +385,7 @@ static int snd_mem_proc_read(struct seq_file *seq, void *offset)
433385
long pages = snd_allocated_pages >> (PAGE_SHIFT-12);
434386
struct snd_mem_list *mem;
435387
int devno;
436-
static char *types[] = { "UNKNOWN", "CONT", "DEV", "DEV-SG", "SBUS" };
388+
static char *types[] = { "UNKNOWN", "CONT", "DEV", "DEV-SG" };
437389

438390
mutex_lock(&list_mutex);
439391
seq_printf(seq, "pages : %li bytes (%li pages per %likB)\n",

0 commit comments

Comments
 (0)