summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/saa7134/saa7134-alsa.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-11-04 14:31:12 -0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-11-04 14:31:12 -0200
commit87a688a17ae8f82d48dd8833ed0eb29ecba1183c (patch)
treec65044f2d92ddab4fdb8d56bfda831307bde74a8 /linux/drivers/media/video/saa7134/saa7134-alsa.c
parent09569d7cdf845441f5d37be1a42c1ef0fe84a61d (diff)
parent1dbbdee4213114f49f8fe0d92a6daeba5c6f639f (diff)
downloadmediapointer-dvb-s2-87a688a17ae8f82d48dd8833ed0eb29ecba1183c.tar.gz
mediapointer-dvb-s2-87a688a17ae8f82d48dd8833ed0eb29ecba1183c.tar.bz2
merge: http://linuxtv.org/hg/~mkrufky/tda8295
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/saa7134/saa7134-alsa.c')
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-alsa.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/linux/drivers/media/video/saa7134/saa7134-alsa.c b/linux/drivers/media/video/saa7134/saa7134-alsa.c
index 9b557ab7c..a2ee5cf9c 100644
--- a/linux/drivers/media/video/saa7134/saa7134-alsa.c
+++ b/linux/drivers/media/video/saa7134/saa7134-alsa.c
@@ -557,8 +557,10 @@ static int snd_card_saa7134_hw_params(struct snd_pcm_substream * substream,
V4L functions, and force ALSA to use that as the DMA area */
substream->runtime->dma_area = dev->dmasound.dma.vmalloc;
+ substream->runtime->dma_bytes = dev->dmasound.bufsize;
+ substream->runtime->dma_addr = 0;
- return 1;
+ return 0;
}
@@ -666,6 +668,17 @@ static int snd_card_saa7134_capture_open(struct snd_pcm_substream * substream)
}
/*
+ * page callback (needed for mmap)
+ */
+
+static struct page *snd_card_saa7134_page(struct snd_pcm_substream *substream,
+ unsigned long offset)
+{
+ void *pageptr = substream->runtime->dma_area + offset;
+ return vmalloc_to_page(pageptr);
+}
+
+/*
* ALSA capture callbacks definition
*/
@@ -678,6 +691,7 @@ static struct snd_pcm_ops snd_card_saa7134_capture_ops = {
.prepare = snd_card_saa7134_capture_prepare,
.trigger = snd_card_saa7134_capture_trigger,
.pointer = snd_card_saa7134_capture_pointer,
+ .page = snd_card_saa7134_page,
};
/*