aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88/cx88-video.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@brturbo.com.br>2005-07-07 20:58:36 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-07 21:24:03 -0400
commita82decf64d34e79a0cc622997866c754350f18f8 (patch)
tree7841c828bdd03cc476067bf1f9b192613f111ae0 /drivers/media/video/cx88/cx88-video.c
parenta2f552f5edc13e18b75f11fb1b08bbcad67fd362 (diff)
[PATCH] v4l: cx88 update
- Add support for ADS Tech Instant TV DVB-T PCI. - Remove obsoleted config options. - Fix DViCO Board names - Remove CABLE type setting from DViCO FusionHDTV3 Gold-T. - Fix compilation with gcc4.0. - V4L2_TUNER_CAP_LOW implemented according with V4L2 API for Radio. - radio range is now defined on tuner-core.c. Cleaning up. - Fix a bug on frequency report for cx88 based cards. - Added support for changing radio mode stereo/mono. - Add remove for MSI TV@nywhere. Signed-off-by: Jorik Jonker <jorik@dnd.utwente.nl>. Signed-off-by: Didier Caillaud <mailing.cld@free.fr> Signed-off-by: Benoit Laniel <benoit.laniel@gmail.com>. Signed-off-by: Nickolay V Shmyrev <nshmyrev@yandex.ru> Signed-off-by: Michael Krufky <mkrufky@m1k.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media/video/cx88/cx88-video.c')
-rw-r--r--drivers/media/video/cx88/cx88-video.c57
1 files changed, 28 insertions, 29 deletions
diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c
index e4ca7350df15..cd5c2615d8c5 100644
--- a/drivers/media/video/cx88/cx88-video.c
+++ b/drivers/media/video/cx88/cx88-video.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * $Id: cx88-video.c,v 1.63 2005/06/12 04:19:19 mchehab Exp $ 2 * $Id: cx88-video.c,v 1.70 2005/06/20 03:36:00 mkrufky Exp $
3 * 3 *
4 * device driver for Conexant 2388x based TV cards 4 * device driver for Conexant 2388x based TV cards
5 * video4linux video interface 5 * video4linux video interface
@@ -1351,9 +1351,6 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
1351 V4L2_CAP_STREAMING | 1351 V4L2_CAP_STREAMING |
1352 V4L2_CAP_VBI_CAPTURE | 1352 V4L2_CAP_VBI_CAPTURE |
1353#if 0 1353#if 0
1354 V4L2_TUNER_CAP_LOW |
1355#endif
1356#if 0
1357 V4L2_CAP_VIDEO_OVERLAY | 1354 V4L2_CAP_VIDEO_OVERLAY |
1358#endif 1355#endif
1359 0; 1356 0;
@@ -1475,7 +1472,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
1475 } 1472 }
1476 break; 1473 break;
1477 case 1: 1474 case 1:
1478 if (CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD == core->board) { 1475 if (CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q == core->board) {
1479 strcpy(a->name,"Line In"); 1476 strcpy(a->name,"Line In");
1480 a->capability = V4L2_AUDCAP_STEREO; 1477 a->capability = V4L2_AUDCAP_STEREO;
1481 return 0; 1478 return 0;
@@ -1588,11 +1585,11 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
1588 { 1585 {
1589 struct v4l2_frequency *f = arg; 1586 struct v4l2_frequency *f = arg;
1590 1587
1588 memset(f,0,sizeof(*f));
1589
1591 if (UNSET == core->tuner_type) 1590 if (UNSET == core->tuner_type)
1592 return -EINVAL; 1591 return -EINVAL;
1593 if (f->tuner != 0) 1592
1594 return -EINVAL;
1595 memset(f,0,sizeof(*f));
1596 f->type = fh->radio ? V4L2_TUNER_RADIO : V4L2_TUNER_ANALOG_TV; 1593 f->type = fh->radio ? V4L2_TUNER_RADIO : V4L2_TUNER_ANALOG_TV;
1597 f->frequency = dev->freq; 1594 f->frequency = dev->freq;
1598 return 0; 1595 return 0;
@@ -1612,11 +1609,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
1612 down(&dev->lock); 1609 down(&dev->lock);
1613 dev->freq = f->frequency; 1610 dev->freq = f->frequency;
1614 cx88_newstation(core); 1611 cx88_newstation(core);
1615#ifdef V4L2_I2C_CLIENTS
1616 cx88_call_i2c_clients(dev->core,VIDIOC_S_FREQUENCY,f); 1612 cx88_call_i2c_clients(dev->core,VIDIOC_S_FREQUENCY,f);
1617#else
1618 cx88_call_i2c_clients(dev->core,VIDIOCSFREQ,&dev->freq);
1619#endif
1620 up(&dev->lock); 1613 up(&dev->lock);
1621 return 0; 1614 return 0;
1622 } 1615 }
@@ -1714,11 +1707,7 @@ static int radio_do_ioctl(struct inode *inode, struct file *file,
1714 sizeof(cap->card)); 1707 sizeof(cap->card));
1715 sprintf(cap->bus_info,"PCI:%s", pci_name(dev->pci)); 1708 sprintf(cap->bus_info,"PCI:%s", pci_name(dev->pci));
1716 cap->version = CX88_VERSION_CODE; 1709 cap->version = CX88_VERSION_CODE;
1717 cap->capabilities = V4L2_CAP_TUNER 1710 cap->capabilities = V4L2_CAP_TUNER;
1718#if 0
1719 | V4L2_TUNER_CAP_LOW
1720#endif
1721 ;
1722 return 0; 1711 return 0;
1723 } 1712 }
1724 case VIDIOC_G_TUNER: 1713 case VIDIOC_G_TUNER:
@@ -1730,19 +1719,8 @@ static int radio_do_ioctl(struct inode *inode, struct file *file,
1730 1719
1731 memset(t,0,sizeof(*t)); 1720 memset(t,0,sizeof(*t));
1732 strcpy(t->name, "Radio"); 1721 strcpy(t->name, "Radio");
1733 t->rangelow = (int)(65*16);
1734 t->rangehigh = (int)(108*16);
1735 1722
1736#ifdef V4L2_I2C_CLIENTS
1737 cx88_call_i2c_clients(dev->core,VIDIOC_G_TUNER,t); 1723 cx88_call_i2c_clients(dev->core,VIDIOC_G_TUNER,t);
1738#else
1739 {
1740 struct video_tuner vt;
1741 memset(&vt,0,sizeof(vt));
1742 cx88_call_i2c_clients(dev,VIDIOCGTUNER,&vt);
1743 t->signal = vt.signal;
1744 }
1745#endif
1746 return 0; 1724 return 0;
1747 } 1725 }
1748 case VIDIOC_ENUMINPUT: 1726 case VIDIOC_ENUMINPUT:
@@ -1775,8 +1753,29 @@ static int radio_do_ioctl(struct inode *inode, struct file *file,
1775 *id = 0; 1753 *id = 0;
1776 return 0; 1754 return 0;
1777 } 1755 }
1778 case VIDIOC_S_AUDIO: 1756 case VIDIOCSTUNER:
1757 {
1758 struct video_tuner *v = arg;
1759
1760 if (v->tuner) /* Only tuner 0 */
1761 return -EINVAL;
1762
1763 cx88_call_i2c_clients(dev->core,VIDIOCSTUNER,v);
1764 return 0;
1765 }
1779 case VIDIOC_S_TUNER: 1766 case VIDIOC_S_TUNER:
1767 {
1768 struct v4l2_tuner *t = arg;
1769
1770 if (0 != t->index)
1771 return -EINVAL;
1772
1773 cx88_call_i2c_clients(dev->core,VIDIOC_S_TUNER,t);
1774
1775 return 0;
1776 }
1777
1778 case VIDIOC_S_AUDIO:
1780 case VIDIOC_S_INPUT: 1779 case VIDIOC_S_INPUT:
1781 case VIDIOC_S_STD: 1780 case VIDIOC_S_STD:
1782 return 0; 1781 return 0;