diff options
author | Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> | 2008-04-22 13:42:13 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-24 13:07:44 -0400 |
commit | 0705135e59f8503e4dade4b3580fed77b1743b7c (patch) | |
tree | 9ab28abeff6cb8ffa50e565204ed4394524d28d7 /drivers/media/video/saa7134/saa7134-alsa.c | |
parent | f13613acfb1a71895ac886dc831d6ae4e20e241a (diff) |
V4L/DVB (7237): Convert videobuf-dma-sg to generic DMA API
videobuf-dma-sg does not need to depend on PCI. Switch it to using generic
DMA API, convert all affected drivers, relax Kconfig restriction, improve
compile-time type checking, fix some Coding Style violations while at it.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
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.c | 10 |
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 505bc0a478af..048081be91fe 100644 --- a/drivers/media/video/saa7134/saa7134-alsa.c +++ b/drivers/media/video/saa7134/saa7134-alsa.c | |||
@@ -503,7 +503,7 @@ static int snd_card_saa7134_hw_params(struct snd_pcm_substream * substream, | |||
503 | /* release the old buffer */ | 503 | /* release the old buffer */ |
504 | if (substream->runtime->dma_area) { | 504 | if (substream->runtime->dma_area) { |
505 | saa7134_pgtable_free(dev->pci, &dev->dmasound.pt); | 505 | saa7134_pgtable_free(dev->pci, &dev->dmasound.pt); |
506 | videobuf_pci_dma_unmap(dev->pci, &dev->dmasound.dma); | 506 | videobuf_sg_dma_unmap(&dev->pci->dev, &dev->dmasound.dma); |
507 | dsp_buffer_free(dev); | 507 | dsp_buffer_free(dev); |
508 | substream->runtime->dma_area = NULL; | 508 | substream->runtime->dma_area = NULL; |
509 | } | 509 | } |
@@ -519,12 +519,12 @@ static int snd_card_saa7134_hw_params(struct snd_pcm_substream * substream, | |||
519 | return err; | 519 | return err; |
520 | } | 520 | } |
521 | 521 | ||
522 | if (0 != (err = videobuf_pci_dma_map(dev->pci, &dev->dmasound.dma))) { | 522 | if (0 != (err = videobuf_sg_dma_map(&dev->pci->dev, &dev->dmasound.dma))) { |
523 | dsp_buffer_free(dev); | 523 | dsp_buffer_free(dev); |
524 | return err; | 524 | return err; |
525 | } | 525 | } |
526 | if (0 != (err = saa7134_pgtable_alloc(dev->pci,&dev->dmasound.pt))) { | 526 | if (0 != (err = saa7134_pgtable_alloc(dev->pci,&dev->dmasound.pt))) { |
527 | videobuf_pci_dma_unmap(dev->pci, &dev->dmasound.dma); | 527 | videobuf_sg_dma_unmap(&dev->pci->dev, &dev->dmasound.dma); |
528 | dsp_buffer_free(dev); | 528 | dsp_buffer_free(dev); |
529 | return err; | 529 | return err; |
530 | } | 530 | } |
@@ -533,7 +533,7 @@ static int snd_card_saa7134_hw_params(struct snd_pcm_substream * substream, | |||
533 | dev->dmasound.dma.sglen, | 533 | dev->dmasound.dma.sglen, |
534 | 0))) { | 534 | 0))) { |
535 | saa7134_pgtable_free(dev->pci, &dev->dmasound.pt); | 535 | saa7134_pgtable_free(dev->pci, &dev->dmasound.pt); |
536 | videobuf_pci_dma_unmap(dev->pci, &dev->dmasound.dma); | 536 | videobuf_sg_dma_unmap(&dev->pci->dev, &dev->dmasound.dma); |
537 | dsp_buffer_free(dev); | 537 | dsp_buffer_free(dev); |
538 | return err; | 538 | return err; |
539 | } | 539 | } |
@@ -569,7 +569,7 @@ static int snd_card_saa7134_hw_free(struct snd_pcm_substream * substream) | |||
569 | 569 | ||
570 | if (substream->runtime->dma_area) { | 570 | if (substream->runtime->dma_area) { |
571 | saa7134_pgtable_free(dev->pci, &dev->dmasound.pt); | 571 | saa7134_pgtable_free(dev->pci, &dev->dmasound.pt); |
572 | videobuf_pci_dma_unmap(dev->pci, &dev->dmasound.dma); | 572 | videobuf_sg_dma_unmap(&dev->pci->dev, &dev->dmasound.dma); |
573 | dsp_buffer_free(dev); | 573 | dsp_buffer_free(dev); |
574 | substream->runtime->dma_area = NULL; | 574 | substream->runtime->dma_area = NULL; |
575 | } | 575 | } |