aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7134/saa7134-alsa.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2006-03-10 10:29:15 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-03-24 14:26:49 -0500
commitc7b0ac0546985fc6361a8d92cf808d46da797677 (patch)
tree2147eb2f6dd7b2b82e0d7b4b9a26e12ef5193252 /drivers/media/video/saa7134/saa7134-alsa.c
parentb2fd16b4ff2508ac16ae994f4bcd941f97754c00 (diff)
V4L/DVB (3516): Make video_buf more generic
Video_buf were concerned to allow PCI devices to be used as video capture devices. This patch extends video_buf features by virtualizing pci-dependent functions and allowing other type of devices to use it. It is still DMA centric, although it may be used also by devices that emulates scatter/gather behavior or a DMA device Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/saa7134/saa7134-alsa.c')
-rw-r--r--drivers/media/video/saa7134/saa7134-alsa.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/media/video/saa7134/saa7134-alsa.c b/drivers/media/video/saa7134/saa7134-alsa.c
index aca84d2f9825..bb3e0ba946d3 100644
--- a/drivers/media/video/saa7134/saa7134-alsa.c
+++ b/drivers/media/video/saa7134/saa7134-alsa.c
@@ -507,7 +507,7 @@ static int snd_card_saa7134_hw_params(struct snd_pcm_substream * substream,
507 /* release the old buffer */ 507 /* release the old buffer */
508 if (substream->runtime->dma_area) { 508 if (substream->runtime->dma_area) {
509 saa7134_pgtable_free(dev->pci, &dev->dmasound.pt); 509 saa7134_pgtable_free(dev->pci, &dev->dmasound.pt);
510 videobuf_dma_pci_unmap(dev->pci, &dev->dmasound.dma); 510 videobuf_pci_dma_unmap(dev->pci, &dev->dmasound.dma);
511 dsp_buffer_free(dev); 511 dsp_buffer_free(dev);
512 substream->runtime->dma_area = NULL; 512 substream->runtime->dma_area = NULL;
513 } 513 }
@@ -523,12 +523,12 @@ static int snd_card_saa7134_hw_params(struct snd_pcm_substream * substream,
523 return err; 523 return err;
524 } 524 }
525 525
526 if (0 != (err = videobuf_dma_pci_map(dev->pci, &dev->dmasound.dma))) { 526 if (0 != (err = videobuf_pci_dma_map(dev->pci, &dev->dmasound.dma))) {
527 dsp_buffer_free(dev); 527 dsp_buffer_free(dev);
528 return err; 528 return err;
529 } 529 }
530 if (0 != (err = saa7134_pgtable_alloc(dev->pci,&dev->dmasound.pt))) { 530 if (0 != (err = saa7134_pgtable_alloc(dev->pci,&dev->dmasound.pt))) {
531 videobuf_dma_pci_unmap(dev->pci, &dev->dmasound.dma); 531 videobuf_pci_dma_unmap(dev->pci, &dev->dmasound.dma);
532 dsp_buffer_free(dev); 532 dsp_buffer_free(dev);
533 return err; 533 return err;
534 } 534 }
@@ -537,7 +537,7 @@ static int snd_card_saa7134_hw_params(struct snd_pcm_substream * substream,
537 dev->dmasound.dma.sglen, 537 dev->dmasound.dma.sglen,
538 0))) { 538 0))) {
539 saa7134_pgtable_free(dev->pci, &dev->dmasound.pt); 539 saa7134_pgtable_free(dev->pci, &dev->dmasound.pt);
540 videobuf_dma_pci_unmap(dev->pci, &dev->dmasound.dma); 540 videobuf_pci_dma_unmap(dev->pci, &dev->dmasound.dma);
541 dsp_buffer_free(dev); 541 dsp_buffer_free(dev);
542 return err; 542 return err;
543 } 543 }
@@ -571,7 +571,7 @@ static int snd_card_saa7134_hw_free(struct snd_pcm_substream * substream)
571 571
572 if (substream->runtime->dma_area) { 572 if (substream->runtime->dma_area) {
573 saa7134_pgtable_free(dev->pci, &dev->dmasound.pt); 573 saa7134_pgtable_free(dev->pci, &dev->dmasound.pt);
574 videobuf_dma_pci_unmap(dev->pci, &dev->dmasound.dma); 574 videobuf_pci_dma_unmap(dev->pci, &dev->dmasound.dma);
575 dsp_buffer_free(dev); 575 dsp_buffer_free(dev);
576 substream->runtime->dma_area = NULL; 576 substream->runtime->dma_area = NULL;
577 } 577 }