diff options
Diffstat (limited to 'drivers/media/video/saa7134')
-rw-r--r-- | drivers/media/video/saa7134/saa7134-alsa.c | 10 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-core.c | 6 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-oss.c | 6 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-ts.c | 9 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-tvaudio.c | 2 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-vbi.c | 10 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-video.c | 9 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134.h | 3 |
8 files changed, 26 insertions, 29 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 | } |
diff --git a/drivers/media/video/saa7134/saa7134-core.c b/drivers/media/video/saa7134/saa7134-core.c index 58e568d7d2ee..c98571c9d5a6 100644 --- a/drivers/media/video/saa7134/saa7134-core.c +++ b/drivers/media/video/saa7134/saa7134-core.c | |||
@@ -254,12 +254,12 @@ void saa7134_pgtable_free(struct pci_dev *pci, struct saa7134_pgtable *pt) | |||
254 | 254 | ||
255 | /* ------------------------------------------------------------------ */ | 255 | /* ------------------------------------------------------------------ */ |
256 | 256 | ||
257 | void saa7134_dma_free(struct saa7134_dev *dev,struct saa7134_buf *buf) | 257 | void saa7134_dma_free(struct videobuf_queue *q,struct saa7134_buf *buf) |
258 | { | 258 | { |
259 | BUG_ON(in_interrupt()); | 259 | BUG_ON(in_interrupt()); |
260 | 260 | ||
261 | videobuf_waiton(&buf->vb,0,0); | 261 | videobuf_waiton(&buf->vb,0,0); |
262 | videobuf_dma_pci_unmap(dev->pci, &buf->vb.dma); | 262 | videobuf_dma_unmap(q, &buf->vb.dma); |
263 | videobuf_dma_free(&buf->vb.dma); | 263 | videobuf_dma_free(&buf->vb.dma); |
264 | buf->vb.state = STATE_NEEDS_INIT; | 264 | buf->vb.state = STATE_NEEDS_INIT; |
265 | } | 265 | } |
@@ -960,7 +960,7 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev, | |||
960 | if (saa7134_no_overlay <= 0) { | 960 | if (saa7134_no_overlay <= 0) { |
961 | saa7134_video_template.type |= VID_TYPE_OVERLAY; | 961 | saa7134_video_template.type |= VID_TYPE_OVERLAY; |
962 | } else { | 962 | } else { |
963 | printk("bttv: Overlay support disabled.\n"); | 963 | printk("%s: Overlay support disabled.\n",dev->name); |
964 | } | 964 | } |
965 | dev->video_dev = vdev_init(dev,&saa7134_video_template,"video"); | 965 | dev->video_dev = vdev_init(dev,&saa7134_video_template,"video"); |
966 | err = video_register_device(dev->video_dev,VFL_TYPE_GRABBER, | 966 | err = video_register_device(dev->video_dev,VFL_TYPE_GRABBER, |
diff --git a/drivers/media/video/saa7134/saa7134-oss.c b/drivers/media/video/saa7134/saa7134-oss.c index d79d05f88705..7aa02b34e012 100644 --- a/drivers/media/video/saa7134/saa7134-oss.c +++ b/drivers/media/video/saa7134/saa7134-oss.c | |||
@@ -124,7 +124,7 @@ static int dsp_rec_start(struct saa7134_dev *dev) | |||
124 | unsigned long flags; | 124 | unsigned long flags; |
125 | 125 | ||
126 | /* prepare buffer */ | 126 | /* prepare buffer */ |
127 | if (0 != (err = videobuf_dma_pci_map(dev->pci,&dev->dmasound.dma))) | 127 | if (0 != (err = videobuf_pci_dma_map(dev->pci,&dev->dmasound.dma))) |
128 | return err; | 128 | return err; |
129 | if (0 != (err = saa7134_pgtable_alloc(dev->pci,&dev->dmasound.pt))) | 129 | if (0 != (err = saa7134_pgtable_alloc(dev->pci,&dev->dmasound.pt))) |
130 | goto fail1; | 130 | goto fail1; |
@@ -213,7 +213,7 @@ static int dsp_rec_start(struct saa7134_dev *dev) | |||
213 | fail2: | 213 | fail2: |
214 | saa7134_pgtable_free(dev->pci,&dev->dmasound.pt); | 214 | saa7134_pgtable_free(dev->pci,&dev->dmasound.pt); |
215 | fail1: | 215 | fail1: |
216 | videobuf_dma_pci_unmap(dev->pci,&dev->dmasound.dma); | 216 | videobuf_pci_dma_unmap(dev->pci,&dev->dmasound.dma); |
217 | return err; | 217 | return err; |
218 | } | 218 | } |
219 | 219 | ||
@@ -231,7 +231,7 @@ static int dsp_rec_stop(struct saa7134_dev *dev) | |||
231 | 231 | ||
232 | /* unlock buffer */ | 232 | /* unlock buffer */ |
233 | saa7134_pgtable_free(dev->pci,&dev->dmasound.pt); | 233 | saa7134_pgtable_free(dev->pci,&dev->dmasound.pt); |
234 | videobuf_dma_pci_unmap(dev->pci,&dev->dmasound.dma); | 234 | videobuf_pci_dma_unmap(dev->pci,&dev->dmasound.dma); |
235 | return 0; | 235 | return 0; |
236 | } | 236 | } |
237 | 237 | ||
diff --git a/drivers/media/video/saa7134/saa7134-ts.c b/drivers/media/video/saa7134/saa7134-ts.c index 470903e2f5e5..60a90a2617ae 100644 --- a/drivers/media/video/saa7134/saa7134-ts.c +++ b/drivers/media/video/saa7134/saa7134-ts.c | |||
@@ -89,7 +89,7 @@ static int buffer_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb, | |||
89 | return -EINVAL; | 89 | return -EINVAL; |
90 | 90 | ||
91 | if (buf->vb.size != size) { | 91 | if (buf->vb.size != size) { |
92 | saa7134_dma_free(dev,buf); | 92 | saa7134_dma_free(q,buf); |
93 | } | 93 | } |
94 | 94 | ||
95 | if (STATE_NEEDS_INIT == buf->vb.state) { | 95 | if (STATE_NEEDS_INIT == buf->vb.state) { |
@@ -98,7 +98,7 @@ static int buffer_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb, | |||
98 | buf->vb.size = size; | 98 | buf->vb.size = size; |
99 | buf->pt = &dev->ts.pt_ts; | 99 | buf->pt = &dev->ts.pt_ts; |
100 | 100 | ||
101 | err = videobuf_iolock(dev->pci,&buf->vb,NULL); | 101 | err = videobuf_iolock(q,&buf->vb,NULL); |
102 | if (err) | 102 | if (err) |
103 | goto oops; | 103 | goto oops; |
104 | err = saa7134_pgtable_build(dev->pci,buf->pt, | 104 | err = saa7134_pgtable_build(dev->pci,buf->pt, |
@@ -126,7 +126,7 @@ static int buffer_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb, | |||
126 | return 0; | 126 | return 0; |
127 | 127 | ||
128 | oops: | 128 | oops: |
129 | saa7134_dma_free(dev,buf); | 129 | saa7134_dma_free(q,buf); |
130 | return err; | 130 | return err; |
131 | } | 131 | } |
132 | 132 | ||
@@ -152,10 +152,9 @@ static void buffer_queue(struct videobuf_queue *q, struct videobuf_buffer *vb) | |||
152 | 152 | ||
153 | static void buffer_release(struct videobuf_queue *q, struct videobuf_buffer *vb) | 153 | static void buffer_release(struct videobuf_queue *q, struct videobuf_buffer *vb) |
154 | { | 154 | { |
155 | struct saa7134_dev *dev = q->priv_data; | ||
156 | struct saa7134_buf *buf = container_of(vb,struct saa7134_buf,vb); | 155 | struct saa7134_buf *buf = container_of(vb,struct saa7134_buf,vb); |
157 | 156 | ||
158 | saa7134_dma_free(dev,buf); | 157 | saa7134_dma_free(q,buf); |
159 | } | 158 | } |
160 | 159 | ||
161 | struct videobuf_queue_ops saa7134_ts_qops = { | 160 | struct videobuf_queue_ops saa7134_ts_qops = { |
diff --git a/drivers/media/video/saa7134/saa7134-tvaudio.c b/drivers/media/video/saa7134/saa7134-tvaudio.c index 3043233a8b6e..0db53d192b2a 100644 --- a/drivers/media/video/saa7134/saa7134-tvaudio.c +++ b/drivers/media/video/saa7134/saa7134-tvaudio.c | |||
@@ -482,12 +482,14 @@ static int tvaudio_setstereo(struct saa7134_dev *dev, struct saa7134_tvaudio *au | |||
482 | [ V4L2_TUNER_MODE_STEREO ] = "stereo", | 482 | [ V4L2_TUNER_MODE_STEREO ] = "stereo", |
483 | [ V4L2_TUNER_MODE_LANG1 ] = "lang1", | 483 | [ V4L2_TUNER_MODE_LANG1 ] = "lang1", |
484 | [ V4L2_TUNER_MODE_LANG2 ] = "lang2", | 484 | [ V4L2_TUNER_MODE_LANG2 ] = "lang2", |
485 | [ V4L2_TUNER_MODE_LANG1_LANG2 ] = "lang1+lang2", | ||
485 | }; | 486 | }; |
486 | static u32 fm[] = { | 487 | static u32 fm[] = { |
487 | [ V4L2_TUNER_MODE_MONO ] = 0x00, /* ch1 */ | 488 | [ V4L2_TUNER_MODE_MONO ] = 0x00, /* ch1 */ |
488 | [ V4L2_TUNER_MODE_STEREO ] = 0x80, /* auto */ | 489 | [ V4L2_TUNER_MODE_STEREO ] = 0x80, /* auto */ |
489 | [ V4L2_TUNER_MODE_LANG1 ] = 0x00, /* ch1 */ | 490 | [ V4L2_TUNER_MODE_LANG1 ] = 0x00, /* ch1 */ |
490 | [ V4L2_TUNER_MODE_LANG2 ] = 0x01, /* ch2 */ | 491 | [ V4L2_TUNER_MODE_LANG2 ] = 0x01, /* ch2 */ |
492 | [ V4L2_TUNER_MODE_LANG1_LANG2 ] = 0x80, /* auto */ | ||
491 | }; | 493 | }; |
492 | u32 reg; | 494 | u32 reg; |
493 | 495 | ||
diff --git a/drivers/media/video/saa7134/saa7134-vbi.c b/drivers/media/video/saa7134/saa7134-vbi.c index f4aee0af80e1..f38366a470fa 100644 --- a/drivers/media/video/saa7134/saa7134-vbi.c +++ b/drivers/media/video/saa7134/saa7134-vbi.c | |||
@@ -135,7 +135,7 @@ static int buffer_prepare(struct videobuf_queue *q, | |||
135 | return -EINVAL; | 135 | return -EINVAL; |
136 | 136 | ||
137 | if (buf->vb.size != size) | 137 | if (buf->vb.size != size) |
138 | saa7134_dma_free(dev,buf); | 138 | saa7134_dma_free(q,buf); |
139 | 139 | ||
140 | if (STATE_NEEDS_INIT == buf->vb.state) { | 140 | if (STATE_NEEDS_INIT == buf->vb.state) { |
141 | buf->vb.width = llength; | 141 | buf->vb.width = llength; |
@@ -143,7 +143,7 @@ static int buffer_prepare(struct videobuf_queue *q, | |||
143 | buf->vb.size = size; | 143 | buf->vb.size = size; |
144 | buf->pt = &fh->pt_vbi; | 144 | buf->pt = &fh->pt_vbi; |
145 | 145 | ||
146 | err = videobuf_iolock(dev->pci,&buf->vb,NULL); | 146 | err = videobuf_iolock(q,&buf->vb,NULL); |
147 | if (err) | 147 | if (err) |
148 | goto oops; | 148 | goto oops; |
149 | err = saa7134_pgtable_build(dev->pci,buf->pt, | 149 | err = saa7134_pgtable_build(dev->pci,buf->pt, |
@@ -159,7 +159,7 @@ static int buffer_prepare(struct videobuf_queue *q, | |||
159 | return 0; | 159 | return 0; |
160 | 160 | ||
161 | oops: | 161 | oops: |
162 | saa7134_dma_free(dev,buf); | 162 | saa7134_dma_free(q,buf); |
163 | return err; | 163 | return err; |
164 | } | 164 | } |
165 | 165 | ||
@@ -190,11 +190,9 @@ static void buffer_queue(struct videobuf_queue *q, struct videobuf_buffer *vb) | |||
190 | 190 | ||
191 | static void buffer_release(struct videobuf_queue *q, struct videobuf_buffer *vb) | 191 | static void buffer_release(struct videobuf_queue *q, struct videobuf_buffer *vb) |
192 | { | 192 | { |
193 | struct saa7134_fh *fh = q->priv_data; | ||
194 | struct saa7134_dev *dev = fh->dev; | ||
195 | struct saa7134_buf *buf = container_of(vb,struct saa7134_buf,vb); | 193 | struct saa7134_buf *buf = container_of(vb,struct saa7134_buf,vb); |
196 | 194 | ||
197 | saa7134_dma_free(dev,buf); | 195 | saa7134_dma_free(q,buf); |
198 | } | 196 | } |
199 | 197 | ||
200 | struct videobuf_queue_ops saa7134_vbi_qops = { | 198 | struct videobuf_queue_ops saa7134_vbi_qops = { |
diff --git a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c index 57a11e71d996..aeef80f88a6b 100644 --- a/drivers/media/video/saa7134/saa7134-video.c +++ b/drivers/media/video/saa7134/saa7134-video.c | |||
@@ -993,7 +993,7 @@ static int buffer_prepare(struct videobuf_queue *q, | |||
993 | buf->vb.size != size || | 993 | buf->vb.size != size || |
994 | buf->vb.field != field || | 994 | buf->vb.field != field || |
995 | buf->fmt != fh->fmt) { | 995 | buf->fmt != fh->fmt) { |
996 | saa7134_dma_free(dev,buf); | 996 | saa7134_dma_free(q,buf); |
997 | } | 997 | } |
998 | 998 | ||
999 | if (STATE_NEEDS_INIT == buf->vb.state) { | 999 | if (STATE_NEEDS_INIT == buf->vb.state) { |
@@ -1004,7 +1004,7 @@ static int buffer_prepare(struct videobuf_queue *q, | |||
1004 | buf->fmt = fh->fmt; | 1004 | buf->fmt = fh->fmt; |
1005 | buf->pt = &fh->pt_cap; | 1005 | buf->pt = &fh->pt_cap; |
1006 | 1006 | ||
1007 | err = videobuf_iolock(dev->pci,&buf->vb,&dev->ovbuf); | 1007 | err = videobuf_iolock(q,&buf->vb,&dev->ovbuf); |
1008 | if (err) | 1008 | if (err) |
1009 | goto oops; | 1009 | goto oops; |
1010 | err = saa7134_pgtable_build(dev->pci,buf->pt, | 1010 | err = saa7134_pgtable_build(dev->pci,buf->pt, |
@@ -1019,7 +1019,7 @@ static int buffer_prepare(struct videobuf_queue *q, | |||
1019 | return 0; | 1019 | return 0; |
1020 | 1020 | ||
1021 | oops: | 1021 | oops: |
1022 | saa7134_dma_free(dev,buf); | 1022 | saa7134_dma_free(q,buf); |
1023 | return err; | 1023 | return err; |
1024 | } | 1024 | } |
1025 | 1025 | ||
@@ -1045,10 +1045,9 @@ static void buffer_queue(struct videobuf_queue *q, struct videobuf_buffer *vb) | |||
1045 | 1045 | ||
1046 | static void buffer_release(struct videobuf_queue *q, struct videobuf_buffer *vb) | 1046 | static void buffer_release(struct videobuf_queue *q, struct videobuf_buffer *vb) |
1047 | { | 1047 | { |
1048 | struct saa7134_fh *fh = q->priv_data; | ||
1049 | struct saa7134_buf *buf = container_of(vb,struct saa7134_buf,vb); | 1048 | struct saa7134_buf *buf = container_of(vb,struct saa7134_buf,vb); |
1050 | 1049 | ||
1051 | saa7134_dma_free(fh->dev,buf); | 1050 | saa7134_dma_free(q,buf); |
1052 | } | 1051 | } |
1053 | 1052 | ||
1054 | static struct videobuf_queue_ops video_qops = { | 1053 | static struct videobuf_queue_ops video_qops = { |
diff --git a/drivers/media/video/saa7134/saa7134.h b/drivers/media/video/saa7134/saa7134.h index ce1c2e0b065e..31ba293854c1 100644 --- a/drivers/media/video/saa7134/saa7134.h +++ b/drivers/media/video/saa7134/saa7134.h | |||
@@ -34,7 +34,6 @@ | |||
34 | #include <asm/io.h> | 34 | #include <asm/io.h> |
35 | 35 | ||
36 | #include <media/tuner.h> | 36 | #include <media/tuner.h> |
37 | #include <media/audiochip.h> | ||
38 | #include <media/ir-common.h> | 37 | #include <media/ir-common.h> |
39 | #include <media/ir-kbd-i2c.h> | 38 | #include <media/ir-kbd-i2c.h> |
40 | #include <media/video-buf.h> | 39 | #include <media/video-buf.h> |
@@ -579,7 +578,7 @@ void saa7134_buffer_finish(struct saa7134_dev *dev, struct saa7134_dmaqueue *q, | |||
579 | unsigned int state); | 578 | unsigned int state); |
580 | void saa7134_buffer_next(struct saa7134_dev *dev, struct saa7134_dmaqueue *q); | 579 | void saa7134_buffer_next(struct saa7134_dev *dev, struct saa7134_dmaqueue *q); |
581 | void saa7134_buffer_timeout(unsigned long data); | 580 | void saa7134_buffer_timeout(unsigned long data); |
582 | void saa7134_dma_free(struct saa7134_dev *dev,struct saa7134_buf *buf); | 581 | void saa7134_dma_free(struct videobuf_queue *q,struct saa7134_buf *buf); |
583 | 582 | ||
584 | int saa7134_set_dmabits(struct saa7134_dev *dev); | 583 | int saa7134_set_dmabits(struct saa7134_dev *dev); |
585 | 584 | ||