Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 73160
b: refs/heads/master
c: 32d111a
h: refs/heads/master
v: v3
  • Loading branch information
Alexander E. Patrakov authored and Mauro Carvalho Chehab committed Nov 4, 2007
1 parent 6ab7be5 commit 94dc5bc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 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: f21daa41d19def8c0a1e9d9626f773447b8191f6
refs/heads/master: 32d111a9f0e6de901667612d1b0c46bbfd5d37cb
16 changes: 15 additions & 1 deletion trunk/drivers/media/video/saa7134/saa7134-alsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -543,8 +543,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;

}

Expand Down Expand Up @@ -651,6 +653,17 @@ static int snd_card_saa7134_capture_open(struct snd_pcm_substream * substream)
return 0;
}

/*
* 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
*/
Expand All @@ -664,6 +677,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,
};

/*
Expand Down

0 comments on commit 94dc5bc

Please sign in to comment.