aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88/cx88-video.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/cx88/cx88-video.c')
-rw-r--r--drivers/media/video/cx88/cx88-video.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c
index 48c450f4a85a..0fab65c3ab39 100644
--- a/drivers/media/video/cx88/cx88-video.c
+++ b/drivers/media/video/cx88/cx88-video.c
@@ -426,12 +426,13 @@ int cx88_video_mux(struct cx88_core *core, unsigned int input)
426 if (core->board.audio_chip && 426 if (core->board.audio_chip &&
427 core->board.audio_chip == V4L2_IDENT_WM8775) { 427 core->board.audio_chip == V4L2_IDENT_WM8775) {
428 call_all(core, audio, s_routing, 428 call_all(core, audio, s_routing,
429 INPUT(input).audioroute, 0, 0); 429 INPUT(input).audioroute, 0, 0);
430 } 430 }
431 /* cx2388's C-ADC is connected to the tuner only. 431 /* cx2388's C-ADC is connected to the tuner only.
432 When used with S-Video, that ADC is busy dealing with 432 When used with S-Video, that ADC is busy dealing with
433 chroma, so an external must be used for baseband audio */ 433 chroma, so an external must be used for baseband audio */
434 if (INPUT(input).type != CX88_VMUX_TELEVISION ) { 434 if (INPUT(input).type != CX88_VMUX_TELEVISION &&
435 INPUT(input).type != CX88_VMUX_CABLE) {
435 /* "I2S ADC mode" */ 436 /* "I2S ADC mode" */
436 core->tvaudio = WW_I2SADC; 437 core->tvaudio = WW_I2SADC;
437 cx88_set_tvaudio(core); 438 cx88_set_tvaudio(core);
@@ -561,8 +562,8 @@ buffer_setup(struct videobuf_queue *q, unsigned int *count, unsigned int *size)
561 *size = fh->fmt->depth*fh->width*fh->height >> 3; 562 *size = fh->fmt->depth*fh->width*fh->height >> 3;
562 if (0 == *count) 563 if (0 == *count)
563 *count = 32; 564 *count = 32;
564 while (*size * *count > vid_limit * 1024 * 1024) 565 if (*size * *count > vid_limit * 1024 * 1024)
565 (*count)--; 566 *count = (vid_limit * 1024 * 1024) / *size;
566 return 0; 567 return 0;
567} 568}
568 569
@@ -1537,9 +1538,12 @@ static int radio_queryctrl (struct file *file, void *priv,
1537 c->id >= V4L2_CID_LASTP1) 1538 c->id >= V4L2_CID_LASTP1)
1538 return -EINVAL; 1539 return -EINVAL;
1539 if (c->id == V4L2_CID_AUDIO_MUTE) { 1540 if (c->id == V4L2_CID_AUDIO_MUTE) {
1540 for (i = 0; i < CX8800_CTLS; i++) 1541 for (i = 0; i < CX8800_CTLS; i++) {
1541 if (cx8800_ctls[i].v.id == c->id) 1542 if (cx8800_ctls[i].v.id == c->id)
1542 break; 1543 break;
1544 }
1545 if (i == CX8800_CTLS)
1546 return -EINVAL;
1543 *c = cx8800_ctls[i].v; 1547 *c = cx8800_ctls[i].v;
1544 } else 1548 } else
1545 *c = no_ctl; 1549 *c = no_ctl;
@@ -1977,7 +1981,7 @@ static void __devexit cx8800_finidev(struct pci_dev *pci_dev)
1977 } 1981 }
1978 1982
1979 if (core->ir) 1983 if (core->ir)
1980 cx88_ir_stop(core, core->ir); 1984 cx88_ir_stop(core);
1981 1985
1982 cx88_shutdown(core); /* FIXME */ 1986 cx88_shutdown(core); /* FIXME */
1983 pci_disable_device(pci_dev); 1987 pci_disable_device(pci_dev);
@@ -2015,7 +2019,7 @@ static int cx8800_suspend(struct pci_dev *pci_dev, pm_message_t state)
2015 spin_unlock(&dev->slock); 2019 spin_unlock(&dev->slock);
2016 2020
2017 if (core->ir) 2021 if (core->ir)
2018 cx88_ir_stop(core, core->ir); 2022 cx88_ir_stop(core);
2019 /* FIXME -- shutdown device */ 2023 /* FIXME -- shutdown device */
2020 cx88_shutdown(core); 2024 cx88_shutdown(core);
2021 2025
@@ -2056,7 +2060,7 @@ static int cx8800_resume(struct pci_dev *pci_dev)
2056 /* FIXME: re-initialize hardware */ 2060 /* FIXME: re-initialize hardware */
2057 cx88_reset(core); 2061 cx88_reset(core);
2058 if (core->ir) 2062 if (core->ir)
2059 cx88_ir_start(core, core->ir); 2063 cx88_ir_start(core);
2060 2064
2061 cx_set(MO_PCI_INTMSK, core->pci_irqmask); 2065 cx_set(MO_PCI_INTMSK, core->pci_irqmask);
2062 2066