Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

Commit

Permalink
ALSA: Remove old DMA-mmap code from arm/devdma.c
Browse files Browse the repository at this point in the history
The call of dma_mmap_coherent() is done in the PCM core now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
tiwai committed Nov 27, 2009
1 parent 6985c88 commit d679732
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 95 deletions.
2 changes: 1 addition & 1 deletion sound/arm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#

obj-$(CONFIG_SND_ARMAACI) += snd-aaci.o
snd-aaci-objs := aaci.o devdma.o
snd-aaci-objs := aaci.o

obj-$(CONFIG_SND_PXA2XX_PCM) += snd-pxa2xx-pcm.o
snd-pxa2xx-pcm-objs := pxa2xx-pcm.o
Expand Down
16 changes: 5 additions & 11 deletions sound/arm/aaci.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include <sound/pcm_params.h>

#include "aaci.h"
#include "devdma.h"

#define DRIVER_NAME "aaci-pl041"

Expand Down Expand Up @@ -492,7 +491,7 @@ static int aaci_pcm_hw_free(struct snd_pcm_substream *substream)
/*
* Clear out the DMA and any allocated buffers.
*/
devdma_hw_free(NULL, substream);
snd_pcm_lib_free_pages(substream);

return 0;
}
Expand All @@ -505,8 +504,8 @@ static int aaci_pcm_hw_params(struct snd_pcm_substream *substream,

aaci_pcm_hw_free(substream);

err = devdma_hw_alloc(NULL, substream,
params_buffer_bytes(params));
err = snd_pcm_lib_malloc_pages(substream,
params_buffer_bytes(params));
if (err < 0)
goto out;

Expand Down Expand Up @@ -551,11 +550,6 @@ static snd_pcm_uframes_t aaci_pcm_pointer(struct snd_pcm_substream *substream)
return bytes_to_frames(runtime, bytes);
}

static int aaci_pcm_mmap(struct snd_pcm_substream *substream, struct vm_area_struct *vma)
{
return devdma_mmap(NULL, substream, vma);
}


/*
* Playback specific ALSA stuff
Expand Down Expand Up @@ -722,7 +716,6 @@ static struct snd_pcm_ops aaci_playback_ops = {
.prepare = aaci_pcm_prepare,
.trigger = aaci_pcm_playback_trigger,
.pointer = aaci_pcm_pointer,
.mmap = aaci_pcm_mmap,
};

static int aaci_pcm_capture_hw_params(struct snd_pcm_substream *substream,
Expand Down Expand Up @@ -850,7 +843,6 @@ static struct snd_pcm_ops aaci_capture_ops = {
.prepare = aaci_pcm_capture_prepare,
.trigger = aaci_pcm_capture_trigger,
.pointer = aaci_pcm_pointer,
.mmap = aaci_pcm_mmap,
};

/*
Expand Down Expand Up @@ -1040,6 +1032,8 @@ static int __devinit aaci_init_pcm(struct aaci *aaci)

snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &aaci_playback_ops);
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &aaci_capture_ops);
snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
NULL, 0, 64 * 104);
}

return ret;
Expand Down
80 changes: 0 additions & 80 deletions sound/arm/devdma.c

This file was deleted.

3 changes: 0 additions & 3 deletions sound/arm/devdma.h

This file was deleted.

0 comments on commit d679732

Please sign in to comment.