diff options
Diffstat (limited to 'drivers/media/video/cx88')
-rw-r--r-- | drivers/media/video/cx88/Kconfig | 3 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-blackbird.c | 15 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-cards.c | 2 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-core.c | 3 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-video.c | 37 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88.h | 4 |
6 files changed, 36 insertions, 28 deletions
diff --git a/drivers/media/video/cx88/Kconfig b/drivers/media/video/cx88/Kconfig index 10e20d8196d..9dd7bdf659b 100644 --- a/drivers/media/video/cx88/Kconfig +++ b/drivers/media/video/cx88/Kconfig | |||
@@ -33,9 +33,8 @@ config VIDEO_CX88_ALSA | |||
33 | 33 | ||
34 | config VIDEO_CX88_BLACKBIRD | 34 | config VIDEO_CX88_BLACKBIRD |
35 | tristate "Blackbird MPEG encoder support (cx2388x + cx23416)" | 35 | tristate "Blackbird MPEG encoder support (cx2388x + cx23416)" |
36 | depends on VIDEO_CX88 && HOTPLUG | 36 | depends on VIDEO_CX88 |
37 | select VIDEO_CX2341X | 37 | select VIDEO_CX2341X |
38 | select FW_LOADER | ||
39 | ---help--- | 38 | ---help--- |
40 | This adds support for MPEG encoder cards based on the | 39 | This adds support for MPEG encoder cards based on the |
41 | Blackbird reference design, using the Conexant 2388x | 40 | Blackbird reference design, using the Conexant 2388x |
diff --git a/drivers/media/video/cx88/cx88-blackbird.c b/drivers/media/video/cx88/cx88-blackbird.c index bfdca584776..9a1374a38ec 100644 --- a/drivers/media/video/cx88/cx88-blackbird.c +++ b/drivers/media/video/cx88/cx88-blackbird.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/device.h> | 33 | #include <linux/device.h> |
34 | #include <linux/firmware.h> | 34 | #include <linux/firmware.h> |
35 | #include <media/v4l2-common.h> | 35 | #include <media/v4l2-common.h> |
36 | #include <media/v4l2-ioctl.h> | ||
36 | #include <media/cx2341x.h> | 37 | #include <media/cx2341x.h> |
37 | 38 | ||
38 | #include "cx88.h" | 39 | #include "cx88.h" |
@@ -1174,12 +1175,7 @@ static const struct file_operations mpeg_fops = | |||
1174 | .llseek = no_llseek, | 1175 | .llseek = no_llseek, |
1175 | }; | 1176 | }; |
1176 | 1177 | ||
1177 | static struct video_device cx8802_mpeg_template = | 1178 | static const struct v4l2_ioctl_ops mpeg_ioctl_ops = { |
1178 | { | ||
1179 | .name = "cx8802", | ||
1180 | .type = VID_TYPE_CAPTURE|VID_TYPE_TUNER|VID_TYPE_SCALES|VID_TYPE_MPEG_ENCODER, | ||
1181 | .fops = &mpeg_fops, | ||
1182 | .minor = -1, | ||
1183 | .vidioc_querymenu = vidioc_querymenu, | 1179 | .vidioc_querymenu = vidioc_querymenu, |
1184 | .vidioc_querycap = vidioc_querycap, | 1180 | .vidioc_querycap = vidioc_querycap, |
1185 | .vidioc_enum_fmt_vid_cap = vidioc_enum_fmt_vid_cap, | 1181 | .vidioc_enum_fmt_vid_cap = vidioc_enum_fmt_vid_cap, |
@@ -1207,6 +1203,13 @@ static struct video_device cx8802_mpeg_template = | |||
1207 | .vidioc_g_tuner = vidioc_g_tuner, | 1203 | .vidioc_g_tuner = vidioc_g_tuner, |
1208 | .vidioc_s_tuner = vidioc_s_tuner, | 1204 | .vidioc_s_tuner = vidioc_s_tuner, |
1209 | .vidioc_s_std = vidioc_s_std, | 1205 | .vidioc_s_std = vidioc_s_std, |
1206 | }; | ||
1207 | |||
1208 | static struct video_device cx8802_mpeg_template = { | ||
1209 | .name = "cx8802", | ||
1210 | .fops = &mpeg_fops, | ||
1211 | .ioctl_ops = &mpeg_ioctl_ops, | ||
1212 | .minor = -1, | ||
1210 | .tvnorms = CX88_NORMS, | 1213 | .tvnorms = CX88_NORMS, |
1211 | .current_norm = V4L2_STD_NTSC_M, | 1214 | .current_norm = V4L2_STD_NTSC_M, |
1212 | }; | 1215 | }; |
diff --git a/drivers/media/video/cx88/cx88-cards.c b/drivers/media/video/cx88/cx88-cards.c index fa6d398e97b..de199a206a1 100644 --- a/drivers/media/video/cx88/cx88-cards.c +++ b/drivers/media/video/cx88/cx88-cards.c | |||
@@ -1348,7 +1348,7 @@ static const struct cx88_board cx88_boards[] = { | |||
1348 | .tuner_addr = ADDR_UNSET, | 1348 | .tuner_addr = ADDR_UNSET, |
1349 | .radio_addr = ADDR_UNSET, | 1349 | .radio_addr = ADDR_UNSET, |
1350 | .tda9887_conf = TDA9887_PRESENT, | 1350 | .tda9887_conf = TDA9887_PRESENT, |
1351 | .audio_chip = AUDIO_CHIP_WM8775, | 1351 | .audio_chip = V4L2_IDENT_WM8775, |
1352 | .input = {{ | 1352 | .input = {{ |
1353 | .type = CX88_VMUX_TELEVISION, | 1353 | .type = CX88_VMUX_TELEVISION, |
1354 | .vmux = 0, | 1354 | .vmux = 0, |
diff --git a/drivers/media/video/cx88/cx88-core.c b/drivers/media/video/cx88/cx88-core.c index 60eeda3057e..d656fec5901 100644 --- a/drivers/media/video/cx88/cx88-core.c +++ b/drivers/media/video/cx88/cx88-core.c | |||
@@ -40,6 +40,7 @@ | |||
40 | 40 | ||
41 | #include "cx88.h" | 41 | #include "cx88.h" |
42 | #include <media/v4l2-common.h> | 42 | #include <media/v4l2-common.h> |
43 | #include <media/v4l2-ioctl.h> | ||
43 | 44 | ||
44 | MODULE_DESCRIPTION("v4l2 driver module for cx2388x based TV cards"); | 45 | MODULE_DESCRIPTION("v4l2 driver module for cx2388x based TV cards"); |
45 | MODULE_AUTHOR("Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]"); | 46 | MODULE_AUTHOR("Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]"); |
@@ -1006,7 +1007,7 @@ struct video_device *cx88_vdev_init(struct cx88_core *core, | |||
1006 | return NULL; | 1007 | return NULL; |
1007 | *vfd = *template; | 1008 | *vfd = *template; |
1008 | vfd->minor = -1; | 1009 | vfd->minor = -1; |
1009 | vfd->dev = &pci->dev; | 1010 | vfd->parent = &pci->dev; |
1010 | vfd->release = video_device_release; | 1011 | vfd->release = video_device_release; |
1011 | snprintf(vfd->name, sizeof(vfd->name), "%s %s (%s)", | 1012 | snprintf(vfd->name, sizeof(vfd->name), "%s %s (%s)", |
1012 | core->name, type, core->board.name); | 1013 | core->name, type, core->board.name); |
diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c index 0fed5cd2cce..ef4d56ea002 100644 --- a/drivers/media/video/cx88/cx88-video.c +++ b/drivers/media/video/cx88/cx88-video.c | |||
@@ -39,6 +39,7 @@ | |||
39 | 39 | ||
40 | #include "cx88.h" | 40 | #include "cx88.h" |
41 | #include <media/v4l2-common.h> | 41 | #include <media/v4l2-common.h> |
42 | #include <media/v4l2-ioctl.h> | ||
42 | 43 | ||
43 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | 44 | #ifdef CONFIG_VIDEO_V4L1_COMPAT |
44 | /* Include V4L1 specific functions. Should be removed soon */ | 45 | /* Include V4L1 specific functions. Should be removed soon */ |
@@ -447,7 +448,7 @@ int cx88_video_mux(struct cx88_core *core, unsigned int input) | |||
447 | the initialization. Some boards may use different | 448 | the initialization. Some boards may use different |
448 | routes for different inputs. HVR-1300 surely does */ | 449 | routes for different inputs. HVR-1300 surely does */ |
449 | if (core->board.audio_chip && | 450 | if (core->board.audio_chip && |
450 | core->board.audio_chip == AUDIO_CHIP_WM8775) { | 451 | core->board.audio_chip == V4L2_IDENT_WM8775) { |
451 | struct v4l2_routing route; | 452 | struct v4l2_routing route; |
452 | 453 | ||
453 | route.input = INPUT(input).audioroute; | 454 | route.input = INPUT(input).audioroute; |
@@ -1682,13 +1683,7 @@ static const struct file_operations video_fops = | |||
1682 | .llseek = no_llseek, | 1683 | .llseek = no_llseek, |
1683 | }; | 1684 | }; |
1684 | 1685 | ||
1685 | static struct video_device cx8800_vbi_template; | 1686 | static const struct v4l2_ioctl_ops video_ioctl_ops = { |
1686 | static struct video_device cx8800_video_template = | ||
1687 | { | ||
1688 | .name = "cx8800-video", | ||
1689 | .type = VID_TYPE_CAPTURE|VID_TYPE_TUNER|VID_TYPE_SCALES, | ||
1690 | .fops = &video_fops, | ||
1691 | .minor = -1, | ||
1692 | .vidioc_querycap = vidioc_querycap, | 1687 | .vidioc_querycap = vidioc_querycap, |
1693 | .vidioc_enum_fmt_vid_cap = vidioc_enum_fmt_vid_cap, | 1688 | .vidioc_enum_fmt_vid_cap = vidioc_enum_fmt_vid_cap, |
1694 | .vidioc_g_fmt_vid_cap = vidioc_g_fmt_vid_cap, | 1689 | .vidioc_g_fmt_vid_cap = vidioc_g_fmt_vid_cap, |
@@ -1721,6 +1716,15 @@ static struct video_device cx8800_video_template = | |||
1721 | .vidioc_g_register = vidioc_g_register, | 1716 | .vidioc_g_register = vidioc_g_register, |
1722 | .vidioc_s_register = vidioc_s_register, | 1717 | .vidioc_s_register = vidioc_s_register, |
1723 | #endif | 1718 | #endif |
1719 | }; | ||
1720 | |||
1721 | static struct video_device cx8800_vbi_template; | ||
1722 | |||
1723 | static struct video_device cx8800_video_template = { | ||
1724 | .name = "cx8800-video", | ||
1725 | .fops = &video_fops, | ||
1726 | .minor = -1, | ||
1727 | .ioctl_ops = &video_ioctl_ops, | ||
1724 | .tvnorms = CX88_NORMS, | 1728 | .tvnorms = CX88_NORMS, |
1725 | .current_norm = V4L2_STD_NTSC_M, | 1729 | .current_norm = V4L2_STD_NTSC_M, |
1726 | }; | 1730 | }; |
@@ -1735,12 +1739,7 @@ static const struct file_operations radio_fops = | |||
1735 | .llseek = no_llseek, | 1739 | .llseek = no_llseek, |
1736 | }; | 1740 | }; |
1737 | 1741 | ||
1738 | static struct video_device cx8800_radio_template = | 1742 | static const struct v4l2_ioctl_ops radio_ioctl_ops = { |
1739 | { | ||
1740 | .name = "cx8800-radio", | ||
1741 | .type = VID_TYPE_TUNER, | ||
1742 | .fops = &radio_fops, | ||
1743 | .minor = -1, | ||
1744 | .vidioc_querycap = radio_querycap, | 1743 | .vidioc_querycap = radio_querycap, |
1745 | .vidioc_g_tuner = radio_g_tuner, | 1744 | .vidioc_g_tuner = radio_g_tuner, |
1746 | .vidioc_enum_input = radio_enum_input, | 1745 | .vidioc_enum_input = radio_enum_input, |
@@ -1759,6 +1758,13 @@ static struct video_device cx8800_radio_template = | |||
1759 | #endif | 1758 | #endif |
1760 | }; | 1759 | }; |
1761 | 1760 | ||
1761 | static struct video_device cx8800_radio_template = { | ||
1762 | .name = "cx8800-radio", | ||
1763 | .fops = &radio_fops, | ||
1764 | .minor = -1, | ||
1765 | .ioctl_ops = &radio_ioctl_ops, | ||
1766 | }; | ||
1767 | |||
1762 | /* ----------------------------------------------------------- */ | 1768 | /* ----------------------------------------------------------- */ |
1763 | 1769 | ||
1764 | static void cx8800_unregister_video(struct cx8800_dev *dev) | 1770 | static void cx8800_unregister_video(struct cx8800_dev *dev) |
@@ -1830,7 +1836,6 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev, | |||
1830 | memcpy( &cx8800_vbi_template, &cx8800_video_template, | 1836 | memcpy( &cx8800_vbi_template, &cx8800_video_template, |
1831 | sizeof(cx8800_vbi_template) ); | 1837 | sizeof(cx8800_vbi_template) ); |
1832 | strcpy(cx8800_vbi_template.name,"cx8800-vbi"); | 1838 | strcpy(cx8800_vbi_template.name,"cx8800-vbi"); |
1833 | cx8800_vbi_template.type = VID_TYPE_TELETEXT|VID_TYPE_TUNER; | ||
1834 | 1839 | ||
1835 | /* initialize driver struct */ | 1840 | /* initialize driver struct */ |
1836 | spin_lock_init(&dev->slock); | 1841 | spin_lock_init(&dev->slock); |
@@ -1866,7 +1871,7 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev, | |||
1866 | 1871 | ||
1867 | /* load and configure helper modules */ | 1872 | /* load and configure helper modules */ |
1868 | 1873 | ||
1869 | if (core->board.audio_chip == AUDIO_CHIP_WM8775) | 1874 | if (core->board.audio_chip == V4L2_IDENT_WM8775) |
1870 | request_module("wm8775"); | 1875 | request_module("wm8775"); |
1871 | 1876 | ||
1872 | switch (core->boardnr) { | 1877 | switch (core->boardnr) { |
diff --git a/drivers/media/video/cx88/cx88.h b/drivers/media/video/cx88/cx88.h index 14ac173f407..54fe6509471 100644 --- a/drivers/media/video/cx88/cx88.h +++ b/drivers/media/video/cx88/cx88.h | |||
@@ -29,8 +29,8 @@ | |||
29 | #include <media/tuner.h> | 29 | #include <media/tuner.h> |
30 | #include <media/tveeprom.h> | 30 | #include <media/tveeprom.h> |
31 | #include <media/videobuf-dma-sg.h> | 31 | #include <media/videobuf-dma-sg.h> |
32 | #include <media/v4l2-chip-ident.h> | ||
32 | #include <media/cx2341x.h> | 33 | #include <media/cx2341x.h> |
33 | #include <media/audiochip.h> | ||
34 | #if defined(CONFIG_VIDEO_CX88_DVB) || defined(CONFIG_VIDEO_CX88_DVB_MODULE) | 34 | #if defined(CONFIG_VIDEO_CX88_DVB) || defined(CONFIG_VIDEO_CX88_DVB_MODULE) |
35 | #include <media/videobuf-dvb.h> | 35 | #include <media/videobuf-dvb.h> |
36 | #endif | 36 | #endif |
@@ -252,7 +252,7 @@ struct cx88_board { | |||
252 | struct cx88_input input[MAX_CX88_INPUT]; | 252 | struct cx88_input input[MAX_CX88_INPUT]; |
253 | struct cx88_input radio; | 253 | struct cx88_input radio; |
254 | enum cx88_board_type mpeg; | 254 | enum cx88_board_type mpeg; |
255 | enum audiochip audio_chip; | 255 | unsigned int audio_chip; |
256 | }; | 256 | }; |
257 | 257 | ||
258 | struct cx88_subid { | 258 | struct cx88_subid { |