Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 270438
b: refs/heads/master
c: 6b69a0e
h: refs/heads/master
v: v3
  • Loading branch information
Takashi Iwai committed Sep 24, 2011
1 parent 72669a0 commit 4ffb8ef
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 49957f39665d50343e04effc65c78919364228ce
refs/heads/master: 6b69a0e520a0dc6579901098d0810bcd2e1ea60b
13 changes: 7 additions & 6 deletions trunk/sound/drivers/aloop.c
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,8 @@ static void loopback_runtime_free(struct snd_pcm_runtime *runtime)
static int loopback_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{
return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params));
return snd_pcm_lib_alloc_vmalloc_buffer(substream,
params_buffer_bytes(params));
}

static int loopback_hw_free(struct snd_pcm_substream *substream)
Expand All @@ -587,7 +588,7 @@ static int loopback_hw_free(struct snd_pcm_substream *substream)
mutex_lock(&dpcm->loopback->cable_lock);
cable->valid &= ~(1 << substream->stream);
mutex_unlock(&dpcm->loopback->cable_lock);
return snd_pcm_lib_free_pages(substream);
return snd_pcm_lib_free_vmalloc_buffer(substream);
}

static unsigned int get_cable_index(struct snd_pcm_substream *substream)
Expand Down Expand Up @@ -740,6 +741,8 @@ static struct snd_pcm_ops loopback_playback_ops = {
.prepare = loopback_prepare,
.trigger = loopback_trigger,
.pointer = loopback_pointer,
.page = snd_pcm_lib_get_vmalloc_page,
.mmap = snd_pcm_lib_mmap_vmalloc,
};

static struct snd_pcm_ops loopback_capture_ops = {
Expand All @@ -751,6 +754,8 @@ static struct snd_pcm_ops loopback_capture_ops = {
.prepare = loopback_prepare,
.trigger = loopback_trigger,
.pointer = loopback_pointer,
.page = snd_pcm_lib_get_vmalloc_page,
.mmap = snd_pcm_lib_mmap_vmalloc,
};

static int __devinit loopback_pcm_new(struct loopback *loopback,
Expand All @@ -771,10 +776,6 @@ static int __devinit loopback_pcm_new(struct loopback *loopback,
strcpy(pcm->name, "Loopback PCM");

loopback->pcm[device] = pcm;

snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_CONTINUOUS,
snd_dma_continuous_data(GFP_KERNEL),
0, 2 * 1024 * 1024);
return 0;
}

Expand Down

0 comments on commit 4ffb8ef

Please sign in to comment.