Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 65787
b: refs/heads/master
c: f6210c9
h: refs/heads/master
i:
  65785: 86e0f83
  65783: 53749ff
v: v3
  • Loading branch information
Trent Piepho authored and Mauro Carvalho Chehab committed Oct 10, 2007
1 parent 8b0dd44 commit 288859c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ffb7394d51cf6f60a3753a5cc40613fc9d5c5c96
refs/heads/master: f6210c9160dff82ceaaf5e59cf5f8fcd6bdefa38
14 changes: 14 additions & 0 deletions trunk/drivers/media/video/cx88/cx88-alsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <linux/init.h>
#include <linux/device.h>
#include <linux/interrupt.h>
#include <linux/vmalloc.h>
#include <linux/dma-mapping.h>
#include <linux/pci.h>

Expand Down Expand Up @@ -423,6 +424,8 @@ static int snd_cx88_hw_params(struct snd_pcm_substream * substream,
chip->dma_risc = buf->vb.dma;

substream->runtime->dma_area = chip->dma_risc.vmalloc;
substream->runtime->dma_bytes = chip->dma_size;
substream->runtime->dma_addr = 0;
return 0;

error:
Expand Down Expand Up @@ -499,6 +502,16 @@ static snd_pcm_uframes_t snd_cx88_pointer(struct snd_pcm_substream *substream)
return runtime->period_size * (count & (runtime->periods-1));
}

/*
* page callback (needed for mmap)
*/
static struct page *snd_cx88_page(struct snd_pcm_substream *substream,
unsigned long offset)
{
void *pageptr = substream->runtime->dma_area + offset;
return vmalloc_to_page(pageptr);
}

/*
* operators
*/
Expand All @@ -511,6 +524,7 @@ static struct snd_pcm_ops snd_cx88_pcm_ops = {
.prepare = snd_cx88_prepare,
.trigger = snd_cx88_card_trigger,
.pointer = snd_cx88_pointer,
.page = snd_cx88_page,
};

/*
Expand Down

0 comments on commit 288859c

Please sign in to comment.