diff options
Diffstat (limited to 'drivers/media/video/ivtv')
-rw-r--r-- | drivers/media/video/ivtv/Kconfig | 2 | ||||
-rw-r--r-- | drivers/media/video/ivtv/ivtv-driver.c | 5 | ||||
-rw-r--r-- | drivers/media/video/ivtv/ivtv-driver.h | 1 | ||||
-rw-r--r-- | drivers/media/video/ivtv/ivtv-ioctl.c | 130 | ||||
-rw-r--r-- | drivers/media/video/ivtv/ivtv-streams.c | 7 |
5 files changed, 71 insertions, 74 deletions
diff --git a/drivers/media/video/ivtv/Kconfig b/drivers/media/video/ivtv/Kconfig index 5d7ee8fcdd50..0069898bddab 100644 --- a/drivers/media/video/ivtv/Kconfig +++ b/drivers/media/video/ivtv/Kconfig | |||
@@ -2,9 +2,7 @@ config VIDEO_IVTV | |||
2 | tristate "Conexant cx23416/cx23415 MPEG encoder/decoder support" | 2 | tristate "Conexant cx23416/cx23415 MPEG encoder/decoder support" |
3 | depends on VIDEO_V4L1 && VIDEO_V4L2 && PCI && I2C && EXPERIMENTAL | 3 | depends on VIDEO_V4L1 && VIDEO_V4L2 && PCI && I2C && EXPERIMENTAL |
4 | depends on INPUT # due to VIDEO_IR | 4 | depends on INPUT # due to VIDEO_IR |
5 | depends on HOTPLUG # due to FW_LOADER | ||
6 | select I2C_ALGOBIT | 5 | select I2C_ALGOBIT |
7 | select FW_LOADER | ||
8 | select VIDEO_IR | 6 | select VIDEO_IR |
9 | select VIDEO_TUNER | 7 | select VIDEO_TUNER |
10 | select VIDEO_TVEEPROM | 8 | select VIDEO_TVEEPROM |
diff --git a/drivers/media/video/ivtv/ivtv-driver.c b/drivers/media/video/ivtv/ivtv-driver.c index 41fd79279bb5..aea1664948ce 100644 --- a/drivers/media/video/ivtv/ivtv-driver.c +++ b/drivers/media/video/ivtv/ivtv-driver.c | |||
@@ -465,9 +465,8 @@ static void ivtv_process_eeprom(struct ivtv *itv) | |||
465 | if (itv->options.radio == -1) | 465 | if (itv->options.radio == -1) |
466 | itv->options.radio = (tv.has_radio != 0); | 466 | itv->options.radio = (tv.has_radio != 0); |
467 | /* only enable newi2c if an IR blaster is present */ | 467 | /* only enable newi2c if an IR blaster is present */ |
468 | /* FIXME: for 2.6.20 the test against 2 should be removed */ | 468 | if (itv->options.newi2c == -1 && tv.has_ir) { |
469 | if (itv->options.newi2c == -1 && tv.has_ir != -1 && tv.has_ir != 2) { | 469 | itv->options.newi2c = (tv.has_ir & 4) ? 1 : 0; |
470 | itv->options.newi2c = (tv.has_ir & 2) ? 1 : 0; | ||
471 | if (itv->options.newi2c) { | 470 | if (itv->options.newi2c) { |
472 | IVTV_INFO("Reopen i2c bus for IR-blaster support\n"); | 471 | IVTV_INFO("Reopen i2c bus for IR-blaster support\n"); |
473 | exit_ivtv_i2c(itv); | 472 | exit_ivtv_i2c(itv); |
diff --git a/drivers/media/video/ivtv/ivtv-driver.h b/drivers/media/video/ivtv/ivtv-driver.h index a08bb3331cfb..ab287b48fc2b 100644 --- a/drivers/media/video/ivtv/ivtv-driver.h +++ b/drivers/media/video/ivtv/ivtv-driver.h | |||
@@ -60,6 +60,7 @@ | |||
60 | #include <linux/dvb/video.h> | 60 | #include <linux/dvb/video.h> |
61 | #include <linux/dvb/audio.h> | 61 | #include <linux/dvb/audio.h> |
62 | #include <media/v4l2-common.h> | 62 | #include <media/v4l2-common.h> |
63 | #include <media/v4l2-ioctl.h> | ||
63 | #include <media/tuner.h> | 64 | #include <media/tuner.h> |
64 | #include <media/cx2341x.h> | 65 | #include <media/cx2341x.h> |
65 | 66 | ||
diff --git a/drivers/media/video/ivtv/ivtv-ioctl.c b/drivers/media/video/ivtv/ivtv-ioctl.c index 52e00a7f3110..61030309d0ad 100644 --- a/drivers/media/video/ivtv/ivtv-ioctl.c +++ b/drivers/media/video/ivtv/ivtv-ioctl.c | |||
@@ -1842,69 +1842,73 @@ int ivtv_v4l2_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, | |||
1842 | return res; | 1842 | return res; |
1843 | } | 1843 | } |
1844 | 1844 | ||
1845 | void ivtv_set_funcs(struct video_device *vdev) | 1845 | static const struct v4l2_ioctl_ops ivtv_ioctl_ops = { |
1846 | { | 1846 | .vidioc_querycap = ivtv_querycap, |
1847 | vdev->vidioc_querycap = ivtv_querycap; | 1847 | .vidioc_g_priority = ivtv_g_priority, |
1848 | vdev->vidioc_g_priority = ivtv_g_priority; | 1848 | .vidioc_s_priority = ivtv_s_priority, |
1849 | vdev->vidioc_s_priority = ivtv_s_priority; | 1849 | .vidioc_s_audio = ivtv_s_audio, |
1850 | vdev->vidioc_s_audio = ivtv_s_audio; | 1850 | .vidioc_g_audio = ivtv_g_audio, |
1851 | vdev->vidioc_g_audio = ivtv_g_audio; | 1851 | .vidioc_enumaudio = ivtv_enumaudio, |
1852 | vdev->vidioc_enumaudio = ivtv_enumaudio; | 1852 | .vidioc_s_audout = ivtv_s_audout, |
1853 | vdev->vidioc_s_audout = ivtv_s_audout; | 1853 | .vidioc_g_audout = ivtv_g_audout, |
1854 | vdev->vidioc_g_audout = ivtv_g_audout; | 1854 | .vidioc_enum_input = ivtv_enum_input, |
1855 | vdev->vidioc_enum_input = ivtv_enum_input; | 1855 | .vidioc_enum_output = ivtv_enum_output, |
1856 | vdev->vidioc_enum_output = ivtv_enum_output; | 1856 | .vidioc_enumaudout = ivtv_enumaudout, |
1857 | vdev->vidioc_enumaudout = ivtv_enumaudout; | 1857 | .vidioc_cropcap = ivtv_cropcap, |
1858 | vdev->vidioc_cropcap = ivtv_cropcap; | 1858 | .vidioc_s_crop = ivtv_s_crop, |
1859 | vdev->vidioc_s_crop = ivtv_s_crop; | 1859 | .vidioc_g_crop = ivtv_g_crop, |
1860 | vdev->vidioc_g_crop = ivtv_g_crop; | 1860 | .vidioc_g_input = ivtv_g_input, |
1861 | vdev->vidioc_g_input = ivtv_g_input; | 1861 | .vidioc_s_input = ivtv_s_input, |
1862 | vdev->vidioc_s_input = ivtv_s_input; | 1862 | .vidioc_g_output = ivtv_g_output, |
1863 | vdev->vidioc_g_output = ivtv_g_output; | 1863 | .vidioc_s_output = ivtv_s_output, |
1864 | vdev->vidioc_s_output = ivtv_s_output; | 1864 | .vidioc_g_frequency = ivtv_g_frequency, |
1865 | vdev->vidioc_g_frequency = ivtv_g_frequency; | 1865 | .vidioc_s_frequency = ivtv_s_frequency, |
1866 | vdev->vidioc_s_frequency = ivtv_s_frequency; | 1866 | .vidioc_s_tuner = ivtv_s_tuner, |
1867 | vdev->vidioc_s_tuner = ivtv_s_tuner; | 1867 | .vidioc_g_tuner = ivtv_g_tuner, |
1868 | vdev->vidioc_g_tuner = ivtv_g_tuner; | 1868 | .vidioc_g_enc_index = ivtv_g_enc_index, |
1869 | vdev->vidioc_g_enc_index = ivtv_g_enc_index; | 1869 | .vidioc_g_fbuf = ivtv_g_fbuf, |
1870 | vdev->vidioc_g_fbuf = ivtv_g_fbuf; | 1870 | .vidioc_s_fbuf = ivtv_s_fbuf, |
1871 | vdev->vidioc_s_fbuf = ivtv_s_fbuf; | 1871 | .vidioc_g_std = ivtv_g_std, |
1872 | vdev->vidioc_g_std = ivtv_g_std; | 1872 | .vidioc_s_std = ivtv_s_std, |
1873 | vdev->vidioc_s_std = ivtv_s_std; | 1873 | .vidioc_overlay = ivtv_overlay, |
1874 | vdev->vidioc_overlay = ivtv_overlay; | 1874 | .vidioc_log_status = ivtv_log_status, |
1875 | vdev->vidioc_log_status = ivtv_log_status; | 1875 | .vidioc_enum_fmt_vid_cap = ivtv_enum_fmt_vid_cap, |
1876 | vdev->vidioc_enum_fmt_vid_cap = ivtv_enum_fmt_vid_cap; | 1876 | .vidioc_encoder_cmd = ivtv_encoder_cmd, |
1877 | vdev->vidioc_encoder_cmd = ivtv_encoder_cmd; | 1877 | .vidioc_try_encoder_cmd = ivtv_try_encoder_cmd, |
1878 | vdev->vidioc_try_encoder_cmd = ivtv_try_encoder_cmd; | 1878 | .vidioc_enum_fmt_vid_out = ivtv_enum_fmt_vid_out, |
1879 | vdev->vidioc_enum_fmt_vid_out = ivtv_enum_fmt_vid_out; | 1879 | .vidioc_g_fmt_vid_cap = ivtv_g_fmt_vid_cap, |
1880 | vdev->vidioc_g_fmt_vid_cap = ivtv_g_fmt_vid_cap; | 1880 | .vidioc_g_fmt_vbi_cap = ivtv_g_fmt_vbi_cap, |
1881 | vdev->vidioc_g_fmt_vbi_cap = ivtv_g_fmt_vbi_cap; | 1881 | .vidioc_g_fmt_sliced_vbi_cap = ivtv_g_fmt_sliced_vbi_cap, |
1882 | vdev->vidioc_g_fmt_sliced_vbi_cap = ivtv_g_fmt_sliced_vbi_cap; | 1882 | .vidioc_g_fmt_vid_out = ivtv_g_fmt_vid_out, |
1883 | vdev->vidioc_g_fmt_vid_out = ivtv_g_fmt_vid_out; | 1883 | .vidioc_g_fmt_vid_out_overlay = ivtv_g_fmt_vid_out_overlay, |
1884 | vdev->vidioc_g_fmt_vid_out_overlay = ivtv_g_fmt_vid_out_overlay; | 1884 | .vidioc_g_fmt_sliced_vbi_out = ivtv_g_fmt_sliced_vbi_out, |
1885 | vdev->vidioc_g_fmt_sliced_vbi_out = ivtv_g_fmt_sliced_vbi_out; | 1885 | .vidioc_s_fmt_vid_cap = ivtv_s_fmt_vid_cap, |
1886 | vdev->vidioc_s_fmt_vid_cap = ivtv_s_fmt_vid_cap; | 1886 | .vidioc_s_fmt_vbi_cap = ivtv_s_fmt_vbi_cap, |
1887 | vdev->vidioc_s_fmt_vbi_cap = ivtv_s_fmt_vbi_cap; | 1887 | .vidioc_s_fmt_sliced_vbi_cap = ivtv_s_fmt_sliced_vbi_cap, |
1888 | vdev->vidioc_s_fmt_sliced_vbi_cap = ivtv_s_fmt_sliced_vbi_cap; | 1888 | .vidioc_s_fmt_vid_out = ivtv_s_fmt_vid_out, |
1889 | vdev->vidioc_s_fmt_vid_out = ivtv_s_fmt_vid_out; | 1889 | .vidioc_s_fmt_vid_out_overlay = ivtv_s_fmt_vid_out_overlay, |
1890 | vdev->vidioc_s_fmt_vid_out_overlay = ivtv_s_fmt_vid_out_overlay; | 1890 | .vidioc_s_fmt_sliced_vbi_out = ivtv_s_fmt_sliced_vbi_out, |
1891 | vdev->vidioc_s_fmt_sliced_vbi_out = ivtv_s_fmt_sliced_vbi_out; | 1891 | .vidioc_try_fmt_vid_cap = ivtv_try_fmt_vid_cap, |
1892 | vdev->vidioc_try_fmt_vid_cap = ivtv_try_fmt_vid_cap; | 1892 | .vidioc_try_fmt_vbi_cap = ivtv_try_fmt_vbi_cap, |
1893 | vdev->vidioc_try_fmt_vbi_cap = ivtv_try_fmt_vbi_cap; | 1893 | .vidioc_try_fmt_sliced_vbi_cap = ivtv_try_fmt_sliced_vbi_cap, |
1894 | vdev->vidioc_try_fmt_sliced_vbi_cap = ivtv_try_fmt_sliced_vbi_cap; | 1894 | .vidioc_try_fmt_vid_out = ivtv_try_fmt_vid_out, |
1895 | vdev->vidioc_try_fmt_vid_out = ivtv_try_fmt_vid_out; | 1895 | .vidioc_try_fmt_vid_out_overlay = ivtv_try_fmt_vid_out_overlay, |
1896 | vdev->vidioc_try_fmt_vid_out_overlay = ivtv_try_fmt_vid_out_overlay; | 1896 | .vidioc_try_fmt_sliced_vbi_out = ivtv_try_fmt_sliced_vbi_out, |
1897 | vdev->vidioc_try_fmt_sliced_vbi_out = ivtv_try_fmt_sliced_vbi_out; | 1897 | .vidioc_g_sliced_vbi_cap = ivtv_g_sliced_vbi_cap, |
1898 | vdev->vidioc_g_sliced_vbi_cap = ivtv_g_sliced_vbi_cap; | 1898 | .vidioc_g_chip_ident = ivtv_g_chip_ident, |
1899 | vdev->vidioc_g_chip_ident = ivtv_g_chip_ident; | ||
1900 | #ifdef CONFIG_VIDEO_ADV_DEBUG | 1899 | #ifdef CONFIG_VIDEO_ADV_DEBUG |
1901 | vdev->vidioc_g_register = ivtv_g_register; | 1900 | .vidioc_g_register = ivtv_g_register, |
1902 | vdev->vidioc_s_register = ivtv_s_register; | 1901 | .vidioc_s_register = ivtv_s_register, |
1903 | #endif | 1902 | #endif |
1904 | vdev->vidioc_default = ivtv_default; | 1903 | .vidioc_default = ivtv_default, |
1905 | vdev->vidioc_queryctrl = ivtv_queryctrl; | 1904 | .vidioc_queryctrl = ivtv_queryctrl, |
1906 | vdev->vidioc_querymenu = ivtv_querymenu; | 1905 | .vidioc_querymenu = ivtv_querymenu, |
1907 | vdev->vidioc_g_ext_ctrls = ivtv_g_ext_ctrls; | 1906 | .vidioc_g_ext_ctrls = ivtv_g_ext_ctrls, |
1908 | vdev->vidioc_s_ext_ctrls = ivtv_s_ext_ctrls; | 1907 | .vidioc_s_ext_ctrls = ivtv_s_ext_ctrls, |
1909 | vdev->vidioc_try_ext_ctrls = ivtv_try_ext_ctrls; | 1908 | .vidioc_try_ext_ctrls = ivtv_try_ext_ctrls, |
1909 | }; | ||
1910 | |||
1911 | void ivtv_set_funcs(struct video_device *vdev) | ||
1912 | { | ||
1913 | vdev->ioctl_ops = &ivtv_ioctl_ops; | ||
1910 | } | 1914 | } |
diff --git a/drivers/media/video/ivtv/ivtv-streams.c b/drivers/media/video/ivtv/ivtv-streams.c index f8883b487f4a..54d2023b26c4 100644 --- a/drivers/media/video/ivtv/ivtv-streams.c +++ b/drivers/media/video/ivtv/ivtv-streams.c | |||
@@ -208,16 +208,11 @@ static int ivtv_prep_dev(struct ivtv *itv, int type) | |||
208 | return -ENOMEM; | 208 | return -ENOMEM; |
209 | } | 209 | } |
210 | 210 | ||
211 | s->v4l2dev->type = VID_TYPE_CAPTURE | VID_TYPE_TUNER | VID_TYPE_TELETEXT | | ||
212 | VID_TYPE_CLIPPING | VID_TYPE_SCALES | VID_TYPE_MPEG_ENCODER; | ||
213 | if (itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT) { | ||
214 | s->v4l2dev->type |= VID_TYPE_MPEG_DECODER; | ||
215 | } | ||
216 | snprintf(s->v4l2dev->name, sizeof(s->v4l2dev->name), "ivtv%d %s", | 211 | snprintf(s->v4l2dev->name, sizeof(s->v4l2dev->name), "ivtv%d %s", |
217 | itv->num, s->name); | 212 | itv->num, s->name); |
218 | 213 | ||
219 | s->v4l2dev->minor = minor; | 214 | s->v4l2dev->minor = minor; |
220 | s->v4l2dev->dev = &itv->dev->dev; | 215 | s->v4l2dev->parent = &itv->dev->dev; |
221 | s->v4l2dev->fops = ivtv_stream_info[type].fops; | 216 | s->v4l2dev->fops = ivtv_stream_info[type].fops; |
222 | s->v4l2dev->release = video_device_release; | 217 | s->v4l2dev->release = video_device_release; |
223 | s->v4l2dev->tvnorms = V4L2_STD_ALL; | 218 | s->v4l2dev->tvnorms = V4L2_STD_ALL; |