From 4c0f631e14b849782259519c749414b1f1ddbfa8 Mon Sep 17 00:00:00 2001 From: Ricardo Cerqueira Date: Mon, 23 Jan 2006 09:42:06 -0200 Subject: V4L/DVB (3393): Move all IR keymaps to ir-common module - All the keymaps have the same structure, and can be shared between different chips, so it makes no sense having them scattered between the input files. This aggregates them all at ir-common module. - Added new Hauppauge remote (Hauppauge grey), contributed by J.O. Aho (with some small changes) Changed KEY_KPx (keypad numerals) references to KEY_x, to avoid problems when NumLock is off (suggested by Peter Missel ) - Some cleanups at IR code Signed-off-by: Ricardo Cerqueira Signed-off-by: Mauro Carvalho Chehab --- include/media/ir-common.h | 42 +++++++++++++++++++++++++++++++++++------- 1 file changed, 35 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/media/ir-common.h b/include/media/ir-common.h index ad3e9bb670c..50fe522bad3 100644 --- a/include/media/ir-common.h +++ b/include/media/ir-common.h @@ -47,13 +47,6 @@ struct ir_input_state { int keypressed; /* current state */ }; -extern IR_KEYTAB_TYPE ir_codes_rc5_tv[IR_KEYTAB_SIZE]; -extern IR_KEYTAB_TYPE ir_codes_winfast[IR_KEYTAB_SIZE]; -extern IR_KEYTAB_TYPE ir_codes_pinnacle[IR_KEYTAB_SIZE]; -extern IR_KEYTAB_TYPE ir_codes_empty[IR_KEYTAB_SIZE]; -extern IR_KEYTAB_TYPE ir_codes_hauppauge_new[IR_KEYTAB_SIZE]; -extern IR_KEYTAB_TYPE ir_codes_pixelview[IR_KEYTAB_SIZE]; - void ir_input_init(struct input_dev *dev, struct ir_input_state *ir, int ir_type, IR_KEYTAB_TYPE *ir_codes); void ir_input_nokey(struct input_dev *dev, struct ir_input_state *ir); @@ -64,6 +57,41 @@ int ir_dump_samples(u32 *samples, int count); int ir_decode_biphase(u32 *samples, int count, int low, int high); int ir_decode_pulsedistance(u32 *samples, int count, int low, int high); +/* Keymaps to be used by other modules */ + +extern IR_KEYTAB_TYPE ir_codes_empty[IR_KEYTAB_SIZE]; +extern IR_KEYTAB_TYPE ir_codes_avermedia[IR_KEYTAB_SIZE]; +extern IR_KEYTAB_TYPE ir_codes_avermedia_dvbt[IR_KEYTAB_SIZE]; +extern IR_KEYTAB_TYPE ir_codes_apac_viewcomp[IR_KEYTAB_SIZE]; +extern IR_KEYTAB_TYPE ir_codes_conceptronic[IR_KEYTAB_SIZE]; +extern IR_KEYTAB_TYPE ir_codes_nebula[IR_KEYTAB_SIZE]; +extern IR_KEYTAB_TYPE ir_codes_dntv_live_dvb_t[IR_KEYTAB_SIZE]; +extern IR_KEYTAB_TYPE ir_codes_iodata_bctv7e[IR_KEYTAB_SIZE]; +extern IR_KEYTAB_TYPE ir_codes_adstech_dvb_t_pci[IR_KEYTAB_SIZE]; +extern IR_KEYTAB_TYPE ir_codes_msi_tvanywhere[IR_KEYTAB_SIZE]; +extern IR_KEYTAB_TYPE ir_codes_cinergy_1400[IR_KEYTAB_SIZE]; +extern IR_KEYTAB_TYPE ir_codes_avertv_303[IR_KEYTAB_SIZE]; +extern IR_KEYTAB_TYPE ir_codes_dntv_live_dvbt_pro[IR_KEYTAB_SIZE]; +extern IR_KEYTAB_TYPE ir_codes_em_terratec[IR_KEYTAB_SIZE]; +extern IR_KEYTAB_TYPE ir_codes_em_pinnacle_usb[IR_KEYTAB_SIZE]; +extern IR_KEYTAB_TYPE ir_codes_flyvideo[IR_KEYTAB_SIZE]; +extern IR_KEYTAB_TYPE ir_codes_flydvb[IR_KEYTAB_SIZE]; +extern IR_KEYTAB_TYPE ir_codes_cinergy[IR_KEYTAB_SIZE]; +extern IR_KEYTAB_TYPE ir_codes_eztv[IR_KEYTAB_SIZE]; +extern IR_KEYTAB_TYPE ir_codes_avacssmart[IR_KEYTAB_SIZE]; +extern IR_KEYTAB_TYPE ir_codes_md2819[IR_KEYTAB_SIZE]; +extern IR_KEYTAB_TYPE ir_codes_videomate_tv_pvr[IR_KEYTAB_SIZE]; +extern IR_KEYTAB_TYPE ir_codes_manli[IR_KEYTAB_SIZE]; +extern IR_KEYTAB_TYPE ir_codes_gotview7135[IR_KEYTAB_SIZE]; +extern IR_KEYTAB_TYPE ir_codes_purpletv[IR_KEYTAB_SIZE]; +extern IR_KEYTAB_TYPE ir_codes_pctv_sedna[IR_KEYTAB_SIZE]; +extern IR_KEYTAB_TYPE ir_codes_pv951[IR_KEYTAB_SIZE]; +extern IR_KEYTAB_TYPE ir_codes_rc5_tv[IR_KEYTAB_SIZE]; +extern IR_KEYTAB_TYPE ir_codes_winfast[IR_KEYTAB_SIZE]; +extern IR_KEYTAB_TYPE ir_codes_pinnacle[IR_KEYTAB_SIZE]; +extern IR_KEYTAB_TYPE ir_codes_hauppauge_new[IR_KEYTAB_SIZE]; +extern IR_KEYTAB_TYPE ir_codes_pixelview[IR_KEYTAB_SIZE]; + #endif /* -- cgit v1.2.3 From b639f9d286f2216795492eac2a39b8ed6b4d555c Mon Sep 17 00:00:00 2001 From: "Nickolay V. Shmyrev" Date: Mon, 23 Jan 2006 09:44:10 -0200 Subject: V4L/DVB (3400): Remove duplicated keymaps and add keymap for KWorld LTV883IR. - Remove duplicated keymaps and add keymap for KWorld LTV883IR. Thanks to Jon Ferguson . Signed-off-by: Nickolay V. Shmyrev Signed-off-by: Mauro Carvalho Chehab --- include/media/ir-common.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/media/ir-common.h b/include/media/ir-common.h index 50fe522bad3..302d5b3946e 100644 --- a/include/media/ir-common.h +++ b/include/media/ir-common.h @@ -63,7 +63,7 @@ extern IR_KEYTAB_TYPE ir_codes_empty[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_avermedia[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_avermedia_dvbt[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_apac_viewcomp[IR_KEYTAB_SIZE]; -extern IR_KEYTAB_TYPE ir_codes_conceptronic[IR_KEYTAB_SIZE]; +extern IR_KEYTAB_TYPE ir_codes_pixelview[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_nebula[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_dntv_live_dvb_t[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_iodata_bctv7e[IR_KEYTAB_SIZE]; @@ -78,8 +78,7 @@ extern IR_KEYTAB_TYPE ir_codes_flyvideo[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_flydvb[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_cinergy[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_eztv[IR_KEYTAB_SIZE]; -extern IR_KEYTAB_TYPE ir_codes_avacssmart[IR_KEYTAB_SIZE]; -extern IR_KEYTAB_TYPE ir_codes_md2819[IR_KEYTAB_SIZE]; +extern IR_KEYTAB_TYPE ir_codes_avermedia[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_videomate_tv_pvr[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_manli[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_gotview7135[IR_KEYTAB_SIZE]; @@ -90,7 +89,6 @@ extern IR_KEYTAB_TYPE ir_codes_rc5_tv[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_winfast[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_pinnacle[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_hauppauge_new[IR_KEYTAB_SIZE]; -extern IR_KEYTAB_TYPE ir_codes_pixelview[IR_KEYTAB_SIZE]; #endif -- cgit v1.2.3 From 6ac48b458769059ee6147dd8bf2767e820407292 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 23 Jan 2006 17:11:05 -0200 Subject: V4L/DVB (3408): Included new sliced VBI types to videodev2.h and tvp5150 - Added other sliced VBI types to videodev2.h - tvp5150 now uses standard V4L2 API codes from videodev2.h - Implemented VIDIOC_G_SLICED_VBI_CAP for tvp5150. This is dynamically filled based on defined VDP C-RAM values filled by the driver. Signed-off-by: Mauro Carvalho Chehab --- include/linux/videodev2.h | 51 ++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 44 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index ce40675324b..27ae3d679cb 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h @@ -949,13 +949,50 @@ struct v4l2_sliced_vbi_format __u32 reserved[2]; /* must be zero */ }; -#define V4L2_SLICED_TELETEXT_B (0x0001) -#define V4L2_SLICED_VPS (0x0400) -#define V4L2_SLICED_CAPTION_525 (0x1000) -#define V4L2_SLICED_WSS_625 (0x4000) - -#define V4L2_SLICED_VBI_525 (V4L2_SLICED_CAPTION_525) -#define V4L2_SLICED_VBI_625 (V4L2_SLICED_TELETEXT_B | V4L2_SLICED_VPS | V4L2_SLICED_WSS_625) +/* Teletext WST, defined on ITU-R BT.653-2 */ +#define V4L2_SLICED_TELETEXT_PAL_B (0x000001) +#define V4L2_SLICED_TELETEXT_PAL_C (0x000002) +#define V4L2_SLICED_TELETEXT_NTSC_B (0x000010) +#define V4L2_SLICED_TELETEXT_SECAM (0x000020) + +/* Teletext NABTS, defined on ITU-R BT.653-2 */ +#define V4L2_SLICED_TELETEXT_NTSC_C (0x000040) +#define V4L2_SLICED_TELETEXT_NTSC_D (0x000080) + +/* Video Program System, defined on ETS 300 231*/ +#define V4L2_SLICED_VPS (0x000400) + +/* Closed Caption, defined on EIA-608 */ +#define V4L2_SLICED_CAPTION_525 (0x001000) +#define V4L2_SLICED_CAPTION_625 (0x002000) + +/* Wide Screen System, defined on ITU-R BT1119.1 */ +#define V4L2_SLICED_WSS_625 (0x004000) + +/* Wide Screen System, defined on IEC 61880 */ +#define V4L2_SLICED_WSS_525 (0x008000) + +/* Vertical Interval Timecode (VITC), defined on SMPTE 12M */ +#define V4l2_SLICED_VITC_625 (0x010000) +#define V4l2_SLICED_VITC_525 (0x020000) + +/* Compat macro - Should be removed for 2.6.18 */ +#define V4L2_SLICED_TELETEXT_B V4L2_SLICED_TELETEXT_PAL_B + +#define V4L2_SLICED_VBI_525 (V4L2_SLICED_TELETEXT_NTSC_B |\ + V4L2_SLICED_TELETEXT_NTSC_C |\ + V4L2_SLICED_TELETEXT_NTSC_D |\ + V4L2_SLICED_CAPTION_525 |\ + V4L2_SLICED_WSS_525 |\ + V4l2_SLICED_VITC_525) + +#define V4L2_SLICED_VBI_625 (V4L2_SLICED_TELETEXT_PAL_B |\ + V4L2_SLICED_TELETEXT_PAL_C |\ + V4L2_SLICED_TELETEXT_SECAM |\ + V4L2_SLICED_VPS |\ + V4L2_SLICED_CAPTION_625 |\ + V4L2_SLICED_WSS_625 |\ + V4l2_SLICED_VITC_625) struct v4l2_sliced_vbi_cap { -- cgit v1.2.3 From 4d0dddb10723cee2b3048bd2389673703bc228e4 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 23 Jan 2006 17:11:07 -0200 Subject: V4L/DVB (3419): added some VBI macros and moved minor definitions to header file - Moved some hardcoded minor numbers to videodev2.h - Included more comments for sliced VBI standards - Included some VBI macros to group similar standards Signed-off-by: Mauro Carvalho Chehab --- include/linux/videodev2.h | 38 +++++++++++++++++++++++++++++++++----- 1 file changed, 33 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 27ae3d679cb..6e33ce96cab 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h @@ -21,7 +21,7 @@ #include /* need __user */ -#define OBSOLETE_OWNER 1 /* It will be removed for 2.6.15 */ +#define OBSOLETE_OWNER 1 /* It will be removed for 2.6.17 */ #define HAVE_V4L2 1 /* @@ -48,6 +48,16 @@ #ifdef __KERNEL__ +/* Minor device allocation */ +#define MINOR_VFL_TYPE_GRABBER_MIN 0 +#define MINOR_VFL_TYPE_GRABBER_MAX 63 +#define MINOR_VFL_TYPE_RADIO_MIN 64 +#define MINOR_VFL_TYPE_RADIO_MAX 127 +#define MINOR_VFL_TYPE_VTX_MIN 192 +#define MINOR_VFL_TYPE_VTX_MAX 223 +#define MINOR_VFL_TYPE_VBI_MIN 224 +#define MINOR_VFL_TYPE_VBI_MAX 255 + #define VFL_TYPE_GRABBER 0 #define VFL_TYPE_VBI 1 #define VFL_TYPE_RADIO 2 @@ -949,13 +959,15 @@ struct v4l2_sliced_vbi_format __u32 reserved[2]; /* must be zero */ }; -/* Teletext WST, defined on ITU-R BT.653-2 */ +/* Teletext World System Teletext + (WST), defined on ITU-R BT.653-2 */ #define V4L2_SLICED_TELETEXT_PAL_B (0x000001) #define V4L2_SLICED_TELETEXT_PAL_C (0x000002) #define V4L2_SLICED_TELETEXT_NTSC_B (0x000010) #define V4L2_SLICED_TELETEXT_SECAM (0x000020) -/* Teletext NABTS, defined on ITU-R BT.653-2 */ +/* Teletext North American Broadcast Teletext Specification + (NABTS), defined on ITU-R BT.653-2 */ #define V4L2_SLICED_TELETEXT_NTSC_C (0x000040) #define V4L2_SLICED_TELETEXT_NTSC_D (0x000080) @@ -976,8 +988,24 @@ struct v4l2_sliced_vbi_format #define V4l2_SLICED_VITC_625 (0x010000) #define V4l2_SLICED_VITC_525 (0x020000) -/* Compat macro - Should be removed for 2.6.18 */ -#define V4L2_SLICED_TELETEXT_B V4L2_SLICED_TELETEXT_PAL_B +#define V4L2_SLICED_TELETEXT_B (V4L2_SLICED_TELETEXT_PAL_B |\ + V4L2_SLICED_TELETEXT_NTSC_B) + +#define V4L2_SLICED_TELETEXT (V4L2_SLICED_TELETEXT_PAL_B |\ + V4L2_SLICED_TELETEXT_PAL_C |\ + V4L2_SLICED_TELETEXT_SECAM |\ + V4L2_SLICED_TELETEXT_NTSC_B |\ + V4L2_SLICED_TELETEXT_NTSC_C |\ + V4L2_SLICED_TELETEXT_NTSC_D) + +#define V4L2_SLICED_CAPTION (V4L2_SLICED_CAPTION_525 |\ + V4L2_SLICED_CAPTION_625) + +#define V4L2_SLICED_WSS (V4L2_SLICED_WSS_525 |\ + V4L2_SLICED_WSS_625) + +#define V4L2_SLICED_VITC (V4L2_SLICED_VITC_525 |\ + V4L2_SLICED_VITC_625) #define V4L2_SLICED_VBI_525 (V4L2_SLICED_TELETEXT_NTSC_B |\ V4L2_SLICED_TELETEXT_NTSC_C |\ -- cgit v1.2.3 From 12db56071b473a59c550d0aa70db6972a49d73af Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 23 Jan 2006 17:11:08 -0200 Subject: V4L/DVB (3420): Added iocls to configure VBI on tvp5150 - Added iocls to configure VBI on tvp5150 Signed-off-by: Mauro Carvalho Chehab --- include/media/v4l2-common.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h index d4030a7e16e..11728daf009 100644 --- a/include/media/v4l2-common.h +++ b/include/media/v4l2-common.h @@ -160,7 +160,8 @@ struct msp_matrix { /* Used to generate VBI signals on a video signal. v4l2_sliced_vbi_data is filled with the data packets that should be output. Note that if you set - the line field to 0, then that VBI signal is disabled. */ + the line field to 0, then that VBI signal is disabled. If no + valid VBI data was found, then the type field is set to 0 on return. */ #define VIDIOC_INT_S_VBI_DATA _IOW ('d', 105, struct v4l2_sliced_vbi_data) /* Used to obtain the sliced VBI packet from a readback register. Not all -- cgit v1.2.3 From 757d250518c4905c5d13c8974446e08a2e3cf244 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Mon, 23 Jan 2006 17:11:10 -0200 Subject: V4L/DVB (3430): Add new internal VIDIOC_INT commands - Add new internal VIDIOC_INT commands for setting the tuner mode, for putting a chip into standby mode and to set/get the routing of inputs/outputs of audio or video of a chip. These new commands will replace older commands that are no longer up to the task. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- include/media/v4l2-common.h | 51 ++++++++++++++++++++++++++++++++++++++------- 1 file changed, 44 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h index 11728daf009..234e9cf7e84 100644 --- a/include/media/v4l2-common.h +++ b/include/media/v4l2-common.h @@ -115,12 +115,15 @@ enum v4l2_chip_ident { }; /* audio ioctls */ -/* v4l device was opened in Radio mode */ + +/* v4l device was opened in Radio mode, to be replaced by VIDIOC_INT_S_TUNER_MODE */ #define AUDC_SET_RADIO _IO('d',88) -/* select from TV,radio,extern,MUTE */ + +/* select from TV,radio,extern,MUTE, to be replaced with VIDIOC_INT_S_AUDIO_ROUTING */ #define AUDC_SET_INPUT _IOW('d',89,int) -/* msp3400 ioctl: will be removed in the near future */ +/* msp3400 ioctl: will be removed in the near future, to be replaced by + VIDIOC_INT_S_AUDIO_ROUTING. */ struct msp_matrix { int input; int output; @@ -128,12 +131,25 @@ struct msp_matrix { #define MSP_SET_MATRIX _IOW('m',17,struct msp_matrix) /* tuner ioctls */ + /* Sets tuner type and its I2C addr */ -#define TUNER_SET_TYPE_ADDR _IOW('d',90,int) -/* Puts tuner on powersaving state, disabling it, except for i2c */ -#define TUNER_SET_STANDBY _IOW('d',91,int) +#define TUNER_SET_TYPE_ADDR _IOW('d', 90, int) + +/* Puts tuner on powersaving state, disabling it, except for i2c. To be replaced + by VIDIOC_INT_S_STANDBY. */ +#define TUNER_SET_STANDBY _IOW('d', 91, int) + /* Sets tda9887 specific stuff, like port1, port2 and qss */ -#define TDA9887_SET_CONFIG _IOW('d',92,int) +#define TDA9887_SET_CONFIG _IOW('d', 92, int) + +/* Switch the tuner to a specific tuner mode. Replacement of AUDC_SET_RADIO */ +#define VIDIOC_INT_S_TUNER_MODE _IOW('d', 93, enum v4l2_tuner_type) + +/* Generic standby command. Passing -1 (all bits set to 1) will put the whole + chip into standby mode, value 0 will make the chip fully active. Specific + bits can be used by certain chips to enable/disable specific subsystems. + Replacement of TUNER_SET_STANDBY. */ +#define VIDIOC_INT_S_STANDBY _IOW('d', 94, u32) /* only implemented if CONFIG_VIDEO_ADV_DEBUG is defined */ #define VIDIOC_INT_S_REGISTER _IOR ('d', 100, struct v4l2_register) @@ -181,4 +197,25 @@ struct msp_matrix { If the frequency is not supported, then -EINVAL is returned. */ #define VIDIOC_INT_I2S_CLOCK_FREQ _IOW ('d', 108, u32) +/* Routing definition, device dependent. It specifies which inputs (if any) + should be routed to which outputs (if any). */ +struct v4l2_routing { + u32 input; + u32 output; +}; + +/* These internal commands should be used to define the inputs and outputs + of an audio/video chip. They will replace AUDC_SET_INPUT. + The v4l2 API commands VIDIOC_S/G_INPUT, VIDIOC_S/G_OUTPUT, + VIDIOC_S/G_AUDIO and VIDIOC_S/G_AUDOUT are meant to be used by the + user. Internally these commands should be used to switch inputs/outputs + because only the driver knows how to map a 'Television' input to the precise + input/output routing of an A/D converter, or a DSP, or a video digitizer. + These four commands should only be sent directly to an i2c device, they + should not be broadcast as the routing is very device specific. */ +#define VIDIOC_INT_S_AUDIO_ROUTING _IOW ('d', 109, struct v4l2_routing) +#define VIDIOC_INT_G_AUDIO_ROUTING _IOR ('d', 110, struct v4l2_routing *) +#define VIDIOC_INT_S_VIDEO_ROUTING _IOW ('d', 111, struct v4l2_routing) +#define VIDIOC_INT_G_VIDEO_ROUTING _IOR ('d', 112, struct v4l2_routing *) + #endif /* V4L2_COMMON_H_ */ -- cgit v1.2.3 From 3fc46d35b30cfae018c4903228a270c9543f4d7a Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Mon, 23 Jan 2006 17:11:11 -0200 Subject: V4L/DVB (3436): move config byte from tuner_params to tuner_range struct. - Move config byte from tuner_params to tuner_range struct. - dvb tuners must be able to set different config byte for each range. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab --- include/media/tuner-types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/media/tuner-types.h b/include/media/tuner-types.h index 15821ab14a9..53ac66e0114 100644 --- a/include/media/tuner-types.h +++ b/include/media/tuner-types.h @@ -14,6 +14,7 @@ enum param_type { struct tuner_range { unsigned short limit; + unsigned char config; unsigned char cb; }; @@ -38,7 +39,6 @@ struct tuner_params { * static unless the control byte was sent first. */ unsigned int cb_first_if_lower_freq:1; - unsigned char config; /* to be moved into struct tuner_range for dvb-pll merge */ unsigned int count; struct tuner_range *ranges; -- cgit v1.2.3 From bbab6fd81f26b210f0815d79064a3387c3a1ade3 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Mon, 6 Feb 2006 09:15:11 -0200 Subject: V4L/DVB (3265): Add count to tunertype struct The tuner_params element is an array of undefined length, with each array member being a set of parameters for each video standard type. The number of members in the tuner_params array will be stored in tuners[]->count Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab --- include/media/tuner-types.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/media/tuner-types.h b/include/media/tuner-types.h index 53ac66e0114..ad9c171bfa0 100644 --- a/include/media/tuner-types.h +++ b/include/media/tuner-types.h @@ -46,6 +46,7 @@ struct tuner_params { struct tunertype { char *name; + unsigned int count; struct tuner_params *params; }; -- cgit v1.2.3 From d97a11e091a0bf40f1cfb0bbf443ddd7b455b133 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Tue, 7 Feb 2006 06:48:40 -0200 Subject: V4L/DVB (3300): Add standard for South Korean NTSC-M using A2 audio. South Korea uses NTSC-M but with A2 audio instead of BTSC. Several audio chips need this information in order to set the correct audio processing registers. Acked-by: Mauro Carvalho Chehab Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- include/linux/videodev2.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 6e33ce96cab..965c8902fe6 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h @@ -638,6 +638,7 @@ typedef __u64 v4l2_std_id; #define V4L2_STD_NTSC_M ((v4l2_std_id)0x00001000) #define V4L2_STD_NTSC_M_JP ((v4l2_std_id)0x00002000) #define V4L2_STD_NTSC_443 ((v4l2_std_id)0x00004000) +#define V4L2_STD_NTSC_M_KR ((v4l2_std_id)0x00008000) #define V4L2_STD_SECAM_B ((v4l2_std_id)0x00010000) #define V4L2_STD_SECAM_D ((v4l2_std_id)0x00020000) @@ -670,7 +671,8 @@ typedef __u64 v4l2_std_id; V4L2_STD_PAL_H |\ V4L2_STD_PAL_I) #define V4L2_STD_NTSC (V4L2_STD_NTSC_M |\ - V4L2_STD_NTSC_M_JP) + V4L2_STD_NTSC_M_JP |\ + V4L2_STD_NTSC_M_KR) #define V4L2_STD_SECAM_DK (V4L2_STD_SECAM_D |\ V4L2_STD_SECAM_K |\ V4L2_STD_SECAM_K1) -- cgit v1.2.3 From 3593cab5d62c4c7abced1076710f9bc2d8847433 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Tue, 7 Feb 2006 06:49:14 -0200 Subject: V4L/DVB (3318b): sem2mutex: drivers/media/, #2 Semaphore to mutex conversion. The conversion was generated via scripts, and the result was validated automatically via a script as well. Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Mauro Carvalho Chehab --- include/linux/videodev2.h | 3 ++- include/media/saa7146.h | 21 ++++++++++++--------- include/media/video-buf-dvb.h | 2 +- include/media/video-buf.h | 2 +- 4 files changed, 16 insertions(+), 12 deletions(-) (limited to 'include') diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 965c8902fe6..1dd8efeff35 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h @@ -17,6 +17,7 @@ #include /* need struct timeval */ #include #include +#include #endif #include /* need __user */ @@ -90,7 +91,7 @@ struct video_device /* for videodev.c intenal usage -- please don't touch */ int users; /* video_exclusive_{open|close} ... */ - struct semaphore lock; /* ... helper function uses these */ + struct mutex lock; /* ... helper function uses these */ char devfs_name[64]; /* devfs */ struct class_device class_dev; /* sysfs */ }; diff --git a/include/media/saa7146.h b/include/media/saa7146.h index 2bc634fcb7b..fee579f10b3 100644 --- a/include/media/saa7146.h +++ b/include/media/saa7146.h @@ -11,6 +11,8 @@ #include /* for i2c subsystem */ #include /* for accessing devices */ #include +#include + #include /* for vmalloc() */ #include /* for vmalloc_to_page() */ @@ -112,7 +114,7 @@ struct saa7146_dev /* different device locks */ spinlock_t slock; - struct semaphore lock; + struct mutex lock; unsigned char __iomem *mem; /* pointer to mapped IO memory */ int revision; /* chip revision; needed for bug-workarounds*/ @@ -133,15 +135,16 @@ struct saa7146_dev void (*vv_callback)(struct saa7146_dev *dev, unsigned long status); /* i2c-stuff */ - struct semaphore i2c_lock; - u32 i2c_bitrate; - struct saa7146_dma d_i2c; /* pointer to i2c memory */ - wait_queue_head_t i2c_wq; - int i2c_op; + struct mutex i2c_lock; + + u32 i2c_bitrate; + struct saa7146_dma d_i2c; /* pointer to i2c memory */ + wait_queue_head_t i2c_wq; + int i2c_op; /* memories */ - struct saa7146_dma d_rps0; - struct saa7146_dma d_rps1; + struct saa7146_dma d_rps0; + struct saa7146_dma d_rps1; }; /* from saa7146_i2c.c */ @@ -150,7 +153,7 @@ int saa7146_i2c_transfer(struct saa7146_dev *saa, const struct i2c_msg *msgs, in /* from saa7146_core.c */ extern struct list_head saa7146_devices; -extern struct semaphore saa7146_devices_lock; +extern struct mutex saa7146_devices_lock; int saa7146_register_extension(struct saa7146_extension*); int saa7146_unregister_extension(struct saa7146_extension*); struct saa7146_format* format_by_fourcc(struct saa7146_dev *dev, int fourcc); diff --git a/include/media/video-buf-dvb.h b/include/media/video-buf-dvb.h index ad0a07a3a89..b78d90fe629 100644 --- a/include/media/video-buf-dvb.h +++ b/include/media/video-buf-dvb.h @@ -11,7 +11,7 @@ struct videobuf_dvb { struct videobuf_queue dvbq; /* video-buf-dvb state info */ - struct semaphore lock; + struct mutex lock; struct task_struct *thread; int nfeeds; diff --git a/include/media/video-buf.h b/include/media/video-buf.h index 8ecfd78e002..d90dec5484e 100644 --- a/include/media/video-buf.h +++ b/include/media/video-buf.h @@ -177,7 +177,7 @@ struct videobuf_queue_ops { }; struct videobuf_queue { - struct semaphore lock; + struct mutex lock; spinlock_t *irqlock; struct pci_dev *pci; -- cgit v1.2.3 From 0004fd59d57a5875db8897966c414a88b5dad481 Mon Sep 17 00:00:00 2001 From: Markus Rechberger Date: Mon, 27 Feb 2006 00:07:27 -0300 Subject: V4L/DVB (3291): Added support for xc3028 analogue tuner (Hauppauge HVR900, Terratec Hybrid XS) Added support for xc3028 to v4l which adds support for: * Terratec Hybrid XS (analogue) * Hauppauge HVR 900 (analogue) Signed-off-by: Markus Rechberger Signed-off-by: Mauro Carvalho Chehab --- include/media/tuner.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/media/tuner.h b/include/media/tuner.h index a5beeac495c..f51759c0d18 100644 --- a/include/media/tuner.h +++ b/include/media/tuner.h @@ -117,6 +117,8 @@ #define TUNER_TNF_5335MF 69 /* Sabrent Bt848 */ #define TUNER_SAMSUNG_TCPN_2121P30A 70 /* Hauppauge PVR-500MCE NTSC */ +#define TUNER_XCEIVE_XC3028 71 + /* tv card specific */ #define TDA9887_PRESENT (1<<0) #define TDA9887_PORT1_INACTIVE (1<<1) @@ -209,6 +211,7 @@ struct tuner { extern unsigned const int tuner_count; extern int microtune_init(struct i2c_client *c); +extern int xc3028_init(struct i2c_client *c); extern int tda8290_init(struct i2c_client *c); extern int tda8290_probe(struct i2c_client *c); extern int tea5767_tuner_init(struct i2c_client *c); -- cgit v1.2.3 From 749eef857948a3de789b7d0e3b96d92199d723cf Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 27 Feb 2006 00:07:40 -0300 Subject: V4L/DVB (3334): Added ET61X251 fourcc type Signed-off-by: Mauro Carvalho Chehab --- include/linux/videodev2.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 1dd8efeff35..3f150435347 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h @@ -326,6 +326,7 @@ struct v4l2_pix_format #define V4L2_PIX_FMT_SN9C10X v4l2_fourcc('S','9','1','0') /* SN9C10x compression */ #define V4L2_PIX_FMT_PWC1 v4l2_fourcc('P','W','C','1') /* pwc older webcam */ #define V4L2_PIX_FMT_PWC2 v4l2_fourcc('P','W','C','2') /* pwc newer webcam */ +#define V4L2_PIX_FMT_ET61X251 v4l2_fourcc('E','6','2','5') /* ET61X251 compression */ /* * F O R M A T E N U M E R A T I O N -- cgit v1.2.3 From 41f38b43e0bfbb2ba1ef3c778f376dad8820b214 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 27 Feb 2006 00:08:49 -0300 Subject: V4L/DVB (3371): Add debug to ioctl arguments. Added a new function that allows printing ioctl arguments. This makes easier to include debug code under v4l ioctl handling. Also fixed some declarations on internal ioctl. Signed-off-by: Mauro Carvalho Chehab --- include/media/v4l2-common.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h index 234e9cf7e84..c44741e78f2 100644 --- a/include/media/v4l2-common.h +++ b/include/media/v4l2-common.h @@ -58,6 +58,9 @@ /* Prints the ioctl in a human-readable format */ extern void v4l_printk_ioctl(unsigned int cmd); +/* Prints the ioctl and arg in a human-readable format */ +extern void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg); + /* Use this macro for non-I2C drivers. Pass the driver name as the first arg. */ #define v4l_print_ioctl(name, cmd) \ do { \ @@ -185,11 +188,11 @@ struct msp_matrix { register contains invalid or erroneous data -EIO is returned. Note that you must fill in the 'id' member and the 'field' member (to determine whether CC data from the first or second field should be obtained). */ -#define VIDIOC_INT_G_VBI_DATA _IOWR('d', 106, struct v4l2_sliced_vbi_data *) +#define VIDIOC_INT_G_VBI_DATA _IOWR('d', 106, struct v4l2_sliced_vbi_data) /* Returns the chip identifier or V4L2_IDENT_UNKNOWN if no identification can be made. */ -#define VIDIOC_INT_G_CHIP_IDENT _IOR ('d', 107, enum v4l2_chip_ident *) +#define VIDIOC_INT_G_CHIP_IDENT _IOR ('d', 107, enum v4l2_chip_ident) /* Sets I2S speed in bps. This is used to provide a standard way to select I2S clock used by driving digital audio streams at some board designs. @@ -214,8 +217,8 @@ struct v4l2_routing { These four commands should only be sent directly to an i2c device, they should not be broadcast as the routing is very device specific. */ #define VIDIOC_INT_S_AUDIO_ROUTING _IOW ('d', 109, struct v4l2_routing) -#define VIDIOC_INT_G_AUDIO_ROUTING _IOR ('d', 110, struct v4l2_routing *) +#define VIDIOC_INT_G_AUDIO_ROUTING _IOR ('d', 110, struct v4l2_routing) #define VIDIOC_INT_S_VIDEO_ROUTING _IOW ('d', 111, struct v4l2_routing) -#define VIDIOC_INT_G_VIDEO_ROUTING _IOR ('d', 112, struct v4l2_routing *) +#define VIDIOC_INT_G_VIDEO_ROUTING _IOR ('d', 112, struct v4l2_routing) #endif /* V4L2_COMMON_H_ */ -- cgit v1.2.3 From f05cce863fa399dd79c5aa3896d608b8b86d8030 Mon Sep 17 00:00:00 2001 From: Andreas Oberritter Date: Mon, 27 Feb 2006 00:09:00 -0300 Subject: V4L/DVB (3375): Add AUDIO_GET_PTS and VIDEO_GET_PTS ioctls Add two new ioctls to read the 33 bit presentation time stamp from audio and video devices as defined in ITU T-REC-H.222.0 and ISO/IEC 13818-1. Acked-by: Johannes Stezenbach Signed-off-by: Andreas Oberritter Signed-off-by: Mauro Carvalho Chehab --- include/linux/dvb/audio.h | 13 +++++++++++++ include/linux/dvb/video.h | 13 +++++++++++++ 2 files changed, 26 insertions(+) (limited to 'include') diff --git a/include/linux/dvb/audio.h b/include/linux/dvb/audio.h index 2b879708468..0874a67c6b9 100644 --- a/include/linux/dvb/audio.h +++ b/include/linux/dvb/audio.h @@ -121,4 +121,17 @@ typedef uint16_t audio_attributes_t; #define AUDIO_SET_ATTRIBUTES _IOW('o', 17, audio_attributes_t) #define AUDIO_SET_KARAOKE _IOW('o', 18, audio_karaoke_t) +/** + * AUDIO_GET_PTS + * + * Read the 33 bit presentation time stamp as defined + * in ITU T-REC-H.222.0 / ISO/IEC 13818-1. + * + * The PTS should belong to the currently played + * frame if possible, but may also be a value close to it + * like the PTS of the last decoded frame or the last PTS + * extracted by the PES parser. + */ +#define AUDIO_GET_PTS _IOR('o', 19, __u64) + #endif /* _DVBAUDIO_H_ */ diff --git a/include/linux/dvb/video.h b/include/linux/dvb/video.h index b1999bfeaa5..1f7fa0351da 100644 --- a/include/linux/dvb/video.h +++ b/include/linux/dvb/video.h @@ -200,4 +200,17 @@ typedef uint16_t video_attributes_t; #define VIDEO_GET_SIZE _IOR('o', 55, video_size_t) #define VIDEO_GET_FRAME_RATE _IOR('o', 56, unsigned int) +/** + * VIDEO_GET_PTS + * + * Read the 33 bit presentation time stamp as defined + * in ITU T-REC-H.222.0 / ISO/IEC 13818-1. + * + * The PTS should belong to the currently played + * frame if possible, but may also be a value close to it + * like the PTS of the last decoded frame or the last PTS + * extracted by the PES parser. + */ +#define VIDEO_GET_PTS _IOR('o', 57, __u64) + #endif /*_DVBVIDEO_H_*/ -- cgit v1.2.3 From 780dfef37e2c941985b708f67aa0074edc922bea Mon Sep 17 00:00:00 2001 From: Chris Pascoe Date: Tue, 28 Feb 2006 08:34:59 -0300 Subject: V4L/DVB (3408): DViCO FusionHDTV DVB-T Hybrid and ZL10353-based FusionHDTV DVB-T Plus support Add support for the FE6600 tuner used on the DVB-T Hybrid board. Add support for the Zarlink ZL10353 DVB-T demodulator, which supersedes the MT352, used on the DViCO FusionHDTV DVB-T Hybrid and later model Plus boards. Signed-off-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab --- include/media/tuner.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/media/tuner.h b/include/media/tuner.h index f51759c0d18..039c77e02d3 100644 --- a/include/media/tuner.h +++ b/include/media/tuner.h @@ -116,9 +116,10 @@ #define TUNER_PHILIPS_TUV1236D 68 /* ATI HDTV Wonder */ #define TUNER_TNF_5335MF 69 /* Sabrent Bt848 */ #define TUNER_SAMSUNG_TCPN_2121P30A 70 /* Hauppauge PVR-500MCE NTSC */ - #define TUNER_XCEIVE_XC3028 71 +#define TUNER_FE6600 72 /* DViCO FusionHDTV DVB-T Hybrid */ + /* tv card specific */ #define TDA9887_PRESENT (1<<0) #define TDA9887_PORT1_INACTIVE (1<<1) -- cgit v1.2.3 From 91ae3299d7d3493a25e5f26cbaceeb18e7760ef3 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Wed, 1 Mar 2006 00:04:42 -0300 Subject: V4L/DVB (3411): FE6600 is a Thomson tuner - The tuner used in DViCO FusionHDTV DVB-T hybrid is made by Thomson - renamed tuner and dvb_pll structs accordingly Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab --- include/media/tuner.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/media/tuner.h b/include/media/tuner.h index 039c77e02d3..02d7d9a76fa 100644 --- a/include/media/tuner.h +++ b/include/media/tuner.h @@ -118,7 +118,7 @@ #define TUNER_SAMSUNG_TCPN_2121P30A 70 /* Hauppauge PVR-500MCE NTSC */ #define TUNER_XCEIVE_XC3028 71 -#define TUNER_FE6600 72 /* DViCO FusionHDTV DVB-T Hybrid */ +#define TUNER_THOMSON_FE6600 72 /* DViCO FusionHDTV DVB-T Hybrid */ /* tv card specific */ #define TDA9887_PRESENT (1<<0) -- cgit v1.2.3 From f3629be8388a679590eb919919ee63e2715ec25e Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Sat, 11 Mar 2006 17:02:01 -0300 Subject: V4L/DVB (3445): LG TALN series: add PAL / SECAM support - added tuner_lg_taln_pal_secam_ranges - renamed tuner 66 from TUNER_LG_NTSC_TALN_MINI to TUNER_LG_TALN - updated FlyTV mini Asus Digimatrix with new tuner Thanks-to: Rickard Osser Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab --- include/media/tuner.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/media/tuner.h b/include/media/tuner.h index 02d7d9a76fa..017fed7d5e4 100644 --- a/include/media/tuner.h +++ b/include/media/tuner.h @@ -110,7 +110,7 @@ #define TUNER_LG_TDVS_H062F 64 /* DViCO FusionHDTV 5 */ #define TUNER_YMEC_TVF66T5_B_DFF 65 /* Acorp Y878F */ -#define TUNER_LG_NTSC_TALN_MINI 66 +#define TUNER_LG_TALN 66 #define TUNER_PHILIPS_TD1316 67 #define TUNER_PHILIPS_TUV1236D 68 /* ATI HDTV Wonder */ -- cgit v1.2.3 From f5762e441d5022ecc5b66b5fe54e41e2ac5d02be Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 13 Mar 2006 13:31:31 -0300 Subject: V4L/DVB (3513): Remove saa711x driver Now, em28xx uses saa7115 instead of saa711x. saa7115 driver is capable of handling saa 7113, 7114 and 7115. Signed-off-by: Mauro Carvalho Chehab --- include/media/v4l2-common.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h index c44741e78f2..2360453e749 100644 --- a/include/media/v4l2-common.h +++ b/include/media/v4l2-common.h @@ -103,6 +103,7 @@ enum v4l2_chip_ident { V4L2_IDENT_UNKNOWN = 0, /* module saa7115: reserved range 100-149 */ + V4L2_IDENT_SAA7113 = 103, V4L2_IDENT_SAA7114 = 104, V4L2_IDENT_SAA7115 = 105, -- cgit v1.2.3