diff options
-rw-r--r-- | drivers/media/video/saa7134/saa7134-alsa.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/media/video/saa7134/saa7134-alsa.c b/drivers/media/video/saa7134/saa7134-alsa.c index c6f7279669c1..b9c5cf7dc849 100644 --- a/drivers/media/video/saa7134/saa7134-alsa.c +++ b/drivers/media/video/saa7134/saa7134-alsa.c | |||
@@ -543,8 +543,10 @@ static int snd_card_saa7134_hw_params(struct snd_pcm_substream * substream, | |||
543 | V4L functions, and force ALSA to use that as the DMA area */ | 543 | V4L functions, and force ALSA to use that as the DMA area */ |
544 | 544 | ||
545 | substream->runtime->dma_area = dev->dmasound.dma.vmalloc; | 545 | substream->runtime->dma_area = dev->dmasound.dma.vmalloc; |
546 | substream->runtime->dma_bytes = dev->dmasound.bufsize; | ||
547 | substream->runtime->dma_addr = 0; | ||
546 | 548 | ||
547 | return 1; | 549 | return 0; |
548 | 550 | ||
549 | } | 551 | } |
550 | 552 | ||
@@ -652,6 +654,17 @@ static int snd_card_saa7134_capture_open(struct snd_pcm_substream * substream) | |||
652 | } | 654 | } |
653 | 655 | ||
654 | /* | 656 | /* |
657 | * page callback (needed for mmap) | ||
658 | */ | ||
659 | |||
660 | static struct page *snd_card_saa7134_page(struct snd_pcm_substream *substream, | ||
661 | unsigned long offset) | ||
662 | { | ||
663 | void *pageptr = substream->runtime->dma_area + offset; | ||
664 | return vmalloc_to_page(pageptr); | ||
665 | } | ||
666 | |||
667 | /* | ||
655 | * ALSA capture callbacks definition | 668 | * ALSA capture callbacks definition |
656 | */ | 669 | */ |
657 | 670 | ||
@@ -664,6 +677,7 @@ static struct snd_pcm_ops snd_card_saa7134_capture_ops = { | |||
664 | .prepare = snd_card_saa7134_capture_prepare, | 677 | .prepare = snd_card_saa7134_capture_prepare, |
665 | .trigger = snd_card_saa7134_capture_trigger, | 678 | .trigger = snd_card_saa7134_capture_trigger, |
666 | .pointer = snd_card_saa7134_capture_pointer, | 679 | .pointer = snd_card_saa7134_capture_pointer, |
680 | .page = snd_card_saa7134_page, | ||
667 | }; | 681 | }; |
668 | 682 | ||
669 | /* | 683 | /* |