Re: [PATCH 1/4] v4l: add support for selection api
Hi Tomasz, Thanks for the patch, and sorry for the late reply. On Wednesday 31 August 2011 14:28:20 Tomasz Stanislawski wrote: This patch introduces new api for a precise control of cropping and composing features for video devices. The new ioctls are VIDIOC_S_SELECTION and VIDIOC_G_SELECTION. Signed-off-by: Tomasz Stanislawski t.stanisl...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com --- drivers/media/video/v4l2-compat-ioctl32.c |2 + drivers/media/video/v4l2-ioctl.c | 28 + include/linux/videodev2.h | 46 + include/media/v4l2-ioctl.h| 4 ++ 4 files changed, 80 insertions(+), 0 deletions(-) diff --git a/drivers/media/video/v4l2-compat-ioctl32.c b/drivers/media/video/v4l2-compat-ioctl32.c index 61979b7..f3b9d15 100644 --- a/drivers/media/video/v4l2-compat-ioctl32.c +++ b/drivers/media/video/v4l2-compat-ioctl32.c @@ -927,6 +927,8 @@ long v4l2_compat_ioctl32(struct file *file, unsigned int cmd, unsigned long arg) case VIDIOC_CROPCAP: case VIDIOC_G_CROP: case VIDIOC_S_CROP: + case VIDIOC_G_SELECTION: + case VIDIOC_S_SELECTION: case VIDIOC_G_JPEGCOMP: case VIDIOC_S_JPEGCOMP: case VIDIOC_QUERYSTD: diff --git a/drivers/media/video/v4l2-ioctl.c b/drivers/media/video/v4l2-ioctl.c index 002ce13..6e02b45 100644 --- a/drivers/media/video/v4l2-ioctl.c +++ b/drivers/media/video/v4l2-ioctl.c @@ -225,6 +225,8 @@ static const char *v4l2_ioctls[] = { [_IOC_NR(VIDIOC_CROPCAP)] = VIDIOC_CROPCAP, [_IOC_NR(VIDIOC_G_CROP)] = VIDIOC_G_CROP, [_IOC_NR(VIDIOC_S_CROP)] = VIDIOC_S_CROP, + [_IOC_NR(VIDIOC_G_SELECTION)] = VIDIOC_G_SELECTION, + [_IOC_NR(VIDIOC_S_SELECTION)] = VIDIOC_S_SELECTION, [_IOC_NR(VIDIOC_G_JPEGCOMP)] = VIDIOC_G_JPEGCOMP, [_IOC_NR(VIDIOC_S_JPEGCOMP)] = VIDIOC_S_JPEGCOMP, [_IOC_NR(VIDIOC_QUERYSTD)] = VIDIOC_QUERYSTD, @@ -1714,6 +1716,32 @@ static long __video_do_ioctl(struct file *file, ret = ops-vidioc_s_crop(file, fh, p); break; } + case VIDIOC_G_SELECTION: + { + struct v4l2_selection *p = arg; + + if (!ops-vidioc_g_selection) + break; + + dbgarg(cmd, type=%s\n, prt_names(p-type, v4l2_type_names)); + + ret = ops-vidioc_g_selection(file, fh, p); + if (!ret) + dbgrect(vfd, , p-r); + break; + } + case VIDIOC_S_SELECTION: + { + struct v4l2_selection *p = arg; + + if (!ops-vidioc_s_selection) + break; + dbgarg(cmd, type=%s\n, prt_names(p-type, v4l2_type_names)); + dbgrect(vfd, , p-r); + + ret = ops-vidioc_s_selection(file, fh, p); + break; + } case VIDIOC_CROPCAP: { struct v4l2_cropcap *p = arg; diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index fca24cc..b7471fe 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h @@ -738,6 +738,48 @@ struct v4l2_crop { struct v4l2_rectc; }; +/* Hints for adjustments of selection rectangle */ +#define V4L2_SEL_SIZE_GE 0x0001 +#define V4L2_SEL_SIZE_LE 0x0002 + +/* Selection targets */ + +/* current cropping area */ +#define V4L2_SEL_CROP_ACTIVE 0 +/* default cropping area */ +#define V4L2_SEL_CROP_DEFAULT1 +/* cropping bounds */ +#define V4L2_SEL_CROP_BOUNDS 2 +/* current composing area */ +#define V4L2_SEL_COMPOSE_ACTIVE 256 +/* default composing area */ +#define V4L2_SEL_COMPOSE_DEFAULT 257 +/* composing bounds */ +#define V4L2_SEL_COMPOSE_BOUNDS 258 +/* current composing area plus all padding pixels */ +#define V4L2_SEL_COMPOSE_PADDED 259 + +/** + * struct v4l2_selection - selection info + * @type:buffer type (do not use *_MPLANE types) + * @target: selection target, used to choose one of possible rectangles + * @flags: constraints flags + * @r: coordinates of selection window + * @reserved:for future use, rounds structure size to 64 bytes, set to zero + * + * Hardware may use multiple helper window to process a video stream. + * The structure is used to exchange this selection areas between + * an application and a driver. + */ +struct v4l2_selection { + __u32 type; + __u32 target; + __u32 flags; + struct v4l2_rectr; + __u32 reserved[9]; +}; + + /* * A N A L O G V I D E O S T A N D A R D */ @@ -2182,6 +2224,10 @@ struct v4l2_dbg_chip_ident { #define
[GIT PATCHES FOR 3.2] gspca for_v3.2
Hi Mauro, This set includes the patches: http://patchwork.linuxtv.org/patch/7358 http://patchwork.linuxtv.org/patch/114 Cheers. The following changes since commit e553000a14ead0e265a8aa4d241c7b3221e233e3: [media] sr030pc30: Remove empty s_stream op (2011-09-21 12:48:45 -0300) are available in the git repository at: git://linuxtv.org/jfrancois/gspca.git for_v3.2 Frank Schaefer (1): gspca - sn9c20x: Fix status LED device 0c45:62b3. Jean-François Moine (10): gspca - benq: Remove the useless function sd_isoc_init gspca - main: Use a better altsetting for image transfer gspca - main: Handle the xHCI error on usb_set_interface() gspca - topro: New subdriver for Topro webcams gspca - spca1528: Increase the status waiting time gspca - spca1528: Add some comments and update copyright gspca - spca1528: Change the JPEG quality of the images gspca - spca1528: Don't force the USB transfer alternate setting gspca - main: Version change to 2.14.0 gspca - main: Display the subdriver name and version at probe time Wolfram Sang (1): gspca - zc3xx: New webcam 03f0:1b07 HP Premium Starter Cam Documentation/video4linux/gspca.txt |3 + drivers/media/video/gspca/Kconfig| 10 + drivers/media/video/gspca/Makefile |2 + drivers/media/video/gspca/benq.c | 15 - drivers/media/video/gspca/gspca.c| 225 ++- drivers/media/video/gspca/sn9c20x.c |2 +- drivers/media/video/gspca/spca1528.c | 26 +- drivers/media/video/gspca/topro.c| 4989 ++ drivers/media/video/gspca/zc3xx.c|1 + 9 files changed, 5180 insertions(+), 93 deletions(-) create mode 100644 drivers/media/video/gspca/topro.c -- Ken ar c'hentañ | ** Breizh ha Linux atav! ** Jef | http://moinejf.free.fr/ -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: em28xx PCTV 290e patches
Hi Stuart, On 23/09/11 09:52, Stuart Morris wrote: I have a PCTV 290e and have been watching closely the updates to the Linux media tree for this device. Thanks for addressing the issues with the 290e driver, I am now able to use my 290e for watching UK FreeviewHD with a good degree of success. No problems, although I think Mauro has been working on the locking problem as well :-). I have a question regarding some patches you requested a while back that have yet to be applied to the media tree. These patches are: http://www.spinics.net/lists/linux-media/msg36799.html http://www.spinics.net/lists/linux-media/msg36818.html Yes, I have noticed this. My advice would be to apply the first patch that remove the em28xx_remove_from_devlist() function (and the race condition that it creates), but not the second patch because I don't think it's compatible with Mauro's work. My other patches have *slowly* been added to the queue for 3.2; I am still waiting to see if this patch will join the others before resubmitting it. Cheers, Chris -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 2/2] v4l: Add v4l2 subdev driver for S5K6AAFX sensor
Hi Sakari, On 09/23/2011 12:02 AM, Sakari Ailus wrote: Hi Sylwester, I have a few additional comments below, they don't depend on my earlier ones. Thanks a lot for your follow up review! On Wed, Sep 21, 2011 at 07:45:07PM +0200, Sylwester Nawrocki wrote: This driver exposes preview mode operation of the S5K6AAFX sensor with embedded SoC ISP. It uses one of the five user predefined configuration register sets. There is yet no support for capture (snapshot) operation. Following controls are supported: manual/auto exposure and gain, power line frequency (anti-flicker), saturation, sharpness, brightness, contrast, white balance temperature, color effects, horizontal/vertical image flip, frame interval. Signed-off-by: Sylwester Nawrocki s.nawro...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- ... + +struct s5k6aa_pixfmt { +enum v4l2_mbus_pixelcode code; +u32 colorspace; +/* REG_P_FMT(x) register value */ +u16 reg_p_fmt; +}; + +struct s5k6aa_preset { +struct v4l2_frmsize_discrete out_size; +struct v4l2_rect in_win; +const struct s5k6aa_pixfmt *pixfmt; +unsigned int inv_hflip:1; +unsigned int inv_vflip:1; +u8 frame_rate_type; +u8 index; +}; + +/* Not all controls supported by the driver are in this struct. */ +struct s5k6aa_ctrls { +struct v4l2_ctrl_handler handler; +/* Mirror cluster */ +struct v4l2_ctrl *hflip; +struct v4l2_ctrl *vflip; +/* Auto exposure / manual exposure and gain cluster */ +struct v4l2_ctrl *auto_exp; +struct v4l2_ctrl *exposure; +struct v4l2_ctrl *gain; +}; + +struct s5k6aa_interval { +u16 reg_fr_time; +struct v4l2_fract interval; +/* Maximum rectangle for the interval */ +struct v4l2_frmsize_discrete size; +}; + +struct s5k6aa { +struct v4l2_subdev sd; +struct media_pad pad; + +enum v4l2_mbus_type bus_type; +u8 mipi_lanes; + +int (*s_power)(int enable); +struct regulator_bulk_data supplies[S5K6AA_NUM_SUPPLIES]; +struct s5k6aa_gpio gpio[GPIO_NUM]; + +/* master clock frequency */ +unsigned long mclk_frequency; +u16 clk_fop; +u16 clk_fmin; +u16 clk_fmax; + +/* protects the struct members below */ +struct mutex lock; + +struct s5k6aa_ctrls ctrls; +struct s5k6aa_preset presets[S5K6AA_MAX_PRESETS]; +struct s5k6aa_preset *preset; +const struct s5k6aa_interval *fiv; + +unsigned int streaming:1; +unsigned int apply_new_cfg:1; +unsigned int power; +}; + +static struct s5k6aa_regval s5k6aa_analog_config[] = { +/* Analog settings */ +{ 0x112A, 0x }, { 0x1132, 0x }, +{ 0x113E, 0x }, { 0x115C, 0x }, +{ 0x1164, 0x }, { 0x1174, 0x }, +{ 0x1178, 0x }, { 0x077A, 0x }, +{ 0x077C, 0x }, { 0x077E, 0x }, +{ 0x0780, 0x }, { 0x0782, 0x }, +{ 0x0784, 0x }, { 0x0786, 0x }, +{ 0x0788, 0x }, { 0x07A2, 0x }, +{ 0x07A4, 0x }, { 0x07A6, 0x }, +{ 0x07A8, 0x }, { 0x07B6, 0x }, +{ 0x07B8, 0x0002 }, { 0x07BA, 0x0004 }, +{ 0x07BC, 0x0004 }, { 0x07BE, 0x0005 }, +{ 0x07C0, 0x0005 }, { S5K6AA_TERM, 0 }, A number of the hexadecimals are upper case. Should be lower. opps, looking at this so many times still missed that:) I'll fix it. +}; + +/* TODO: Add RGB888 and Bayer format */ +static const struct s5k6aa_pixfmt s5k6aa_formats[] = { +{ V4L2_MBUS_FMT_YUYV8_2X8, V4L2_COLORSPACE_JPEG, 5 }, +/* range 16-240 */ +{ V4L2_MBUS_FMT_YUYV8_2X8, V4L2_COLORSPACE_REC709, 6 }, +{ V4L2_MBUS_FMT_RGB565_2X8_BE, V4L2_COLORSPACE_JPEG, 0 }, +}; + +static const struct s5k6aa_interval s5k6aa_intervals[] = { +{ 1000, {1, 100}, {1280, 1024} }, /* 10 fps */ +{ 666, {15000, 100}, {1280, 1024} }, /* 15 fps */ +{ 500, {2, 100}, {1280, 720} }, /* 20 fps */ +{ 400, {25000, 100}, {640, 480} }, /* 25 fps */ +{ 333, {33300, 100}, {640, 480} }, /* 30 fps */ +}; + +#define S5K6AA_INTERVAL_DEF_INDEX 1 /* 15 fps */ + +static struct v4l2_subdev *ctrl_to_sd(struct v4l2_ctrl *ctrl) +{ +return container_of(ctrl-handler, struct s5k6aa, ctrls.handler)-sd; +} + +static struct s5k6aa *to_s5k6aa(struct v4l2_subdev *sd) +{ +return container_of(sd, struct s5k6aa, sd); +} + +/* Set initial values for all preview presets */ +static void s5k6aa_presets_data_init(struct s5k6aa *s5k6aa, + int hflip, int vflip) +{ +struct s5k6aa_preset *preset = s5k6aa-presets[0]; +int i; + +for (i = 0; i S5K6AA_MAX_PRESETS; i++) { +preset-pixfmt = s5k6aa_formats[0]; +preset-frame_rate_type = FR_RATE_DYNAMIC; +preset-inv_hflip = hflip; +preset-inv_vflip = vflip; +preset-out_size.width =
RE: [PATCH 4/5] ispccdc: Configure CCDC_SYN_MODE register for UYVY8_2X8 and YUYV8_2X8 formats
From: Laurent Pinchart [laurent.pinch...@ideasonboard.com] Sent: Wednesday, September 21, 2011 2:36 PM To: Ravi, Deepthy Cc: mche...@infradead.org; t...@atomide.com; Hiremath, Vaibhav; linux-media@vger.kernel.org; li...@arm.linux.org.uk; linux-arm-ker...@lists.infradead.org; kyungmin.p...@samsung.com; hverk...@xs4all.nl; m.szyprow...@samsung.com; g.liakhovet...@gmx.de; Shilimkar, Santosh; khil...@deeprootsystems.com; david.woodho...@intel.com; a...@linux-foundation.org; linux-ker...@vger.kernel.org; linux-o...@vger.kernel.org; Sakari Ailus Subject: Re: [PATCH 4/5] ispccdc: Configure CCDC_SYN_MODE register for UYVY8_2X8 and YUYV8_2X8 formats Hi Deepthy, On Wednesday 21 September 2011 07:32:44 Ravi, Deepthy wrote: On Wednesday, September 21, 2011 4:56 AM Laurent Pinchart wrote: On Tuesday 20 September 2011 16:56:51 Deepthy Ravi wrote: Configure INPMOD and PACK8 fileds of CCDC_SYN_MODE register for UYVY8_2X8 and YUYV8_2X8 formats. Signed-off-by: Deepthy Ravi deepthy.r...@ti.com --- drivers/media/video/omap3isp/ispccdc.c | 11 --- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/media/video/omap3isp/ispccdc.c b/drivers/media/video/omap3isp/ispccdc.c index 418ba65..1dcf180 100644 --- a/drivers/media/video/omap3isp/ispccdc.c +++ b/drivers/media/video/omap3isp/ispccdc.c @@ -985,8 +985,12 @@ static void ccdc_config_sync_if(struct isp_ccdc_device *ccdc, syn_mode = ~ISPCCDC_SYN_MODE_INPMOD_MASK; if (format-code == V4L2_MBUS_FMT_YUYV8_2X8 || - format-code == V4L2_MBUS_FMT_UYVY8_2X8) - syn_mode |= ISPCCDC_SYN_MODE_INPMOD_YCBCR8; + format-code == V4L2_MBUS_FMT_UYVY8_2X8){ + if (pdata pdata-bt656) + syn_mode |= ISPCCDC_SYN_MODE_INPMOD_YCBCR8; + else + syn_mode |= ISPCCDC_SYN_MODE_INPMOD_YCBCR16; + } else if (format-code == V4L2_MBUS_FMT_YUYV8_1X16 || format-code == V4L2_MBUS_FMT_UYVY8_1X16) syn_mode |= ISPCCDC_SYN_MODE_INPMOD_YCBCR16; @@ -1172,7 +1176,8 @@ static void ccdc_configure(struct isp_ccdc_device *ccdc) syn_mode = ~ISPCCDC_SYN_MODE_SDR2RSZ; /* Use PACK8 mode for 1byte per pixel formats. */ - if (omap3isp_video_format_info(format-code)-width = 8) + if ((omap3isp_video_format_info(format-code)-width = 8) + (omap3isp_video_format_info(format-code)-bpp = 8)) I'm not sure to follow you. This will clear the PACK8 bit for the YUYV8_2X8 formats. Those formats are 8 bits wide, shouldn't PACK8 be set to store samples on 8 bits instead of 16 bits ? Is this patch intended to support YUYV8_2X8 sensors in non BT.656 mode with the bridge enabled ? In that case, what would you think about setting the CCDC input format to YUYV8_1X16 instead ? This would better reflect the reality, as the bridge converts YUYV8_2X8 to YUYV8_1X16, and the CCDC is then fed with YUYV8_1X16. Yes this is intended for YUYV8_2X8 sensors in non BT.656 with 8 to 16 bit bridge enabled. So the data has to be stored as 16 bits per sample. Thats why PACK8 is cleared . I am not sure about using YUYV8_1X16. My original idea when I wrote the YV support patches was to implement this use case with YUYV8_2X8 at the sensor output and YUYV8_1X16 at the CCDC input. The ISP driver could then enable the bridge automatically. I'm not sure if that's the best solution though, it might be confusing for the users. What I would like to keep, however, is the idea of enabling the bridge automatically. [Deepthy Ravi] But for streaming to start, the formats on both ends of the link should match. I believe setting different formats at sensor output and ccdc input will give a broken pipe error. Is my understanding correct ? If so, how do you propose to handle the situation ? Sakari, any opinion on this ? syn_mode |= ISPCCDC_SYN_MODE_PACK8; else syn_mode = ~ISPCCDC_SYN_MODE_PACK8; -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: cx231xx: DMA problem on ARM
Hello Devin, Le Thu, 22 Sep 2011 17:29:29 +0200, Thomas Petazzoni thomas.petazz...@free-electrons.com a écrit : I guess you're talking about 44ecf1df9493e6684cd1bb34abb107a0ffe1078a, which ensures a 10ms msleep call. We don't have this patch, but as with CONFIG_HZ=100, msleep() calls are anyway rounded up to 10ms, so I'm not sure this patch will have a huge impact. But we will try. Then, there is also de99d5328c6d54694471da28711a05adec708c3b, but it doesn't seem to be related to our problem. But we will also try with that one. So, we have now tried with Linux 3.0 and the following additional patches: * 992299e84a4891275ea5924e30b66ce39a701e5e (Fix regression introduced which broke the Hauppauge USBLive 2) * 44ecf1df9493e6684cd1bb34abb107a0ffe1078a (cx231xx: Fix power ramping issue) * de99d5328c6d54694471da28711a05adec708c3b (cx231xx: Provide signal lock status in G_INPUT) * the DMA fix And still the result is the same: we get a first frame, and then nothing more, and we have a large number of error messages in the kernel logs. [ 18.833587] cx231xx v4l2 driver loaded. [ 18.833831] cx231xx #0: New device Hauppauge Hauppauge Device @ 480 Mbps (2040:c200) with 5 interfaces [ 18.833862] cx231xx #0: registering interface 1 [ 18.854492] cx231xx #0: can't change interface 3 alt no. to 3: Max. Pkt size = 0 [ 19.185943] cx231xx #0: can't change interface 4 alt no. to 1: Max. Pkt size = 0 [ 19.405700] cx231xx #0: Identified as Hauppauge USB Live 2 (card=9) [ 19.692993] cx231xx #0: cx231xx_dif_set_standard: setStandard to [ 20.238159] cx25840 4-0044: cx23102 A/V decoder found @ 0x88 (cx231xx #0) [ 20.333740] cx25840 4-0044: Firmware download size changed to 16 bytes max length [ 21.783569] smsc95xx 1-2.1:1.0: eth0: link up, 100Mbps, full-duplex, lpa 0xC5E1 [ 22.921936] cx25840 4-0044: loaded v4l-cx231xx-avcore-01.fw firmware (16382 bytes) [ 22.960815] cx231xx #0: cx231xx #0: v4l2 driver version 0.0.1 [ 22.989715] cx231xx #0: cx231xx_dif_set_standard: setStandard to [ 23.042663] cx231xx #0: video_mux : 0 [ 23.042694] cx231xx #0: do_mode_ctrl_overrides : 0xb000 [ 23.043548] cx231xx #0: do_mode_ctrl_overrides NTSC [ 23.056213] cx231xx #0: cx231xx #0/0: registered device video0 [v4l2] [ 23.061035] cx231xx #0: cx231xx #0/0: registered device vbi0 [ 23.061065] cx231xx #0: V4L2 device registered as video0 and vbi0 [ 23.061096] cx231xx #0: EndPoint Addr 0x84, Alternate settings: 5 [ 23.061096] cx231xx #0: Alternate setting 0, max size= 512 [ 23.061126] cx231xx #0: Alternate setting 1, max size= 184 [ 23.061126] cx231xx #0: Alternate setting 2, max size= 728 [ 23.061157] cx231xx #0: Alternate setting 3, max size= 2892 [ 23.061157] cx231xx #0: Alternate setting 4, max size= 1800 [ 23.061187] cx231xx #0: EndPoint Addr 0x85, Alternate settings: 2 [ 23.061187] cx231xx #0: Alternate setting 0, max size= 512 [ 23.061218] cx231xx #0: Alternate setting 1, max size= 512 [ 23.061218] cx231xx #0: EndPoint Addr 0x86, Alternate settings: 2 [ 23.061248] cx231xx #0: Alternate setting 0, max size= 512 [ 23.061248] cx231xx #0: Alternate setting 1, max size= 576 [ 23.067108] usbcore: registered new interface driver cx231xx [ 23.360412] cx231xx #0: setPowerMode::mode = 48, No Change req. [ 23.365905] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8 [ 23.367156] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8 [ 23.872253] cx231xx #0: cx231xx-audio.c: probing for cx231xx non standard usbaudio [ 23.875762] cx231xx #0: EndPoint Addr 0x83, Alternate settings: 3 [ 23.875793] cx231xx #0: Alternate setting 0, max size= 512 [ 23.875793] cx231xx #0: Alternate setting 1, max size= 28 [ 23.875823] cx231xx #0: Alternate setting 2, max size= 52 [ 23.875823] cx231xx: Cx231xx Audio Extension initialized [ 24.794891] lp: driver loaded but no devices found [ 24.880157] ppdev: user-space parallel port driver [ 30.872589] eth0: no IPv6 routers present [ 183.789154] omap_device: omap-mcbsp.2: new worst case activate latency 0: 30517 [ 183.829803] omap_device: omap-mcbsp.2: new worst case deactivate latency 0: 30517 [ 184.355712] omap_device: omap-mcbsp.2: new worst case deactivate latency 0: 61035 [ 186.400878] cx231xx #0: cx231xx_start_stream():: ep_mask = 4 [ 186.401855] cx231xx #0: cx231xx_stop_stream():: ep_mask = 4 [ 186.404571] cx231xx #0: cx231xx_start_stream():: ep_mask = 4 [ 186.405578] cx231xx #0: cx231xx_stop_stream():: ep_mask = 4 [ 186.408050] cx231xx #0: cx231xx_start_stream():: ep_mask = 4 [ 186.409332] cx231xx #0: cx231xx_stop_stream():: ep_mask = 4 [ 186.412109] cx231xx #0: cx231xx_start_stream():: ep_mask = 4 [ 186.414306] cx231xx #0: cx231xx_stop_stream():: ep_mask = 4 [ 186.416961] cx231xx #0: cx231xx_start_stream():: ep_mask = 4 [ 186.418060] cx231xx #0: cx231xx_stop_stream():: ep_mask = 4 [ 186.427520] cx231xx #0: cx231xx_start_stream():: ep_mask = 4 [ 186.498504] cx231xx #0:
Re: [PATCH 2/4] v4l: add documentation for selection API
On 09/23/2011 12:41 AM, Laurent Pinchart wrote: Hi Laurent, Thank you for the review. It looks that spelling highlighting is not enough :). I discussed some of your comments. There are still some open issues. Hi Tomasz, Thanks for the patch, and sorry for the late reply. On Wednesday 31 August 2011 14:28:21 Tomasz Stanislawski wrote: This patch adds a documentation for VIDIOC_{G/S}_SELECTION ioctl. Moreover, the patch adds the description of modeling of composing, cropping and scaling features in V4L2. Finally, some examples are presented. Signed-off-by: Tomasz Stanislawskit.stanisl...@samsung.com Signed-off-by: Kyungmin Parkkyungmin.p...@samsung.com The documentation looks very good. Thank you for your great work. Just a couple of small comments below, mostly about typo fixes. [snip] diff --git a/Documentation/DocBook/media/v4l/selection-api.xml b/Documentation/DocBook/media/v4l/selection-api.xml new file mode 100644 index 000..d9fd57d8 --- /dev/null +++ b/Documentation/DocBook/media/v4l/selection-api.xml @@ -0,0 +1,278 @@ +section id=selection-api + +titleCropping, composing and scaling/title + +paraSome video capture devices can sample a subsection of a picture and +shrink or enlarge it to an image of arbitrary size. Next, the devices can +insert the image into larger one. Some video output devices can crop part of an +input image, scale it up or down and insert it at an arbitrary scan line and +horizontal offset into a video signal. We call these abilities cropping, +scaling and composing./para + +paraOn a videoemphasiscapture/emphasis device the source is a video +signal, and the cropping target determine the area actually sampled. The sink +is an image stored in a memory buffer. The composing area specify which part s/specify/specifies/ +of the buffer is actually written by the hardware./para s/written/written to/ +paraOn a videoemphasisoutput/emphasis device the source is an image in a +memory buffer, and the cropping target is a part of an image to shown on a s/shown/show/ or s/shown/be shown/ +display. The sink is the display or the graphics screen. The application may +select the part of display where the image should be displayed. The size and +position of such a window is controlled by compose target./para s/compose target/the compose target/ +paraRectangles for all cropping and composing targets are defined even if the +device does not support neither cropping nor composing. Their size and position s/does not support/supports/ or s/neither cropping nor/cropping or/ +will be fixed in such a case. If the device does not support scaling then the +cropping and composing rectangles have the same size./para + +section +titleSelection targets/title + +figure id=sel-targets-capture + titleCropping and composing targets/title + mediaobject + imageobject + imagedata fileref=selection.png format=PNG / + /imageobject + textobject + phraseTargets used by a cropping, composing and scaling +process/phrase + /textobject + /mediaobject +/figure +/section + +section + +titleConfiguration/title + +paraApplications can use thelink linkend=vidioc-g-selectionselection +API/link to select an area in a video signal or a buffer, and to query for +default settings and hardware limits./para + +paraVideo hardware can have various cropping, composing and scaling +limitations. It may only scale up or down, support only discrete scaling +factors, or have different scaling abilities in horizontal and vertical +direction. Also it may not support scaling at all. At the same time the s/horizontal and vertical direction/the horizontal and vertical directions/ +cropping/composing rectangles may have to be aligned, and both the source and +the sink may have arbitrary upper and lower size limits. Therefore, as usual, +drivers are expected to adjust the requested parameters and return the actual +values selected. An application can control the rounding behaviour usinglink +linkend=v4l2-sel-flags constraint flags/link./para + +section + +titleConfiguration of video capture/title + +paraSee the figurexref linkend=sel-targets-capture / for examples of the s/the figure/figure/ +selection targets available for a video capture device. The targets should be +configured according to the pipeline configuration rules for a capture device. Do we have such rules written somewhere ? The pipeline configuration rules are not a part of V4L2 doc yet. It was discussed at IRC meeting. Do you think that the RFC should be posted in separate patch to V4L2 doc? +It means that the cropping targets must be configured in prior to the composing +targets./para + +paraThe range of coordinates of the top left corner, width and height of a +area which can be sampled is given by theconstant V4L2_SEL_CROP_BOUNDS s/a area which/areas that/ +/constant target. To support a wide range of hardware this specification does +not define an origin or
RE: cx231xx: DMA problem on ARM
Hi Thomas, Do you have USB Analyzer (hardware) ? If so, Is it possible to take a trace and compare it with x86 trace to see for any obvious differences ? I am actually confused why set interface fails in the log. The device is very simple one with no firmware and is totally controlled by hardware itself. So far we had never seen any issue, though never tried with any other ARM based devices. Not sure if anybody had tried already. Hope that helps, Thanks Sri -Original Message- From: Thomas Petazzoni [mailto:thomas.petazz...@free-electrons.com] Sent: Friday, September 23, 2011 5:04 AM To: Devin Heitmueller Cc: Thomas Petazzoni; linux-media@vger.kernel.org; Sri Deevi; Maxime Ripard Subject: Re: cx231xx: DMA problem on ARM Hello Devin, Le Thu, 22 Sep 2011 17:29:29 +0200, Thomas Petazzoni thomas.petazz...@free-electrons.com a écrit : I guess you're talking about 44ecf1df9493e6684cd1bb34abb107a0ffe1078a, which ensures a 10ms msleep call. We don't have this patch, but as with CONFIG_HZ=100, msleep() calls are anyway rounded up to 10ms, so I'm not sure this patch will have a huge impact. But we will try. Then, there is also de99d5328c6d54694471da28711a05adec708c3b, but it doesn't seem to be related to our problem. But we will also try with that one. So, we have now tried with Linux 3.0 and the following additional patches: * 992299e84a4891275ea5924e30b66ce39a701e5e (Fix regression introduced which broke the Hauppauge USBLive 2) * 44ecf1df9493e6684cd1bb34abb107a0ffe1078a (cx231xx: Fix power ramping issue) * de99d5328c6d54694471da28711a05adec708c3b (cx231xx: Provide signal lock status in G_INPUT) * the DMA fix And still the result is the same: we get a first frame, and then nothing more, and we have a large number of error messages in the kernel logs. [ 18.833587] cx231xx v4l2 driver loaded. [ 18.833831] cx231xx #0: New device Hauppauge Hauppauge Device @ 480 Mbps (2040:c200) with 5 interfaces [ 18.833862] cx231xx #0: registering interface 1 [ 18.854492] cx231xx #0: can't change interface 3 alt no. to 3: Max. Pkt size = 0 [ 19.185943] cx231xx #0: can't change interface 4 alt no. to 1: Max. Pkt size = 0 [ 19.405700] cx231xx #0: Identified as Hauppauge USB Live 2 (card=9) [ 19.692993] cx231xx #0: cx231xx_dif_set_standard: setStandard to [ 20.238159] cx25840 4-0044: cx23102 A/V decoder found @ 0x88 (cx231xx #0) [ 20.333740] cx25840 4-0044: Firmware download size changed to 16 bytes max length [ 21.783569] smsc95xx 1-2.1:1.0: eth0: link up, 100Mbps, full-duplex, lpa 0xC5E1 [ 22.921936] cx25840 4-0044: loaded v4l-cx231xx-avcore-01.fw firmware (16382 bytes) [ 22.960815] cx231xx #0: cx231xx #0: v4l2 driver version 0.0.1 [ 22.989715] cx231xx #0: cx231xx_dif_set_standard: setStandard to [ 23.042663] cx231xx #0: video_mux : 0 [ 23.042694] cx231xx #0: do_mode_ctrl_overrides : 0xb000 [ 23.043548] cx231xx #0: do_mode_ctrl_overrides NTSC [ 23.056213] cx231xx #0: cx231xx #0/0: registered device video0 [v4l2] [ 23.061035] cx231xx #0: cx231xx #0/0: registered device vbi0 [ 23.061065] cx231xx #0: V4L2 device registered as video0 and vbi0 [ 23.061096] cx231xx #0: EndPoint Addr 0x84, Alternate settings: 5 [ 23.061096] cx231xx #0: Alternate setting 0, max size= 512 [ 23.061126] cx231xx #0: Alternate setting 1, max size= 184 [ 23.061126] cx231xx #0: Alternate setting 2, max size= 728 [ 23.061157] cx231xx #0: Alternate setting 3, max size= 2892 [ 23.061157] cx231xx #0: Alternate setting 4, max size= 1800 [ 23.061187] cx231xx #0: EndPoint Addr 0x85, Alternate settings: 2 [ 23.061187] cx231xx #0: Alternate setting 0, max size= 512 [ 23.061218] cx231xx #0: Alternate setting 1, max size= 512 [ 23.061218] cx231xx #0: EndPoint Addr 0x86, Alternate settings: 2 [ 23.061248] cx231xx #0: Alternate setting 0, max size= 512 [ 23.061248] cx231xx #0: Alternate setting 1, max size= 576 [ 23.067108] usbcore: registered new interface driver cx231xx [ 23.360412] cx231xx #0: setPowerMode::mode = 48, No Change req. [ 23.365905] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8 [ 23.367156] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8 [ 23.872253] cx231xx #0: cx231xx-audio.c: probing for cx231xx non standard usbaudio [ 23.875762] cx231xx #0: EndPoint Addr 0x83, Alternate settings: 3 [ 23.875793] cx231xx #0: Alternate setting 0, max size= 512 [ 23.875793] cx231xx #0: Alternate setting 1, max size= 28 [ 23.875823] cx231xx #0: Alternate setting 2, max size= 52 [ 23.875823] cx231xx: Cx231xx Audio Extension initialized [ 24.794891] lp: driver loaded but no devices found [ 24.880157] ppdev: user-space parallel port driver [ 30.872589] eth0: no IPv6 routers present [ 183.789154] omap_device: omap-mcbsp.2: new worst case activate latency 0: 30517 [ 183.829803] omap_device: omap-mcbsp.2: new worst case deactivate latency 0: 30517 [ 184.355712] omap_device: omap-mcbsp.2: new worst case deactivate
Re: [PATCH 2/4] v4l: add documentation for selection API
Hi Tomasz, On Friday 23 September 2011 14:36:51 Tomasz Stanislawski wrote: On 09/23/2011 12:41 AM, Laurent Pinchart wrote: Hi Laurent, Thank you for the review. Your welcome. Sorry once again for the delay. It looks that spelling highlighting is not enough :). That's what review is for :-) I discussed some of your comments. There are still some open issues. On Wednesday 31 August 2011 14:28:21 Tomasz Stanislawski wrote: [snip] +section + +titleConfiguration of video capture/title + +paraSee the figurexref linkend=sel-targets-capture / for examples of the s/the figure/figure/ +selection targets available for a video capture device. The targets should be +configured according to the pipeline configuration rules for a capture device. Do we have such rules written somewhere ? The pipeline configuration rules are not a part of V4L2 doc yet. It was discussed at IRC meeting. Do you think that the RFC should be posted in separate patch to V4L2 doc? As this document refers to them, I think that would be useful. We're talking about pipeline configuration using the video nodes API, right ? [snip] +paraThe composing targets refer to a memory buffer. The limits of composing +coordinates are obtained usingconstant V4L2_SEL_COMPOSE_BOUNDS/constant. +All coordinates are expressed in pixels. The top/left corner is always point +constant {0,0}/constant. The width and height is equal to the image size +specified usingconstant VIDIOC_S_FMT/constant./para We support sub-pixel cropping, but not sub-pixel composition. Can you remind me of the rationale for that ? Do you mean that OMAP3 ISP supports cropping with sub-pixel resolution? No, sorry. By we I meant the selection API. I thought that pixels are natural units for images stored in memory buffers. But I would not be surprised if there was some weird fractal-like format providing images with infinite resolution. Do you think that the sentence All coordinates are expressed in pixel should be dropped from spec? I don't know to be honest. What bothers me is that the spec allows sub-pixel resolution for cropping but not for composing. I'm not sure if there's any hardware supported by our current drivers that could make use of sub-pixel selections, but I don't see a reason to allow sub-pixel cropping and not sub- pixel composing. The solution might be to disallow sub-pixel cropping for now though. If we do that, can we later extend it in a clean way ? [snip] +paraFor capture devices the default composing rectangle is queried using +constant V4L2_SEL_COMPOSE_DEFAULT/constant and it is always equal to +bounding rectangle./para If they're always equal, why do we have two different targets ? :-) Maybe is usually identical to or is most of the time identical to would be better ? Good question. I remember that once Hans has said that there should be no margins in an image if no selection ioctl was used. Therefore I decided that default and bounds rectangles should be equal for video capture. I am interested what is Hans' opinion about proposal of softening this requirement. I think it's a good requirement for now, but we might find use cases later that would conflict with the requirement. If we just say that the rectangles must be identical, applications might use the BOUNDS target instead of the DEFAULT target to retrieve the default rectangle (if they're identical, why should they bother ?). I'd like to reword the spec to make it clear that that drivers must (at least for now) have identical defaults and bounds, and that application must use the DEFAULT target to retrieve the default rectangle in case the driver-side requirement gets lifted later. +paraThe part of a buffer that is modified by the hardware is given by +constant V4L2_SEL_COMPOSE_PADDED/constant. It contains all pixels defined +usingconstant V4L2_SEL_COMPOSE_ACTIVE/constant plus all padding data +modified by hardware during insertion process. All pixel outside this rectangle s/All pixel/All pixels/ +emphasismust not/emphasis be changed by the hardware. The content of pixels +that lie inside the padded area but outside active area is undefined. The +application can use the padded and active rectangles to detect where the +rubbish pixels are located and remove them if needed./para How would an application remove them ? The application may use memset if it recognizes fourcc. The idea of padding target was to provide information about artifacts introduced the hardware. If the image is decoded directly to framebuffer then the application could remove artifacts. We could introduce some V4L2 control to inform if the padding are is filled with zeros to avoid redundant memset. What do you think? OK, I understand this better now. I'm still not sure how applications will be able to cope with that. memset'ing the garbage area won't look good on the
[PATCH 2/2] media, rc: Use static inline functions to kill warnings
From: Pekka Enberg penb...@kernel.org This patch converts some ifdef'd wrapper functions from macros to static inline functions to kill the following warnings issued by GCC: CC [M] drivers/media/rc/ir-raw.o drivers/media/rc/ir-raw.c: In function ‘init_decoders’: drivers/media/rc/ir-raw.c:353:2: warning: statement with no effect [-Wunused-value] drivers/media/rc/ir-raw.c:354:2: warning: statement with no effect [-Wunused-value] drivers/media/rc/ir-raw.c:355:2: warning: statement with no effect [-Wunused-value] drivers/media/rc/ir-raw.c:356:2: warning: statement with no effect [-Wunused-value] drivers/media/rc/ir-raw.c:357:2: warning: statement with no effect [-Wunused-value] drivers/media/rc/ir-raw.c:359:2: warning: statement with no effect [-Wunused-value] Cc: Mauro Carvalho Chehab mche...@infradead.org Cc: David Härdeman da...@hardeman.nu Cc: Jarod Wilson ja...@redhat.com Cc: linux-media@vger.kernel.org Signed-off-by: Pekka Enberg penb...@kernel.org --- drivers/media/rc/rc-core-priv.h | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/media/rc/rc-core-priv.h b/drivers/media/rc/rc-core-priv.h index 04c2c72..c6ca870 100644 --- a/drivers/media/rc/rc-core-priv.h +++ b/drivers/media/rc/rc-core-priv.h @@ -162,49 +162,49 @@ void ir_raw_init(void); #ifdef CONFIG_IR_NEC_DECODER_MODULE #define load_nec_decode() request_module(ir-nec-decoder) #else -#define load_nec_decode() 0 +static inline void load_nec_decode(void) { } #endif /* from ir-rc5-decoder.c */ #ifdef CONFIG_IR_RC5_DECODER_MODULE #define load_rc5_decode() request_module(ir-rc5-decoder) #else -#define load_rc5_decode() 0 +static inline void load_rc5_decode(void) { } #endif /* from ir-rc6-decoder.c */ #ifdef CONFIG_IR_RC6_DECODER_MODULE #define load_rc6_decode() request_module(ir-rc6-decoder) #else -#define load_rc6_decode() 0 +static inline void load_rc6_decode(void) { } #endif /* from ir-jvc-decoder.c */ #ifdef CONFIG_IR_JVC_DECODER_MODULE #define load_jvc_decode() request_module(ir-jvc-decoder) #else -#define load_jvc_decode() 0 +static inline void load_jvc_decode(void) { } #endif /* from ir-sony-decoder.c */ #ifdef CONFIG_IR_SONY_DECODER_MODULE #define load_sony_decode() request_module(ir-sony-decoder) #else -#define load_sony_decode() 0 +static inline void load_sony_decode(void) { } #endif /* from ir-mce_kbd-decoder.c */ #ifdef CONFIG_IR_MCE_KBD_DECODER_MODULE #define load_mce_kbd_decode() request_module(ir-mce_kbd-decoder) #else -#define load_mce_kbd_decode() 0 +static inline void load_mce_kbd_decode(void) { } #endif /* from ir-lirc-codec.c */ #ifdef CONFIG_IR_LIRC_CODEC_MODULE #define load_lirc_codec() request_module(ir-lirc-codec) #else -#define load_lirc_codec() 0 +static inline void load_lirc_codec(void) { } #endif -- 1.7.6.2 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[DVB] Digital Devices Cine CT V6 support
Dear Oliver, Using your latest development tree (hg clone http://linuxtv.org/hg/~endriss/media_build_experimental), I have made a small modification in ddbridge-core.c (see below) to make the new Cine CT V6 card detected by the ddbridge module. With this small patch, the card is now detected, but not the double C/T tuner onboard. If I connect a DuoFlex CT on a port, the tuners of the add-in card are detected. Also, I was wondering why they put a male and a female RF connectors on the Cine CT V6 (maybe a loop-through?) where there are two female RF connectors on the DuoFlex CT card. Best regards, Sebastien. Before -- static struct ddb_info ddb_v6 = { .type = DDB_OCTOPUS, .name = Digital Devices Cine S2 V6 DVB adapter, .port_num = 3, }; And DDB_ID(DDVID, 0x0003, DDVID, 0x0020, ddb_v6), After - static struct ddb_info ddb_v6_s2 = { .type = DDB_OCTOPUS, .name = Digital Devices Cine S2 V6 DVB-S/S2 adapter, .port_num = 3, }; static struct ddb_info ddb_v6_ct = { .type = DDB_OCTOPUS, .name = Digital Devices Cine S2 V6 DVB-C/T adapter, .port_num = 3, }; And DDB_ID(DDVID, 0x0003, DDVID, 0x0020, ddb_v6_s2), DDB_ID(DDVID, 0x0003, DDVID, 0x0030, ddb_v6_ct), -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: em28xx PCTV 290e patches
Em 23-09-2011 06:30, Chris Rankin escreveu: Hi Stuart, On 23/09/11 09:52, Stuart Morris wrote: I have a PCTV 290e and have been watching closely the updates to the Linux media tree for this device. Thanks for addressing the issues with the 290e driver, I am now able to use my 290e for watching UK FreeviewHD with a good degree of success. No problems, although I think Mauro has been working on the locking problem as well :-). I have a question regarding some patches you requested a while back that have yet to be applied to the media tree. These patches are: http://www.spinics.net/lists/linux-media/msg36799.html http://www.spinics.net/lists/linux-media/msg36818.html Yes, I have noticed this. My advice would be to apply the first patch that remove the em28xx_remove_from_devlist() function (and the race condition that it creates), but not the second patch because I don't think it's compatible with Mauro's work. My other patches have *slowly* been added to the queue for 3.2; I am still waiting to see if this patch will join the others before resubmitting it. Chris, Please, re-submit the ones that are pertinent. Some of your patches are missing your SOB, and, due to the patchwork.kernel.org outage, I lost part of my control about what patches got obsoleted, especially since you didn't add a version number to the patches you've submitted. In general, when people re-submit a patch series, they tag the new series as [PATCHv2] or something, to help maintainers to discard the old stuff ;) Cheers, Chris -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/4] v4l: add documentation for selection API
On 09/23/2011 03:13 PM, Laurent Pinchart wrote: Hi Laurent, Thank you very much for your comments. The crop/compose setup is much more complicated task than I expected. The discussion is very helpful to find the optimal solution. +selection targets available for a video capture device. The targets should be +configured according to the pipeline configuration rules for a capture device. Do we have such rules written somewhere ? The pipeline configuration rules are not a part of V4L2 doc yet. It was discussed at IRC meeting. Do you think that the RFC should be posted in separate patch to V4L2 doc? As this document refers to them, I think that would be useful. We're talking about pipeline configuration using the video nodes API, right ? Yes. The pipeline configuration should go with the separate RFC. For now, I remove this sentence. Then it will be after pipeline RFC is posted. [snip] +paraThe composing targets refer to a memory buffer. The limits of composing +coordinates are obtained usingconstant V4L2_SEL_COMPOSE_BOUNDS/constant. +All coordinates are expressed in pixels. The top/left corner is always point +constant {0,0}/constant. The width and height is equal to the image size +specified usingconstant VIDIOC_S_FMT/constant./para We support sub-pixel cropping, but not sub-pixel composition. Can you remind me of the rationale for that ? Do you mean that OMAP3 ISP supports cropping with sub-pixel resolution? No, sorry. By we I meant the selection API. I thought that pixels are natural units for images stored in memory buffers. But I would not be surprised if there was some weird fractal-like format providing images with infinite resolution. Do you think that the sentence All coordinates are expressed in pixel should be dropped from spec? I don't know to be honest. What bothers me is that the spec allows sub-pixel resolution for cropping but not for composing. I'm not sure if there's any hardware supported by our current drivers that could make use of sub-pixel selections, but I don't see a reason to allow sub-pixel cropping and not sub- pixel composing. The solution might be to disallow sub-pixel cropping for now though. If we do that, can we later extend it in a clean way ? Video Processor (VP) chip that is part of s5p-tv hardware is capable of subpixel cropping using polyphase filters. So the hardware is already present. I have to ideas to add subpixels to selection API. 1. Introduce struct v4l2_frect similar to struct v4l2_rect. All its fields' type would be struct v4l2_fract. 2. Add field denominator to v4l2_selection as one of reserved fields. All selection coordinates would be divided by this number. The 2nd proposal could added in the future update to selection API. [snip] +paraFor capture devices the default composing rectangle is queried using +constant V4L2_SEL_COMPOSE_DEFAULT/constant and it is always equal to +bounding rectangle./para If they're always equal, why do we have two different targets ? :-) Maybe is usually identical to or is most of the time identical to would be better ? Good question. I remember that once Hans has said that there should be no margins in an image if no selection ioctl was used. Therefore I decided that default and bounds rectangles should be equal for video capture. I am interested what is Hans' opinion about proposal of softening this requirement. I think it's a good requirement for now, but we might find use cases later that would conflict with the requirement. If we just say that the rectangles must be identical, applications might use the BOUNDS target instead of the DEFAULT target to retrieve the default rectangle (if they're identical, why should they bother ?). I'd like to reword the spec to make it clear that that drivers must (at least for now) have identical defaults and bounds, and that application must use the DEFAULT target to retrieve the default rectangle in case the driver-side requirement gets lifted later. OK +paraThe part of a buffer that is modified by the hardware is given by +constant V4L2_SEL_COMPOSE_PADDED/constant. It contains all pixels defined +usingconstant V4L2_SEL_COMPOSE_ACTIVE/constant plus all padding data +modified by hardware during insertion process. All pixel outside this rectangle s/All pixel/All pixels/ +emphasismust not/emphasis be changed by the hardware. The content of pixels +that lie inside the padded area but outside active area is undefined. The +application can use the padded and active rectangles to detect where the +rubbish pixels are located and remove them if needed./para How would an application remove them ? The application may use memset if it recognizes fourcc. The idea of padding target was to provide information about artifacts introduced the hardware. If the image is decoded directly to framebuffer then the application could remove artifacts. We could introduce some V4L2 control to inform if the padding are is filled with zeros to
[GIT PATCHES FOR 3.2] Media bus configuration flags
Hi Mauro, Please pull from git://git.infradead.org/users/kmpark/linux-2.6-samsung v4l_mbus_config for a small addition to the media bus configuration flags, a patch converting s5p-fimc driver to use generic flags and an optimization patch for m5mols driver. I have added the m5mols patch which has also been included in recent pull request from Marek, as I wasn't sure if you're going to pull it due to some further ongoing discussion on the selection API. The following changes since commit 3a7a62378be538944ff00904b8e0b795fe16609a: [media] ati_remote: update Kconfig description (2011-09-22 10:55:10 -0300) are available in the git repository at: git://git.infradead.org/users/kmpark/linux-2.6-samsung v4l_mbus_config Sylwester Nawrocki (3): v4l2: Add polarity flag definitions for the parallel bus FIELD signal s5p-fimc: Convert to use generic media bus polarity flags m5mols: Remove superfluous irq field from the platform data struct drivers/media/video/m5mols/m5mols_core.c |6 +++--- drivers/media/video/s5p-fimc/fimc-reg.c | 14 +- drivers/media/video/s5p-fimc/regs-fimc.h |1 + include/media/m5mols.h |4 +--- include/media/s5p_fimc.h |7 +-- include/media/v4l2-mediabus.h| 12 ++-- 6 files changed, 25 insertions(+), 19 deletions(-) Best regards, -- Sylwester Nawrocki Samsung Poland RD Center -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] xc5000: Add support for get_if_frequency
This is needed for devices with DRX-K and xc5000. Compiled-test only. Please test with a HVR 930C hardware. Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com --- drivers/media/common/tuners/xc5000.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/drivers/media/common/tuners/xc5000.c b/drivers/media/common/tuners/xc5000.c index aa1b2e8..e689b72 100644 --- a/drivers/media/common/tuners/xc5000.c +++ b/drivers/media/common/tuners/xc5000.c @@ -968,6 +968,14 @@ static int xc5000_get_frequency(struct dvb_frontend *fe, u32 *freq) return 0; } +static int xc5000_get_if_frequency(struct dvb_frontend *fe, u32 *freq) +{ + struct xc5000_priv *priv = fe-tuner_priv; + dprintk(1, %s()\n, __func__); + *freq = priv-if_khz; + return 0; +} + static int xc5000_get_bandwidth(struct dvb_frontend *fe, u32 *bw) { struct xc5000_priv *priv = fe-tuner_priv; @@ -1108,6 +1116,7 @@ static const struct dvb_tuner_ops xc5000_tuner_ops = { .set_params= xc5000_set_params, .set_analog_params = xc5000_set_analog_params, .get_frequency = xc5000_get_frequency, + .get_if_frequency = xc5000_get_if_frequency, .get_bandwidth = xc5000_get_bandwidth, .get_status= xc5000_get_status }; -- 1.7.6.2 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [v2] xc5000: Add support for get_if_frequency
This is needed for devices with DRX-K and xc5000. Compiled-test only. Please test with a HVR 930C hardware. Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com --- v2: Frequency should be in Hz --- drivers/media/common/tuners/xc5000.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/drivers/media/common/tuners/xc5000.c b/drivers/media/common/tuners/xc5000.c index aa1b2e8..e3e4fb7 100644 --- a/drivers/media/common/tuners/xc5000.c +++ b/drivers/media/common/tuners/xc5000.c @@ -968,6 +968,14 @@ static int xc5000_get_frequency(struct dvb_frontend *fe, u32 *freq) return 0; } +static int xc5000_get_if_frequency(struct dvb_frontend *fe, u32 *freq) +{ + struct xc5000_priv *priv = fe-tuner_priv; + dprintk(1, %s()\n, __func__); + *freq = priv-if_khz * 1000; + return 0; +} + static int xc5000_get_bandwidth(struct dvb_frontend *fe, u32 *bw) { struct xc5000_priv *priv = fe-tuner_priv; @@ -1108,6 +1116,7 @@ static const struct dvb_tuner_ops xc5000_tuner_ops = { .set_params= xc5000_set_params, .set_analog_params = xc5000_set_analog_params, .get_frequency = xc5000_get_frequency, + .get_if_frequency = xc5000_get_if_frequency, .get_bandwidth = xc5000_get_bandwidth, .get_status= xc5000_get_status }; -- 1.7.6.2 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/2] [media] tm6000: Fix some CodingStyle issues
Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com --- drivers/staging/tm6000/tm6000-core.c | 20 ++-- drivers/staging/tm6000/tm6000-dvb.c |4 ++-- drivers/staging/tm6000/tm6000-i2c.c | 16 drivers/staging/tm6000/tm6000-regs.h |2 +- drivers/staging/tm6000/tm6000-usb-isoc.h |2 +- drivers/staging/tm6000/tm6000.h |4 ++-- 6 files changed, 24 insertions(+), 24 deletions(-) diff --git a/drivers/staging/tm6000/tm6000-core.c b/drivers/staging/tm6000/tm6000-core.c index 6d0803c..9783616 100644 --- a/drivers/staging/tm6000/tm6000-core.c +++ b/drivers/staging/tm6000/tm6000-core.c @@ -52,18 +52,18 @@ int tm6000_read_write_usb(struct tm6000_core *dev, u8 req_type, u8 req, } if (tm6000_debug V4L2_DEBUG_I2C) { - printk((dev %p, pipe %08x): , dev-udev, pipe); + printk(KERN_DEBUG (dev %p, pipe %08x): , dev-udev, pipe); - printk(%s: %02x %02x %02x %02x %02x %02x %02x %02x , + printk(KERN_CONT %s: %02x %02x %02x %02x %02x %02x %02x %02x , (req_type USB_DIR_IN) ? IN : OUT, req_type, req, value0xff, value8, index0xff, index8, len0xff, len8); if (!(req_type USB_DIR_IN)) { - printk( ); + printk(KERN_CONT ); for (i = 0; i len; i++) - printk( %02x, buf[i]); - printk(\n); + printk(KERN_CONT %02x, buf[i]); + printk(KERN_CONT \n); } } @@ -76,14 +76,14 @@ int tm6000_read_write_usb(struct tm6000_core *dev, u8 req_type, u8 req, if (tm6000_debug V4L2_DEBUG_I2C) { if (ret 0) { if (req_type USB_DIR_IN) - printk( (len=%d)\n, len); + printk(KERN_DEBUG (len=%d)\n, len); - printk(%s: Error #%d\n, __FUNCTION__, ret); + printk(KERN_CONT %s: Error #%d\n, __func__, ret); } else if (req_type USB_DIR_IN) { - printk( ); + printk(KERN_CONT ); for (i = 0; i len; i++) - printk( %02x, buf[i]); - printk(\n); + printk(KERN_CONT %02x, buf[i]); + printk(KERN_CONT \n); } } diff --git a/drivers/staging/tm6000/tm6000-dvb.c b/drivers/staging/tm6000/tm6000-dvb.c index 8f2a50b..5e6c129 100644 --- a/drivers/staging/tm6000/tm6000-dvb.c +++ b/drivers/staging/tm6000/tm6000-dvb.c @@ -330,7 +330,7 @@ static int register_dvb(struct tm6000_core *dev) dvb-demux.write_to_decoder = NULL; ret = dvb_dmx_init(dvb-demux); if (ret 0) { - printk(tm6000: dvb_dmx_init failed (errno = %d)\n, ret); + printk(KERN_ERR tm6000: dvb_dmx_init failed (errno = %d)\n, ret); goto frontend_err; } @@ -340,7 +340,7 @@ static int register_dvb(struct tm6000_core *dev) ret = dvb_dmxdev_init(dvb-dmxdev, dvb-adapter); if (ret 0) { - printk(tm6000: dvb_dmxdev_init failed (errno = %d)\n, ret); + printk(KERN_ERR tm6000: dvb_dmxdev_init failed (errno = %d)\n, ret); goto dvb_dmx_err; } diff --git a/drivers/staging/tm6000/tm6000-i2c.c b/drivers/staging/tm6000/tm6000-i2c.c index 76a8e3a..0290bbf 100644 --- a/drivers/staging/tm6000/tm6000-i2c.c +++ b/drivers/staging/tm6000/tm6000-i2c.c @@ -189,7 +189,7 @@ static int tm6000_i2c_xfer(struct i2c_adapter *i2c_adap, /* 1 or 2 byte write followed by a read */ if (i2c_debug = 2) for (byte = 0; byte msgs[i].len; byte++) - printk( %02x, msgs[i].buf[byte]); + printk(KERN_CONT %02x, msgs[i].buf[byte]); i2c_dprintk(2, ; joined to read %s len=%d:, i == num - 2 ? stop : nonstop, msgs[i + 1].len); @@ -211,17 +211,17 @@ static int tm6000_i2c_xfer(struct i2c_adapter *i2c_adap, } if (i2c_debug = 2) for (byte = 0; byte msgs[i].len; byte++) - printk( %02x, msgs[i].buf[byte]); + printk(KERN_CONT %02x, msgs[i].buf[byte]); } else { /* write bytes */ if (i2c_debug = 2) for (byte = 0; byte msgs[i].len; byte++) - printk( %02x, msgs[i].buf[byte]); +
[GIT PATCHES FOR 3.2] fix type error in cx23885 and altera-stapl move out from staging
The following changes since commit 3a7a62378be538944ff00904b8e0b795fe16609a: [media] ati_remote: update Kconfig description (2011-09-22 10:55:10 -0300) are available in the git repository at: http://linuxtv.org/git/liplianin/media_tree.git netup_patches Igor M. Liplianin (2): cx23885: fix type error altera-stapl: it is time to move out from staging drivers/media/video/cx23885/Kconfig|2 +- drivers/media/video/cx23885/cx23885-cards.c|2 +- drivers/misc/Kconfig |1 + drivers/misc/Makefile |1 + drivers/{staging = misc}/altera-stapl/Kconfig |2 + drivers/misc/altera-stapl/Makefile |3 ++ .../{staging = misc}/altera-stapl/altera-comp.c |0 .../{staging = misc}/altera-stapl/altera-exprt.h |0 .../{staging = misc}/altera-stapl/altera-jtag.c |2 +- .../{staging = misc}/altera-stapl/altera-jtag.h |0 .../{staging = misc}/altera-stapl/altera-lpt.c|0 drivers/{staging = misc}/altera-stapl/altera.c| 35 +++ drivers/staging/Kconfig|2 - drivers/staging/Makefile |1 - drivers/staging/altera-stapl/Makefile |3 -- .../staging/altera-stapl = include/misc}/altera.h |0 16 files changed, 23 insertions(+), 31 deletions(-) rename drivers/{staging = misc}/altera-stapl/Kconfig (77%) create mode 100644 drivers/misc/altera-stapl/Makefile rename drivers/{staging = misc}/altera-stapl/altera-comp.c (100%) rename drivers/{staging = misc}/altera-stapl/altera-exprt.h (100%) rename drivers/{staging = misc}/altera-stapl/altera-jtag.c (99%) rename drivers/{staging = misc}/altera-stapl/altera-jtag.h (100%) rename drivers/{staging = misc}/altera-stapl/altera-lpt.c (100%) rename drivers/{staging = misc}/altera-stapl/altera.c (99%) delete mode 100644 drivers/staging/altera-stapl/Makefile rename {drivers/staging/altera-stapl = include/misc}/altera.h (100%) -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] v4l: mem2mem: add wait_{prepare,finish} ops to m2m_testdev
Hi, On Thu, Jul 14, 2011 at 08:43:38AM -0700, Pawel Osciak wrote: Acked-by: Pawel Osciak pa...@osciak.com As nobody had objections to Michael's patch, can we do something to move this forward? Thanks, rsc -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0| Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917- | -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
cron job: media_tree daily build: WARNINGS
This message is generated daily by a cron job that builds media_tree for the kernels and architectures in the list below. Results of the daily build of media_tree: date:Fri Sep 23 19:00:16 CEST 2011 git hash:3a7a62378be538944ff00904b8e0b795fe16609a gcc version: i686-linux-gcc (GCC) 4.6.1 host hardware:x86_64 host os: 3.0-4.slh.3-amd64 linux-git-armv5: WARNINGS linux-git-armv5-davinci: WARNINGS linux-git-armv5-ixp: WARNINGS linux-git-armv5-omap2: WARNINGS linux-git-i686: WARNINGS linux-git-m32r: OK linux-git-mips: WARNINGS linux-git-powerpc64: WARNINGS linux-git-x86_64: WARNINGS linux-2.6.31.12-i686: WARNINGS linux-2.6.32.6-i686: WARNINGS linux-2.6.33-i686: WARNINGS linux-2.6.34-i686: WARNINGS linux-2.6.35.3-i686: WARNINGS linux-2.6.36-i686: WARNINGS linux-2.6.37-i686: WARNINGS linux-2.6.38.2-i686: WARNINGS linux-2.6.39.1-i686: WARNINGS linux-3.0-i686: WARNINGS linux-3.1-rc1-i686: WARNINGS linux-2.6.31.12-x86_64: WARNINGS linux-2.6.32.6-x86_64: WARNINGS linux-2.6.33-x86_64: WARNINGS linux-2.6.34-x86_64: WARNINGS linux-2.6.35.3-x86_64: WARNINGS linux-2.6.36-x86_64: WARNINGS linux-2.6.37-x86_64: WARNINGS linux-2.6.38.2-x86_64: WARNINGS linux-2.6.39.1-x86_64: WARNINGS linux-3.0-x86_64: WARNINGS linux-3.1-rc1-x86_64: WARNINGS spec-git: WARNINGS sparse: ERRORS Detailed results are available here: http://www.xs4all.nl/~hverkuil/logs/Friday.log Full logs are available here: http://www.xs4all.nl/~hverkuil/logs/Friday.tar.bz2 The V4L-DVB specification from this daily build is here: http://www.xs4all.nl/~hverkuil/spec/media.html -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [GIT PATCHES FOR 3.2] fix type error in cx23885 and altera-stapl move out from staging
Em 23-09-2011 14:26, Igor M. Liplianin escreveu: The following changes since commit 3a7a62378be538944ff00904b8e0b795fe16609a: [media] ati_remote: update Kconfig description (2011-09-22 10:55:10 -0300) are available in the git repository at: http://linuxtv.org/git/liplianin/media_tree.git netup_patches Igor M. Liplianin (2): cx23885: fix type error altera-stapl: it is time to move out from staging Applied, thanks! There was a merge conflict with some patch(es) that were fixing the memory leak on some errors conditions, so, I've reverted the changes bellow. Thanks, Mauro. --- a/drivers/staging/altera-stapl/altera.c +++ b/drivers/misc/altera-stapl/altera.c @@ -2430,23 +2430,16 @@ int altera_init(struct altera_config *config, const struct firmware *fw) int index = 0; s32 offset = 0L; s32 error_address = 0L; - int retval = 0; - key = kzalloc(33, GFP_KERNEL); - if (!key) { - retval = -ENOMEM; - goto out; - } - value = kzalloc(257, GFP_KERNEL); - if (!value) { - retval = -ENOMEM; - goto free_key; - } + key = kzalloc(33 * sizeof(char), GFP_KERNEL); + if (!key) + return -ENOMEM; + value = kzalloc(257 * sizeof(char), GFP_KERNEL); + if (!value) + return -ENOMEM; astate = kzalloc(sizeof(struct altera_state), GFP_KERNEL); - if (!astate) { - retval = -ENOMEM; - goto free_value; - } + if (!astate) + return -ENOMEM; astate-config = config; if (!astate-config-jtag_io) { @@ -2525,12 +2518,10 @@ int altera_init(struct altera_config *config, const struct firmware *fw) } else if (exec_result) printk(KERN_ERR %s: error %d\n, __func__, exec_result); - kfree(astate); -free_value: - kfree(value); -free_key: kfree(key); -out: - return retval; + kfree(value); + kfree(astate); + + return 0; } EXPORT_SYMBOL(altera_init); -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [media] rc tables: include linux/module.h
Prevents errors when merging with -next: drivers/media/rc/keymaps/rc-snapstream-firefly.c:105:16: error: expected declaration specifiers or ‘...’ before string constant drivers/media/rc/keymaps/rc-snapstream-firefly.c:106:15: error: expected declaration specifiers or ‘...’ before string constant Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com --- drivers/media/rc/keymaps/rc-ati-x10.c|1 + drivers/media/rc/keymaps/rc-medion-x10.c |1 + drivers/media/rc/keymaps/rc-snapstream-firefly.c |1 + 3 files changed, 3 insertions(+), 0 deletions(-) diff --git a/drivers/media/rc/keymaps/rc-ati-x10.c b/drivers/media/rc/keymaps/rc-ati-x10.c index f3397f8..e1b8b26 100644 --- a/drivers/media/rc/keymaps/rc-ati-x10.c +++ b/drivers/media/rc/keymaps/rc-ati-x10.c @@ -23,6 +23,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#include linux/module.h #include media/rc-map.h static struct rc_map_table ati_x10[] = { diff --git a/drivers/media/rc/keymaps/rc-medion-x10.c b/drivers/media/rc/keymaps/rc-medion-x10.c index 5fc57468..09e2cc0 100644 --- a/drivers/media/rc/keymaps/rc-medion-x10.c +++ b/drivers/media/rc/keymaps/rc-medion-x10.c @@ -21,6 +21,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#include linux/module.h #include media/rc-map.h static struct rc_map_table medion_x10[] = { diff --git a/drivers/media/rc/keymaps/rc-snapstream-firefly.c b/drivers/media/rc/keymaps/rc-snapstream-firefly.c index 5836aa2..ef14652 100644 --- a/drivers/media/rc/keymaps/rc-snapstream-firefly.c +++ b/drivers/media/rc/keymaps/rc-snapstream-firefly.c @@ -18,6 +18,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#include linux/module.h #include media/rc-map.h static struct rc_map_table snapstream_firefly[] = { -- 1.7.6.2 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] trying to add PAL support to SAA7164
Hello, I have a saa7164 card and am using it with PAL. To get this working I started from the patch by Julian Scheel http://www.spinics.net/lists/linux-media/msg27603.html I saw that some of the changes (added supported device) were already in the repository. I also tried to clean up the rest of the changes a bit but I'm a complete v4l/kernel coding beginner. The patch applies to the current HEAD but is not yet usable as it initializes the card to PAL per default. Is there anyone that could help me with getting this thing in a good state so that it could be added into the repository for others to use it? Thanks and Regards, Patrick diff --git a/drivers/media/video/saa7164/saa7164-api.c b/drivers/media/video/saa7164/saa7164-api.c index 8a98ab6..8142d0f 100644 --- a/drivers/media/video/saa7164/saa7164-api.c +++ b/drivers/media/video/saa7164/saa7164-api.c @@ -631,7 +631,7 @@ int saa7164_api_set_dif(struct saa7164_port *port, u8 reg, u8 val) dprintk(DBGLVL_API, %s(nr=%d type=%d val=%x)\n, __func__, port-nr, port-type, val); - if (port-nr == 0) + if (port-nr 3) mas = 0xd0; else mas = 0xe0; diff --git a/drivers/media/video/saa7164/saa7164-encoder.c b/drivers/media/video/saa7164/saa7164-encoder.c index 2fd38a0..390fa58 100644 --- a/drivers/media/video/saa7164/saa7164-encoder.c +++ b/drivers/media/video/saa7164/saa7164-encoder.c @@ -32,7 +32,25 @@ static struct saa7164_tvnorm saa7164_tvnorms[] = { }, { .name = NTSC-JP, .id= V4L2_STD_NTSC_M_JP, - } + }, { +.name = PAL-I, +.id= V4L2_STD_PAL_I, + }, { +.name = PAL-M, +.id= V4L2_STD_PAL_M, + }, { +.name = PAL-N, +.id= V4L2_STD_PAL_N, + }, { +.name = PAL-Nc, +.id= V4L2_STD_PAL_Nc, + }, { +.name = PAL-B, +.id= V4L2_STD_PAL_B, + }, { +.name = PAL-DK, +.id= V4L2_STD_PAL_DK, +} }; static const u32 saa7164_v4l2_ctrls[] = { @@ -1362,7 +1380,7 @@ static struct video_device saa7164_mpeg_template = { .ioctl_ops = mpeg_ioctl_ops, .minor = -1, .tvnorms = SAA7164_NORMS, - .current_norm = V4L2_STD_NTSC_M, + .current_norm = V4L2_STD_PAL_B, }; static struct video_device *saa7164_encoder_alloc( @@ -1410,7 +1428,7 @@ int saa7164_encoder_register(struct saa7164_port *port) /* Establish encoder defaults here */ /* Set default TV standard */ - port-encodernorm = saa7164_tvnorms[0]; + port-encodernorm = saa7164_tvnorms[6]; port-width = 720; port-mux_input = 1; /* Composite */ port-video_format = EU_VIDEO_FORMAT_MPEG_2; diff --git a/drivers/media/video/saa7164/saa7164-reg.h b/drivers/media/video/saa7164/saa7164-reg.h index 2bbf815..b95aeaf 100644 --- a/drivers/media/video/saa7164/saa7164-reg.h +++ b/drivers/media/video/saa7164/saa7164-reg.h @@ -181,7 +181,7 @@ #define TU_STANDARD_AUTO_CONTROL 0x01 #define TU_STANDARD_NONE 0x00 #define TU_STANDARD_NTSC_M 0x01 -#define TU_STANDARD_PAL_I 0x08 +#define TU_STANDARD_PAL_I 0x04 #define TU_STANDARD_MANUAL 0x00 #define TU_STANDARD_AUTO 0x01 diff --git a/drivers/media/video/saa7164/saa7164-vbi.c b/drivers/media/video/saa7164/saa7164-vbi.c index e2e0341..7c40efa 100644 --- a/drivers/media/video/saa7164/saa7164-vbi.c +++ b/drivers/media/video/saa7164/saa7164-vbi.c @@ -28,7 +28,25 @@ static struct saa7164_tvnorm saa7164_tvnorms[] = { }, { .name = NTSC-JP, .id= V4L2_STD_NTSC_M_JP, - } + }, { +.name = PAL-I, +.id= V4L2_STD_PAL_I, +}, { +.name = PAL-M, +.id= V4L2_STD_PAL_M, +}, { +.name = PAL-N, +.id= V4L2_STD_PAL_N, +}, { +.name = PAL-Nc, +.id= V4L2_STD_PAL_Nc, +}, { +.name = PAL-B, +.id= V4L2_STD_PAL_B, +}, { +.name = PAL-DK, +.id= V4L2_STD_PAL_DK, +} }; static const u32 saa7164_v4l2_ctrls[] = { diff --git a/drivers/media/video/saa7164/saa7164.h b/drivers/media/video/saa7164/saa7164.h index 742b341..adf8baf 100644 --- a/drivers/media/video/saa7164/saa7164.h +++ b/drivers/media/video/saa7164/saa7164.h @@ -115,7 +115,7 @@ #define DBGLVL_CPU 8192 #define SAA7164_NORMS \ - (V4L2_STD_NTSC_M | V4L2_STD_NTSC_M_JP | V4L2_STD_NTSC_443) + (V4L2_STD_NTSC_M | V4L2_STD_NTSC_M_JP | V4L2_STD_NTSC_443 | V4L2_STD_PAL_I | V4L2_STD_PAL_M | V4L2_STD_PAL_N | V4L2_STD_PAL_Nc | V4L2_STD_PAL_B | V4L2_STD_PAL_DK) enum port_t { SAA7164_MPEG_UNDEFINED = 0,
Re: [PATCH 1/17]DVB:Siano drivers - Adding LKM for handling SPI connected devices.
Em 20-09-2011 07:30, Doron Cohen escreveu: Hi, It took a long time to merge all the changes in kernel.org with Siano sources which were updated in a different repository for the last couple of years. I have made all the changes in small steps seperated to functional reasons. First patch is actually adding new kernel object which handles SPI connection and used the spidrv of the kernel. module is used mainly in android platforms but is a pure LKM works with siano modules stack. Thanks, Doron Cohen - From 9115d85edbafc38e48ed1fc5f1218da81b7c5a2e Mon Sep 17 00:00:00 2001 From: Doron Cohen dor...@siano-ms.com Date: Mon, 12 Sep 2011 17:41:29 +0300 Subject: [PATCH 02/21] Add support in generic SPI driver for Siano SPI connected devices --- drivers/media/dvb/siano/Kconfig| 45 drivers/media/dvb/siano/smsspicommon.c | 408 drivers/media/dvb/siano/smsspicommon.h | 96 +++ drivers/media/dvb/siano/smsspidrv.c| 455 drivers/media/dvb/siano/smsspiphy.c| 246 + drivers/media/dvb/siano/smsspiphy.h| 36 +++ 6 files changed, 1286 insertions(+), 0 deletions(-) create mode 100644 drivers/media/dvb/siano/smsspicommon.c create mode 100644 drivers/media/dvb/siano/smsspicommon.h create mode 100644 drivers/media/dvb/siano/smsspidrv.c create mode 100644 drivers/media/dvb/siano/smsspiphy.c create mode 100644 drivers/media/dvb/siano/smsspiphy.h diff --git a/drivers/media/dvb/siano/Kconfig b/drivers/media/dvb/siano/Kconfig index bc6456e..aeca46f 100644 --- a/drivers/media/dvb/siano/Kconfig +++ b/drivers/media/dvb/siano/Kconfig @@ -17,6 +17,37 @@ config SMS_SIANO_MDTV if SMS_SIANO_MDTV menu Siano module components +# Kernel sub systems support + +config SMS_DVB3_SUBSYS + bool DVB v.3 Subsystem support + depends on DVB_CORE + default y if DVB_CORE + ---help--- + Choose if you would like to have DVB v.3 kernel sub-system support. + +config SMS_DVB5_S2API_SUBSYS + bool DVB v.5 (S2 API) Subsystem support + default n + ---help--- + Choose if you would like to have DVB v.5 (S2 API) kernel sub-system support. NACK. The driver should be able to handle a call for programs that use either DVB v3 or DVB v5 calls, and this feature is mandatory for all DVB drivers. + +config SMS_HOSTLIB_SUBSYS + bool Host Library Subsystem support + default n + ---help--- + Choose if you would like to have Siano's host library kernel sub-system support. NACK. Proprietary/alternative API support shouldn't be added at the Linux Kernel. There's only one API defined to talk with a DTV device, and all drivers should implement it only. If you detect that some API features are missing at the DVB API, please discuss what is missing and let's work to add those features at the API. + +if SMS_HOSTLIB_SUBSYS + +config SMS_NET_SUBSYS + tristate Siano Network Adapter + depends on NET + default n + ---help--- + Choose if you would like to have Siano's network adapter support. +endif # SMS_HOSTLIB_SUBSYS + # Hardware interfaces support config SMS_USB_DRV @@ -30,5 +61,19 @@ config SMS_SDIO_DRV depends on DVB_CORE MMC ---help--- Choose if you would like to have Siano's support for SDIO interface + +config SMS_SPI_DRV + tristate SPI interface support + depends on SPI + default y if SPI + ---help--- + Choose if you would like to have Siano's support for PXA 310 SPI interface + +config SMS_I2C_DRV + tristate I2C interface support + depends on DVB_CORE I2C + ---help--- + Choose if you would like to have Siano's support for I2C interface + endmenu endif # SMS_SIANO_MDTV diff --git a/drivers/media/dvb/siano/smsspicommon.c b/drivers/media/dvb/siano/smsspicommon.c new file mode 100644 index 000..d4ef3f8 --- /dev/null +++ b/drivers/media/dvb/siano/smsspicommon.c @@ -0,0 +1,408 @@ +/ + +Siano Mobile Silicon, Inc. +MDTV receiver kernel modules. +Copyright (C) 2006-2008, Uri Shkolnik + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + + This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see http://www.gnu.org/licenses/. + +/ +#include smsspicommon.h +#include
Re: [PATCH 2/17]DVB:Siano drivers - Update module name string to contain module version
Em 20-09-2011 07:30, Doron Cohen escreveu: Hi, This patch step adds version to module name string for all modules. Thanks, Doron Cohen --- From 81a55103537fb6df2b487819aa9a5af28a5c4bd2 Mon Sep 17 00:00:00 2001 From: Doron Cohen dor...@siano-ms.com Date: Wed, 14 Sep 2011 13:33:20 +0300 Subject: [PATCH 03/21] Add smsspi driver to support Siano SPI connected device using SPI generic driver modified: drivers/media/dvb/siano/Makefile modified: drivers/media/dvb/siano/smscoreapi.c new file: drivers/media/dvb/siano/smsdbg_prn.h modified: drivers/media/dvb/siano/smsspidrv.c modified: drivers/media/dvb/siano/smsspiphy.c --- drivers/media/dvb/siano/Makefile |2 + drivers/media/dvb/siano/smscoreapi.c |2 +- drivers/media/dvb/siano/smsdbg_prn.h | 56 ++ Patch is also mangled by your emailer. drivers/media/dvb/siano/smsspidrv.c | 33 +++- drivers/media/dvb/siano/smsspiphy.c | 40 5 files changed, 97 insertions(+), 36 deletions(-) create mode 100644 drivers/media/dvb/siano/smsdbg_prn.h diff --git a/drivers/media/dvb/siano/Makefile b/drivers/media/dvb/siano/Makefile index c54140b..affaf01 100644 --- a/drivers/media/dvb/siano/Makefile +++ b/drivers/media/dvb/siano/Makefile @@ -1,9 +1,11 @@ smsmdtv-objs := smscoreapi.o sms-cards.o smsendian.o smsir.o +smsspi-objs := smsspicommon.o smsspidrv.o smsspiphy.o obj-$(CONFIG_SMS_SIANO_MDTV) += smsmdtv.o smsdvb.o obj-$(CONFIG_SMS_USB_DRV) += smsusb.o obj-$(CONFIG_SMS_SDIO_DRV) += smssdio.o +obj-$(CONFIG_SMS_SPI_DRV) += smsspi.o EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core diff --git a/drivers/media/dvb/siano/smscoreapi.c b/drivers/media/dvb/siano/smscoreapi.c index 78765ed..239f453 100644 --- a/drivers/media/dvb/siano/smscoreapi.c +++ b/drivers/media/dvb/siano/smscoreapi.c @@ -39,7 +39,7 @@ #include smsir.h #include smsendian.h -static int sms_dbg; +int sms_dbg; module_param_named(debug, sms_dbg, int, 0644); MODULE_PARM_DESC(debug, set debug level (info=1, adv=2 (or-able))); diff --git a/drivers/media/dvb/siano/smsdbg_prn.h b/drivers/media/dvb/siano/smsdbg_prn.h new file mode 100644 index 000..ea157da --- /dev/null +++ b/drivers/media/dvb/siano/smsdbg_prn.h @@ -0,0 +1,56 @@ +/ + +Siano Mobile Silicon, Inc. +MDTV receiver kernel modules. +Copyright (C) 2006-2008, Uri Shkolnik + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + + This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see http://www.gnu.org/licenses/. + +/ + +#ifndef _SMS_DBG_H_ +#define _SMS_DBG_H_ + +#include linux/kernel.h +#include linux/module.h + +// +/* Debug Zones definitions. */ +// +#undef PERROR +# define PERROR(fmt, args...) \ + printk(KERN_ERR spibus error: line %d- %s(): fmt, __LINE__,\ + __func__, ## args) +#undef PWARNING +# define PWARNING(fmt, args...) \ + printk(KERN_WARNING spibus warning: line %d- %s(): fmt, __LINE__, \ + __func__, ## args) + +/* the debug macro - conditional compilation from the makefile */ +#undef PDEBUG/* undef it, just in case */ +#ifdef SPIBUS_DEBUG +# define PDEBUG(fmt, args...) \ + printk(KERN_DEBUG spibus: line %d- %s(): fmt, __LINE__, \ + __func__, ## args) +#else +# define PDEBUG(fmt, args...) /* not debugging: nothing */ +#endif + +/* The following defines are used for printing and +are mandatory for compilation. */ +#define TXT(str) str +#define PRN_DBG(str) PDEBUG str +#define PRN_ERR(str) PERROR str + +#endif /*_SMS_DBG_H_*/ diff --git a/drivers/media/dvb/siano/smsspidrv.c b/drivers/media/dvb/siano/smsspidrv.c index 35cce42..fa80c1a 100644 --- a/drivers/media/dvb/siano/smsspidrv.c +++ b/drivers/media/dvb/siano/smsspidrv.c @@ -79,18 +79,27 @@ struct _Msg { struct _spi_device_st *spi_dev; +int sms_dbg; static void spi_worker_thread(void *arg); static DECLARE_WORK(spi_work_queue, (void *)spi_worker_thread); static u8 smsspi_preamble[] = { 0xa5, 0x5a, 0xe7, 0x7e }; static u8 smsspi_startup[] = { 0, 0, 0xde, 0xc1, 0xa5, 0x51, 0xf1, 0xed };
Re: [PATCH 3/17]DVB:Siano drivers - Changing some field names and debug messages.
Em 20-09-2011 07:30, Doron Cohen escreveu: Hi, This patch is changing field names and debug messages to be more clear. From 5b3525a0860992b3811dd9ebd4c797b79e14631a Mon Sep 17 00:00:00 2001 From: Doron Cohen dor...@siano-ms.com Date: Thu, 15 Sep 2011 14:30:24 +0300 Subject: [PATCH 06/21] Change debug prints and struct field names to be more clear. Thanks, Doron Cohen --- drivers/media/dvb/siano/Kconfig | 17 +++--- drivers/media/dvb/siano/Makefile | 10 ++ drivers/media/dvb/siano/smscoreapi.c | 20 +++ drivers/media/dvb/siano/smsir.c | 60 - Also mangled. drivers/media/dvb/siano/smsir.h |2 +- 5 files changed, 57 insertions(+), 52 deletions(-) diff --git a/drivers/media/dvb/siano/Kconfig b/drivers/media/dvb/siano/Kconfig index aeca46f..bb91911 100644 --- a/drivers/media/dvb/siano/Kconfig +++ b/drivers/media/dvb/siano/Kconfig @@ -4,7 +4,7 @@ config SMS_SIANO_MDTV tristate Siano SMS1xxx based MDTV receiver - depends on DVB_CORE RC_CORE HAS_DMA + depends on DVB_CORE HAS_DMA ---help--- Choose Y or M here if you have MDTV receiver with a Siano chipset. @@ -19,18 +19,12 @@ menu Siano module components # Kernel sub systems support -config SMS_DVB3_SUBSYS - bool DVB v.3 Subsystem support - depends on DVB_CORE - default y if DVB_CORE - ---help--- - Choose if you would like to have DVB v.3 kernel sub-system support. - -config SMS_DVB5_S2API_SUBSYS - bool DVB v.5 (S2 API) Subsystem support +config SMS_RC_SUPPORT_SUBSYS + bool Remote Control Subsystem support + depends on RC_CORE default n ---help--- - Choose if you would like to have DVB v.5 (S2 API) kernel sub-system support. + Choose if you would like to have Siano's ir remote control sub-system support. config SMS_HOSTLIB_SUBSYS bool Host Library Subsystem support @@ -39,7 +33,6 @@ config SMS_HOSTLIB_SUBSYS Choose if you would like to have Siano's host library kernel sub-system support. if SMS_HOSTLIB_SUBSYS - config SMS_NET_SUBSYS tristate Siano Network Adapter depends on NET diff --git a/drivers/media/dvb/siano/Makefile b/drivers/media/dvb/siano/Makefile index affaf01..a5e52f5 100644 --- a/drivers/media/dvb/siano/Makefile +++ b/drivers/media/dvb/siano/Makefile @@ -11,3 +11,13 @@ EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core EXTRA_CFLAGS += $(extra-cflags-y) $(extra-cflags-m) +ifdef CONFIG_SMS_RC_SUPPORT_SUBSYS + EXTRA_CFLAGS += -DSMS_RC_SUPPORT_SUBSYS +endif + +ifdef CONFIG_SMS_HOSTLIB_SUBSYS + EXTRA_CFLAGS += -DSMS_HOSTLIB_SUBSYS +endif Please, avoid using ifdef's inside the code. Makes harder to analyze it. Instead, move it to the header files. For example, you can just move the smscore_init_ir() function to the IR .c file, and use, at the header: #ifdef CONFIG_SMS_RC int smscore_init_ir(struct smscore_device_t *coredev); #else int smscore_init_ir(struct smscore_device_t *coredev) { return 0; }; #endif At Makefile, you can just do something like: obj-$(CONFIG_SMS_RC) += smsir.c + + + diff --git a/drivers/media/dvb/siano/smscoreapi.c b/drivers/media/dvb/siano/smscoreapi.c index 115604c..7c74544 100644 --- a/drivers/media/dvb/siano/smscoreapi.c +++ b/drivers/media/dvb/siano/smscoreapi.c @@ -426,27 +426,26 @@ static int smscore_sendrequest_and_wait(struct smscore_device_t *coredev, msecs_to_jiffies(SMS_PROTOCOL_MAX_RAOUNDTRIP_MS)) ? 0 : -ETIME; } - +#ifdef SMS_RC_SUPPORT_SUBSYS /** * Starts enables IR operations * * @return 0 on success, 0 on error. */ static int smscore_init_ir(struct smscore_device_t *coredev) -{ +{ int ir_io; int rc; void *buffer; - - coredev-ir.dev = NULL; + coredev-ir.rc_dev = NULL; ir_io = sms_get_board(smscore_get_board_id(coredev))-board_cfg.ir; if (ir_io) {/* only if IR port exist we use IR sub-module */ sms_info(IR loading); rc = sms_ir_init(coredev); - if (rc != 0) sms_err(Error initialization DTV IR sub-module); - else { + else + { buffer = kmalloc(sizeof(struct SmsMsgData_ST2) + SMS_DMA_ALIGNMENT, GFP_KERNEL | GFP_DMA); @@ -477,6 +476,7 @@ static int smscore_init_ir(struct smscore_device_t *coredev) return 0; } +#endif /*SMS_RC_SUPPORT_SUBSYS*/ /** * sets initial device mode and notifies client hotplugs that device is ready @@ -498,7 +498,9 @@ int smscore_start_device(struct smscore_device_t *coredev) kmutex_lock(g_smscore_deviceslock); rc = smscore_notify_callbacks(coredev, coredev-device, 1); +#ifdef SMS_RC_SUPPORT_SUBSYS
Re: [PATCH 4/17]DVB:Siano drivers - Add support in new Siano SDIO devices.
Em 20-09-2011 07:31, Doron Cohen escreveu: Hi, This patch adds support in newer devices. Thanks, Doron Cohen -- From 7714e418af56ae73d760cfa39b9e7b99d4dc3aa2 Mon Sep 17 00:00:00 2001 From: Doron Cohen dor...@siano-ms.com Date: Thu, 15 Sep 2011 14:40:03 +0300 Subject: [PATCH 07/21] Add support to new siano DSIO devices. --- drivers/media/dvb/siano/sms-cards.h | 10 ++ drivers/media/dvb/siano/smssdio.c | 13 +++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/drivers/media/dvb/siano/sms-cards.h b/drivers/media/dvb/siano/sms-cards.h index d8cdf75..1c2159b 100644 --- a/drivers/media/dvb/siano/sms-cards.h +++ b/drivers/media/dvb/siano/sms-cards.h @@ -22,7 +22,9 @@ #include linux/usb.h #include smscoreapi.h +#ifdef SMS_RC_SUPPORT_SUBSYS #include smsir.h +#endif Don't mix it on this patch. I would have applied the rest of the patch, if it was not because of this. #define SMS_BOARD_UNKNOWN 0 #define SMS1XXX_BOARD_SIANO_STELLAR 1 @@ -37,6 +39,14 @@ #define SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD_R2 10 #define SMS1XXX_BOARD_SIANO_NICE 11 #define SMS1XXX_BOARD_SIANO_VENICE 12 +#define SMS1XXX_BOARD_SIANO_STELLAR_ROM 13 +#define SMS1XXX_BOARD_ZTE_DVB_DATA_CARD 14 +#define SMS1XXX_BOARD_ONDA_MDTV_DATA_CARD 15 +#define SMS1XXX_BOARD_SIANO_MING 16 +#define SMS1XXX_BOARD_SIANO_PELE 17 +#define SMS1XXX_BOARD_SIANO_RIO 18 +#define SMS1XXX_BOARD_SIANO_DENVER_1530 19 +#define SMS1XXX_BOARD_SIANO_DENVER_2160 20 struct sms_board_gpio_cfg { int lna_vhf_exist; diff --git a/drivers/media/dvb/siano/smssdio.c b/drivers/media/dvb/siano/smssdio.c index e57d38b..e5705c3 100644 --- a/drivers/media/dvb/siano/smssdio.c +++ b/drivers/media/dvb/siano/smssdio.c @@ -3,8 +3,7 @@ * * Copyright 2008 Pierre Ossman * - * Based on code by Siano Mobile Silicon, Inc., - * Copyright (C) 2006-2008, Uri Shkolnik + * Copyright (C) 2006-20011, Siano Mobile Silicon (Doron Cohen) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -60,6 +59,16 @@ static const struct sdio_device_id smssdio_ids[] __devinitconst = { .driver_data = SMS1XXX_BOARD_SIANO_VEGA}, {SDIO_DEVICE(SDIO_VENDOR_ID_SIANO, SDIO_DEVICE_ID_SIANO_VENICE), .driver_data = SMS1XXX_BOARD_SIANO_VEGA}, + {SDIO_DEVICE(SDIO_VENDOR_ID_SIANO, 0x302), + .driver_data = SMS1XXX_BOARD_SIANO_MING}, + {SDIO_DEVICE(SDIO_VENDOR_ID_SIANO, 0x500), + .driver_data = SMS1XXX_BOARD_SIANO_PELE}, + {SDIO_DEVICE(SDIO_VENDOR_ID_SIANO, 0x600), + .driver_data = SMS1XXX_BOARD_SIANO_RIO}, +{SDIO_DEVICE(SDIO_VENDOR_ID_SIANO, 0x700), + .driver_data = SMS1XXX_BOARD_SIANO_DENVER_2160}, + {SDIO_DEVICE(SDIO_VENDOR_ID_SIANO, 0x800), + .driver_data = SMS1XXX_BOARD_SIANO_DENVER_1530}, { /* end: all zeroes */ }, }; -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] Add support for PCTV452E.
Here is my version. Made with git format-patch for branch staging/for_v3.2 From cc44ac937f36ed51335eb11a7e28cf047a979a1c Mon Sep 17 00:00:00 2001 From: Igor M. Liplianin liplia...@me.by Date: Fri, 23 Sep 2011 23:31:25 +0300 Subject: [PATCH] Add support for pctv452e To: mche...@infradead.org, linux-media@vger.kernel.org Signed-off-by: Igor M. Liplianin liplia...@me.by --- drivers/media/dvb/dvb-usb/Kconfig | 13 + drivers/media/dvb/dvb-usb/Makefile |4 + drivers/media/dvb/dvb-usb/dvb-usb-ids.h |3 + drivers/media/dvb/dvb-usb/pctv452e.c| 1182 +++ drivers/media/dvb/frontends/Kconfig | 10 + drivers/media/dvb/frontends/Makefile|1 + drivers/media/dvb/frontends/lnbp22.c| 148 drivers/media/dvb/frontends/lnbp22.h| 57 ++ drivers/media/dvb/ttpci/ttpci-eeprom.c | 29 + drivers/media/dvb/ttpci/ttpci-eeprom.h |1 + 10 files changed, 1448 insertions(+), 0 deletions(-) create mode 100644 drivers/media/dvb/dvb-usb/pctv452e.c create mode 100644 drivers/media/dvb/frontends/lnbp22.c create mode 100644 drivers/media/dvb/frontends/lnbp22.h diff --git a/drivers/media/dvb/dvb-usb/Kconfig b/drivers/media/dvb/dvb-usb/Kconfig index 2c773827..5825716 100644 --- a/drivers/media/dvb/dvb-usb/Kconfig +++ b/drivers/media/dvb/dvb-usb/Kconfig @@ -258,6 +258,19 @@ config DVB_USB_AF9005_REMOTE Say Y here to support the default remote control decoding for the Afatech AF9005 based receiver. +config DVB_USB_PCTV452E + tristate Pinnacle PCTV HDTV Pro USB device/TT Connect S2-3600 + depends on DVB_USB + select TTPCI_EEPROM + select DVB_LNBP22 if !DVB_FE_CUSTOMISE + select DVB_STB0899 if !DVB_FE_CUSTOMISE + select DVB_STB6100 if !DVB_FE_CUSTOMISE + help + Support for external USB adapter designed by Pinnacle, + shipped under the brand name 'PCTV HDTV Pro USB'. + Also supports TT Connect S2-3600/3650 cards. + Say Y if you own such a device and want to use it. + config DVB_USB_DW2102 tristate DvbWorld TeVii DVB-S/S2 USB2.0 support depends on DVB_USB diff --git a/drivers/media/dvb/dvb-usb/Makefile b/drivers/media/dvb/dvb-usb/Makefile index 06f75f6..7d0710b 100644 --- a/drivers/media/dvb/dvb-usb/Makefile +++ b/drivers/media/dvb/dvb-usb/Makefile @@ -64,6 +64,9 @@ obj-$(CONFIG_DVB_USB_AF9005_REMOTE) += dvb-usb-af9005-remote.o dvb-usb-anysee-objs = anysee.o obj-$(CONFIG_DVB_USB_ANYSEE) += dvb-usb-anysee.o +dvb-usb-pctv452e-objs = pctv452e.o +obj-$(CONFIG_DVB_USB_PCTV452E) += dvb-usb-pctv452e.o + dvb-usb-dw2102-objs = dw2102.o obj-$(CONFIG_DVB_USB_DW2102) += dvb-usb-dw2102.o @@ -104,4 +107,5 @@ obj-$(CONFIG_DVB_USB_MXL111SF) += mxl111sf-tuner.o ccflags-y += -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends/ # due to tuner-xc3028 ccflags-y += -Idrivers/media/common/tuners +EXTRA_CFLAGS += -Idrivers/media/dvb/ttpci diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-ids.h b/drivers/media/dvb/dvb-usb/dvb-usb-ids.h index 7433261..2ad33ba 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb-ids.h +++ b/drivers/media/dvb/dvb-usb/dvb-usb-ids.h @@ -241,6 +241,9 @@ #define USB_PID_PCTV_200E0x020e #define USB_PID_PCTV_400E0x020f #define USB_PID_PCTV_450E0x0222 +#define USB_PID_PCTV_452E0x021f +#define USB_PID_TECHNOTREND_CONNECT_S2_3600 0x3007 +#define USB_PID_TECHNOTREND_CONNECT_S2_3650_CI 0x300a #define USB_PID_NEBULA_DIGITV0x0201 #define USB_PID_DVICO_BLUEBIRD_LGDT 0xd820 #define USB_PID_DVICO_BLUEBIRD_LG064F_COLD 0xd500 diff --git a/drivers/media/dvb/dvb-usb/pctv452e.c b/drivers/media/dvb/dvb-usb/pctv452e.c new file mode 100644 index 000..6151b3e --- /dev/null +++ b/drivers/media/dvb/dvb-usb/pctv452e.c @@ -0,0 +1,1182 @@ +/* + * PCTV 452e DVB driver + * + * Copyright (c) 2006-2008 Dominik Kuhlen dkuh...@gmx.net + * + * TT connect S2-3650-CI Common Interface support, MAC readout + * Copyright (C) 2008 Michael H. Schimek mschi...@gmx.at + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + */ + +/* dvb usb framework */ +#define DVB_USB_LOG_PREFIX pctv452e +#include dvb-usb.h + +/* Demodulator */ +#include stb0899_drv.h +#include stb0899_reg.h +#include stb0899_cfg.h +/* Tuner */ +#include stb6100.h +#include stb6100_cfg.h +/* FE Power */ +#include lnbp22.h + +#include dvb_ca_en50221.h +#include ttpci-eeprom.h + +static int debug; +module_param(debug, int, 0644); +MODULE_PARM_DESC(debug, Turn on/off debugging (default:off).); + +DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); + +#define ISO_BUF_COUNT 4 +#define FRAMES_PER_ISO_BUF 4 +#define ISO_FRAME_SIZE 940 +#define ISOC_INTERFACE_ALTERNATIVE 3 + +#define SYNC_BYTE_OUT 0xaa +#define SYNC_BYTE_IN 0x55 + +/* guessed: (copied from ttusb-budget) */ +#define PCTV_CMD_RESET 0x15 +/* command to poll IR receiver */ +#define PCTV_CMD_IR
Re: [PATCH]Medion 95700 analog video support
Michael Krufky mkru...@linuxtv.org wrote: On Fri, Sep 23, 2011 at 3:32 PM, Mauro Carvalho Chehab mche...@infradead.org wrote: Em 04-09-2011 16:46, Michael Krufky escreveu: Maciej, I'm excited to see some success getting analog to work in the dvb-usb framework. Some people have been asking for this support in the cxusb driver for a long time. I have a device (DViCO FusionHDTV5 usb) that should work with this patch with some small modifications -- i will try it out. I see that this patch adds analog support to cxusb... have you thought at all about adding generic analog support callbacks to the dvb-usb framework? There are some other dvb-usb devices based on the dib0700 chipset that also also use the cx25840 decoder for analog -- it would be great if this can be done in a way to benefit both the dib0700 and cxusb drivers. I will let you know how things go after I try this code on my own device, here. Any news on that? Thanks! Mauro Didn't have a chance to test it yet, but I am quite excited for this, and perhaps porting support to dib0700 as well. I hope to try this out *before* the Kernel Summit in Prague. I apologize for delays, the dvb-usb-mfe refactoring has been higher on the priority list lately. I'll get back to you when I can :-) Cheers, Mike Thanks for your patch. -Mike Krufky On Sun, Sep 4, 2011 at 2:51 PM, Maciej Szmigiero m...@o2.pl wrote: This patch adds support for analog part of Medion 95700 in the cxusb driver. What works: * Video capture at various sizes with sequential fields, * Input switching (TV Tuner, Composite, S-Video), * TV tuning, * Video standard switching and auto detection, * Unplugging while capturing, * DVB/analog coexistence, * Raw BT.656 stream support. What does not work yet: * Audio, * Radio, * VBI, * Picture controls. Note that this patch needs https://patchwork.kernel.org/patch/1110982/ to be applied first. Signed-off-by: Maciej Szmigiero m...@o2.pl diff --git a/drivers/media/dvb/dvb-usb/Kconfig b/drivers/media/dvb/dvb-usb/Kconfig index 6e97bb3..afecb9d 100644 --- a/drivers/media/dvb/dvb-usb/Kconfig +++ b/drivers/media/dvb/dvb-usb/Kconfig @@ -108,6 +108,8 @@ config DVB_USB_UMT_010 config DVB_USB_CXUSB tristate Conexant USB2.0 hybrid reference design support depends on DVB_USB + select VIDEO_CX25840 + select VIDEOBUF2_VMALLOC select DVB_PLL if !DVB_FE_CUSTOMISE select DVB_CX22702 if !DVB_FE_CUSTOMISE select DVB_LGDT330X if !DVB_FE_CUSTOMISE diff --git a/drivers/media/dvb/dvb-usb/Makefile b/drivers/media/dvb/dvb-usb/Makefile index 03ae657..b57600b 100644 --- a/drivers/media/dvb/dvb-usb/Makefile +++ b/drivers/media/dvb/dvb-usb/Makefile @@ -42,7 +42,7 @@ obj-$(CONFIG_DVB_USB_AU6610) += dvb-usb-au6610.o dvb-usb-digitv-objs = digitv.o obj-$(CONFIG_DVB_USB_DIGITV) += dvb-usb-digitv.o -dvb-usb-cxusb-objs = cxusb.o +dvb-usb-cxusb-objs = cxusb.o cxusb-analog.o obj-$(CONFIG_DVB_USB_CXUSB) += dvb-usb-cxusb.o dvb-usb-ttusb2-objs = ttusb2.o diff --git a/drivers/media/dvb/dvb-usb/cxusb-analog.c b/drivers/media/dvb/dvb-usb/cxusb-analog.c new file mode 100644 index 000..89c9335 --- /dev/null +++ b/drivers/media/dvb/dvb-usb/cxusb-analog.c @@ -0,0 +1,1738 @@ +/* DVB USB compliant linux driver for Conexant USB reference design - + * (analog part). + * + * Copyright (C) 2011 Maciej Szmigiero (m...@o2.pl) + * + * TODO: + * * audio support, + * * radio support (requires audio of course), + * * VBI support, + * * controls support + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301, USA. + */ + +#include media/cx25840.h +#include media/tuner.h +#include media/v4l2-ioctl.h + +#include cxusb.h + +static int cxusb_medion_v_queue_setup(struct vb2_queue *q, + unsigned int *num_buffers, + unsigned int *num_planes, + unsigned long sizes[], + void *alloc_ctxs[]) +{ + struct dvb_usb_device *dvbdev = vb2_get_drv_priv(q); + struct cxusb_medion_dev *cxdev = dvbdev-priv; + + if (*num_buffers 6) + *num_buffers = 6; + + *num_planes = 1; + + if (cxdev-raw_mode) +
Re: [PATCH] Add support for PCTV452E.
В сообщении от 23 сентября 2011 23:58:15 автор Oliver Freyermuth написал: Thanks for the review! As this is the first time I touched module- / kernel-code and I am not really familiar with the structures of the rc-system, I do not really feel up to porting to non-legacy rc-support (Igors version also appears to use rc-legacy), and up to now, it was only combining patches and fixing small glitches for me. However, feel free to use me as a tester (I have the hardware available, after all) or flood me with links to guidelines or further instructions. Thanks again, Oliver Freyermuth Note, this patch is good for testing with media_build system. Just in case someone want not to load ~500 Mb kernel git tree, then configure, compile, install vmlinuz and so on, so on. -- Igor M. Liplianin Microsoft Windows Free Zone - Linux used for all Computing Tasks -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
af9015/tda18218: Multiples (separates) usb devices errors/conflicts
Hello, I've been testing af9015/tda18218 based usb DVB-T tuners on a 2.6.39.4 kernel with the latest v4l drivers avaiable (from git). When I'm using a single USB module, (listed as /dev/dvb/adapter0), everything works fine. When I'm plugging another module, at first it looks like everything's ok (/dev/dvb/adapter1) and if I try to use this module while the adapter0 is not been used, it works - but if try to use both modules at the same time, I get garbage output on both cards (error: warning: discontinuity for PID... with dvblast on both cards. Does anyone have any idea on how to fix this problem? -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH]Medion 95700 analog video support
W dniu 23.09.2011 23:06, Andy Walls pisze: Michael Krufky mkru...@linuxtv.org wrote: The cx25840 part of the patch breaks ivtv, IIRC. The patch really need to add board specific configuration and behavior to cx25840. I'll have time tomorrow late afternoon to properly reviw and comment. Regards, Andy Have you already narrowed it down which part of the cx25840 patch breaks ivtv - maybe it is setting the defaults at init or change to check for plain I2C instead of SMBus? Best regards, Maciej Szmigiero -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] Add support for PCTV452E.
В сообщении от 24 сентября 2011 00:11:21 автор Igor M. Liplianin написал: В сообщении от 23 сентября 2011 23:58:15 автор Oliver Freyermuth написал: Thanks for the review! As this is the first time I touched module- / kernel-code and I am not really familiar with the structures of the rc-system, I do not really feel up to porting to non-legacy rc-support (Igors version also appears to use rc-legacy), and up to now, it was only combining patches and fixing small glitches for me. However, feel free to use me as a tester (I have the hardware available, after all) or flood me with links to guidelines or further instructions. Thanks again, Oliver Freyermuth Note, this patch is good for testing with media_build system. Just in case someone want not to load ~500 Mb kernel git tree, then configure, compile, install vmlinuz and so on, so on. Sorry, wrong patch, forget to amend. This patch. -- Igor M. Liplianin Microsoft Windows Free Zone - Linux used for all Computing Tasks From ae2acc4401230c17b68f74f806501de5d710a386 Mon Sep 17 00:00:00 2001 From: Igor M. Liplianin liplia...@me.by Date: Sat, 24 Sep 2011 00:33:50 +0300 Subject: [PATCH] Add support for pctv452e To: mche...@infradead.org, linux-media@vger.kernel.org Signed-off-by: Igor M. Liplianin liplia...@me.by --- drivers/media/dvb/dvb-usb/Kconfig | 13 + drivers/media/dvb/dvb-usb/Makefile |4 + drivers/media/dvb/dvb-usb/dvb-usb-ids.h |3 + drivers/media/dvb/dvb-usb/pctv452e.c| 1093 +++ drivers/media/dvb/frontends/Kconfig | 10 + drivers/media/dvb/frontends/Makefile|1 + drivers/media/dvb/frontends/lnbp22.c| 148 + drivers/media/dvb/frontends/lnbp22.h| 57 ++ drivers/media/dvb/ttpci/ttpci-eeprom.c | 29 + drivers/media/dvb/ttpci/ttpci-eeprom.h |1 + 10 files changed, 1359 insertions(+), 0 deletions(-) create mode 100644 drivers/media/dvb/dvb-usb/pctv452e.c create mode 100644 drivers/media/dvb/frontends/lnbp22.c create mode 100644 drivers/media/dvb/frontends/lnbp22.h diff --git a/drivers/media/dvb/dvb-usb/Kconfig b/drivers/media/dvb/dvb-usb/Kconfig index 2c773827..5825716 100644 --- a/drivers/media/dvb/dvb-usb/Kconfig +++ b/drivers/media/dvb/dvb-usb/Kconfig @@ -258,6 +258,19 @@ config DVB_USB_AF9005_REMOTE Say Y here to support the default remote control decoding for the Afatech AF9005 based receiver. +config DVB_USB_PCTV452E + tristate Pinnacle PCTV HDTV Pro USB device/TT Connect S2-3600 + depends on DVB_USB + select TTPCI_EEPROM + select DVB_LNBP22 if !DVB_FE_CUSTOMISE + select DVB_STB0899 if !DVB_FE_CUSTOMISE + select DVB_STB6100 if !DVB_FE_CUSTOMISE + help + Support for external USB adapter designed by Pinnacle, + shipped under the brand name 'PCTV HDTV Pro USB'. + Also supports TT Connect S2-3600/3650 cards. + Say Y if you own such a device and want to use it. + config DVB_USB_DW2102 tristate DvbWorld TeVii DVB-S/S2 USB2.0 support depends on DVB_USB diff --git a/drivers/media/dvb/dvb-usb/Makefile b/drivers/media/dvb/dvb-usb/Makefile index 06f75f6..7d0710b 100644 --- a/drivers/media/dvb/dvb-usb/Makefile +++ b/drivers/media/dvb/dvb-usb/Makefile @@ -64,6 +64,9 @@ obj-$(CONFIG_DVB_USB_AF9005_REMOTE) += dvb-usb-af9005-remote.o dvb-usb-anysee-objs = anysee.o obj-$(CONFIG_DVB_USB_ANYSEE) += dvb-usb-anysee.o +dvb-usb-pctv452e-objs = pctv452e.o +obj-$(CONFIG_DVB_USB_PCTV452E) += dvb-usb-pctv452e.o + dvb-usb-dw2102-objs = dw2102.o obj-$(CONFIG_DVB_USB_DW2102) += dvb-usb-dw2102.o @@ -104,4 +107,5 @@ obj-$(CONFIG_DVB_USB_MXL111SF) += mxl111sf-tuner.o ccflags-y += -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends/ # due to tuner-xc3028 ccflags-y += -Idrivers/media/common/tuners +EXTRA_CFLAGS += -Idrivers/media/dvb/ttpci diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-ids.h b/drivers/media/dvb/dvb-usb/dvb-usb-ids.h index 7433261..2ad33ba 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb-ids.h +++ b/drivers/media/dvb/dvb-usb/dvb-usb-ids.h @@ -241,6 +241,9 @@ #define USB_PID_PCTV_200E0x020e #define USB_PID_PCTV_400E0x020f #define USB_PID_PCTV_450E0x0222 +#define USB_PID_PCTV_452E0x021f +#define USB_PID_TECHNOTREND_CONNECT_S2_3600 0x3007 +#define USB_PID_TECHNOTREND_CONNECT_S2_3650_CI 0x300a #define USB_PID_NEBULA_DIGITV0x0201 #define USB_PID_DVICO_BLUEBIRD_LGDT 0xd820 #define USB_PID_DVICO_BLUEBIRD_LG064F_COLD 0xd500 diff --git a/drivers/media/dvb/dvb-usb/pctv452e.c b/drivers/media/dvb/dvb-usb/pctv452e.c new file mode 100644 index 000..9a5c811 --- /dev/null +++ b/drivers/media/dvb/dvb-usb/pctv452e.c @@ -0,0 +1,1093 @@ +/* + * PCTV 452e DVB driver + * + * Copyright (c) 2006-2008 Dominik Kuhlen dkuh...@gmx.net + * + * TT connect S2-3650-CI Common Interface support, MAC readout + * Copyright (C) 2008 Michael H. Schimek mschi...@gmx.at + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public
Re: af9015/tda18218: Multiples (separates) usb devices errors/conflicts
On 09/24/2011 12:06 AM, Jin Kazama wrote: Hello, I've been testing af9015/tda18218 based usb DVB-T tuners on a 2.6.39.4 kernel with the latest v4l drivers avaiable (from git). When I'm using a single USB module, (listed as /dev/dvb/adapter0), everything works fine. When I'm plugging another module, at first it looks like everything's ok (/dev/dvb/adapter1) and if I try to use this module while the adapter0 is not been used, it works - but if try to use both modules at the same time, I get garbage output on both cards (error: warning: discontinuity for PID... with dvblast on both cards. Does anyone have any idea on how to fix this problem? Feel free to fix it. I am too busy currently. Antti -- http://palosaari.fi/ -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 6/17]DVB:Siano drivers - Add support in various boards implemented with siano devices.
Em 20-09-2011 07:31, Doron Cohen escreveu: Hi, This patch adds support in various boards implemented with Siano devices. This one looks ok, except that it was mangled by your emailer. Thanks, Doron Cohen -- From becf520ccaba483a80e242622b471d10bd74024e Mon Sep 17 00:00:00 2001 From: Doron Cohen dor...@siano-ms.com Date: Mon, 19 Sep 2011 13:57:40 +0300 Subject: [PATCH 09/21] Add support in various boards with SMS devices --- drivers/media/dvb/siano/sms-cards.c | 224 ++- 1 files changed, 195 insertions(+), 29 deletions(-) diff --git a/drivers/media/dvb/siano/sms-cards.c b/drivers/media/dvb/siano/sms-cards.c index 00c6c5f..66b302e 100644 --- a/drivers/media/dvb/siano/sms-cards.c +++ b/drivers/media/dvb/siano/sms-cards.c @@ -18,53 +18,66 @@ */ #include sms-cards.h +#ifdef SMS_RC_SUPPORT_SUBSYS #include smsir.h - -static int sms_dbg; -module_param_named(cards_dbg, sms_dbg, int, 0644); -MODULE_PARM_DESC(cards_dbg, set debug level (info=1, adv=2 (or-able))); - +#endif static struct sms_board sms_boards[] = { [SMS_BOARD_UNKNOWN] = { - .name = Unknown board, + /* 0 */ + .name = Unknown board, + .type = SMS_UNKNOWN_TYPE, + .default_mode = SMSHOSTLIB_DEVMD_NONE, }, [SMS1XXX_BOARD_SIANO_STELLAR] = { - .name = Siano Stellar Digital Receiver, - .type = SMS_STELLAR, + /* 1 */ + .name = Siano Stellar Digital Receiver, + .type = SMS_STELLAR, + .default_mode = SMSHOSTLIB_DEVMD_DVBT_BDA, }, [SMS1XXX_BOARD_SIANO_NOVA_A] = { - .name = Siano Nova A Digital Receiver, - .type = SMS_NOVA_A0, + /* 2 */ + .name = Siano Nova A Digital Receiver, + .type = SMS_NOVA_A0, + .default_mode = SMSHOSTLIB_DEVMD_DVBT_BDA, }, [SMS1XXX_BOARD_SIANO_NOVA_B] = { - .name = Siano Nova B Digital Receiver, - .type = SMS_NOVA_B0, + /* 3 */ + .name = Siano Nova B Digital Receiver, + .type = SMS_NOVA_B0, + .default_mode = SMSHOSTLIB_DEVMD_DVBT_BDA, }, [SMS1XXX_BOARD_SIANO_VEGA] = { - .name = Siano Vega Digital Receiver, - .type = SMS_VEGA, + /* 4 */ + .name = Siano Vega Digital Receiver, + .type = SMS_VEGA, + .default_mode = SMSHOSTLIB_DEVMD_CMMB, }, [SMS1XXX_BOARD_HAUPPAUGE_CATAMOUNT] = { - .name = Hauppauge Catamount, - .type = SMS_STELLAR, + /* 5 */ + .name = Hauppauge Catamount, + .type = SMS_STELLAR, .fw[SMSHOSTLIB_DEVMD_DVBT_BDA] = sms1xxx-stellar-dvbt-01.fw, + .default_mode = SMSHOSTLIB_DEVMD_DVBT_BDA, }, [SMS1XXX_BOARD_HAUPPAUGE_OKEMO_A] = { - .name = Hauppauge Okemo-A, - .type = SMS_NOVA_A0, + /* 6 */ + .name = Hauppauge Okemo-A, + .type = SMS_NOVA_A0, .fw[SMSHOSTLIB_DEVMD_DVBT_BDA] = sms1xxx-nova-a-dvbt-01.fw, + .default_mode = SMSHOSTLIB_DEVMD_DVBT_BDA, }, [SMS1XXX_BOARD_HAUPPAUGE_OKEMO_B] = { - .name = Hauppauge Okemo-B, - .type = SMS_NOVA_B0, + /* 7 */ + .name = Hauppauge Okemo-B, + .type = SMS_NOVA_B0, .fw[SMSHOSTLIB_DEVMD_DVBT_BDA] = sms1xxx-nova-b-dvbt-01.fw, }, [SMS1XXX_BOARD_HAUPPAUGE_WINDHAM] = { - .name = Hauppauge WinTV MiniStick, - .type = SMS_NOVA_B0, - .fw[SMSHOSTLIB_DEVMD_ISDBT_BDA] = sms1xxx-hcw-55xxx-isdbt-02.fw, + /* 8 */ + .name = Hauppauge WinTV MiniStick, + .type = SMS_NOVA_B0, .fw[SMSHOSTLIB_DEVMD_DVBT_BDA] = sms1xxx-hcw-55xxx-dvbt-02.fw, - .rc_codes = RC_MAP_HAUPPAUGE, + .default_mode = SMSHOSTLIB_DEVMD_DVBT_BDA, .board_cfg.leds_power = 26, .board_cfg.led0 = 27, .board_cfg.led1 = 28, @@ -74,29 +87,91 @@ static struct sms_board sms_boards[] = { .led_hi= 28, }, [SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD] = { + /* 9 */ .name = Hauppauge WinTV MiniCard, .type = SMS_NOVA_B0, .fw[SMSHOSTLIB_DEVMD_DVBT_BDA] = sms1xxx-hcw-55xxx-dvbt-02.fw, + .default_mode = SMSHOSTLIB_DEVMD_DVBT_BDA, .lna_ctrl = 29, .board_cfg.foreign_lna0_ctrl = 29, .rf_switch = 17, .board_cfg.rf_switch_uhf = 17, }, [SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD_R2] = { - .name = Hauppauge WinTV MiniCard, - .type = SMS_NOVA_B0, + /* 10 */ + .name = Hauppauge WinTV
Re: [PATCH 7/17]DVB:Siano drivers - Support flexiable usb endpoint rather than hard-cored numbers.
Em 20-09-2011 07:31, Doron Cohen escreveu: Hi, This patch changes the usb driver to support flexiable usb endpoint rather than hard-cored numbers. Also looked ok, except for the whitespace mangling. Thanks, Doron Cohen -- From e4134fa357d3f41476b8ff33ebbcb69c399641dc Mon Sep 17 00:00:00 2001 From: Doron Cohen dor...@siano-ms.com Date: Mon, 19 Sep 2011 13:58:43 +0300 Subject: [PATCH 10/21] Support flexible endpoint numbering for various SMS devices 9instead of hard coded values) --- drivers/media/dvb/siano/smsusb.c | 240 +++-- 1 files changed, 149 insertions(+), 91 deletions(-) diff --git a/drivers/media/dvb/siano/smsusb.c b/drivers/media/dvb/siano/smsusb.c index b1c38a2..d7ef147 100644 --- a/drivers/media/dvb/siano/smsusb.c +++ b/drivers/media/dvb/siano/smsusb.c @@ -2,7 +2,7 @@ Siano Mobile Silicon, Inc. MDTV receiver kernel modules. -Copyright (C) 2005-2009, Uri Shkolnik, Anatoly Greenblat +Copyright (C) 2006-2011, Doron Cohen Cohen This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -29,21 +29,93 @@ along with this program. If not, see http://www.gnu.org/licenses/. #include sms-cards.h #include smsendian.h -static int sms_dbg; -module_param_named(debug, sms_dbg, int, 0644); +int sms_debug; +module_param_named(debug, sms_debug, int, 0644); MODULE_PARM_DESC(debug, set debug level (info=1, adv=2 (or-able))); #define USB1_BUFFER_SIZE 0x1000 -#define USB2_BUFFER_SIZE 0x4000 +#define USB2_BUFFER_SIZE 0x2000 #define MAX_BUFFERS 50 #define MAX_URBS 10 + +struct usb_device_id smsusb_id_table[] = { + { USB_DEVICE(0x187f, 0x0010), + .driver_info = SMS1XXX_BOARD_SIANO_STELLAR_ROM }, + { USB_DEVICE(0x187f, 0x0100), + .driver_info = SMS1XXX_BOARD_SIANO_STELLAR }, + { USB_DEVICE(0x187f, 0x0200), + .driver_info = SMS1XXX_BOARD_SIANO_NOVA_A }, + { USB_DEVICE(0x187f, 0x0201), + .driver_info = SMS1XXX_BOARD_SIANO_NOVA_B }, + { USB_DEVICE(0x187f, 0x0300), + .driver_info = SMS1XXX_BOARD_SIANO_VEGA }, + { USB_DEVICE(0x2040, 0x1700), + .driver_info = SMS1XXX_BOARD_HAUPPAUGE_CATAMOUNT }, + { USB_DEVICE(0x2040, 0x1800), + .driver_info = SMS1XXX_BOARD_HAUPPAUGE_OKEMO_A }, + { USB_DEVICE(0x2040, 0x1801), + .driver_info = SMS1XXX_BOARD_HAUPPAUGE_OKEMO_B }, + { USB_DEVICE(0x2040, 0x2000), + .driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD }, + { USB_DEVICE(0x2040, 0x2009), + .driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD_R2 }, + { USB_DEVICE(0x2040, 0x200a), + .driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD }, + { USB_DEVICE(0x2040, 0x2010), + .driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD }, + { USB_DEVICE(0x2040, 0x2019), + .driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD }, + { USB_DEVICE(0x2040, 0x5500), + .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM }, + { USB_DEVICE(0x2040, 0x5510), + .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM }, + { USB_DEVICE(0x2040, 0x5520), + .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM }, + { USB_DEVICE(0x2040, 0x5530), + .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM }, + { USB_DEVICE(0x2040, 0x5580), + .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM }, + { USB_DEVICE(0x2040, 0x5590), + .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM }, + { USB_DEVICE(0x187f, 0x0202), + .driver_info = SMS1XXX_BOARD_SIANO_NICE }, + { USB_DEVICE(0x187f, 0x0301), + .driver_info = SMS1XXX_BOARD_SIANO_VENICE }, + { USB_DEVICE(0x187f, 0x0302), + .driver_info = SMS1XXX_BOARD_SIANO_VENICE }, + { USB_DEVICE(0x187f, 0x0310), + .driver_info = SMS1XXX_BOARD_SIANO_MING }, + { USB_DEVICE(0x187f, 0x0500), + .driver_info = SMS1XXX_BOARD_SIANO_PELE }, + { USB_DEVICE(0x187f, 0x0600), + .driver_info = SMS1XXX_BOARD_SIANO_RIO }, + { USB_DEVICE(0x187f, 0x0700), + .driver_info = SMS1XXX_BOARD_SIANO_DENVER_2160 }, + { USB_DEVICE(0x187f, 0x0800), + .driver_info = SMS1XXX_BOARD_SIANO_DENVER_1530 }, + { USB_DEVICE(0x19D2, 0x0086), + .driver_info = SMS1XXX_BOARD_ZTE_DVB_DATA_CARD }, + { USB_DEVICE(0x19D2, 0x0078), + .driver_info = SMS1XXX_BOARD_ONDA_MDTV_DATA_CARD }, + { } /* Terminating entry */ + }; + +MODULE_DEVICE_TABLE(usb, smsusb_id_table); + +enum smsusb_state { + SMSUSB_DISCONNECTED, + SMSUSB_SUSPENDED, + SMSUSB_ACTIVE +}; + struct
Re: [PATCH 8/17]DVB:Siano drivers - Hide smscore structure from all modules which are not the core device.
Em 20-09-2011 07:31, Doron Cohen escreveu: Hi, This patch makes smscore structure hidden from all other module by making it's pointer NULL. Thanks, Doron Cohen -- From b003e8ec2893b7d6e68720abeb490fba38904e59 Mon Sep 17 00:00:00 2001 From: Doron Cohen dor...@siano-ms.com Date: Mon, 19 Sep 2011 14:16:02 +0300 Subject: [PATCH 11/21] Hide smscore data by making pointer NULL with unkniown fields. Please better explain this patch at the description: why to hide smscore data here? --- drivers/media/dvb/siano/smsdvb.c | 65 +- 1 files changed, 36 insertions(+), 29 deletions(-) diff --git a/drivers/media/dvb/siano/smsdvb.c b/drivers/media/dvb/siano/smsdvb.c index 62dd37c..2695d3a 100644 --- a/drivers/media/dvb/siano/smsdvb.c +++ b/drivers/media/dvb/siano/smsdvb.c @@ -37,7 +37,7 @@ DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); struct smsdvb_client_t { struct list_head entry; - struct smscore_device_t *coredev; + void *coredev; struct smscore_client_t *smsclient; struct dvb_adapter adapter; @@ -73,15 +73,15 @@ enum SMS_DVB3_EVENTS { static struct list_head g_smsdvb_clients; static struct mutex g_smsdvb_clientslock; -static int sms_dbg; -module_param_named(debug, sms_dbg, int, 0644); +int sms_debug; +module_param_named(debug, sms_debug, int, 0644); MODULE_PARM_DESC(debug, set debug level (info=1, adv=2 (or-able))); /* Events that may come from DVB v3 adapter */ static void sms_board_dvb3_event(struct smsdvb_client_t *client, enum SMS_DVB3_EVENTS event) { - struct smscore_device_t *coredev = client-coredev; + void *coredev = client-coredev; switch (event) { case DVB3_EVENT_INIT: sms_debug(DVB3_EVENT_INIT); @@ -656,45 +656,43 @@ static int smsdvb_isdbt_set_frontend(struct dvb_frontend *fe, struct dtv_frontend_properties *c = fe-dtv_property_cache; struct smsdvb_client_t *client = container_of(fe, struct smsdvb_client_t, frontend); - - struct { - struct SmsMsgHdr_S Msg; - u32 Data[4]; - } Msg; + struct SmsMsgData4Args_S Msg; fe-dtv_property_cache.delivery_system = SYS_ISDBT; - Msg.Msg.msgSrcId = DVBT_BDA_CONTROL_MSG_ID; - Msg.Msg.msgDstId = HIF_TASK; - Msg.Msg.msgFlags = 0; - Msg.Msg.msgType = MSG_SMS_ISDBT_TUNE_REQ; - Msg.Msg.msgLength = sizeof(Msg); - + Msg.xMsgHeader.msgSrcId = DVBT_BDA_CONTROL_MSG_ID; + Msg.xMsgHeader.msgDstId = HIF_TASK; + Msg.xMsgHeader.msgFlags = 0; + Msg.xMsgHeader.msgType = MSG_SMS_ISDBT_TUNE_REQ; + Msg.xMsgHeader.msgLength = sizeof(Msg); + Msg.msgData[0] = p-frequency; if (c-isdbt_sb_segment_idx == -1) c-isdbt_sb_segment_idx = 0; + sms_info(freq %d band %d, + p-frequency, p-u.ofdm.bandwidth); switch (c-isdbt_sb_segment_count) { case 3: - Msg.Data[1] = BW_ISDBT_3SEG; + Msg.msgData[1] = BW_ISDBT_3SEG; break; case 1: - Msg.Data[1] = BW_ISDBT_1SEG; + Msg.msgData[1] = BW_ISDBT_1SEG; break; case 0: /* AUTO */ switch (c-bandwidth_hz / 100) { case 8: case 7: c-isdbt_sb_segment_count = 3; - Msg.Data[1] = BW_ISDBT_3SEG; + Msg.msgData[1] = BW_ISDBT_3SEG; break; case 6: c-isdbt_sb_segment_count = 1; - Msg.Data[1] = BW_ISDBT_1SEG; + Msg.msgData[1] = BW_ISDBT_1SEG; break; default: /* Assumes 6 MHZ bw */ c-isdbt_sb_segment_count = 1; c-bandwidth_hz = 6000; - Msg.Data[1] = BW_ISDBT_1SEG; + Msg.msgData[1] = BW_ISDBT_1SEG; break; } break; @@ -702,10 +700,9 @@ static int smsdvb_isdbt_set_frontend(struct dvb_frontend *fe, sms_info(Segment count %d not supported, c-isdbt_sb_segment_count); return -EINVAL; } - - Msg.Data[0] = c-frequency; - Msg.Data[2] = 1200; - Msg.Data[3] = c-isdbt_sb_segment_idx; +Msg.msgData[0] = c-frequency; + Msg.msgData[2] = 1200; + Msg.msgData[3] = c-isdbt_sb_segment_idx; sms_info(%s: freq %d segwidth %d segindex %d\n, __func__, c-frequency, c-isdbt_sb_segment_count, @@ -782,7 +779,7 @@ static struct dvb_frontend_ops smsdvb_fe_ops = { .info = { .name = Siano Mobile Digital MDTV Receiver, .type = FE_OFDM, - .frequency_min = 4425, + .frequency_min = 16400,
Re: [PATCH 9/17]DVB:Siano drivers - Improve debug capabilities by separating debug and info messages.
Em 20-09-2011 07:31, Doron Cohen escreveu: Hi, This patch Improves debug capabilities by changing debug messages. seems ok. Ah, please, when submitting a patch, don't add a comment like that before the patch, as my scripts and patchwork.linuxtv.org will do the wrong thing with it. Thanks, Doron Cohen -- From 1adbdde1dc186b23eb772f0c647d7175dc3f7418 Mon Sep 17 00:00:00 2001 From: Doron Cohen dor...@siano-ms.com Date: Mon, 19 Sep 2011 14:24:29 +0300 Subject: [PATCH 12/21] Improve debug capabilities by separating debug and info messages --- drivers/media/dvb/siano/smsdvb.c | 39 ++--- 1 files changed, 23 insertions(+), 16 deletions(-) diff --git a/drivers/media/dvb/siano/smsdvb.c b/drivers/media/dvb/siano/smsdvb.c index 2695d3a..b80868c 100644 --- a/drivers/media/dvb/siano/smsdvb.c +++ b/drivers/media/dvb/siano/smsdvb.c @@ -84,42 +84,42 @@ static void sms_board_dvb3_event(struct smsdvb_client_t *client, void *coredev = client-coredev; switch (event) { case DVB3_EVENT_INIT: - sms_debug(DVB3_EVENT_INIT); + sms_info(DVB3_EVENT_INIT); sms_board_event(coredev, BOARD_EVENT_BIND); break; case DVB3_EVENT_SLEEP: - sms_debug(DVB3_EVENT_SLEEP); + sms_info(DVB3_EVENT_SLEEP); sms_board_event(coredev, BOARD_EVENT_POWER_SUSPEND); break; case DVB3_EVENT_HOTPLUG: - sms_debug(DVB3_EVENT_HOTPLUG); + sms_info(DVB3_EVENT_HOTPLUG); sms_board_event(coredev, BOARD_EVENT_POWER_INIT); break; case DVB3_EVENT_FE_LOCK: if (client-event_fe_state != DVB3_EVENT_FE_LOCK) { client-event_fe_state = DVB3_EVENT_FE_LOCK; - sms_debug(DVB3_EVENT_FE_LOCK); + sms_info(DVB3_EVENT_FE_LOCK); sms_board_event(coredev, BOARD_EVENT_FE_LOCK); } break; case DVB3_EVENT_FE_UNLOCK: if (client-event_fe_state != DVB3_EVENT_FE_UNLOCK) { client-event_fe_state = DVB3_EVENT_FE_UNLOCK; - sms_debug(DVB3_EVENT_FE_UNLOCK); + sms_info(DVB3_EVENT_FE_UNLOCK); sms_board_event(coredev, BOARD_EVENT_FE_UNLOCK); } break; case DVB3_EVENT_UNC_OK: if (client-event_unc_state != DVB3_EVENT_UNC_OK) { client-event_unc_state = DVB3_EVENT_UNC_OK; - sms_debug(DVB3_EVENT_UNC_OK); + sms_info(DVB3_EVENT_UNC_OK); sms_board_event(coredev, BOARD_EVENT_MULTIPLEX_OK); } break; case DVB3_EVENT_UNC_ERR: if (client-event_unc_state != DVB3_EVENT_UNC_ERR) { client-event_unc_state = DVB3_EVENT_UNC_ERR; - sms_debug(DVB3_EVENT_UNC_ERR); + sms_info(DVB3_EVENT_UNC_ERR); sms_board_event(coredev, BOARD_EVENT_MULTIPLEX_ERRORS); } break; @@ -249,20 +249,24 @@ static int smsdvb_onresponse(void *context, struct smscore_buffer_t *cb) struct smsdvb_client_t *client = (struct smsdvb_client_t *) context; struct SmsMsgHdr_S *phdr = (struct SmsMsgHdr_S *) (((u8 *) cb-p) + cb-offset); - u32 *pMsgData = (u32 *) phdr + 1; - /*u32 MsgDataLen = phdr-msgLength - sizeof(struct SmsMsgHdr_S);*/ + u32 *pMsgData = (u32 *) (phdr + 1); bool is_status_update = false; + static int data_packets = 0; smsendian_handle_rx_message((struct SmsMsgData_S *) phdr); switch (phdr-msgType) { case MSG_SMS_DVBT_BDA_DATA: + if (!(data_packets 0xf)); + sms_info(Got %d data packets so far., data_packets); + data_packets++; dvb_dmx_swfilter(client-demux, (u8 *)(phdr + 1), cb-size - sizeof(struct SmsMsgHdr_S)); break; case MSG_SMS_RF_TUNE_RES: case MSG_SMS_ISDBT_TUNE_RES: + sms_info(MSG_SMS_RF_TUNE_RES); complete(client-tune_done); break; @@ -416,8 +420,7 @@ static int smsdvb_start_feed(struct dvb_demux_feed *feed) container_of(feed-demux, struct smsdvb_client_t, demux); struct SmsMsgData_S PidMsg; - sms_debug(add pid %d(%x), - feed-pid, feed-pid); + sms_info(add pid %d(%x), feed-pid, feed-pid); PidMsg.xMsgHeader.msgSrcId = DVBT_BDA_CONTROL_MSG_ID; PidMsg.xMsgHeader.msgDstId = HIF_TASK; @@ -437,8 +440,7 @@ static int smsdvb_stop_feed(struct dvb_demux_feed *feed) container_of(feed-demux, struct smsdvb_client_t, demux); struct SmsMsgData_S PidMsg; - sms_debug(remove
Re: [PATCH 10/17]DVB:Siano drivers - Improve signal reception parameters monitoring using siano statistic functions
Em 20-09-2011 07:31, Doron Cohen escreveu: Hi, This patch Improve signal reception parameters monitoring using siano statistic functions. Thanks, Doron Cohen -- From 0325e0559d99ccb5ac04e9edef8eb0281a410c52 Mon Sep 17 00:00:00 2001 From: Doron Cohen dor...@siano-ms.com Date: Mon, 19 Sep 2011 14:43:01 +0300 Subject: [PATCH 13/21] Use get_statistics_ex instead of depracated get_statistics Does that mean that the old firmwares won't work? --- drivers/media/dvb/siano/smsdvb.c | 73 +- 1 files changed, 40 insertions(+), 33 deletions(-) diff --git a/drivers/media/dvb/siano/smsdvb.c b/drivers/media/dvb/siano/smsdvb.c index b80868c..aa345ed 100644 --- a/drivers/media/dvb/siano/smsdvb.c +++ b/drivers/media/dvb/siano/smsdvb.c @@ -48,6 +48,7 @@ struct smsdvb_client_t { fe_status_t fe_status; struct completion tune_done; + struct completion get_stats_done; /* todo: save freq/band instead whole struct */ struct dvb_frontend_parameters fe_params; @@ -330,7 +331,7 @@ static int smsdvb_onresponse(void *context, struct smscore_buffer_t *cb) is_status_update = true; break; } - case MSG_SMS_GET_STATISTICS_RES: { + case MSG_SMS_GET_STATISTICS_EX_RES: { union { struct SMSHOSTLIB_STATISTICS_ISDBT_S isdbt; struct SMSHOSTLIB_STATISTICS_DVB_Sdvb; @@ -343,22 +344,20 @@ static int smsdvb_onresponse(void *context, struct smscore_buffer_t *cb) is_status_update = true; switch (smscore_get_device_mode(client-coredev)) { + case SMSHOSTLIB_DEVMD_DVBT: + case SMSHOSTLIB_DEVMD_DVBH: + case SMSHOSTLIB_DEVMD_DVBT_BDA: + smsdvb_update_dvb_stats(pReceptionData, p-dvb); + break; case SMSHOSTLIB_DEVMD_ISDBT: case SMSHOSTLIB_DEVMD_ISDBT_BDA: smsdvb_update_isdbt_stats(pReceptionData, p-isdbt); break; default: - smsdvb_update_dvb_stats(pReceptionData, p-dvb); - } - if (!pReceptionData-IsDemodLocked) { - pReceptionData-SNR = 0; - pReceptionData-BER = 0; - pReceptionData-BERErrorCount = 0; - pReceptionData-InBandPwr = 0; - pReceptionData-ErrorTSPackets = 0; + break; } - - complete(client-tune_done); + is_status_update = true; + complete(client-get_stats_done); break; } default: @@ -470,18 +469,22 @@ static int smsdvb_sendrequest_and_wait(struct smsdvb_client_t *client, 0 : -ETIME; } -static int smsdvb_send_statistics_request(struct smsdvb_client_t *client) -{ - int rc; - struct SmsMsgHdr_S Msg = { MSG_SMS_GET_STATISTICS_REQ, - DVBT_BDA_CONTROL_MSG_ID, - HIF_TASK, - sizeof(struct SmsMsgHdr_S), 0 }; +static int smsdvb_get_statistics_ex(struct dvb_frontend *fe) { - rc = smsdvb_sendrequest_and_wait(client, Msg, sizeof(Msg), - client-tune_done); + struct smsdvb_client_t *client = + container_of(fe, struct smsdvb_client_t, frontend); + struct SmsMsgHdr_S Msg; + + Msg.msgSrcId = DVBT_BDA_CONTROL_MSG_ID; + Msg.msgDstId = HIF_TASK; + Msg.msgFlags = 0; + Msg.msgType = MSG_SMS_GET_STATISTICS_EX_REQ; + Msg.msgLength = sizeof(Msg); + + smsendian_handle_tx_message((struct SmsMsgHdr_S *)Msg); + return smsdvb_sendrequest_and_wait(client, Msg, sizeof(Msg), +client-get_stats_done); - return rc; } static inline int led_feedback(struct smsdvb_client_t *client) @@ -500,7 +503,7 @@ static int smsdvb_read_status(struct dvb_frontend *fe, fe_status_t *stat) struct smsdvb_client_t *client; client = container_of(fe, struct smsdvb_client_t, frontend); - rc = smsdvb_send_statistics_request(client); + rc = smsdvb_get_statistics_ex(fe); *stat = client-fe_status; @@ -515,7 +518,7 @@ static int smsdvb_read_ber(struct dvb_frontend *fe, u32 *ber) struct smsdvb_client_t *client; client = container_of(fe, struct smsdvb_client_t, frontend); - rc = smsdvb_send_statistics_request(client); + rc = smsdvb_get_statistics_ex(fe); *ber = client-reception_data.BER; @@ -531,7 +534,7 @@ static int smsdvb_read_signal_strength(struct dvb_frontend *fe, u16 *strength) struct smsdvb_client_t *client; client = container_of(fe, struct smsdvb_client_t, frontend); - rc =
Re: [PATCH 11/17]DVB:Siano drivers - Improve debug capabilities - add and change debug prints
Em 20-09-2011 07:31, Doron Cohen escreveu: Hi, This patch Improve debug capabilities - add and change debug prints. Thanks, Doron Cohen -- From 33055c84a25faa1bde70a8417c2138381f49f498 Mon Sep 17 00:00:00 2001 From: Doron Cohen dor...@siano-ms.com Date: Tue, 20 Sep 2011 08:05:35 +0300 Subject: [PATCH 15/21] Improve debug capabilities - add and change debug prints --- drivers/media/dvb/siano/smscoreapi.c | 91 ++--- 1 files changed, 71 insertions(+), 20 deletions(-) diff --git a/drivers/media/dvb/siano/smscoreapi.c b/drivers/media/dvb/siano/smscoreapi.c index 9738bad..db24391 100644 --- a/drivers/media/dvb/siano/smscoreapi.c +++ b/drivers/media/dvb/siano/smscoreapi.c @@ -42,8 +42,10 @@ #include smsendian.h #define MAX_GPIO_PIN_NUMBER 31 +static struct smsmdtv_version_t version = {MAJOR_VERSION,MINOR_VERSION,SUB_VERSION}; It is probably easier to just add a MODULE_VERSION() macro to the module. int sms_debug; +module_param_named(debug, sms_debug, int, 0644); MODULE_PARM_DESC(debug, set debug level (info=1, adv=2 (or-able))); struct smscore_device_notifyee_t { @@ -415,7 +417,7 @@ int smscore_register_device(struct smsdevice_params_t *params, *coredev = dev; - sms_info(device %p created, dev); + sms_info(core device 0x%p created, mode %d, type %d devpath %s, dev, dev-mode, params-device_type, dev-devpath); return 0; } @@ -499,7 +501,7 @@ int smscore_start_device(struct smscore_device_t *coredev) int rc = smscore_set_device_mode( coredev, smscore_registry_getmode(coredev-devpath)); if (rc 0) { - sms_info(set device mode faile , rc %d, rc); + sms_info(configure board failed , rc %d, rc); return rc; } @@ -510,7 +512,7 @@ int smscore_start_device(struct smscore_device_t *coredev) smscore_init_ir(coredev); #endif /*SMS_RC_SUPPORT_SUBSYS*/ - sms_info(device %p started, rc %d, coredev, rc); + sms_info(device 0x%p started, rc %d, coredev, rc); kmutex_unlock(g_smscore_deviceslock); @@ -519,6 +521,15 @@ int smscore_start_device(struct smscore_device_t *coredev) EXPORT_SYMBOL_GPL(smscore_start_device); +/** + * injects firmware from a buffer to the device using data messages + * + * @param coredev pointer to a coredev object returned by + * smscore_register_device + * @param buffer pointer to a firmware buffer + * @param size size (in bytes) of the firmware buffer + * @return 0 on success, 0 on error. + */ static int smscore_load_firmware_family2(struct smscore_device_t *coredev, void *buffer, size_t size) { @@ -625,8 +636,7 @@ static int smscore_load_firmware_family2(struct smscore_device_t *coredev, kfree(msg); return ((rc = 0) coredev-postload_handler) ? - coredev-postload_handler(coredev-context) : - rc; + coredev-postload_handler(coredev-context) : rc; } /** @@ -634,6 +644,9 @@ static int smscore_load_firmware_family2(struct smscore_device_t *coredev, * * @param coredev pointer to a coredev object returned by *smscore_register_device + * @param mode requested mode of operation + * @param lookup if 1, always get the fw filename from smscore_fw_lkup + * table. if 0, try first to get from sms_boards * @param filename null-terminated string specifies firmware file name * @param loadfirmware_handler device handler that loads firmware * @@ -741,7 +754,7 @@ void smscore_unregister_device(struct smscore_device_t *coredev) kmutex_unlock(g_smscore_deviceslock); - sms_info(device %p destroyed, coredev); + sms_info(device 0x%p destroyed, coredev); } EXPORT_SYMBOL_GPL(smscore_unregister_device); @@ -761,6 +774,11 @@ static int smscore_detect_mode(struct smscore_device_t *coredev) rc = smscore_sendrequest_and_wait(coredev, msg, msg-msgLength, coredev-version_ex_done); + + if (rc 0) { + sms_err(detect mode failed, rc %d, rc); + } + if (rc == -ETIME) { sms_err(MSG_SMS_GET_VERSION_EX_REQ failed first try); @@ -855,7 +873,7 @@ int smscore_set_device_mode(struct smscore_device_t *coredev, int mode) rc = smscore_load_firmware_from_file(coredev, fw_filename, NULL); if (rc 0) { - sms_warn(error %d loading firmware: %s, + sms_debug(error %d loading firmware: %s, trying again with default firmware, rc, fw_filename); @@ -865,9 +883,7 @@ int smscore_set_device_mode(struct smscore_device_t *coredev, int
Re: [PATCH 12/17]DVB:Siano drivers - Improve firmware load and reload mechanism.
Em 20-09-2011 07:31, Doron Cohen escreveu: Hi, This patch step Improve firmware load and reload mechanism in order to support new siano devices and match all existing devices. Thanks, Doron Cohen --- From 59062b9fbc2f3c28cbb1ec014c6ed5a3e065a7de Mon Sep 17 00:00:00 2001 From: Doron Cohen dor...@siano-ms.com Date: Tue, 20 Sep 2011 08:22:29 +0300 Subject: [PATCH 16/21] Improve firmware load and reload mechanism in order to support new siano devices and match all existing devices. --- drivers/media/dvb/siano/smscoreapi.c | 530 +++--- 1 files changed, 423 insertions(+), 107 deletions(-) diff --git a/drivers/media/dvb/siano/smscoreapi.c b/drivers/media/dvb/siano/smscoreapi.c index db24391..e50e356 100644 --- a/drivers/media/dvb/siano/smscoreapi.c +++ b/drivers/media/dvb/siano/smscoreapi.c @@ -312,6 +312,7 @@ smscore_buffer_t *smscore_createbuffer(u8 *buffer, void *common_buffer, cb-p = buffer; cb-offset_in_common = buffer - (u8 *) common_buffer; cb-phys = common_buffer_phys + cb-offset_in_common; + cb-offset=0; return cb; } @@ -352,6 +353,7 @@ int smscore_register_device(struct smsdevice_params_t *params, /* init completion events */ init_completion(dev-version_ex_done); init_completion(dev-data_download_done); + init_completion(dev-data_validity_done); init_completion(dev-trigger_done); init_completion(dev-init_device_done); init_completion(dev-reload_start_done); @@ -360,6 +362,7 @@ int smscore_register_device(struct smsdevice_params_t *params, init_completion(dev-gpio_set_level_done); init_completion(dev-gpio_get_level_done); init_completion(dev-ir_init_done); + init_completion(dev-device_ready_done); /* Buffer management */ init_waitqueue_head(dev-buffer_mng_waitq); @@ -426,7 +429,13 @@ EXPORT_SYMBOL_GPL(smscore_register_device); static int smscore_sendrequest_and_wait(struct smscore_device_t *coredev, void *buffer, size_t size, struct completion *completion) { - int rc = coredev-sendrequest_handler(coredev-context, buffer, size); + int rc; + + if (completion == NULL) + return -EINVAL; + init_completion(completion); + + rc = coredev-sendrequest_handler(coredev-context, buffer, size); if (rc 0) { sms_info(sendrequest returned error %d, rc); return rc; @@ -535,7 +544,8 @@ static int smscore_load_firmware_family2(struct smscore_device_t *coredev, { struct SmsFirmware_ST *firmware = (struct SmsFirmware_ST *) buffer; struct SmsMsgHdr_S *msg; - u32 mem_address; + u32 mem_address, calc_checksum = 0; + u32 i, *ptr; u8 *payload = firmware-Payload; int rc = 0; firmware-StartAddress = le32_to_cpu(firmware-StartAddress); @@ -563,9 +573,17 @@ static int smscore_load_firmware_family2(struct smscore_device_t *coredev, rc = smscore_sendrequest_and_wait(coredev, msg, msg-msgLength, coredev-reload_start_done); + + if (rc 0) { + sms_err(device reload failed, rc %d, rc); + goto exit_fw_download; + } + mem_address = *(u32 *) payload[20]; } + for (i = 0, ptr = (u32*)firmware-Payload; i firmware-Length/4 ; i ++, ptr++) + calc_checksum += *ptr; while (size rc = 0) { struct SmsDataDownload_S *DataMsg = (struct SmsDataDownload_S *) msg; @@ -578,14 +596,9 @@ static int smscore_load_firmware_family2(struct smscore_device_t *coredev, DataMsg-MemAddr = mem_address; memcpy(DataMsg-Payload, payload, payload_size); - if ((coredev-device_flags SMS_ROM_NO_RESPONSE) - (coredev-mode == SMSHOSTLIB_DEVMD_NONE)) - rc = coredev-sendrequest_handler( - coredev-context, DataMsg, - DataMsg-xMsgHeader.msgLength); - else - rc = smscore_sendrequest_and_wait( - coredev, DataMsg, + + + rc = smscore_sendrequest_and_wait(coredev, DataMsg, DataMsg-xMsgHeader.msgLength, coredev-data_download_done); @@ -594,44 +607,63 @@ static int smscore_load_firmware_family2(struct smscore_device_t *coredev, mem_address += payload_size; } - if (rc = 0) { + if (rc 0) + goto exit_fw_download; + + sms_err(sending MSG_SMS_DATA_VALIDITY_REQ expecting 0x%x, calc_checksum); + SMS_INIT_MSG(msg, MSG_SMS_DATA_VALIDITY_REQ, + sizeof(struct
Re: [PATCH 13/17]DVB:Siano drivers - Support big endian platform which uses SPI/I2C
Em 20-09-2011 07:31, Doron Cohen escreveu: Hi, This patch step adds support big endian platform which uses SPI/I2C seems ok. Thanks, Doron Cohen From 2b77c0b5f69924206b9e09cda42aad56772e9380 Mon Sep 17 00:00:00 2001 From: Doron Cohen dor...@siano-ms.com Date: Tue, 20 Sep 2011 08:31:52 +0300 Subject: [PATCH 17/21] Support big endian platform which uses SPI/I2C (need to switch header byte order) --- drivers/media/dvb/siano/smscoreapi.c |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/media/dvb/siano/smscoreapi.c b/drivers/media/dvb/siano/smscoreapi.c index e50e356..459c6e9 100644 --- a/drivers/media/dvb/siano/smscoreapi.c +++ b/drivers/media/dvb/siano/smscoreapi.c @@ -570,8 +570,8 @@ static int smscore_load_firmware_family2(struct smscore_device_t *coredev, sms_debug(sending reload command.); SMS_INIT_MSG(msg, MSG_SW_RELOAD_START_REQ, sizeof(struct SmsMsgHdr_S)); - rc = smscore_sendrequest_and_wait(coredev, msg, - msg-msgLength, + smsendian_handle_tx_message((struct SmsMsgHdr_S *)msg); + rc = smscore_sendrequest_and_wait(coredev, msg, msg-msgLength, coredev-reload_start_done); if (rc 0) { @@ -597,7 +597,7 @@ static int smscore_load_firmware_family2(struct smscore_device_t *coredev, memcpy(DataMsg-Payload, payload, payload_size); - + smsendian_handle_tx_message((struct SmsMsgHdr_S *)msg); rc = smscore_sendrequest_and_wait(coredev, DataMsg, DataMsg-xMsgHeader.msgLength, coredev-data_download_done); @@ -976,6 +976,7 @@ static int smscore_detect_mode(struct smscore_device_t *coredev) SMS_INIT_MSG(msg, MSG_SMS_GET_VERSION_EX_REQ, sizeof(struct SmsMsgHdr_S)); + smsendian_handle_tx_message((struct SmsMsgHdr_S *)msg); rc = smscore_sendrequest_and_wait(coredev, msg, msg-msgLength, coredev-version_ex_done); @@ -1356,6 +1357,8 @@ void smscore_onresponse(struct smscore_device_t *coredev, rc = client-onresponse_handler(client-context, cb); if (rc 0) { + smsendian_handle_rx_message((struct SmsMsgData_S *)phdr); + switch (phdr-msgType) { case MSG_SMS_ISDBT_TUNE_RES: sms_debug(MSG_SMS_ISDBT_TUNE_RES); -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 14/17]DVB:Siano drivers - support platform whcih doesn't have request firmware deamon (used in android)
Em 20-09-2011 07:31, Doron Cohen escreveu: Hi, This patch step support platform whcih doesn't have request firmware deamon (used in android). Thanks, Doron Cohen --- From 3e0060fc7cfdbd5844e9a644b6d2927a406cde20 Mon Sep 17 00:00:00 2001 From: Doron Cohen dor...@siano-ms.com Date: Tue, 20 Sep 2011 08:37:43 +0300 Subject: [PATCH 18/21] Support platform which doesn't have request_firmware deamon. Allow loading firmware from application without using request_firmware API NACK. --- drivers/media/dvb/siano/smscoreapi.c | 77 - 1 files changed, 74 insertions(+), 3 deletions(-) diff --git a/drivers/media/dvb/siano/smscoreapi.c b/drivers/media/dvb/siano/smscoreapi.c index 459c6e9..bb92351 100644 --- a/drivers/media/dvb/siano/smscoreapi.c +++ b/drivers/media/dvb/siano/smscoreapi.c @@ -507,12 +507,83 @@ static int smscore_init_ir(struct smscore_device_t *coredev) */ int smscore_start_device(struct smscore_device_t *coredev) { - int rc = smscore_set_device_mode( - coredev, smscore_registry_getmode(coredev-devpath)); + int rc = 0; + int board_id = smscore_get_board_id(coredev); + +#ifdef REQUEST_FIRMWARE_SUPPORTED + int mode; + int type = sms_get_board(board_id)-type; + if (type == SMS_UNKNOWN_TYPE) + type = smscore_registry_gettype(coredev-devpath); + sms_info (starting device type %d, type); + /* + * first, search operation mode in the registry, with + * the limitation of type-mode compatability. + * if firmware donload fails, get operation mode from + * sms_boards + * for spi, type = SMS_UNKNOWN_TYPE and board_id = SMS_BOARD_UNKNOWN + * so always default_mode is set + */ + switch (type) { + case SMS_UNKNOWN_TYPE: + mode = default_mode; + break; + case SMS_STELLAR: + case SMS_NOVA_A0: + case SMS_NOVA_B0: + case SMS_PELE: + case SMS_RIO: + mode = smscore_registry_getmode(coredev-devpath); + sms_info (mode for path %s in registry %d, coredev-devpath, mode); + if (mode == SMSHOSTLIB_DEVMD_CMMB) + mode = (default_mode == SMSHOSTLIB_DEVMD_CMMB) ? SMSHOSTLIB_DEVMD_NONE : default_mode; + break; +case SMS_DENVER_1530: +mode = SMSHOSTLIB_DEVMD_ATSC; +break; +case SMS_DENVER_2160: +mode = SMSHOSTLIB_DEVMD_DAB_TDMB; +break; +case SMS_VEGA: + case SMS_VENICE: + case SMS_MING: + mode = SMSHOSTLIB_DEVMD_CMMB; + break; + default: + mode = SMSHOSTLIB_DEVMD_NONE; + } + + /* first try */ + sms_info (mode after adjustment %d, mode); + rc = smscore_set_device_mode(coredev, mode); + + if (rc 0) { + sms_info(set device mode to %d failed, mode); + + /* + * don't try again on spi mode, or if the mode from + * sms_boards is identical to the previous mode + */ + if ((board_id == SMS_BOARD_UNKNOWN) || + (mode == sms_get_board(board_id)-default_mode)) + return -ENOEXEC; + + /* second try */ + mode = sms_get_board(board_id)-default_mode; + rc = smscore_set_device_mode(coredev, mode); + if (rc 0) { + sms_info(set device mode to %d failed, mode); + return -ENOEXEC ; + } + } + sms_info(set device mode succeeded); + + rc = smscore_configure_board(coredev); if (rc 0) { sms_info(configure board failed , rc %d, rc); return rc; } +#endif kmutex_lock(g_smscore_deviceslock); @@ -1614,7 +1685,7 @@ void smscore_unregister_client(struct smscore_client_t *client) kfree(identry); } - sms_info(%p, client-context); + sms_info(unregister client 0x%p, client-context); list_del(client-entry); kfree(client); -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 15/17]DVB:Siano drivers - Bug fix - avoid (rare) dead locks causing the driver to hang when module removed.
Em 20-09-2011 07:32, Doron Cohen escreveu: Hi, This patch step is a Bug fix - avoid (rare) dead locks causing the driver to hang when module removed. Thanks, Doron Cohen --- From ad75d9ce48d440c6db6c5147530f1e23de2fcb28 Mon Sep 17 00:00:00 2001 From: Doron Cohen dor...@siano-ms.com Date: Tue, 20 Sep 2011 08:46:52 +0300 Subject: [PATCH 19/21] Bug fix - waiting for free buffers might have caused dead locks. Mechanism changed so locks are released around each wait. --- drivers/media/dvb/siano/smscoreapi.c | 53 +++-- 1 files changed, 43 insertions(+), 10 deletions(-) diff --git a/drivers/media/dvb/siano/smscoreapi.c b/drivers/media/dvb/siano/smscoreapi.c index bb92351..0555a38 100644 --- a/drivers/media/dvb/siano/smscoreapi.c +++ b/drivers/media/dvb/siano/smscoreapi.c @@ -1543,26 +1543,59 @@ EXPORT_SYMBOL_GPL(smscore_onresponse); * * @return pointer to descriptor on success, NULL on error. */ - -struct smscore_buffer_t *get_entry(struct smscore_device_t *coredev) +struct smscore_buffer_t *smscore_getbuffer(struct smscore_device_t *coredev) { struct smscore_buffer_t *cb = NULL; unsigned long flags; + DEFINE_WAIT(wait); + + spin_lock_irqsave(coredev-bufferslock, flags); + + /* set the current process state to interruptible sleep + * in case schedule() will be called, this process will go to sleep + * and woken up only when a new buffer is available (see smscore_putbuffer) + */ + prepare_to_wait(coredev-buffer_mng_waitq, wait, TASK_INTERRUPTIBLE); + + if (list_empty(coredev-buffers)) { + sms_debug(no avaliable common buffer, need to schedule); + + /* + * before going to sleep, release the lock + */ + spin_unlock_irqrestore(coredev-bufferslock, flags); + + schedule(); + + sms_debug(wake up after schedule()); + + /* + * acquire the lock again + */ spin_lock_irqsave(coredev-bufferslock, flags); - if (!list_empty(coredev-buffers)) { - cb = (struct smscore_buffer_t *) coredev-buffers.next; - list_del(cb-entry); } The proper fix is not to call schedule(). It is to use a waitqueue. The current driver has it already. I think you're likely reverting the fix here. Please take a look at the git history to see how it was solved. + + /* + * in case that schedule() was skipped, set the process state to running + */ + finish_wait(coredev-buffer_mng_waitq, wait); + + /* + * verify that the list is not empty, since it might have been + * emptied during the sleep + * comment : this sitation can be avoided using spin_unlock_irqrestore_exclusive + */ + if (list_empty(coredev-buffers)) { + sms_err(failed to allocate buffer, returning NULL); spin_unlock_irqrestore(coredev-bufferslock, flags); - return cb; + return NULL; } -struct smscore_buffer_t *smscore_getbuffer(struct smscore_device_t *coredev) -{ - struct smscore_buffer_t *cb = NULL; + cb = (struct smscore_buffer_t *) coredev-buffers.next; + list_del(cb-entry); - wait_event(coredev-buffer_mng_waitq, (cb = get_entry(coredev))); + spin_unlock_irqrestore(coredev-bufferslock, flags); return cb; } -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 16/17]DVB:Siano drivers - extern function smscore_send_last_fw_chunk to be used by other modules
Em 20-09-2011 07:32, Doron Cohen escreveu: Hi, This patch step externs function smscore_send_last_fw_chunk to be used by other modules. Thanks, Doron Cohen --- From 1e19b238fa7129396df7ddc89e8197669c72a3a4 Mon Sep 17 00:00:00 2001 From: Doron Cohen dor...@siano-ms.com Date: Tue, 20 Sep 2011 09:38:10 +0300 Subject: [PATCH 20/21] extern function smscore_send_last_fw_chunk to be used by other modules --- drivers/media/dvb/siano/smscoreapi.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/media/dvb/siano/smscoreapi.c b/drivers/media/dvb/siano/smscoreapi.c index 0555a38..10bd28c 100644 --- a/drivers/media/dvb/siano/smscoreapi.c +++ b/drivers/media/dvb/siano/smscoreapi.c @@ -964,6 +964,8 @@ exit_fw_download: return rc; } +EXPORT_SYMBOL_GPL(smscore_send_last_fw_chunk); + The driver should be able to compile after each applied patch. If you're needing this one here, you probably broke the compilation. Please fold this patch with the one that had the compilation breakage. /** * notifies all clients registered with the device, notifies hotplugs, -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 17/17]DVB:Siano drivers - Automatically load client modules to make easier usage of device
Em 20-09-2011 07:32, Doron Cohen escreveu: Hi, This patch step makes Automatically load client modules to make easier usage of device Ok. Thanks, Doron Cohen --- From 82afa26fc1fb9db798e46de0c55b49fd1bda9580 Mon Sep 17 00:00:00 2001 From: Doron Cohen dor...@siano-ms.com Date: Tue, 20 Sep 2011 09:39:02 +0300 Subject: [PATCH 21/21] Automatically load client modules to make easier usage of device --- drivers/media/dvb/siano/sms-cards.c | 17 - 1 files changed, 4 insertions(+), 13 deletions(-) diff --git a/drivers/media/dvb/siano/sms-cards.c b/drivers/media/dvb/siano/sms-cards.c index 66b302e..378c25d 100644 --- a/drivers/media/dvb/siano/sms-cards.c +++ b/drivers/media/dvb/siano/sms-cards.c @@ -458,19 +458,10 @@ EXPORT_SYMBOL_GPL(sms_board_lna_control); int sms_board_load_modules(int id) { - switch (id) { - case SMS1XXX_BOARD_HAUPPAUGE_CATAMOUNT: - case SMS1XXX_BOARD_HAUPPAUGE_OKEMO_A: - case SMS1XXX_BOARD_HAUPPAUGE_OKEMO_B: - case SMS1XXX_BOARD_HAUPPAUGE_WINDHAM: - case SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD: - case SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD_R2: - request_module(smsdvb); - break; - default: - /* do nothing */ - break; - } + /* Siano smsmdtv loads all other supported client modules*/ + request_module(smsdvb); return 0; } EXPORT_SYMBOL_GPL(sms_board_load_modules); -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH RESEND 1/4] davinci vpbe: remove unused macro.
Em 19-09-2011 02:35, Manjunath Hadli escreveu: remove VPBE_DISPLAY_SD_BUF_SIZE as it is no longer used. Signed-off-by: Manjunath Hadli manjunath.ha...@ti.com --- drivers/media/video/davinci/vpbe_display.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/drivers/media/video/davinci/vpbe_display.c b/drivers/media/video/davinci/vpbe_display.c index ae7add1..09a659e 100644 --- a/drivers/media/video/davinci/vpbe_display.c +++ b/drivers/media/video/davinci/vpbe_display.c @@ -43,7 +43,6 @@ static int debug; -#define VPBE_DISPLAY_SD_BUF_SIZE (720*576*2) #define VPBE_DEFAULT_NUM_BUFS 3 module_param(debug, int, 0644); This is really trivial. I won't wait for your pull request to merge this one ;) Thanks, Mauro -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH RESEND 0/4] davinci vpbe: enable DM365 v4l2 display driver
Em 19-09-2011 02:35, Manjunath Hadli escreveu: The patchset adds incremental changes necessary to enable dm365 v4l2 display driver, which includes vpbe display driver changes, osd specific changes and venc changes. The changes are incremental in nature,addind a few HD modes, and taking care of register level changes. The patch set does not include THS7303 amplifier driver which is planned to be sent seperately. Manjunath Hadli (4): davinci vpbe: remove unused macro. davinci vpbe: add dm365 VPBE display driver changes davinci vpbe: add dm365 and dm355 specific OSD changes davinci vpbe: add VENC block changes to enable dm365 and dm355 drivers/media/video/davinci/vpbe.c | 55 +++- drivers/media/video/davinci/vpbe_display.c |1 - drivers/media/video/davinci/vpbe_osd.c | 474 +--- drivers/media/video/davinci/vpbe_venc.c| 205 +++-- include/media/davinci/vpbe.h | 16 + include/media/davinci/vpbe_venc.h |4 + 6 files changed, 686 insertions(+), 69 deletions(-) Not sure why are you re-sending this patch series. To whom are you re-sending it? You have your git access at linuxtv.org. So, if the patches are ready for merge, just send me a pull request. Otherwise, please mark the patches as RFC or send to the one that will maintain the driver, c/c the mailing list. In any case, I'll mark the patches 2-4 as RFC (patch 1 is too trivial, I'll just apply it, to never see it again ;) ). Thanks, Mauro -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: RC6 decoding
Em 19-09-2011 08:12, Lawrence Rust escreveu: The current decoder for the RC6 IR protocol supports mode 0 (16 bit) and mode 6A. In mode 6A the decoder supports either 32-bit data (for Microsoft's MCE RC) or 24 bit. I would like to support a Sky/Sky+ standard RC which transmits RC6-6-20 i.e. 20 bit data. The transmitted frame format is identical to the 24 bit form so I'm curious as to what remotes transmit 24 bit data or was this an error and it should be 20? RC6-6-20 is explained here: http://www.guiott.com/wrc/RC6-6.html If 24-bit mode is in use, is there a way to select between 20 and 24 bit operation? You'll need to figure out a way to detect between them. It is probably not hard to detect, and add support for both at the decider. Maybe you can find something useful here: http://www.sbprojects.com/knowledge/ir/rc6.php I made the following simple mod to ir-rc6-decoder.c and my Sky/Sky+ RCs decode correctly (with a custom keytable): --- a/drivers/media/rc/ir-rc6-decoder.c 2011-05-19 06:06:34.0 +0200 +++ b/drivers/media/rc/ir-rc6-decoder.c 2011-09-19 13:02:35.0 +0200 @@ -17,14 +17,14 @@ /* * This decoder currently supports: * RC6-0-16 (standard toggle bit in header) - * RC6-6A-24 (no toggle bit) + * RC6-6A-20 (no toggle bit) * RC6-6A-32 (MCE version with toggle bit in body) */ #define RC6_UNIT 44 /* us */ #define RC6_HEADER_NBITS 4 /* not including toggle bit */ #define RC6_0_NBITS 16 -#define RC6_6A_SMALL_NBITS 24 +#define RC6_6A_SMALL_NBITS 20 #define RC6_6A_LARGE_NBITS 32 #define RC6_PREFIX_PULSE (6 * RC6_UNIT) #define RC6_PREFIX_SPACE (2 * RC6_UNIT) @@ -231,7 +231,7 @@ again: scancode = data-body ~RC6_6A_MCE_TOGGLE_MASK; } else { toggle = 0; - scancode = data-body 0xff; + scancode = data-body; } IR_dprintk(1, RC6(6A) scancode 0x%08x (toggle: %u)\n, -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: cx231xx: DMA problem on ARM
Em 23-09-2011 09:04, Thomas Petazzoni escreveu: Hello Devin, Le Thu, 22 Sep 2011 17:29:29 +0200, Thomas Petazzoni thomas.petazz...@free-electrons.com a écrit : I guess you're talking about 44ecf1df9493e6684cd1bb34abb107a0ffe1078a, which ensures a 10ms msleep call. We don't have this patch, but as with CONFIG_HZ=100, msleep() calls are anyway rounded up to 10ms, so I'm not sure this patch will have a huge impact. But we will try. Then, there is also de99d5328c6d54694471da28711a05adec708c3b, but it doesn't seem to be related to our problem. But we will also try with that one. So, we have now tried with Linux 3.0 and the following additional patches: * 992299e84a4891275ea5924e30b66ce39a701e5e (Fix regression introduced which broke the Hauppauge USBLive 2) * 44ecf1df9493e6684cd1bb34abb107a0ffe1078a (cx231xx: Fix power ramping issue) * de99d5328c6d54694471da28711a05adec708c3b (cx231xx: Provide signal lock status in G_INPUT) * the DMA fix And still the result is the same: we get a first frame, and then nothing more, and we have a large number of error messages in the kernel logs. I don't think that this is related to the power manager anymore. It can be related to cache coherency and/or to iommu support. [ 18.833587] cx231xx v4l2 driver loaded. [ 18.833831] cx231xx #0: New device Hauppauge Hauppauge Device @ 480 Mbps (2040:c200) with 5 interfaces [ 18.833862] cx231xx #0: registering interface 1 [ 18.854492] cx231xx #0: can't change interface 3 alt no. to 3: Max. Pkt size = 0 [ 19.185943] cx231xx #0: can't change interface 4 alt no. to 1: Max. Pkt size = 0 [ 19.405700] cx231xx #0: Identified as Hauppauge USB Live 2 (card=9) [ 19.692993] cx231xx #0: cx231xx_dif_set_standard: setStandard to [ 20.238159] cx25840 4-0044: cx23102 A/V decoder found @ 0x88 (cx231xx #0) [ 20.333740] cx25840 4-0044: Firmware download size changed to 16 bytes max length [ 21.783569] smsc95xx 1-2.1:1.0: eth0: link up, 100Mbps, full-duplex, lpa 0xC5E1 [ 22.921936] cx25840 4-0044: loaded v4l-cx231xx-avcore-01.fw firmware (16382 bytes) [ 22.960815] cx231xx #0: cx231xx #0: v4l2 driver version 0.0.1 [ 22.989715] cx231xx #0: cx231xx_dif_set_standard: setStandard to [ 23.042663] cx231xx #0: video_mux : 0 [ 23.042694] cx231xx #0: do_mode_ctrl_overrides : 0xb000 [ 23.043548] cx231xx #0: do_mode_ctrl_overrides NTSC [ 23.056213] cx231xx #0: cx231xx #0/0: registered device video0 [v4l2] [ 23.061035] cx231xx #0: cx231xx #0/0: registered device vbi0 [ 23.061065] cx231xx #0: V4L2 device registered as video0 and vbi0 [ 23.061096] cx231xx #0: EndPoint Addr 0x84, Alternate settings: 5 [ 23.061096] cx231xx #0: Alternate setting 0, max size= 512 [ 23.061126] cx231xx #0: Alternate setting 1, max size= 184 [ 23.061126] cx231xx #0: Alternate setting 2, max size= 728 [ 23.061157] cx231xx #0: Alternate setting 3, max size= 2892 [ 23.061157] cx231xx #0: Alternate setting 4, max size= 1800 [ 23.061187] cx231xx #0: EndPoint Addr 0x85, Alternate settings: 2 [ 23.061187] cx231xx #0: Alternate setting 0, max size= 512 [ 23.061218] cx231xx #0: Alternate setting 1, max size= 512 [ 23.061218] cx231xx #0: EndPoint Addr 0x86, Alternate settings: 2 [ 23.061248] cx231xx #0: Alternate setting 0, max size= 512 [ 23.061248] cx231xx #0: Alternate setting 1, max size= 576 [ 23.067108] usbcore: registered new interface driver cx231xx [ 23.360412] cx231xx #0: setPowerMode::mode = 48, No Change req. [ 23.365905] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8 [ 23.367156] cx231xx #0: cx231xx_stop_stream():: ep_mask = 8 [ 23.872253] cx231xx #0: cx231xx-audio.c: probing for cx231xx non standard usbaudio [ 23.875762] cx231xx #0: EndPoint Addr 0x83, Alternate settings: 3 [ 23.875793] cx231xx #0: Alternate setting 0, max size= 512 [ 23.875793] cx231xx #0: Alternate setting 1, max size= 28 [ 23.875823] cx231xx #0: Alternate setting 2, max size= 52 [ 23.875823] cx231xx: Cx231xx Audio Extension initialized [ 24.794891] lp: driver loaded but no devices found [ 24.880157] ppdev: user-space parallel port driver [ 30.872589] eth0: no IPv6 routers present [ 183.789154] omap_device: omap-mcbsp.2: new worst case activate latency 0: 30517 [ 183.829803] omap_device: omap-mcbsp.2: new worst case deactivate latency 0: 30517 [ 184.355712] omap_device: omap-mcbsp.2: new worst case deactivate latency 0: 61035 [ 186.400878] cx231xx #0: cx231xx_start_stream():: ep_mask = 4 [ 186.401855] cx231xx #0: cx231xx_stop_stream():: ep_mask = 4 [ 186.404571] cx231xx #0: cx231xx_start_stream():: ep_mask = 4 [ 186.405578] cx231xx #0: cx231xx_stop_stream():: ep_mask = 4 [ 186.408050] cx231xx #0: cx231xx_start_stream():: ep_mask = 4 [ 186.409332] cx231xx #0: cx231xx_stop_stream():: ep_mask = 4 [ 186.412109] cx231xx #0: cx231xx_start_stream():: ep_mask = 4 [ 186.414306] cx231xx #0:
Re: [GIT PATCHES FOR 3.2] gspca for_v3.2
Em 23-09-2011 05:37, Jean-Francois Moine escreveu: Hi Mauro, This set includes the patches: http://patchwork.linuxtv.org/patch/7358 http://patchwork.linuxtv.org/patch/114 Thanks for doing that! Applied, thanks! Cheers. The following changes since commit e553000a14ead0e265a8aa4d241c7b3221e233e3: [media] sr030pc30: Remove empty s_stream op (2011-09-21 12:48:45 -0300) are available in the git repository at: git://linuxtv.org/jfrancois/gspca.git for_v3.2 Frank Schaefer (1): gspca - sn9c20x: Fix status LED device 0c45:62b3. Jean-François Moine (10): gspca - benq: Remove the useless function sd_isoc_init gspca - main: Use a better altsetting for image transfer gspca - main: Handle the xHCI error on usb_set_interface() gspca - topro: New subdriver for Topro webcams gspca - spca1528: Increase the status waiting time gspca - spca1528: Add some comments and update copyright gspca - spca1528: Change the JPEG quality of the images gspca - spca1528: Don't force the USB transfer alternate setting gspca - main: Version change to 2.14.0 gspca - main: Display the subdriver name and version at probe time Wolfram Sang (1): gspca - zc3xx: New webcam 03f0:1b07 HP Premium Starter Cam Documentation/video4linux/gspca.txt |3 + drivers/media/video/gspca/Kconfig| 10 + drivers/media/video/gspca/Makefile |2 + drivers/media/video/gspca/benq.c | 15 - drivers/media/video/gspca/gspca.c| 225 ++- drivers/media/video/gspca/sn9c20x.c |2 +- drivers/media/video/gspca/spca1528.c | 26 +- drivers/media/video/gspca/topro.c| 4989 ++ drivers/media/video/gspca/zc3xx.c|1 + 9 files changed, 5180 insertions(+), 93 deletions(-) create mode 100644 drivers/media/video/gspca/topro.c -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [GIT PULL] Selection API and fixes for v3.2
Em 22-09-2011 12:13, Marek Szyprowski escreveu: Hello Mauro, I've collected pending selection API patches together with pending videobuf2 and Samsung driver fixes to a single git branch. Please pull them to your media tree. Marek Szyprowski (1): staging: dt3155v4l: fix build break I've applied this one previously, from the patch you sent me. Tomasz Stanislawski (6): v4l: add support for selection api v4l: add documentation for selection API I need more time to review those two patches. I'll probably do it at the next week. I generally start analyzing API changes based on the DocBook, so, let me point a few things I've noticed on a quick read, at the vidioc-g-selection.html DocBook-generated page: 1) The coordinates are expressed in driver-dependant units Why? coordinates should be expressed in pixels, as otherwise there's no way to use this API on a hardware-independent way. 2) 0 - driver is free to adjust size, it is recommended to choose the crop/compose rectangle as close as possible to the original one SEL_SIZE_GE - driver is not allowed to shrink the rectangle. The original rectangle must lay inside the adjusted one SEL_SIZE_LE - drive is not allowed to grow the rectangle. The adjusted rectangle must lay inside the original one SEL_SIZE_GE | SEL_SIZE_LE - choose size exactly the same as in desired rectangle. The macro names above don't match the definition, as they aren't prefixed by V4L2_. 3) There was no hyperlink for the struct v4l2_selection, as on other API definitions. 4) the language doesn't seem too consistent with the way other ioctl's are defined. For example, you're using struct::field for a field at the struct. Other parts of the API just say field foo of struct bar. 5) There's not a single mention at the git commit or at the DocBook about why the old crop API is being deprecated. You need to convince me about such need (ok, I followed a few discussions in the past, but, my brain patch buffer is shorter than the 7000 patchwork patches I reviewed just on this week). Besides that: do we really need to obsolete the crop API for TV cards? If so, why? If not, you need to explain why a developer should opt between one ioctl set of the other. 6) You should add a note about it at hist-v4l2.html page, stating what happened, and why a new crop ioctl set is needed. 7) You didn't update the Experimental API Elements or the Obsolete API Elements at the hist-v4l2.html Thanks, Mauro -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html