aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/cx88')
-rw-r--r--drivers/media/video/cx88/cx88-alsa.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/media/video/cx88/cx88-alsa.c b/drivers/media/video/cx88/cx88-alsa.c
index ac317fb856e4..85d632224f3a 100644
--- a/drivers/media/video/cx88/cx88-alsa.c
+++ b/drivers/media/video/cx88/cx88-alsa.c
@@ -28,6 +28,7 @@
28#include <linux/init.h> 28#include <linux/init.h>
29#include <linux/device.h> 29#include <linux/device.h>
30#include <linux/interrupt.h> 30#include <linux/interrupt.h>
31#include <linux/vmalloc.h>
31#include <linux/dma-mapping.h> 32#include <linux/dma-mapping.h>
32#include <linux/pci.h> 33#include <linux/pci.h>
33 34
@@ -423,6 +424,8 @@ static int snd_cx88_hw_params(struct snd_pcm_substream * substream,
423 chip->dma_risc = buf->vb.dma; 424 chip->dma_risc = buf->vb.dma;
424 425
425 substream->runtime->dma_area = chip->dma_risc.vmalloc; 426 substream->runtime->dma_area = chip->dma_risc.vmalloc;
427 substream->runtime->dma_bytes = chip->dma_size;
428 substream->runtime->dma_addr = 0;
426 return 0; 429 return 0;
427 430
428error: 431error:
@@ -500,6 +503,16 @@ static snd_pcm_uframes_t snd_cx88_pointer(struct snd_pcm_substream *substream)
500} 503}
501 504
502/* 505/*
506 * page callback (needed for mmap)
507 */
508static struct page *snd_cx88_page(struct snd_pcm_substream *substream,
509 unsigned long offset)
510{
511 void *pageptr = substream->runtime->dma_area + offset;
512 return vmalloc_to_page(pageptr);
513}
514
515/*
503 * operators 516 * operators
504 */ 517 */
505static struct snd_pcm_ops snd_cx88_pcm_ops = { 518static struct snd_pcm_ops snd_cx88_pcm_ops = {
@@ -511,6 +524,7 @@ static struct snd_pcm_ops snd_cx88_pcm_ops = {
511 .prepare = snd_cx88_prepare, 524 .prepare = snd_cx88_prepare,
512 .trigger = snd_cx88_card_trigger, 525 .trigger = snd_cx88_card_trigger,
513 .pointer = snd_cx88_pointer, 526 .pointer = snd_cx88_pointer,
527 .page = snd_cx88_page,
514}; 528};
515 529
516/* 530/*