Re: [git:media_tree/master] [media] Siano: smsusb - Add a device id for PX-S1UD
Thank you for the update, Mauro. I didn't know how to check the status, now I get it :-) Thanks, Satoshi (2014/03/12 0:12), Mauro Carvalho Chehab wrote: This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media_tree.git tree: Subject: [media] Siano: smsusb - Add a device id for PX-S1UD Author: Satoshi Nagahama satt...@aim.com Date:Mon Feb 10 06:45:29 2014 -0300 Add a device id to support for PX-S1UD (PLEX ISDB-T usb dongle) which has sms2270. Signed-off-by: Satoshi Nagahama satt...@aim.com Signed-off-by: Mauro Carvalho Chehab m.che...@samsung.com drivers/media/usb/siano/smsusb.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) --- http://git.linuxtv.org/media_tree.git?a=commitdiff;h=f61e2268a06c3ea7354a1f4b3d878bedb8b776b1 diff --git a/drivers/media/usb/siano/smsusb.c b/drivers/media/usb/siano/smsusb.c index 05bd91a..1836a41 100644 --- a/drivers/media/usb/siano/smsusb.c +++ b/drivers/media/usb/siano/smsusb.c @@ -653,6 +653,8 @@ static const struct usb_device_id smsusb_id_table[] = { .driver_info = SMS1XXX_BOARD_ZTE_DVB_DATA_CARD }, { USB_DEVICE(0x19D2, 0x0078), .driver_info = SMS1XXX_BOARD_ONDA_MDTV_DATA_CARD }, + { USB_DEVICE(0x3275, 0x0080), + .driver_info = SMS1XXX_BOARD_SIANO_RIO }, { } /* Terminating entry */ }; -- 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: problems with Cinergy HTC HD Rev. 2 (0x0ccd:0x0101) Conexant 231xx
On 10.03.2014 10:51, Jan Gebhardt wrote: Hi, i have some problems using the Terratec Cinergy HTC Stick HD Rev. 2 . The driver or the specification is currenty not implemented into driverset of media-build. That means nothing happened when plugging the stick in? All i know is, that there is a buildin Conexant Chip (I think the CX23102) and a SiliconLabs Tuner (SI2173). I already tried to adapt this knownledge combined with the configuration of the windows driver to the driver(cx231xx) but sadly without success. How did you check the chips that are present? Did you read through the inf file of the windows driver or open the device? Looking at the inf file you attached, it most likely has a si2165 dvb-c/t demod. I wrote a first driver for this demod. But I think the tuner is unsupported (si2173 or si2170 as inf file says). Google only found these documents: - https://www.silabs.com/Support%20Documents/TechnicalDocs/Si2173-short.pdf - http://electronix.ru/forum/index.php?act=attachtype=postid=66442 But both documents skip the detailed programming. And I found this driver for si2176: https://github.com/fards/AMlogic_Meson6_030812release/blob/master/drivers/amlogic/tuners/si2176_func.c But I am not sure about the relation between si2170, si2173 and si2176 For adding support your device, you need to go through the normal process described in the wiki. Part of this is recording usb traffic. This can then partially be matched to the existing drivers. Regards Matthias -- 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: [RFC PATCH] [media]: of: move graph helpers from drivers/media/v4l2-core to drivers/of
On Mon, Mar 10, 2014 at 02:52:53PM +0100, Laurent Pinchart wrote: In theory unidirectional links in DT are indeed enough. However, let's not forget the following. - There's no such thing as single start points for graphs. Sure, in some simple cases the graph will have a single start point, but that's not a generic rule. For instance the camera graphs http://ideasonboard.org/media/omap3isp.ps and http://ideasonboard.org/media/eyecam.ps have two camera sensors, and thus two starting points from a data flow point of view. I think we need to stop thinking of a graph linked in terms of data flow - that's really not useful. Consider a display subsystem. The CRTC is the primary interface for the CPU - this is the most interesting interface, it's the interface which provides access to the picture to be displayed for the CPU. Other interfaces are secondary to that purpose - reading the I2C DDC bus for the display information is all secondary to the primary purpose of displaying a picture. For a capture subsystem, the primary interface for the CPU is the frame grabber (whether it be an already encoded frame or not.) The sensor devices are all secondary to that. So, the primary software interface in each case is where the data for the primary purpose is transferred. This is the point at which these graphs should commence since this is where we would normally start enumeration of the secondary interfaces. V4L2 even provides interfaces for this: you open the capture device, which then allows you to enumerate the capture device's inputs, and this in turn allows you to enumerate their properties. You don't open a particular sensor and work back up the tree. I believe trying to do this according to the flow of data is just wrong. You should always describe things from the primary device for the CPU towards the peripheral devices and never the opposite direction. -- FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly improving, and getting towards what was expected from it. -- 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: [REVIEWv3 PATCH 11/35] v4l2-ctrls: prepare for matrix support: add cols rows fields.
Em Mon, 17 Feb 2014 10:57:26 +0100 Hans Verkuil hverk...@xs4all.nl escreveu: From: Hans Verkuil hans.verk...@cisco.com Add cols and rows fields to the core control structures in preparation for matrix support. Signed-off-by: Hans Verkuil hans.verk...@cisco.com Reviewed-by: Sylwester Nawrocki s.nawro...@samsung.com --- drivers/media/v4l2-core/v4l2-ctrls.c | 26 +- include/media/v4l2-ctrls.h | 6 ++ 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c index ad8e5e4..a136cdc 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls.c +++ b/drivers/media/v4l2-core/v4l2-ctrls.c @@ -1731,7 +1731,7 @@ static struct v4l2_ctrl *v4l2_ctrl_new(struct v4l2_ctrl_handler *hdl, u32 id, const char *name, const char *unit, enum v4l2_ctrl_type type, s64 min, s64 max, u64 step, s64 def, - u32 elem_size, + u32 cols, u32 rows, u32 elem_size, u32 flags, const char * const *qmenu, const s64 *qmenu_int, void *priv) { @@ -1744,6 +1744,11 @@ static struct v4l2_ctrl *v4l2_ctrl_new(struct v4l2_ctrl_handler *hdl, if (hdl-error) return NULL; + if (cols == 0) + cols = 1; + if (rows == 0) + rows = 1; + if (type == V4L2_CTRL_TYPE_INTEGER64) elem_size = sizeof(s64); else if (type == V4L2_CTRL_TYPE_STRING) @@ -1803,6 +1808,8 @@ static struct v4l2_ctrl *v4l2_ctrl_new(struct v4l2_ctrl_handler *hdl, ctrl-is_string = type == V4L2_CTRL_TYPE_STRING; ctrl-is_ptr = type = V4L2_CTRL_COMPLEX_TYPES || ctrl-is_string; ctrl-is_int = !ctrl-is_ptr type != V4L2_CTRL_TYPE_INTEGER64; + ctrl-cols = cols; + ctrl-rows = rows; ctrl-elem_size = elem_size; if (type == V4L2_CTRL_TYPE_MENU) ctrl-qmenu = qmenu; @@ -1868,8 +1875,8 @@ struct v4l2_ctrl *v4l2_ctrl_new_custom(struct v4l2_ctrl_handler *hdl, ctrl = v4l2_ctrl_new(hdl, cfg-ops, cfg-type_ops, cfg-id, name, unit, type, min, max, - is_menu ? cfg-menu_skip_mask : step, - def, cfg-elem_size, + is_menu ? cfg-menu_skip_mask : step, def, + cfg-cols, cfg-rows, cfg-elem_size, flags, qmenu, qmenu_int, priv); if (ctrl) ctrl-is_private = cfg-is_private; @@ -1895,7 +1902,7 @@ struct v4l2_ctrl *v4l2_ctrl_new_std(struct v4l2_ctrl_handler *hdl, return NULL; } return v4l2_ctrl_new(hdl, ops, NULL, id, name, unit, type, - min, max, step, def, 0, + min, max, step, def, 0, 0, 0, flags, NULL, NULL, NULL); Gah, the number of parameters here is too big... 18 parameters on this function call! Please replace it by an structure. } EXPORT_SYMBOL(v4l2_ctrl_new_std); @@ -1929,7 +1936,7 @@ struct v4l2_ctrl *v4l2_ctrl_new_std_menu(struct v4l2_ctrl_handler *hdl, return NULL; } return v4l2_ctrl_new(hdl, ops, NULL, id, name, unit, type, - 0, max, mask, def, 0, + 0, max, mask, def, 0, 0, 0, flags, qmenu, qmenu_int, NULL); } EXPORT_SYMBOL(v4l2_ctrl_new_std_menu); @@ -1962,8 +1969,8 @@ struct v4l2_ctrl *v4l2_ctrl_new_std_menu_items(struct v4l2_ctrl_handler *hdl, return NULL; } return v4l2_ctrl_new(hdl, ops, NULL, id, name, unit, type, - 0, max, mask, def, - 0, flags, qmenu, NULL, NULL); + 0, max, mask, def, 0, 0, 0, + flags, qmenu, NULL, NULL); } EXPORT_SYMBOL(v4l2_ctrl_new_std_menu_items); @@ -1988,7 +1995,7 @@ struct v4l2_ctrl *v4l2_ctrl_new_int_menu(struct v4l2_ctrl_handler *hdl, return NULL; } return v4l2_ctrl_new(hdl, ops, NULL, id, name, unit, type, - 0, max, 0, def, 0, + 0, max, 0, def, 0, 0, 0, flags, NULL, qmenu_int, NULL); } EXPORT_SYMBOL(v4l2_ctrl_new_int_menu); @@ -2334,7 +2341,8 @@ int v4l2_query_ext_ctrl(struct v4l2_ctrl_handler *hdl, struct v4l2_query_ext_ctr qc-min.val = ctrl-minimum; qc-max.val = ctrl-maximum; qc-def.val = ctrl-default_value; - qc-cols = qc-rows = 1; + qc-cols = ctrl-cols; + qc-rows = ctrl-rows; if (ctrl-type == V4L2_CTRL_TYPE_MENU || ctrl-type == V4L2_CTRL_TYPE_INTEGER_MENU) qc-step.val = 1; diff --git a/include/media/v4l2-ctrls.h b/include/media/v4l2-ctrls.h index 5a39877..9eeb9d9 100644 --- a/include/media/v4l2-ctrls.h +++
Re: [REVIEWv3 PATCH 12/35] v4l2-ctrls: replace cur by a union v4l2_ctrl_ptr.
Em Mon, 17 Feb 2014 10:57:27 +0100 Hans Verkuil hverk...@xs4all.nl escreveu: From: Hans Verkuil hans.verk...@cisco.com Instead of having to maintain the 'cur' union this patch replaces it by a v4l2_ctrl_ptr union to be consistent with the future configuration stores, which also use that union. The number of drivers that use 'cur' is fairly small, so it is easy enough to convert them all. Unfortunately, the union for the new value cannot be dropped as easily since it is used pretty much everywhere. As a consequence of these changes the v4l2_ctrl struct changes as well. It was this: union { }; // anonymous union for the 'new' value union { } cur; // union for the 'cur' value union v4l2_ctrl_ptr new; // v4l2_ctrl_ptr to the new value (anonymous union) union v4l2_ctrl_ptr stores[]; // v4l2_ctrl_ptr to the cur union where the stores array contains just one v4l2_ctrl_ptr union when it is allocated. It changes to this: union { }; // anonymous union for the 'new' value union v4l2_ctrl_ptr *stores; // set to cur union v4l2_ctrl_ptr new; // v4l2_ctrl_ptr to the new value (anonymous union) union v4l2_ctrl_ptr cur; // v4l2_ctrl_ptr for the cur value The end result is the same: stores[0] is a pointer to the current value, stores[-1] is a pointer to the new value, and the 'cur' field is still there as well, except that the cur field is now a pointer union to the actual value, so cur.val is now *cur.p_s32. Huh??? Do you want to use a negative value for the array index??? That sounds crazy. Also, I'm pretty sure that all static analyzers will complain about that. Signed-off-by: Hans Verkuil hans.verk...@cisco.com --- Documentation/video4linux/v4l2-controls.txt | 4 ++-- drivers/media/common/cx2341x.c| 4 ++-- drivers/media/i2c/adp1653.c | 10 +- drivers/media/i2c/as3645a.c | 22 ++--- drivers/media/i2c/lm3560.c| 2 +- drivers/media/i2c/m5mols/m5mols_controls.c| 6 +++--- drivers/media/i2c/msp3400-driver.c| 4 ++-- drivers/media/i2c/mt9p031.c | 4 ++-- drivers/media/i2c/mt9t001.c | 4 ++-- drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c | 6 +++--- drivers/media/i2c/smiapp/smiapp-core.c| 12 ++-- drivers/media/pci/cx18/cx18-av-core.c | 2 +- drivers/media/pci/cx18/cx18-driver.c | 10 +- drivers/media/platform/exynos4-is/fimc-core.c | 6 +++--- drivers/media/platform/vivi.c | 28 +-- drivers/media/radio/radio-isa.c | 2 +- drivers/media/radio/radio-sf16fmr2.c | 4 ++-- drivers/media/usb/gspca/conex.c | 8 drivers/media/usb/gspca/sn9c20x.c | 4 ++-- drivers/media/usb/gspca/topro.c | 4 ++-- drivers/media/v4l2-core/v4l2-ctrls.c | 16 +++ include/media/v4l2-ctrls.h| 9 ++--- 22 files changed, 83 insertions(+), 88 deletions(-) diff --git a/Documentation/video4linux/v4l2-controls.txt b/Documentation/video4linux/v4l2-controls.txt index 06cf3ac..1c353c2 100644 --- a/Documentation/video4linux/v4l2-controls.txt +++ b/Documentation/video4linux/v4l2-controls.txt @@ -362,8 +362,8 @@ will result in a deadlock since these helpers lock the handler as well. You can also take the handler lock yourself: mutex_lock(state-ctrl_handler.lock); - printk(KERN_INFO String value is '%s'\n, ctrl1-cur.string); - printk(KERN_INFO Integer value is '%s'\n, ctrl2-cur.val); + pr_info(String value is '%s'\n, ctrl1-cur.p_char); + pr_info(Integer value is '%d'\n, *ctrl2-cur.p_s32); mutex_unlock(state-ctrl_handler.lock); diff --git a/drivers/media/common/cx2341x.c b/drivers/media/common/cx2341x.c index 103ef6b..909d334 100644 --- a/drivers/media/common/cx2341x.c +++ b/drivers/media/common/cx2341x.c @@ -1261,10 +1261,10 @@ static int cx2341x_hdl_api(struct cx2341x_handler *hdl, return hdl-func(hdl-priv, cmd, args, 0, data); } -/* ctrl-handler-lock is held, so it is safe to access cur.val */ +/* ctrl-handler-lock is held, so it is safe to access *cur.p_s32 */ static inline int cx2341x_neq(struct v4l2_ctrl *ctrl) { - return ctrl ctrl-val != ctrl-cur.val; + return ctrl ctrl-val != *ctrl-cur.p_s32; } static int cx2341x_try_ctrl(struct v4l2_ctrl *ctrl) diff --git a/drivers/media/i2c/adp1653.c b/drivers/media/i2c/adp1653.c index 873fe19..7d478dc 100644 --- a/drivers/media/i2c/adp1653.c +++ b/drivers/media/i2c/adp1653.c @@ -158,16 +158,16 @@ static int adp1653_get_ctrl(struct v4l2_ctrl *ctrl) if (IS_ERR_VALUE(rval)) return rval; - ctrl-cur.val = 0; + *ctrl-cur.p_s32 = 0; if (flash-fault
Re: [REVIEWv3 PATCH 13/35] v4l2-ctrls: use 'new' to access pointer controls
Em Mon, 17 Feb 2014 10:57:28 +0100 Hans Verkuil hverk...@xs4all.nl escreveu: From: Hans Verkuil hans.verk...@cisco.com Require that 'new' string and pointer values are accessed through the 'new' field instead of through the union. This reduces the union to just val and val64. Signed-off-by: Hans Verkuil hans.verk...@cisco.com Reviewed-by: Sylwester Nawrocki s.nawro...@samsung.com --- drivers/media/radio/si4713/si4713.c| 4 ++-- drivers/media/v4l2-core/v4l2-ctrls.c | 4 ++-- drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c | 2 +- include/media/v4l2-ctrls.h | 2 -- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/media/radio/si4713/si4713.c b/drivers/media/radio/si4713/si4713.c index 07d5153..718e10d 100644 --- a/drivers/media/radio/si4713/si4713.c +++ b/drivers/media/radio/si4713/si4713.c @@ -1098,11 +1098,11 @@ static int si4713_s_ctrl(struct v4l2_ctrl *ctrl) switch (ctrl-id) { case V4L2_CID_RDS_TX_PS_NAME: - ret = si4713_set_rds_ps_name(sdev, ctrl-string); + ret = si4713_set_rds_ps_name(sdev, ctrl-new.p_char); break; case V4L2_CID_RDS_TX_RADIO_TEXT: - ret = si4713_set_rds_radio_text(sdev, ctrl-string); + ret = si4713_set_rds_radio_text(sdev, ctrl-new.p_char); break; case V4L2_CID_TUNE_ANTENNA_CAPACITOR: diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c index 084335a..49ce52e 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls.c +++ b/drivers/media/v4l2-core/v4l2-ctrls.c @@ -1820,8 +1820,8 @@ static struct v4l2_ctrl *v4l2_ctrl_new(struct v4l2_ctrl_handler *hdl, data = ctrl-stores[1]; if (ctrl-is_ptr) { - ctrl-p = ctrl-new.p = data; - ctrl-stores[0].p = data + elem_size; + for (s = -1; s = 0; s++) + ctrl-stores[s].p = data + (s + 1) * elem_size; NACK! Don't use negative values for arrays. } else { ctrl-new.p = ctrl-val; ctrl-stores[0].p = data; diff --git a/drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c b/drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c index ce9e5aa..d19743b 100644 --- a/drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c +++ b/drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c @@ -1127,7 +1127,7 @@ static int solo_s_ctrl(struct v4l2_ctrl *ctrl) solo_motion_toggle(solo_enc, ctrl-val); return 0; case V4L2_CID_OSD_TEXT: - strcpy(solo_enc-osd_text, ctrl-string); + strcpy(solo_enc-osd_text, ctrl-new.p_char); err = solo_osd_print(solo_enc); return err; default: diff --git a/include/media/v4l2-ctrls.h b/include/media/v4l2-ctrls.h index 4f66393..1b06930 100644 --- a/include/media/v4l2-ctrls.h +++ b/include/media/v4l2-ctrls.h @@ -195,8 +195,6 @@ struct v4l2_ctrl { union { s32 val; s64 val64; - char *string; - void *p; }; union v4l2_ctrl_ptr *stores; union v4l2_ctrl_ptr new; -- Regards, 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: [REVIEWv3 PATCH 14/35] v4l2-ctrls: prepare for matrix support.
Em Mon, 17 Feb 2014 10:57:29 +0100 Hans Verkuil hverk...@xs4all.nl escreveu: From: Hans Verkuil hans.verk...@cisco.com Add core support for matrices. Again, this patch has negative values for array index. I'll stop analyzing here, as it is hard to keep the mind in a sane state seeing those crazy things ;) Signed-off-by: Hans Verkuil hans.verk...@cisco.com --- drivers/media/v4l2-core/v4l2-ctrls.c | 54 +++- include/media/v4l2-ctrls.h | 8 -- 2 files changed, 39 insertions(+), 23 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c index 49ce52e..f76716e 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls.c +++ b/drivers/media/v4l2-core/v4l2-ctrls.c @@ -1132,7 +1132,7 @@ static void send_event(struct v4l2_fh *fh, struct v4l2_ctrl *ctrl, u32 changes) v4l2_event_queue_fh(sev-fh, ev); } -static bool std_equal(const struct v4l2_ctrl *ctrl, +static bool std_equal(const struct v4l2_ctrl *ctrl, u32 idx, union v4l2_ctrl_ptr ptr1, union v4l2_ctrl_ptr ptr2) { @@ -1151,7 +1151,7 @@ static bool std_equal(const struct v4l2_ctrl *ctrl, } } -static void std_init(const struct v4l2_ctrl *ctrl, +static void std_init(const struct v4l2_ctrl *ctrl, u32 idx, union v4l2_ctrl_ptr ptr) { switch (ctrl-type) { @@ -1178,6 +1178,9 @@ static void std_log(const struct v4l2_ctrl *ctrl) { union v4l2_ctrl_ptr ptr = ctrl-stores[0]; + if (ctrl-is_matrix) + pr_cont([%u][%u] , ctrl-rows, ctrl-cols); + switch (ctrl-type) { case V4L2_CTRL_TYPE_INTEGER: pr_cont(%d, *ptr.p_s32); @@ -1220,7 +1223,7 @@ static void std_log(const struct v4l2_ctrl *ctrl) }) /* Validate a new control */ -static int std_validate(const struct v4l2_ctrl *ctrl, +static int std_validate(const struct v4l2_ctrl *ctrl, u32 idx, union v4l2_ctrl_ptr ptr) { size_t len; @@ -1444,7 +1447,7 @@ static int cluster_changed(struct v4l2_ctrl *master) if (ctrl == NULL) continue; - ctrl-has_changed = !ctrl-type_ops-equal(ctrl, + ctrl-has_changed = !ctrl-type_ops-equal(ctrl, 0, ctrl-stores[0], ctrl-new); changed |= ctrl-has_changed; } @@ -1502,15 +1505,15 @@ static int validate_new(const struct v4l2_ctrl *ctrl, case V4L2_CTRL_TYPE_BUTTON: case V4L2_CTRL_TYPE_CTRL_CLASS: ptr.p_s32 = c-value; - return ctrl-type_ops-validate(ctrl, ptr); + return ctrl-type_ops-validate(ctrl, 0, ptr); case V4L2_CTRL_TYPE_INTEGER64: ptr.p_s64 = c-value64; - return ctrl-type_ops-validate(ctrl, ptr); + return ctrl-type_ops-validate(ctrl, 0, ptr); default: ptr.p = c-p; - return ctrl-type_ops-validate(ctrl, ptr); + return ctrl-type_ops-validate(ctrl, 0, ptr); } } @@ -1736,7 +1739,8 @@ static struct v4l2_ctrl *v4l2_ctrl_new(struct v4l2_ctrl_handler *hdl, const s64 *qmenu_int, void *priv) { struct v4l2_ctrl *ctrl; - unsigned sz_extra; + bool is_matrix; + unsigned sz_extra, tot_ctrl_size; void *data; int err; int s; @@ -1748,6 +1752,7 @@ static struct v4l2_ctrl *v4l2_ctrl_new(struct v4l2_ctrl_handler *hdl, cols = 1; if (rows == 0) rows = 1; + is_matrix = cols 1 || rows 1; if (type == V4L2_CTRL_TYPE_INTEGER64) elem_size = sizeof(s64); @@ -1755,17 +1760,18 @@ static struct v4l2_ctrl *v4l2_ctrl_new(struct v4l2_ctrl_handler *hdl, elem_size = max + 1; else if (type V4L2_CTRL_COMPLEX_TYPES) elem_size = sizeof(s32); + tot_ctrl_size = elem_size * cols * rows; /* Sanity checks */ - if (id == 0 || name == NULL || id = V4L2_CID_PRIVATE_BASE || - elem_size == 0 || + if (id == 0 || name == NULL || !elem_size || + id = V4L2_CID_PRIVATE_BASE || (type == V4L2_CTRL_TYPE_MENU qmenu == NULL) || (type == V4L2_CTRL_TYPE_INTEGER_MENU qmenu_int == NULL)) { handler_set_err(hdl, -ERANGE); return NULL; } /* Complex controls are always hidden */ - if (type = V4L2_CTRL_COMPLEX_TYPES) + if (is_matrix || type = V4L2_CTRL_COMPLEX_TYPES) flags |= V4L2_CTRL_FLAG_HIDDEN; err = check_range(type, min, max, step, def); if (err) { @@ -1776,14 +1782,21 @@ static struct v4l2_ctrl *v4l2_ctrl_new(struct v4l2_ctrl_handler *hdl, handler_set_err(hdl, -ERANGE); return NULL; } + if (is_matrix + (type == V4L2_CTRL_TYPE_BUTTON || + type ==
Re: [RFC PATCH] [media]: of: move graph helpers from drivers/media/v4l2-core to drivers/of
On 12/03/14 12:25, Russell King - ARM Linux wrote: On Mon, Mar 10, 2014 at 02:52:53PM +0100, Laurent Pinchart wrote: In theory unidirectional links in DT are indeed enough. However, let's not forget the following. - There's no such thing as single start points for graphs. Sure, in some simple cases the graph will have a single start point, but that's not a generic rule. For instance the camera graphs http://ideasonboard.org/media/omap3isp.ps and http://ideasonboard.org/media/eyecam.ps have two camera sensors, and thus two starting points from a data flow point of view. I think we need to stop thinking of a graph linked in terms of data flow - that's really not useful. Consider a display subsystem. The CRTC is the primary interface for the CPU - this is the most interesting interface, it's the interface which provides access to the picture to be displayed for the CPU. Other interfaces are secondary to that purpose - reading the I2C DDC bus for the display information is all secondary to the primary purpose of displaying a picture. For a capture subsystem, the primary interface for the CPU is the frame grabber (whether it be an already encoded frame or not.) The sensor devices are all secondary to that. So, the primary software interface in each case is where the data for the primary purpose is transferred. This is the point at which these graphs should commence since this is where we would normally start enumeration of the secondary interfaces. V4L2 even provides interfaces for this: you open the capture device, which then allows you to enumerate the capture device's inputs, and this in turn allows you to enumerate their properties. You don't open a particular sensor and work back up the tree. We do it the other way around in OMAP DSS. It's the displays the user is interested in, so we enumerate the displays, and if the user wants to enable a display, we then follow the links from the display towards the SoC, configuring and enabling the components on the way. I don't have a strong opinion on the direction, I think both have their pros. In any case, that's more of a driver model thing, and I'm fine with linking in the DT outwards from the SoC (presuming the double-linking is not ok, which I still like best). I believe trying to do this according to the flow of data is just wrong. You should always describe things from the primary device for the CPU towards the peripheral devices and never the opposite direction. In that case there's possibly the issue I mentioned in other email in this thread: an encoder can be used in both a display and a capture pipeline. Describing the links outwards from CPU means that sometimes the encoder's input port is pointed at, and sometimes the encoder's output port is pointed at. That's possibly ok, but I think Grant was of the opinion that things should be explicitly described in the binding documentation: either a device's port must contain a 'remote-endpoint' property, or it must not, but no sometimes. But maybe I took his words too literally. Then there's also the audio example Philipp mentioned, where there is no clear outward from Soc direction for the link, as the link was bi-directional and between two non-SoC devices. Tomi signature.asc Description: OpenPGP digital signature
Re: [PATCH v4 10/10] rc: img-ir: add Sanyo decoder module
Hi James, Em Fri, 28 Feb 2014 23:29:00 + James Hogan james.ho...@imgtec.com escreveu: Add an img-ir module for decoding the Sanyo infrared protocol. After applying this series, some new warnings are popping up, when compiled with W=1: drivers/media/rc/img-ir/img-ir-hw.c: In function 'img_ir_free_timing': drivers/media/rc/img-ir/img-ir-hw.c:228:23: warning: variable 'maxlen' set but not used [-Wunused-but-set-variable] unsigned int minlen, maxlen, ft_min; ^ drivers/media/rc/img-ir/img-ir-hw.c:228:15: warning: variable 'minlen' set but not used [-Wunused-but-set-variable] unsigned int minlen, maxlen, ft_min; ^ drivers/media/rc/img-ir/img-ir-jvc.c:76:3: warning: initialized field overwritten [-Woverride-init] }, ^ drivers/media/rc/img-ir/img-ir-jvc.c:76:3: warning: (near initialization for 'img_ir_jvc.timings.s00') [-Woverride-init] drivers/media/rc/img-ir/img-ir-jvc.c:81:3: warning: initialized field overwritten [-Woverride-init] }, ^ drivers/media/rc/img-ir/img-ir-jvc.c:81:3: warning: (near initialization for 'img_ir_jvc.timings.s01') [-Woverride-init] Please fix. Regards, 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: [REVIEW PATCH 11/13] DocBook: document RF tuner bandwidth controls
Em Mon, 10 Mar 2014 12:01:28 +0200 Antti Palosaari cr...@iki.fi escreveu: On 05.03.2014 20:49, Mauro Carvalho Chehab wrote: Em Thu, 27 Feb 2014 02:22:06 +0200 Antti Palosaari cr...@iki.fi escreveu: Add documentation for RF tuner bandwidth controls. These controls are used to set filters on tuner signal path. Cc: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Antti Palosaari cr...@iki.fi --- Documentation/DocBook/media/v4l/controls.xml | 19 +++ 1 file changed, 19 insertions(+) diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml index 6c9dbf6..5550fea 100644 --- a/Documentation/DocBook/media/v4l/controls.xml +++ b/Documentation/DocBook/media/v4l/controls.xml @@ -5007,6 +5007,25 @@ descriptor. Calling VIDIOC-QUERYCTRL; for this control will return a description of this control class./entry /row row + entry spanname=idconstantV4L2_CID_RF_TUNER_BANDWIDTH_AUTO/constantnbsp;/entry + entryboolean/entry +/row +row + entry spanname=descrEnables/disables tuner radio channel +bandwidth configuration. In automatic mode bandwidth configuration is performed +by the driver./entry +/row +row + entry spanname=idconstantV4L2_CID_RF_TUNER_BANDWIDTH/constantnbsp;/entry + entryinteger/entry +/row +row + entry spanname=descrFilter(s) on tuner signal path are used to +filter signal according to receiving party needs. Driver configures filters to +fulfill desired bandwidth requirement. Used when V4L2_CID_RF_TUNER_BANDWIDTH_AUTO is not +set. The range and step are driver-specific./entry Huh? If this is enable/disable, why the range and step are driver-specific? Because there is two controls grouped. That is situation of having AUTO/MANUAL. V4L2_CID_RF_TUNER_BANDWIDTH_AUTO V4L2_CID_RF_TUNER_BANDWIDTH V4L2_CID_RF_TUNER_BANDWIDTH is valid only when V4L2_CID_RF_TUNER_BANDWIDTH_AUTO == false. Sorry, but I'm not understanding what you're arguing. Yeah, it is clear at the patch that there are two controls, and that V4L2_CID_RF_TUNER_BANDWIDTH is valid only when AUTO is disabled, but this doesn't answer my question: Why V4L2_CID_RF_TUNER_BANDWIDTH's range and step are driver-specific? -- Regards, 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 v4 10/10] rc: img-ir: add Sanyo decoder module
On 12/03/14 10:57, Mauro Carvalho Chehab wrote: Hi James, Em Fri, 28 Feb 2014 23:29:00 + James Hogan james.ho...@imgtec.com escreveu: Add an img-ir module for decoding the Sanyo infrared protocol. After applying this series, some new warnings are popping up, when compiled with W=1: drivers/media/rc/img-ir/img-ir-hw.c: In function 'img_ir_free_timing': drivers/media/rc/img-ir/img-ir-hw.c:228:23: warning: variable 'maxlen' set but not used [-Wunused-but-set-variable] unsigned int minlen, maxlen, ft_min; ^ drivers/media/rc/img-ir/img-ir-hw.c:228:15: warning: variable 'minlen' set but not used [-Wunused-but-set-variable] unsigned int minlen, maxlen, ft_min; ^ drivers/media/rc/img-ir/img-ir-jvc.c:76:3: warning: initialized field overwritten [-Woverride-init] }, ^ drivers/media/rc/img-ir/img-ir-jvc.c:76:3: warning: (near initialization for 'img_ir_jvc.timings.s00') [-Woverride-init] drivers/media/rc/img-ir/img-ir-jvc.c:81:3: warning: initialized field overwritten [-Woverride-init] }, ^ drivers/media/rc/img-ir/img-ir-jvc.c:81:3: warning: (near initialization for 'img_ir_jvc.timings.s01') [-Woverride-init] Please fix. Ooh yes, I hadn't tried W=1. Both appear to indicate genuine bugs. I'll fix and do a retest later today. Thanks James -- 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: [RFC PATCH] [media]: of: move graph helpers from drivers/media/v4l2-core to drivers/of
Hi Russell and Tomi, On Wednesday 12 March 2014 12:47:09 Tomi Valkeinen wrote: On 12/03/14 12:25, Russell King - ARM Linux wrote: On Mon, Mar 10, 2014 at 02:52:53PM +0100, Laurent Pinchart wrote: In theory unidirectional links in DT are indeed enough. However, let's not forget the following. - There's no such thing as single start points for graphs. Sure, in some simple cases the graph will have a single start point, but that's not a generic rule. For instance the camera graphs http://ideasonboard.org/media/omap3isp.ps and http://ideasonboard.org/media/eyecam.ps have two camera sensors, and thus two starting points from a data flow point of view. I think we need to stop thinking of a graph linked in terms of data flow - that's really not useful. Consider a display subsystem. The CRTC is the primary interface for the CPU - this is the most interesting interface, it's the interface which provides access to the picture to be displayed for the CPU. Other interfaces are secondary to that purpose - reading the I2C DDC bus for the display information is all secondary to the primary purpose of displaying a picture. For a capture subsystem, the primary interface for the CPU is the frame grabber (whether it be an already encoded frame or not.) The sensor devices are all secondary to that. So, the primary software interface in each case is where the data for the primary purpose is transferred. This is the point at which these graphs should commence since this is where we would normally start enumeration of the secondary interfaces. V4L2 even provides interfaces for this: you open the capture device, which then allows you to enumerate the capture device's inputs, and this in turn allows you to enumerate their properties. You don't open a particular sensor and work back up the tree. Please note that this has partly changed a couple of years ago with the introduction of the media controller framework. Userspace now opens a logical media device that describes the topology of the hardware, and then accesses individual components directly, from sensor to DMA engine. We do it the other way around in OMAP DSS. It's the displays the user is interested in, so we enumerate the displays, and if the user wants to enable a display, we then follow the links from the display towards the SoC, configuring and enabling the components on the way. The logical view of a device from a CPU perspective evolves over time, as APIs are refactored or created to support new hardware that comes with new paradigms and additional complexity. The hardware data flow direction, however, doesn't change. Only modeling the data flow direction in DT might be tempting but is probably too hasty of a conclusion though : if DT should model the hardware, it ends up modeling a logical view of the hardware, and is thus not as closed as one might believe. In the particular case of display devices I believe that using the data flow direction for links (assuming we can't use bidirectional links in DT) is a good model. It would allow parsing the whole graph at a reasonable cost (still higher than with bidirectional links) while making clear how to represent links. Let's not forgot that with more complex devices not all components can be referenced directly from the CPU-side display controller. I don't have a strong opinion on the direction, I think both have their pros. In any case, that's more of a driver model thing, and I'm fine with linking in the DT outwards from the SoC (presuming the double-linking is not ok, which I still like best). I believe trying to do this according to the flow of data is just wrong. You should always describe things from the primary device for the CPU towards the peripheral devices and never the opposite direction. In that case there's possibly the issue I mentioned in other email in this thread: an encoder can be used in both a display and a capture pipeline. Describing the links outwards from CPU means that sometimes the encoder's input port is pointed at, and sometimes the encoder's output port is pointed at. That's possibly ok, but I think Grant was of the opinion that things should be explicitly described in the binding documentation: either a device's port must contain a 'remote-endpoint' property, or it must not, but no sometimes. But maybe I took his words too literally. Then there's also the audio example Philipp mentioned, where there is no clear outward from Soc direction for the link, as the link was bi-directional and between two non-SoC devices. Even if the link was unidirectional the outward from SoC direction isn't always defined for links between non-SoC devices. -- Regards, Laurent Pinchart signature.asc Description: This is a digitally signed message part.
Re: [PATCH v9][ 3/8] staging: imx-drm: Correct BGR666 and the board's dts that use them.
Hi, Denis Carikli wrote: The current BGR666 is not consistent with the other color mapings like BGR24. BGR666 should be in the same byte order than BGR24. [...] diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c index 6f9abe8..154d293 100644 --- a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c +++ b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c @@ -397,9 +397,9 @@ int ipu_dc_init(struct ipu_soc *ipu, struct device *dev, /* bgr666 */ ipu_dc_map_clear(priv, IPU_DC_MAP_BGR666); - ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 0, 5, 0xfc); /* blue */ + ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 0, 17, 0xfc); /* blue */ ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 1, 11, 0xfc); /* green */ - ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 2, 17, 0xfc); /* red */ + ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 2, 5, 0xfc); /* red */ /* bgr24 */ ipu_dc_map_clear(priv, IPU_DC_MAP_BGR24); You obviously missed this one which is also affected by your change: diff --git a/drivers/staging/imx-drm/imx-ldb.c b/drivers/staging/imx-drm/imx-ldb.c index daa54df..e5a600b 100644 --- a/drivers/staging/imx-drm/imx-ldb.c +++ b/drivers/staging/imx-drm/imx-ldb.c @@ -185,11 +185,11 @@ static void imx_ldb_encoder_prepare(struct drm_encoder *encoder) switch (imx_ldb_ch-chno) { case 0: pixel_fmt = (ldb-ldb_ctrl LDB_DATA_WIDTH_CH0_24) ? - V4L2_PIX_FMT_RGB24 : V4L2_PIX_FMT_BGR666; + V4L2_PIX_FMT_RGB24 : V4L2_PIX_FMT_RGB666; break; case 1: pixel_fmt = (ldb-ldb_ctrl LDB_DATA_WIDTH_CH1_24) ? - V4L2_PIX_FMT_RGB24 : V4L2_PIX_FMT_BGR666; + V4L2_PIX_FMT_RGB24 : V4L2_PIX_FMT_RGB666; break; default: dev_err(ldb-dev, unable to config di%d panel format\n, Without this patch Red/Blue on an 18bit LVDS display will be swapped. Lothar Waßmann -- ___ Ka-Ro electronics GmbH | Pascalstraße 22 | D - 52076 Aachen Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10 Geschäftsführer: Matthias Kaussen Handelsregistereintrag: Amtsgericht Aachen, HRB 4996 www.karo-electronics.de | i...@karo-electronics.de ___ -- 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: [REVIEWv3 PATCH 14/35] v4l2-ctrls: prepare for matrix support.
On 03/12/14 11:42, Mauro Carvalho Chehab wrote: Em Mon, 17 Feb 2014 10:57:29 +0100 Hans Verkuil hverk...@xs4all.nl escreveu: From: Hans Verkuil hans.verk...@cisco.com Add core support for matrices. Again, this patch has negative values for array index. I'll stop analyzing here, as it is hard to keep the mind in a sane state seeing those crazy things ;) Rather than getting bogged down in these details can you please give your opinion on the public API aspects. There is no point for me to spend time on this and then get it NACKed because you don't like the API itself and want something completely different. Internal things I can change, but I'm not going to spend a second on that unless I know the concept stands. Otherwise it is wasted time. This is something we need to improve on with regards to our processes: when it comes to API enhancements you really need to be involved earlier or it's going to be a huge waste of everyones time it is gets NACked. Not to mention demotivating and frustrating for all concerned. Regards, Hans -- 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: [REVIEW PATCH 11/13] DocBook: document RF tuner bandwidth controls
On 12.03.2014 13:02, Mauro Carvalho Chehab wrote: Em Mon, 10 Mar 2014 12:01:28 +0200 Antti Palosaari cr...@iki.fi escreveu: On 05.03.2014 20:49, Mauro Carvalho Chehab wrote: Em Thu, 27 Feb 2014 02:22:06 +0200 Antti Palosaari cr...@iki.fi escreveu: Add documentation for RF tuner bandwidth controls. These controls are used to set filters on tuner signal path. Cc: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Antti Palosaari cr...@iki.fi --- Documentation/DocBook/media/v4l/controls.xml | 19 +++ 1 file changed, 19 insertions(+) diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml index 6c9dbf6..5550fea 100644 --- a/Documentation/DocBook/media/v4l/controls.xml +++ b/Documentation/DocBook/media/v4l/controls.xml @@ -5007,6 +5007,25 @@ descriptor. Calling VIDIOC-QUERYCTRL; for this control will return a description of this control class./entry /row row + entry spanname=idconstantV4L2_CID_RF_TUNER_BANDWIDTH_AUTO/constantnbsp;/entry + entryboolean/entry +/row +row + entry spanname=descrEnables/disables tuner radio channel +bandwidth configuration. In automatic mode bandwidth configuration is performed +by the driver./entry +/row +row + entry spanname=idconstantV4L2_CID_RF_TUNER_BANDWIDTH/constantnbsp;/entry + entryinteger/entry +/row +row + entry spanname=descrFilter(s) on tuner signal path are used to +filter signal according to receiving party needs. Driver configures filters to +fulfill desired bandwidth requirement. Used when V4L2_CID_RF_TUNER_BANDWIDTH_AUTO is not +set. The range and step are driver-specific./entry Huh? If this is enable/disable, why the range and step are driver-specific? Because there is two controls grouped. That is situation of having AUTO/MANUAL. V4L2_CID_RF_TUNER_BANDWIDTH_AUTO V4L2_CID_RF_TUNER_BANDWIDTH V4L2_CID_RF_TUNER_BANDWIDTH is valid only when V4L2_CID_RF_TUNER_BANDWIDTH_AUTO == false. Sorry, but I'm not understanding what you're arguing. Yeah, it is clear at the patch that there are two controls, and that V4L2_CID_RF_TUNER_BANDWIDTH is valid only when AUTO is disabled, but this doesn't answer my question: Why V4L2_CID_RF_TUNER_BANDWIDTH's range and step are driver-specific? Hmmm. That control is used to configure RF filters. Filters set bandwidth of radio channel. There is usually quite limited set of available analog filters inside RF tuner. If you look for example FC0012/FC0013 possible filters are 6/7/8 MHz. E4000 has something 4-11 MHz. If you look those very old 1st gen silicon tuners like QT1010 / MT2060, there is no integrated filters at all - but there is external saw filter which is usually 8MHz at 36.125 MHz IF. Did you remember there is same parameter already in DVB API (struct dtv_frontend_properties bandwidth_hz)? That is control is currently used to set r820t, fc0012, fc10013 .bandwidth_hz value, e4000 implements it correctly as own control. I am quite astonished we have that big gap with our views. regards 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: [REVIEW PATCH 11/13] DocBook: document RF tuner bandwidth controls
On 12.03.2014 14:26, Antti Palosaari wrote: On 12.03.2014 13:02, Mauro Carvalho Chehab wrote: Em Mon, 10 Mar 2014 12:01:28 +0200 Antti Palosaari cr...@iki.fi escreveu: On 05.03.2014 20:49, Mauro Carvalho Chehab wrote: Em Thu, 27 Feb 2014 02:22:06 +0200 Antti Palosaari cr...@iki.fi escreveu: Add documentation for RF tuner bandwidth controls. These controls are used to set filters on tuner signal path. Cc: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Antti Palosaari cr...@iki.fi --- Documentation/DocBook/media/v4l/controls.xml | 19 +++ 1 file changed, 19 insertions(+) diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml index 6c9dbf6..5550fea 100644 --- a/Documentation/DocBook/media/v4l/controls.xml +++ b/Documentation/DocBook/media/v4l/controls.xml @@ -5007,6 +5007,25 @@ descriptor. Calling VIDIOC-QUERYCTRL; for this control will return a description of this control class./entry /row row + entry spanname=idconstantV4L2_CID_RF_TUNER_BANDWIDTH_AUTO/constantnbsp;/entry + entryboolean/entry +/row +row + entry spanname=descrEnables/disables tuner radio channel +bandwidth configuration. In automatic mode bandwidth configuration is performed +by the driver./entry +/row +row + entry spanname=idconstantV4L2_CID_RF_TUNER_BANDWIDTH/constantnbsp;/entry + entryinteger/entry +/row +row + entry spanname=descrFilter(s) on tuner signal path are used to +filter signal according to receiving party needs. Driver configures filters to +fulfill desired bandwidth requirement. Used when V4L2_CID_RF_TUNER_BANDWIDTH_AUTO is not +set. The range and step are driver-specific./entry Huh? If this is enable/disable, why the range and step are driver-specific? Because there is two controls grouped. That is situation of having AUTO/MANUAL. V4L2_CID_RF_TUNER_BANDWIDTH_AUTO V4L2_CID_RF_TUNER_BANDWIDTH V4L2_CID_RF_TUNER_BANDWIDTH is valid only when V4L2_CID_RF_TUNER_BANDWIDTH_AUTO == false. Sorry, but I'm not understanding what you're arguing. Yeah, it is clear at the patch that there are two controls, and that V4L2_CID_RF_TUNER_BANDWIDTH is valid only when AUTO is disabled, but this doesn't answer my question: Why V4L2_CID_RF_TUNER_BANDWIDTH's range and step are driver-specific? Hmmm. That control is used to configure RF filters. Filters set bandwidth of radio channel. There is usually quite limited set of available analog filters inside RF tuner. If you look for example FC0012/FC0013 possible filters are 6/7/8 MHz. E4000 has something 4-11 MHz. If you look those very old 1st gen silicon tuners like QT1010 / MT2060, there is no integrated filters at all - but there is external saw filter which is usually 8MHz at 36.125 MHz IF. Did you remember there is same parameter already in DVB API (struct dtv_frontend_properties bandwidth_hz)? That is control is currently used to set r820t, fc0012, fc10013 .bandwidth_hz value, e4000 implements it correctly as own control. I am quite astonished we have that big gap with our views. Here is picture from GNU Radio UHD source (it is the original Ettus HW GNU Radio was done AFAIK). Bandwidth is last control. http://lists.gnu.org/archive/html/discuss-gnuradio/2010-12/pngqfPrwUmgsB.png regards 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: [REVIEW PATCH 11/13] DocBook: document RF tuner bandwidth controls
Em Wed, 12 Mar 2014 14:26:35 +0200 Antti Palosaari cr...@iki.fi escreveu: On 12.03.2014 13:02, Mauro Carvalho Chehab wrote: Em Mon, 10 Mar 2014 12:01:28 +0200 Antti Palosaari cr...@iki.fi escreveu: On 05.03.2014 20:49, Mauro Carvalho Chehab wrote: Em Thu, 27 Feb 2014 02:22:06 +0200 Antti Palosaari cr...@iki.fi escreveu: Add documentation for RF tuner bandwidth controls. These controls are used to set filters on tuner signal path. Cc: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Antti Palosaari cr...@iki.fi --- Documentation/DocBook/media/v4l/controls.xml | 19 +++ 1 file changed, 19 insertions(+) diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml index 6c9dbf6..5550fea 100644 --- a/Documentation/DocBook/media/v4l/controls.xml +++ b/Documentation/DocBook/media/v4l/controls.xml @@ -5007,6 +5007,25 @@ descriptor. Calling VIDIOC-QUERYCTRL; for this control will return a description of this control class./entry /row row + entry spanname=idconstantV4L2_CID_RF_TUNER_BANDWIDTH_AUTO/constantnbsp;/entry + entryboolean/entry +/row +row + entry spanname=descrEnables/disables tuner radio channel +bandwidth configuration. In automatic mode bandwidth configuration is performed +by the driver./entry +/row +row + entry spanname=idconstantV4L2_CID_RF_TUNER_BANDWIDTH/constantnbsp;/entry + entryinteger/entry +/row +row + entry spanname=descrFilter(s) on tuner signal path are used to +filter signal according to receiving party needs. Driver configures filters to +fulfill desired bandwidth requirement. Used when V4L2_CID_RF_TUNER_BANDWIDTH_AUTO is not +set. The range and step are driver-specific./entry Huh? If this is enable/disable, why the range and step are driver-specific? Because there is two controls grouped. That is situation of having AUTO/MANUAL. V4L2_CID_RF_TUNER_BANDWIDTH_AUTO V4L2_CID_RF_TUNER_BANDWIDTH V4L2_CID_RF_TUNER_BANDWIDTH is valid only when V4L2_CID_RF_TUNER_BANDWIDTH_AUTO == false. Sorry, but I'm not understanding what you're arguing. Yeah, it is clear at the patch that there are two controls, and that V4L2_CID_RF_TUNER_BANDWIDTH is valid only when AUTO is disabled, but this doesn't answer my question: Why V4L2_CID_RF_TUNER_BANDWIDTH's range and step are driver-specific? Hmmm. That control is used to configure RF filters. Filters set bandwidth of radio channel. There is usually quite limited set of available analog filters inside RF tuner. If you look for example FC0012/FC0013 possible filters are 6/7/8 MHz. E4000 has something 4-11 MHz. If you look those very old 1st gen silicon tuners like QT1010 / MT2060, there is no integrated filters at all - but there is external saw filter which is usually 8MHz at 36.125 MHz IF. Did you remember there is same parameter already in DVB API (struct dtv_frontend_properties bandwidth_hz)? That is control is currently used to set r820t, fc0012, fc10013 .bandwidth_hz value, e4000 implements it correctly as own control. I am quite astonished we have that big gap with our views. Well, on DVB, the bandwidth is specified in Hz, at DVBv5 (or via an enum on DVBv3). Here, there's no description about the unit to be used (Hz? kHz?). It just says that this is an integer, with a driver-specific range and step. So, one driver might choose to use Hz, other kHz, and other to expose some internal counter. That's bad. We should either use a V4L2_CTRL_TYPE_MENU type of control, where it would be possible to do something similar to DVBv3 way to specify the bandwidth filter, or to define that the bandwidth will be in Hz, kHz or MHz. Probably, a menu type is better, as it allows userspace to get all supported bandwidths. Regards, 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: [REVIEW PATCH 11/13] DocBook: document RF tuner bandwidth controls
On 12.03.2014 14:47, Mauro Carvalho Chehab wrote: Em Wed, 12 Mar 2014 14:26:35 +0200 Antti Palosaari cr...@iki.fi escreveu: On 12.03.2014 13:02, Mauro Carvalho Chehab wrote: Em Mon, 10 Mar 2014 12:01:28 +0200 Antti Palosaari cr...@iki.fi escreveu: On 05.03.2014 20:49, Mauro Carvalho Chehab wrote: Em Thu, 27 Feb 2014 02:22:06 +0200 Antti Palosaari cr...@iki.fi escreveu: Add documentation for RF tuner bandwidth controls. These controls are used to set filters on tuner signal path. Cc: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Antti Palosaari cr...@iki.fi --- Documentation/DocBook/media/v4l/controls.xml | 19 +++ 1 file changed, 19 insertions(+) diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml index 6c9dbf6..5550fea 100644 --- a/Documentation/DocBook/media/v4l/controls.xml +++ b/Documentation/DocBook/media/v4l/controls.xml @@ -5007,6 +5007,25 @@ descriptor. Calling VIDIOC-QUERYCTRL; for this control will return a description of this control class./entry /row row + entry spanname=idconstantV4L2_CID_RF_TUNER_BANDWIDTH_AUTO/constantnbsp;/entry + entryboolean/entry +/row +row + entry spanname=descrEnables/disables tuner radio channel +bandwidth configuration. In automatic mode bandwidth configuration is performed +by the driver./entry +/row +row + entry spanname=idconstantV4L2_CID_RF_TUNER_BANDWIDTH/constantnbsp;/entry + entryinteger/entry +/row +row + entry spanname=descrFilter(s) on tuner signal path are used to +filter signal according to receiving party needs. Driver configures filters to +fulfill desired bandwidth requirement. Used when V4L2_CID_RF_TUNER_BANDWIDTH_AUTO is not +set. The range and step are driver-specific./entry Huh? If this is enable/disable, why the range and step are driver-specific? Because there is two controls grouped. That is situation of having AUTO/MANUAL. V4L2_CID_RF_TUNER_BANDWIDTH_AUTO V4L2_CID_RF_TUNER_BANDWIDTH V4L2_CID_RF_TUNER_BANDWIDTH is valid only when V4L2_CID_RF_TUNER_BANDWIDTH_AUTO == false. Sorry, but I'm not understanding what you're arguing. Yeah, it is clear at the patch that there are two controls, and that V4L2_CID_RF_TUNER_BANDWIDTH is valid only when AUTO is disabled, but this doesn't answer my question: Why V4L2_CID_RF_TUNER_BANDWIDTH's range and step are driver-specific? Hmmm. That control is used to configure RF filters. Filters set bandwidth of radio channel. There is usually quite limited set of available analog filters inside RF tuner. If you look for example FC0012/FC0013 possible filters are 6/7/8 MHz. E4000 has something 4-11 MHz. If you look those very old 1st gen silicon tuners like QT1010 / MT2060, there is no integrated filters at all - but there is external saw filter which is usually 8MHz at 36.125 MHz IF. Did you remember there is same parameter already in DVB API (struct dtv_frontend_properties bandwidth_hz)? That is control is currently used to set r820t, fc0012, fc10013 .bandwidth_hz value, e4000 implements it correctly as own control. I am quite astonished we have that big gap with our views. Well, on DVB, the bandwidth is specified in Hz, at DVBv5 (or via an enum on DVBv3). Here, there's no description about the unit to be used (Hz? kHz?). It just says that this is an integer, with a driver-specific range and step. So, one driver might choose to use Hz, other kHz, and other to expose some internal counter. That's bad. We should either use a V4L2_CTRL_TYPE_MENU type of control, where it would be possible to do something similar to DVBv3 way to specify the bandwidth filter, or to define that the bandwidth will be in Hz, kHz or MHz. Yeah, indeed. That was my mistake. The aim was Hz yes. Probably, a menu type is better, as it allows userspace to get all supported bandwidths. I though it too, but there is already a lot choices for some tuners, E4000 has over 30. What is maximum reasonable filter count for V4L2_CTRL_TYPE_MENU? regards 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: [REVIEWv3 PATCH 14/35] v4l2-ctrls: prepare for matrix support.
Em Wed, 12 Mar 2014 13:21:41 +0100 Hans Verkuil hverk...@xs4all.nl escreveu: On 03/12/14 11:42, Mauro Carvalho Chehab wrote: Em Mon, 17 Feb 2014 10:57:29 +0100 Hans Verkuil hverk...@xs4all.nl escreveu: From: Hans Verkuil hans.verk...@cisco.com Add core support for matrices. Again, this patch has negative values for array index. I'll stop analyzing here, as it is hard to keep the mind in a sane state seeing those crazy things ;) Rather than getting bogged down in these details can you please give your opinion on the public API aspects. There is no point for me to spend time on this and then get it NACKed because you don't like the API itself and want something completely different. Internal things I can change, but I'm not going to spend a second on that unless I know the concept stands. Otherwise it is wasted time. Ok, what patches after 16/35 contains the API bits? The changes I saw so far seem ok, with the adjustments I pointed. This is something we need to improve on with regards to our processes: when it comes to API enhancements you really need to be involved earlier or it's going to be a huge waste of everyones time it is gets NACked. Not to mention demotivating and frustrating for all concerned. As I commented before: those complex API changes should ideally be discussed during our mini-summits, as it allows us to better understand the hole proposal. -- Regards, 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: [REVIEWv3 PATCH 14/35] v4l2-ctrls: prepare for matrix support.
Em Wed, 12 Mar 2014 13:21:41 +0100 Hans Verkuil hverk...@xs4all.nl escreveu: On 03/12/14 11:42, Mauro Carvalho Chehab wrote: Em Mon, 17 Feb 2014 10:57:29 +0100 Hans Verkuil hverk...@xs4all.nl escreveu: From: Hans Verkuil hans.verk...@cisco.com Add core support for matrices. Again, this patch has negative values for array index. I'll stop analyzing here, as it is hard to keep the mind in a sane state seeing those crazy things ;) Rather than getting bogged down in these details can you please give your opinion on the public API aspects. There is no point for me to spend time on this and then get it NACKed because you don't like the API itself and want something completely different. Internal things I can change, but I'm not going to spend a second on that unless I know the concept stands. Otherwise it is wasted time. Ok, what patches after 16/35 contains the API bits? The changes I saw so far seem ok, with the adjustments I pointed. This is something we need to improve on with regards to our processes: when it comes to API enhancements you really need to be involved earlier or it's going to be a huge waste of everyones time it is gets NACked. Not to mention demotivating and frustrating for all concerned. As I commented before: those complex API changes should ideally be discussed during our mini-summits, as it allows us to better understand the hole proposal and the taken approach. -- Regards, 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: [REVIEW PATCH 11/13] DocBook: document RF tuner bandwidth controls
On 12.03.2014 14:57, Antti Palosaari wrote: On 12.03.2014 14:47, Mauro Carvalho Chehab wrote: Em Wed, 12 Mar 2014 14:26:35 +0200 Antti Palosaari cr...@iki.fi escreveu: On 12.03.2014 13:02, Mauro Carvalho Chehab wrote: Em Mon, 10 Mar 2014 12:01:28 +0200 Antti Palosaari cr...@iki.fi escreveu: On 05.03.2014 20:49, Mauro Carvalho Chehab wrote: Em Thu, 27 Feb 2014 02:22:06 +0200 Antti Palosaari cr...@iki.fi escreveu: Add documentation for RF tuner bandwidth controls. These controls are used to set filters on tuner signal path. Cc: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Antti Palosaari cr...@iki.fi --- Documentation/DocBook/media/v4l/controls.xml | 19 +++ 1 file changed, 19 insertions(+) diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml index 6c9dbf6..5550fea 100644 --- a/Documentation/DocBook/media/v4l/controls.xml +++ b/Documentation/DocBook/media/v4l/controls.xml @@ -5007,6 +5007,25 @@ descriptor. Calling VIDIOC-QUERYCTRL; for this control will return a description of this control class./entry /row row + entry spanname=idconstantV4L2_CID_RF_TUNER_BANDWIDTH_AUTO/constantnbsp;/entry + entryboolean/entry +/row +row + entry spanname=descrEnables/disables tuner radio channel +bandwidth configuration. In automatic mode bandwidth configuration is performed +by the driver./entry +/row +row + entry spanname=idconstantV4L2_CID_RF_TUNER_BANDWIDTH/constantnbsp;/entry + entryinteger/entry +/row +row + entry spanname=descrFilter(s) on tuner signal path are used to +filter signal according to receiving party needs. Driver configures filters to +fulfill desired bandwidth requirement. Used when V4L2_CID_RF_TUNER_BANDWIDTH_AUTO is not +set. The range and step are driver-specific./entry Huh? If this is enable/disable, why the range and step are driver-specific? Because there is two controls grouped. That is situation of having AUTO/MANUAL. V4L2_CID_RF_TUNER_BANDWIDTH_AUTO V4L2_CID_RF_TUNER_BANDWIDTH V4L2_CID_RF_TUNER_BANDWIDTH is valid only when V4L2_CID_RF_TUNER_BANDWIDTH_AUTO == false. Sorry, but I'm not understanding what you're arguing. Yeah, it is clear at the patch that there are two controls, and that V4L2_CID_RF_TUNER_BANDWIDTH is valid only when AUTO is disabled, but this doesn't answer my question: Why V4L2_CID_RF_TUNER_BANDWIDTH's range and step are driver-specific? Hmmm. That control is used to configure RF filters. Filters set bandwidth of radio channel. There is usually quite limited set of available analog filters inside RF tuner. If you look for example FC0012/FC0013 possible filters are 6/7/8 MHz. E4000 has something 4-11 MHz. If you look those very old 1st gen silicon tuners like QT1010 / MT2060, there is no integrated filters at all - but there is external saw filter which is usually 8MHz at 36.125 MHz IF. Did you remember there is same parameter already in DVB API (struct dtv_frontend_properties bandwidth_hz)? That is control is currently used to set r820t, fc0012, fc10013 .bandwidth_hz value, e4000 implements it correctly as own control. I am quite astonished we have that big gap with our views. Well, on DVB, the bandwidth is specified in Hz, at DVBv5 (or via an enum on DVBv3). Here, there's no description about the unit to be used (Hz? kHz?). It just says that this is an integer, with a driver-specific range and step. So, one driver might choose to use Hz, other kHz, and other to expose some internal counter. That's bad. We should either use a V4L2_CTRL_TYPE_MENU type of control, where it would be possible to do something similar to DVBv3 way to specify the bandwidth filter, or to define that the bandwidth will be in Hz, kHz or MHz. Yeah, indeed. That was my mistake. The aim was Hz yes. Probably, a menu type is better, as it allows userspace to get all supported bandwidths. I though it too, but there is already a lot choices for some tuners, E4000 has over 30. What is maximum reasonable filter count for V4L2_CTRL_TYPE_MENU? One fear there is also what happens when there will be some day new RF tuner having DSP which does digital filtering ~1 Hz step? Mabbe the current control is enough, but probably it is place to add comment unit is Hz (even I think people should expect it is Hz when RF frequencies are spoken). regards 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: [REVIEW PATCH 11/13] DocBook: document RF tuner bandwidth controls
Em Wed, 12 Mar 2014 15:07:02 +0200 Antti Palosaari cr...@iki.fi escreveu: On 12.03.2014 14:57, Antti Palosaari wrote: On 12.03.2014 14:47, Mauro Carvalho Chehab wrote: Em Wed, 12 Mar 2014 14:26:35 +0200 Antti Palosaari cr...@iki.fi escreveu: On 12.03.2014 13:02, Mauro Carvalho Chehab wrote: Em Mon, 10 Mar 2014 12:01:28 +0200 Antti Palosaari cr...@iki.fi escreveu: On 05.03.2014 20:49, Mauro Carvalho Chehab wrote: Em Thu, 27 Feb 2014 02:22:06 +0200 Antti Palosaari cr...@iki.fi escreveu: Add documentation for RF tuner bandwidth controls. These controls are used to set filters on tuner signal path. Cc: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Antti Palosaari cr...@iki.fi --- Documentation/DocBook/media/v4l/controls.xml | 19 +++ 1 file changed, 19 insertions(+) diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml index 6c9dbf6..5550fea 100644 --- a/Documentation/DocBook/media/v4l/controls.xml +++ b/Documentation/DocBook/media/v4l/controls.xml @@ -5007,6 +5007,25 @@ descriptor. Calling VIDIOC-QUERYCTRL; for this control will return a description of this control class./entry /row row + entry spanname=idconstantV4L2_CID_RF_TUNER_BANDWIDTH_AUTO/constantnbsp;/entry + entryboolean/entry +/row +row + entry spanname=descrEnables/disables tuner radio channel +bandwidth configuration. In automatic mode bandwidth configuration is performed +by the driver./entry +/row +row + entry spanname=idconstantV4L2_CID_RF_TUNER_BANDWIDTH/constantnbsp;/entry + entryinteger/entry +/row +row + entry spanname=descrFilter(s) on tuner signal path are used to +filter signal according to receiving party needs. Driver configures filters to +fulfill desired bandwidth requirement. Used when V4L2_CID_RF_TUNER_BANDWIDTH_AUTO is not +set. The range and step are driver-specific./entry Huh? If this is enable/disable, why the range and step are driver-specific? Because there is two controls grouped. That is situation of having AUTO/MANUAL. V4L2_CID_RF_TUNER_BANDWIDTH_AUTO V4L2_CID_RF_TUNER_BANDWIDTH V4L2_CID_RF_TUNER_BANDWIDTH is valid only when V4L2_CID_RF_TUNER_BANDWIDTH_AUTO == false. Sorry, but I'm not understanding what you're arguing. Yeah, it is clear at the patch that there are two controls, and that V4L2_CID_RF_TUNER_BANDWIDTH is valid only when AUTO is disabled, but this doesn't answer my question: Why V4L2_CID_RF_TUNER_BANDWIDTH's range and step are driver-specific? Hmmm. That control is used to configure RF filters. Filters set bandwidth of radio channel. There is usually quite limited set of available analog filters inside RF tuner. If you look for example FC0012/FC0013 possible filters are 6/7/8 MHz. E4000 has something 4-11 MHz. If you look those very old 1st gen silicon tuners like QT1010 / MT2060, there is no integrated filters at all - but there is external saw filter which is usually 8MHz at 36.125 MHz IF. Did you remember there is same parameter already in DVB API (struct dtv_frontend_properties bandwidth_hz)? That is control is currently used to set r820t, fc0012, fc10013 .bandwidth_hz value, e4000 implements it correctly as own control. I am quite astonished we have that big gap with our views. Well, on DVB, the bandwidth is specified in Hz, at DVBv5 (or via an enum on DVBv3). Here, there's no description about the unit to be used (Hz? kHz?). It just says that this is an integer, with a driver-specific range and step. So, one driver might choose to use Hz, other kHz, and other to expose some internal counter. That's bad. We should either use a V4L2_CTRL_TYPE_MENU type of control, where it would be possible to do something similar to DVBv3 way to specify the bandwidth filter, or to define that the bandwidth will be in Hz, kHz or MHz. Yeah, indeed. That was my mistake. The aim was Hz yes. Probably, a menu type is better, as it allows userspace to get all supported bandwidths. I though it too, but there is already a lot choices for some tuners, E4000 has over 30. What is maximum reasonable filter count for V4L2_CTRL_TYPE_MENU? I don't see any troubles on having 30 items there. Maybe Hans is aware of some troubles on having such number of items. The advantage of a menu type is that it helps userspace to select an existing range. One fear there is also what happens when there will be some day new RF tuner having DSP which does digital filtering ~1 Hz step? It is possible. Mabbe the current control is enough, but probably it is place to add comment unit is Hz (even I think people should expect it is Hz when RF
Re: [REVIEWv3 PATCH 14/35] v4l2-ctrls: prepare for matrix support.
On 03/12/2014 02:00 PM, Mauro Carvalho Chehab wrote: Em Wed, 12 Mar 2014 13:21:41 +0100 Hans Verkuil hverk...@xs4all.nl escreveu: On 03/12/14 11:42, Mauro Carvalho Chehab wrote: Em Mon, 17 Feb 2014 10:57:29 +0100 Hans Verkuil hverk...@xs4all.nl escreveu: From: Hans Verkuil hans.verk...@cisco.com Add core support for matrices. Again, this patch has negative values for array index. I'll stop analyzing here, as it is hard to keep the mind in a sane state seeing those crazy things ;) Rather than getting bogged down in these details can you please give your opinion on the public API aspects. There is no point for me to spend time on this and then get it NACKed because you don't like the API itself and want something completely different. Internal things I can change, but I'm not going to spend a second on that unless I know the concept stands. Otherwise it is wasted time. Ok, what patches after 16/35 contains the API bits? Core control functionality: 4, 5, 19-22. Adding support for the motion detection matrices: 24, 25, 27, 28. Adding support for the motion detection event: 29, 30. Sorry for sounding so irritated in my email: today is one of those frustrating days where nothing works out the way you want it and where I should have stayed in bed in the morning, and that spilled over in my mail. Regards, Hans The changes I saw so far seem ok, with the adjustments I pointed. This is something we need to improve on with regards to our processes: when it comes to API enhancements you really need to be involved earlier or it's going to be a huge waste of everyones time it is gets NACked. Not to mention demotivating and frustrating for all concerned. As I commented before: those complex API changes should ideally be discussed during our mini-summits, as it allows us to better understand the hole proposal and the taken approach. -- 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: [REVIEWv3 PATCH 14/35] v4l2-ctrls: prepare for matrix support.
Hi Mauro, On 12/03/14 14:00, Mauro Carvalho Chehab wrote: [...] As I commented before: those complex API changes should ideally be discussed during our mini-summits, as it allows us to better understand the hole proposal and the taken approach. We discussed this in a dedicated brainstorming meeting in Edinburgh, with Sakari, Laurent, Andrzej. IIRC you didn't take part in that discussions for some reason. After we initially agreed on the API Hans started working on the actual implementation. He put much effort and did a pretty good job IMO. I guess we just need to refine any controversial aspects that might be there and move forward with the API. :) -- Regards, Sylwester -- 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: [REVIEWv3 PATCH 19/35] DocBook media: document VIDIOC_QUERY_EXT_CTRL.
Em Mon, 17 Feb 2014 10:57:34 +0100 Hans Verkuil hverk...@xs4all.nl escreveu: From: Hans Verkuil hans.verk...@cisco.com Signed-off-by: Hans Verkuil hans.verk...@cisco.com Reviewed-by: Sylwester Nawrocki s.nawro...@samsung.com --- .../DocBook/media/v4l/vidioc-queryctrl.xml | 223 + 1 file changed, 189 insertions(+), 34 deletions(-) diff --git a/Documentation/DocBook/media/v4l/vidioc-queryctrl.xml b/Documentation/DocBook/media/v4l/vidioc-queryctrl.xml index e6645b9..da0e534 100644 --- a/Documentation/DocBook/media/v4l/vidioc-queryctrl.xml +++ b/Documentation/DocBook/media/v4l/vidioc-queryctrl.xml @@ -1,11 +1,12 @@ refentry id=vidioc-queryctrl refmeta -refentrytitleioctl VIDIOC_QUERYCTRL, VIDIOC_QUERYMENU/refentrytitle +refentrytitleioctl VIDIOC_QUERYCTRL, VIDIOC_QUERY_EXT_CTRL, VIDIOC_QUERYMENU/refentrytitle manvol; /refmeta refnamediv refnameVIDIOC_QUERYCTRL/refname +refnameVIDIOC_QUERY_EXT_CTRL/refname refnameVIDIOC_QUERYMENU/refname refpurposeEnumerate controls and menu control items/refpurpose /refnamediv @@ -24,6 +25,14 @@ funcdefint functionioctl/function/funcdef paramdefint parameterfd/parameter/paramdef paramdefint parameterrequest/parameter/paramdef + paramdefstruct v4l2_query_ext_ctrl *parameterargp/parameter/paramdef + /funcprototype +/funcsynopsis +funcsynopsis + funcprototype + funcdefint functionioctl/function/funcdef + paramdefint parameterfd/parameter/paramdef + paramdefint parameterrequest/parameter/paramdef paramdefstruct v4l2_querymenu *parameterargp/parameter/paramdef /funcprototype /funcsynopsis @@ -42,7 +51,7 @@ varlistentry termparameterrequest/parameter/term listitem - paraVIDIOC_QUERYCTRL, VIDIOC_QUERYMENU/para + paraVIDIOC_QUERYCTRL, VIDIOC_QUERY_EXT_CTRL, VIDIOC_QUERYMENU/para /listitem /varlistentry varlistentry @@ -91,7 +100,26 @@ prematurely end the enumeration)./para/footnote/para constantV4L2_CTRL_FLAG_NEXT_CTRL/constant the driver returns the next supported control, or errorcodeEINVAL/errorcode if there is none. Drivers which do not support this flag yet always return -errorcodeEINVAL/errorcode./para +errorcodeEINVAL/errorcode. Hidden controls (i.e. controls +with the constantV4L2_CTRL_FLAG_HIDDEN/constant flag set) are +skipped when using the constantV4L2_CTRL_FLAG_NEXT_CTRL/constant +flag. Use the constantVIDIOC_QUERY_EXT_CTRL/constant for that./para I suspect that most of the things (if not all) here already commented on the initial patches) In this case, as already commented, I don't see any reason why to deny VIDIOC_QUERYCTRL to get the hidden controls if V4L2_CTRL_FLAG_HIDDEN is used. + +paraThe constantVIDIOC_QUERY_EXT_CTRL/constant ioctl was +introduced in order to better support controls that can use complex +types, and to expose additional control information that cannot be +returned in v4l2-queryctrl; since that structure is full./para s/complex/compound/g + +paraconstantVIDIOC_QUERY_EXT_CTRL/constant is used in the +same way as constantVIDIOC_QUERYCTRL/constant, except that the +structfieldreserved/structfield array must be zeroed as well. +In addition, the constantV4L2_CTRL_FLAG_NEXT_HIDDEN/constant flag +can be specified to enumerate all hidden controls (i.e. controls +with the constantV4L2_CTRL_FLAG_HIDDEN/constant flag set, which +includes all controls with complex types). Specify both +constantV4L2_CTRL_FLAG_NEXT_CTRL/constant and +constantV4L2_CTRL_FLAG_NEXT_HIDDEN/constant in order to enumerate +all controls, hidden or not./para paraAdditional information is required for menu controls: the names of the menu items. To query them applications set the @@ -142,38 +170,23 @@ string. This information is intended for the user./entry entry__s32/entry entrystructfieldminimum/structfield/entry entryMinimum value, inclusive. This field gives a lower -bound for constantV4L2_CTRL_TYPE_INTEGER/constant controls and the -lowest valid index for constantV4L2_CTRL_TYPE_MENU/constant controls. -For constantV4L2_CTRL_TYPE_STRING/constant controls the minimum value -gives the minimum length of the string. This length emphasisdoes not include the terminating -zero/emphasis. It may not be valid for any other type of control, including -constantV4L2_CTRL_TYPE_INTEGER64/constant controls. Note that this is a -signed value./entry +bound for the control. See v4l2-ctrl-type; how the minimum value is to +be used for each possible control type. Note that this a signed 32-bit value./entry /row row entry__s32/entry entrystructfieldmaximum/structfield/entry entryMaximum value, inclusive. This field gives an upper -bound for constantV4L2_CTRL_TYPE_INTEGER/constant controls and the
Re: [REVIEWv3 PATCH 20/35] DocBook media: update VIDIOC_G/S/TRY_EXT_CTRLS.
Em Mon, 17 Feb 2014 10:57:35 +0100 Hans Verkuil hverk...@xs4all.nl escreveu: From: Hans Verkuil hans.verk...@cisco.com Document the support for the new complex type controls. Signed-off-by: Hans Verkuil hans.verk...@cisco.com --- .../DocBook/media/v4l/vidioc-g-ext-ctrls.xml | 43 ++ 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml b/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml index b3bb957..d946d6b 100644 --- a/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml +++ b/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml @@ -72,23 +72,30 @@ initialize the structfieldid/structfield, structfieldsize/structfield and structfieldreserved2/structfield fields of each v4l2-ext-control; and call the constantVIDIOC_G_EXT_CTRLS/constant ioctl. String controls controls -must also set the structfieldstring/structfield field./para +must also set the structfieldstring/structfield field. Controls +of complex types (constantV4L2_CTRL_FLAG_IS_PTR/constant is set) +must set the structfieldp/structfield field./para Same notes I did to the other patches apply here: - s/complex/compound/ - Let's not mix strings with compound types - etc paraIf the structfieldsize/structfield is too small to receive the control result (only relevant for pointer-type controls like strings), then the driver will set structfieldsize/structfield to a valid value and return an ENOSPC;. You should re-allocate the -string memory to this new size and try again. It is possible that the -same issue occurs again if the string has grown in the meantime. It is +memory to this new size and try again. For the string type it is possible that +the same issue occurs again if the string has grown in the meantime. It is recommended to call VIDIOC-QUERYCTRL; first and use structfieldmaximum/structfield+1 as the new structfieldsize/structfield value. It is guaranteed that that is sufficient memory. /para +paraMatrices are set and retrieved row-by-row. You cannot set a partial +matrix, all elements have to be set or retrieved. The total size is calculated +as structfieldrows/structfield * structfieldcols/structfield * structfieldelem_size/structfield. +These values can be obtained by calling VIDIOC-QUERY-EXT-CTRL;./para + paraTo change the value of a set of controls applications initialize the structfieldid/structfield, structfieldsize/structfield, structfieldreserved2/structfield and -structfieldvalue/string/structfield fields of each v4l2-ext-control; and +structfieldvalue/value64/string/p/structfield fields of each v4l2-ext-control; and call the constantVIDIOC_S_EXT_CTRLS/constant ioctl. The controls will only be set if emphasisall/emphasis control values are valid./para @@ -96,11 +103,17 @@ valid./para paraTo check if a set of controls have correct values applications initialize the structfieldid/structfield, structfieldsize/structfield, structfieldreserved2/structfield and -structfieldvalue/string/structfield fields of each v4l2-ext-control; and +structfieldvalue/value64/string/p/structfield fields of each v4l2-ext-control; and call the constantVIDIOC_TRY_EXT_CTRLS/constant ioctl. It is up to the driver whether wrong values are automatically adjusted to a valid value or if an error is returned./para +paraFor matrices it is possible to only set or check only the first +constantX/constant elements by setting size to constantX * elem_size/constant, +where structfieldelem_size/structfield is obtained by calling VIDIOC-QUERY-EXT-CTRL;. +Matrix elements are set row-by-row. Matrix elements that are not explicitly +set will be initialized to their default value./para + That sounds confusing: what are the defaults? Also, what happens if the size is set to, let's say, 1,5 * elem_size? Will it fill one element, will it return an error (what error?) or will it fill two elements, the second one with some wrong value? paraWhen the structfieldid/structfield or structfieldctrl_class/structfield is invalid drivers return an EINVAL;. When the value is out of bounds drivers can choose to take @@ -158,19 +171,33 @@ applications must set the array to zero./entry entry/entry entry__s32/entry entrystructfieldvalue/structfield/entry - entryNew value or current value./entry + entryNew value or current value. Valid if this control is not of +type constantV4L2_CTRL_TYPE_INTEGER64/constant and +constantV4L2_CTRL_FLAG_IS_PTR/constant is not set./entry /row row entry/entry entry__s64/entry entrystructfieldvalue64/structfield/entry - entryNew value or current value./entry + entryNew value or current value. Valid if this control is of +type constantV4L2_CTRL_TYPE_INTEGER64/constant and
Re: [REVIEW PATCH 11/13] DocBook: document RF tuner bandwidth controls
On 12.03.2014 15:21, Mauro Carvalho Chehab wrote: Em Wed, 12 Mar 2014 15:07:02 +0200 Antti Palosaari cr...@iki.fi escreveu: On 12.03.2014 14:57, Antti Palosaari wrote: On 12.03.2014 14:47, Mauro Carvalho Chehab wrote: Em Wed, 12 Mar 2014 14:26:35 +0200 Antti Palosaari cr...@iki.fi escreveu: On 12.03.2014 13:02, Mauro Carvalho Chehab wrote: Em Mon, 10 Mar 2014 12:01:28 +0200 Antti Palosaari cr...@iki.fi escreveu: On 05.03.2014 20:49, Mauro Carvalho Chehab wrote: Em Thu, 27 Feb 2014 02:22:06 +0200 Antti Palosaari cr...@iki.fi escreveu: Add documentation for RF tuner bandwidth controls. These controls are used to set filters on tuner signal path. Cc: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Antti Palosaari cr...@iki.fi --- Documentation/DocBook/media/v4l/controls.xml | 19 +++ 1 file changed, 19 insertions(+) diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml index 6c9dbf6..5550fea 100644 --- a/Documentation/DocBook/media/v4l/controls.xml +++ b/Documentation/DocBook/media/v4l/controls.xml @@ -5007,6 +5007,25 @@ descriptor. Calling VIDIOC-QUERYCTRL; for this control will return a description of this control class./entry /row row + entry spanname=idconstantV4L2_CID_RF_TUNER_BANDWIDTH_AUTO/constantnbsp;/entry + entryboolean/entry +/row +row + entry spanname=descrEnables/disables tuner radio channel +bandwidth configuration. In automatic mode bandwidth configuration is performed +by the driver./entry +/row +row + entry spanname=idconstantV4L2_CID_RF_TUNER_BANDWIDTH/constantnbsp;/entry + entryinteger/entry +/row +row + entry spanname=descrFilter(s) on tuner signal path are used to +filter signal according to receiving party needs. Driver configures filters to +fulfill desired bandwidth requirement. Used when V4L2_CID_RF_TUNER_BANDWIDTH_AUTO is not +set. The range and step are driver-specific./entry Huh? If this is enable/disable, why the range and step are driver-specific? Because there is two controls grouped. That is situation of having AUTO/MANUAL. V4L2_CID_RF_TUNER_BANDWIDTH_AUTO V4L2_CID_RF_TUNER_BANDWIDTH V4L2_CID_RF_TUNER_BANDWIDTH is valid only when V4L2_CID_RF_TUNER_BANDWIDTH_AUTO == false. Sorry, but I'm not understanding what you're arguing. Yeah, it is clear at the patch that there are two controls, and that V4L2_CID_RF_TUNER_BANDWIDTH is valid only when AUTO is disabled, but this doesn't answer my question: Why V4L2_CID_RF_TUNER_BANDWIDTH's range and step are driver-specific? Hmmm. That control is used to configure RF filters. Filters set bandwidth of radio channel. There is usually quite limited set of available analog filters inside RF tuner. If you look for example FC0012/FC0013 possible filters are 6/7/8 MHz. E4000 has something 4-11 MHz. If you look those very old 1st gen silicon tuners like QT1010 / MT2060, there is no integrated filters at all - but there is external saw filter which is usually 8MHz at 36.125 MHz IF. Did you remember there is same parameter already in DVB API (struct dtv_frontend_properties bandwidth_hz)? That is control is currently used to set r820t, fc0012, fc10013 .bandwidth_hz value, e4000 implements it correctly as own control. I am quite astonished we have that big gap with our views. Well, on DVB, the bandwidth is specified in Hz, at DVBv5 (or via an enum on DVBv3). Here, there's no description about the unit to be used (Hz? kHz?). It just says that this is an integer, with a driver-specific range and step. So, one driver might choose to use Hz, other kHz, and other to expose some internal counter. That's bad. We should either use a V4L2_CTRL_TYPE_MENU type of control, where it would be possible to do something similar to DVBv3 way to specify the bandwidth filter, or to define that the bandwidth will be in Hz, kHz or MHz. Yeah, indeed. That was my mistake. The aim was Hz yes. Probably, a menu type is better, as it allows userspace to get all supported bandwidths. I though it too, but there is already a lot choices for some tuners, E4000 has over 30. What is maximum reasonable filter count for V4L2_CTRL_TYPE_MENU? I don't see any troubles on having 30 items there. Maybe Hans is aware of some troubles on having such number of items. The advantage of a menu type is that it helps userspace to select an existing range. One fear there is also what happens when there will be some day new RF tuner having DSP which does digital filtering ~1 Hz step? It is possible. Mabbe the current control is enough, but probably it is place to add comment unit is Hz (even I think people should expect it is Hz when RF frequencies are spoken). Please remind that V4L2 API has 3 scales already for frequencies, HZ being the less obvious one, as it is the one added only for
Re: [REVIEWv3 PATCH 22/35] DocBook media: update control section.
Em Mon, 17 Feb 2014 10:57:37 +0100 Hans Verkuil hverk...@xs4all.nl escreveu: From: Hans Verkuil hans.verk...@cisco.com Document the support for complex types in controls. Signed-off-by: Hans Verkuil hans.verk...@cisco.com Reviewed-by: Sylwester Nawrocki s.nawro...@samsung.com --- Documentation/DocBook/media/v4l/controls.xml | 104 --- 1 file changed, 78 insertions(+), 26 deletions(-) diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml index ef55c3e..85d78d4 100644 --- a/Documentation/DocBook/media/v4l/controls.xml +++ b/Documentation/DocBook/media/v4l/controls.xml @@ -13,6 +13,19 @@ correctly with any device./para paraAll controls are accessed using an ID value. V4L2 defines several IDs for specific purposes. Drivers can also implement their own custom controls using constantV4L2_CID_PRIVATE_BASE/constant +footnoteparaThe use of constantV4L2_CID_PRIVATE_BASE/constant +is problematic because different drivers may use the same +constantV4L2_CID_PRIVATE_BASE/constant ID for different controls. +This makes it hard to programatically set such controls since the meaning +of the control with that ID is driver dependent. In order to resolve this +drivers use unique IDs and the constantV4L2_CID_PRIVATE_BASE/constant +IDs are mapped to those unique IDs by the kernel. Consider these +constantV4L2_CID_PRIVATE_BASE/constant IDs as aliases to the real +IDs./para +paraMany applications today still use the constantV4L2_CID_PRIVATE_BASE/constant +IDs instead of using VIDIOC-QUERYCTRL; with the constantV4L2_CTRL_FLAG_NEXT_CTRL/constant +flag to enumerate all IDs, so support for constantV4L2_CID_PRIVATE_BASE/constant +is still around./para/footnote and higher values. The pre-defined control IDs have the prefix constantV4L2_CID_/constant, and are listed in xref linkend=control-id /. The ID is used when querying the attributes of @@ -31,25 +44,22 @@ the current video input or output, tuner or modulator, or audio input or output. Different in the sense of other bounds, another default and current value, step size or other menu items. A control with a certain emphasiscustom/emphasis ID can also change name and -type.footnote - paraIt will be more convenient for applications if drivers -make use of the constantV4L2_CTRL_FLAG_DISABLED/constant flag, but -that was never required./para - /footnote Control values are stored globally, they do not +type./para + +paraIf a control is not applicable to the current configuration +of the device (for example, it doesn't apply to the current video input) +drivers set the constantV4L2_CTRL_FLAG_INACTIVE/constant flag./para + +paraControl values are stored globally, they do not change when switching except to stay within the reported bounds. They also do not change eg; when the device is opened or closed, when the Hmm... eg; above seems weird (ok, this is not part of your changes, but do you care take a look on the above line?) tuner radio frequency is changed or generally never without -application request. Since V4L2 specifies no event mechanism, panel -applications intended to cooperate with other panel applications (be -they built into a larger application, as a TV viewer) may need to -regularly poll control values to update their user -interface.footnote - paraApplications could call an ioctl to request events. -After another process called VIDIOC-S-CTRL; or another ioctl changing -shared properties the func-select; function would indicate -readability until any ioctl (querying the properties) is -called./para - /footnote/para +application request./para + +paraV4L2 specifies an event mechanism to notify applications +when controls change value (see VIDIOC-SUBSCRIBE-EVENT;, event +constantV4L2_EVENT_CTRL/constant), panel applications might want to make +use of that in order to always reflect the correct control value./para para All controls use machine endianness. @@ -434,8 +444,8 @@ Drivers must implement constantVIDIOC_QUERYCTRL/constant, controls, constantVIDIOC_QUERYMENU/constant when it has one or more menu type controls./para -example - titleEnumerating all controls/title +example id=enum_all_controls + titleEnumerating all user controls/title programlisting v4l2-queryctrl; queryctrl; @@ -501,6 +511,32 @@ for (queryctrl.id = V4L2_CID_PRIVATE_BASE;; /example example + titleEnumerating all user controls (alternative)/title + programlisting +memset(amp;queryctrl, 0, sizeof(queryctrl)); + +queryctrl.id = V4L2_CTRL_CLASS_USER | V4L2_CTRL_FLAG_NEXT_CTRL; +while (0 == ioctl(fd, VIDIOC-QUERYCTRL;, amp;queryctrl)) { + if (V4L2_CTRL_ID2CLASS(queryctrl.id) != V4L2_CTRL_CLASS_USER) + break; + if (queryctrl.flags amp; V4L2_CTRL_FLAG_DISABLED) + continue; + +
Re: [REVIEWv3 PATCH 24/35] v4l2-ctrls/videodev2.h: add u8 and u16 types.
Em Mon, 17 Feb 2014 10:57:39 +0100 Hans Verkuil hverk...@xs4all.nl escreveu: From: Hans Verkuil hans.verk...@cisco.com These are needed by the upcoming patches for the motion detection matrices. Signed-off-by: Hans Verkuil hans.verk...@cisco.com --- drivers/media/v4l2-core/v4l2-ctrls.c | 45 include/media/v4l2-ctrls.h | 4 include/uapi/linux/videodev2.h | 4 3 files changed, 49 insertions(+), 4 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c index 1886b79..ca4271b 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls.c +++ b/drivers/media/v4l2-core/v4l2-ctrls.c @@ -1145,6 +1145,10 @@ static bool std_equal(const struct v4l2_ctrl *ctrl, u32 idx, return !strcmp(ptr1.p_char + idx, ptr2.p_char + idx); case V4L2_CTRL_TYPE_INTEGER64: return ptr1.p_s64[idx] == ptr2.p_s64[idx]; + case V4L2_CTRL_TYPE_U8: + return ptr1.p_u8[idx] == ptr2.p_u8[idx]; + case V4L2_CTRL_TYPE_U16: + return ptr1.p_u16[idx] == ptr2.p_u16[idx]; Please replace V4L2_CTRL_TYPE_INTEGER64 and V4L2_CTRL_TYPE_INTEGER to V4L2_CTRL_TYPE_S64 and V4L2_CTRL_TYPE_S32 and add an alias for those previous names at videodev2.h: #define V4L2_CTRL_TYPE_INTEGER64V4L2_CTRL_TYPE_S64 #define V4L2_CTRL_TYPE_INTEGER V4L2_CTRL_TYPE_S32 Please notice that there's no reason at all to deprecate the old names, so we'll keep the above defines forever. Yet, now that we're using Ubitsize for some types, let's standardize this to the other types too, as it makes the API more consistent. Also, I won't doubt that we'll eventually need S8, S16, U32, U64 types in the future. default: if (ctrl-is_int) return ptr1.p_s32[idx] == ptr2.p_s32[idx]; @@ -1172,6 +1176,12 @@ static void std_init(const struct v4l2_ctrl *ctrl, u32 idx, case V4L2_CTRL_TYPE_BOOLEAN: ptr.p_s32[idx] = ctrl-default_value; break; + case V4L2_CTRL_TYPE_U8: + ptr.p_u8[idx] = ctrl-default_value; + break; + case V4L2_CTRL_TYPE_U16: + ptr.p_u16[idx] = ctrl-default_value; + break; default: idx *= ctrl-elem_size; memset(ptr.p + idx, 0, ctrl-elem_size); @@ -1208,6 +1218,12 @@ static void std_log(const struct v4l2_ctrl *ctrl) case V4L2_CTRL_TYPE_STRING: pr_cont(%s, ptr.p_char); break; + case V4L2_CTRL_TYPE_U8: + pr_cont(%u, (unsigned)*ptr.p_u8); + break; + case V4L2_CTRL_TYPE_U16: + pr_cont(%u, (unsigned)*ptr.p_u16); + break; default: pr_cont(unknown type %d, ctrl-type); break; @@ -1238,6 +1254,10 @@ static int std_validate(const struct v4l2_ctrl *ctrl, u32 idx, return ROUND_TO_RANGE(ptr.p_s32[idx], u32, ctrl); case V4L2_CTRL_TYPE_INTEGER64: return ROUND_TO_RANGE(ptr.p_s64[idx], u64, ctrl); + case V4L2_CTRL_TYPE_U8: + return ROUND_TO_RANGE(ptr.p_u8[idx], u8, ctrl); + case V4L2_CTRL_TYPE_U16: + return ROUND_TO_RANGE(ptr.p_u16[idx], u16, ctrl); case V4L2_CTRL_TYPE_BOOLEAN: ptr.p_s32[idx] = !!ptr.p_s32[idx]; @@ -1470,6 +1490,8 @@ static int check_range(enum v4l2_ctrl_type type, if (step != 1 || max 1 || min 0) return -ERANGE; /* fall through */ + case V4L2_CTRL_TYPE_U8: + case V4L2_CTRL_TYPE_U16: case V4L2_CTRL_TYPE_INTEGER: case V4L2_CTRL_TYPE_INTEGER64: if (step == 0 || min max || def min || def max) @@ -1768,12 +1790,25 @@ static struct v4l2_ctrl *v4l2_ctrl_new(struct v4l2_ctrl_handler *hdl, rows = 1; is_matrix = cols 1 || rows 1; - if (type == V4L2_CTRL_TYPE_INTEGER64) + /* Prefill elem_size for all types handled by std_type_ops */ + switch (type) { + case V4L2_CTRL_TYPE_INTEGER64: elem_size = sizeof(s64); - else if (type == V4L2_CTRL_TYPE_STRING) + break; + case V4L2_CTRL_TYPE_STRING: elem_size = max + 1; - else if (type V4L2_CTRL_COMPLEX_TYPES) - elem_size = sizeof(s32); + break; + case V4L2_CTRL_TYPE_U8: + elem_size = sizeof(u8); + break; + case V4L2_CTRL_TYPE_U16: + elem_size = sizeof(u16); + break; + default: + if (type V4L2_CTRL_COMPLEX_TYPES) + elem_size = sizeof(s32); + break; + } tot_ctrl_size = elem_size * cols * rows; /* Sanity checks */ @@ -3114,6 +3149,8 @@ int v4l2_ctrl_modify_range(struct v4l2_ctrl *ctrl, case V4L2_CTRL_TYPE_MENU: case V4L2_CTRL_TYPE_INTEGER_MENU: case
Re: [PATCH v8 3/10] Documentation: devicetree: Update Samsung FIMC DT binding
Mark, Could you please also review this patch? It is the only thing pending for this 10 patches series to be merged. Thank you! Mauro Em Tue, 11 Mar 2014 17:38:23 +0100 Laurent Pinchart laurent.pinch...@ideasonboard.com escreveu: On Tuesday 11 March 2014 17:34:30 Sylwester Nawrocki wrote: This patch documents following updates of the Exynos4 SoC camera subsystem devicetree binding: - addition of #clock-cells and clock-output-names properties to 'camera' node - these are now needed so the image sensor sub-devices can reference clocks provided by the camera host interface, - dropped a note about required clock-frequency properties at the image sensor nodes; the sensor devices can now control their clock explicitly through the clk API and there is no need to require this property in the camera host interface binding. Signed-off-by: Sylwester Nawrocki s.nawro...@samsung.com Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com --- Changes since v7: - dropped a note about clock-frequency property in sensor nodes. Changes since v6: - #clock-cells, clock-output-names documented as mandatory properties; - renamed cam_mclk_{a,b} to cam_{a,b}_clkout in the example dts, this now matches changes in exynos4.dtsi further in the patch series; - marked samsung,camclk-out property as deprecated. Changes since v5: - none. Changes since v4: - dropped a requirement of specific order of values in clocks/ clock-names properties (Mark) and reference to clock-names in clock-output-names property description (Mark). --- .../devicetree/bindings/media/samsung-fimc.txt | 44 +++-- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/Documentation/devicetree/bindings/media/samsung-fimc.txt b/Documentation/devicetree/bindings/media/samsung-fimc.txt index 96312f6..922d6f8 100644 --- a/Documentation/devicetree/bindings/media/samsung-fimc.txt +++ b/Documentation/devicetree/bindings/media/samsung-fimc.txt @@ -15,11 +15,21 @@ Common 'camera' node Required properties: -- compatible : must be samsung,fimc, simple-bus -- clocks : list of clock specifiers, corresponding to entries in - the clock-names property; -- clock-names : must contain sclk_cam0, sclk_cam1, pxl_async0, - pxl_async1 entries, matching entries in the clocks property. +- compatible: must be samsung,fimc, simple-bus +- clocks: list of clock specifiers, corresponding to entries in + the clock-names property; +- clock-names : must contain sclk_cam0, sclk_cam1, pxl_async0, + pxl_async1 entries, matching entries in the clocks property. + +- #clock-cells: from the common clock bindings (../clock/clock-bindings.txt), + must be 1. A clock provider is associated with the 'camera' node and it should + be referenced by external sensors that use clocks provided by the SoC on + CAM_*_CLKOUT pins. The clock specifier cell stores an index of a clock. + The indices are 0, 1 for CAM_A_CLKOUT, CAM_B_CLKOUT clocks respectively. + +- clock-output-names: from the common clock bindings, should contain names of + clocks registered by the camera subsystem corresponding to CAM_A_CLKOUT, + CAM_B_CLKOUT output clocks respectively. The pinctrl bindings defined in ../pinctrl/pinctrl-bindings.txt must be used to define a required pinctrl state named default and optional pinctrl states: @@ -32,6 +42,7 @@ way around. The 'camera' node must include at least one 'fimc' child node. + 'fimc' device nodes --- @@ -88,8 +99,8 @@ port nodes specifies data input - 0, 1 indicates input A, B respectively. Optional properties -- samsung,camclk-out : specifies clock output for remote sensor, - 0 - CAM_A_CLKOUT, 1 - CAM_B_CLKOUT; +- samsung,camclk-out (deprecated) : specifies clock output for remote sensor, + 0 - CAM_A_CLKOUT, 1 - CAM_B_CLKOUT; Image sensor nodes -- @@ -97,8 +108,6 @@ Image sensor nodes The sensor device nodes should be added to their control bus controller (e.g. I2C0) nodes and linked to a port node in the csis or the parallel-ports node, using the common video interfaces bindings, defined in video-interfaces.txt. -The implementation of this bindings requires clock-frequency property to be -present in the sensor device nodes. Example: @@ -114,7 +123,7 @@ Example: vddio-supply = ...; clock-frequency = 2400; - clocks = ...; + clocks = camera 1; clock-names = mclk; port { @@ -135,7 +144,7 @@ Example: vddio-supply = ...; clock-frequency = 2400; - clocks = ...; + clocks = camera 0;
[PATCH] [trivial] doc: DocBook: Fix typo in xml and template file
Fix spelling typo under Documentation/DocBook/media. It is because these files are NOT generated by make htmldocs, I have to fix the files. Signed-off-by: Masanari Iida standby2...@gmail.com --- Documentation/DocBook/media/dvb/dvbproperty.xml | 2 +- Documentation/DocBook/media/v4l/compat.xml | 2 +- Documentation/DocBook/media_api.tmpl| 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/DocBook/media/dvb/dvbproperty.xml b/Documentation/DocBook/media/dvb/dvbproperty.xml index a9b15e3..24c22ca 100644 --- a/Documentation/DocBook/media/dvb/dvbproperty.xml +++ b/Documentation/DocBook/media/dvb/dvbproperty.xml @@ -196,7 +196,7 @@ get/set up to 64 properties. The actual meaning of each property is described on para1)For satellital delivery systems, it is measured in kHz. For the other ones, it is measured in Hz./para para2)For ISDB-T, the channels are usually transmitted with an offset of 143kHz. - E.g. a valid frequncy could be 474143 kHz. The stepping is bound to the bandwidth of + E.g. a valid frequency could be 474143 kHz. The stepping is bound to the bandwidth of the channel which is 6MHz./para para3)As in ISDB-Tsb the channel consists of only one or three segments the diff --git a/Documentation/DocBook/media/v4l/compat.xml b/Documentation/DocBook/media/v4l/compat.xml index c4cac6d..86c6dd2 100644 --- a/Documentation/DocBook/media/v4l/compat.xml +++ b/Documentation/DocBook/media/v4l/compat.xml @@ -397,7 +397,7 @@ linkend=control /./para paraThe structfielddepth/structfield (average number of bits per pixel) of a video image is implied by the selected image -format. V4L2 does not explicitely provide such information assuming +format. V4L2 does not explicitly provide such information assuming applications recognizing the format are aware of the image depth and others need not know. The structfieldpalette/structfield field moved into the v4l2-pix-format;:informaltable diff --git a/Documentation/DocBook/media_api.tmpl b/Documentation/DocBook/media_api.tmpl index 4c8d282..ab56f89c 100644 --- a/Documentation/DocBook/media_api.tmpl +++ b/Documentation/DocBook/media_api.tmpl @@ -58,7 +58,7 @@ Foundation. A copy of the license is included in the chapter entitled titleIntroduction/title paraThis document covers the Linux Kernel to Userspace API's used by - video and radio straming devices, including video cameras, + video and radio streaming devices, including video cameras, analog and digital TV receiver cards, AM/FM receiver cards, streaming capture devices./para paraIt is divided into four parts./para -- 1.9.0 -- 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 v10][ 03/10] imx-drm: Correct BGR666 and the board's dts that use them.
The current BGR666 is not consistent with the other color mapings like BGR24. BGR666 should be in the same byte order than BGR24. Signed-off-by: Denis Carikli de...@eukrea.com Acked-by: Philipp Zabel p.za...@pengutronix.de --- ChangeLog v9-v10: - Rebased. - Added Philipp Zabel's Ack. - Included Lothar Waßmann's suggestion about imx-ldb.c. - Shortened the patch title ChangeLog v8-v9: - Removed the Cc. They are now set in git-send-email directly. ChangeLog v7-v8: - Shrinked even more the Cc list. ChangeLog v6-v7: - Shrinked even more the Cc list. ChangeLog v5-v6: - Remove people not concerned by this patch from the Cc list. - Added a better explanation of the change. ChangeLog v5: - New patch. --- arch/arm/boot/dts/imx51-apf51dev.dts|2 +- arch/arm/boot/dts/imx53-m53evk.dts |2 +- drivers/staging/imx-drm/imx-ldb.c |4 ++-- drivers/staging/imx-drm/ipu-v3/ipu-dc.c |4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arm/boot/dts/imx51-apf51dev.dts b/arch/arm/boot/dts/imx51-apf51dev.dts index c5a9a24..7b3851d 100644 --- a/arch/arm/boot/dts/imx51-apf51dev.dts +++ b/arch/arm/boot/dts/imx51-apf51dev.dts @@ -18,7 +18,7 @@ display@di1 { compatible = fsl,imx-parallel-display; - interface-pix-fmt = bgr666; + interface-pix-fmt = rgb666; pinctrl-names = default; pinctrl-0 = pinctrl_ipu_disp1; diff --git a/arch/arm/boot/dts/imx53-m53evk.dts b/arch/arm/boot/dts/imx53-m53evk.dts index f6d3ac3..4646ea9 100644 --- a/arch/arm/boot/dts/imx53-m53evk.dts +++ b/arch/arm/boot/dts/imx53-m53evk.dts @@ -23,7 +23,7 @@ soc { display1: display@di1 { compatible = fsl,imx-parallel-display; - interface-pix-fmt = bgr666; + interface-pix-fmt = rgb666; pinctrl-names = default; pinctrl-0 = pinctrl_ipu_disp1; diff --git a/drivers/staging/imx-drm/imx-ldb.c b/drivers/staging/imx-drm/imx-ldb.c index 33d2b883..e6d7bc7 100644 --- a/drivers/staging/imx-drm/imx-ldb.c +++ b/drivers/staging/imx-drm/imx-ldb.c @@ -185,11 +185,11 @@ static void imx_ldb_encoder_prepare(struct drm_encoder *encoder) switch (imx_ldb_ch-chno) { case 0: pixel_fmt = (ldb-ldb_ctrl LDB_DATA_WIDTH_CH0_24) ? - V4L2_PIX_FMT_RGB24 : V4L2_PIX_FMT_BGR666; + V4L2_PIX_FMT_RGB24 : V4L2_PIX_FMT_RGB666; break; case 1: pixel_fmt = (ldb-ldb_ctrl LDB_DATA_WIDTH_CH1_24) ? - V4L2_PIX_FMT_RGB24 : V4L2_PIX_FMT_BGR666; + V4L2_PIX_FMT_RGB24 : V4L2_PIX_FMT_RGB666; break; default: dev_err(ldb-dev, unable to config di%d panel format\n, diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c index 6f9abe8..154d293 100644 --- a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c +++ b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c @@ -397,9 +397,9 @@ int ipu_dc_init(struct ipu_soc *ipu, struct device *dev, /* bgr666 */ ipu_dc_map_clear(priv, IPU_DC_MAP_BGR666); - ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 0, 5, 0xfc); /* blue */ + ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 0, 17, 0xfc); /* blue */ ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 1, 11, 0xfc); /* green */ - ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 2, 17, 0xfc); /* red */ + ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 2, 5, 0xfc); /* red */ /* bgr24 */ ipu_dc_map_clear(priv, IPU_DC_MAP_BGR24); -- 1.7.9.5 -- 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 v10][ 02/10] imx-drm: Add RGB666 support for parallel display.
Signed-off-by: Denis Carikli de...@eukrea.com Acked-by: Philipp Zabel p.za...@pengutronix.de --- ChangeLog v8-v9: - Rebased. - Added Philipp Zabel's ack. - Shortened the patch title. ChangeLog v8-v9: - Removed the Cc. They are now set in git-send-email directly. - Rebased. ChangeLog v7-v8: - Shrinked even more the Cc list. ChangeLog v6-v7: - Shrinked even more the Cc list. ChangeLog v5-v6: - Remove people not concerned by this patch from the Cc list. ChangeLog v3-v5: - Use the correct RGB order. ChangeLog v2-v3: - Added some interested people in the Cc list. - Removed the commit message long desciption that was just a copy of the short description. - Rebased the patch. - Fixed a copy-paste error in the ipu_dc_map_clear parameter. --- .../bindings/staging/imx-drm/fsl-imx-drm.txt |3 ++- drivers/staging/imx-drm/ipu-v3/ipu-dc.c|9 + drivers/staging/imx-drm/parallel-display.c |2 ++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt b/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt index 3be5ce7..83137ef 100644 --- a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt +++ b/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt @@ -60,7 +60,8 @@ Required properties: - compatible: Should be fsl,imx-parallel-display Optional properties: - interface_pix_fmt: How this display is connected to the - display interface. Currently supported types: rgb24, rgb565, bgr666 + display interface. Currently supported types: rgb24, rgb565, bgr666, + rgb666 - edid: verbatim EDID data block describing attached display. - ddc: phandle describing the i2c bus handling the display data channel diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c index d5de8bb..6f9abe8 100644 --- a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c +++ b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c @@ -92,6 +92,7 @@ enum ipu_dc_map { IPU_DC_MAP_GBR24, /* TVEv2 */ IPU_DC_MAP_BGR666, IPU_DC_MAP_BGR24, + IPU_DC_MAP_RGB666, }; struct ipu_dc { @@ -155,6 +156,8 @@ static int ipu_pixfmt_to_map(u32 fmt) return IPU_DC_MAP_BGR666; case V4L2_PIX_FMT_BGR24: return IPU_DC_MAP_BGR24; + case V4L2_PIX_FMT_RGB666: + return IPU_DC_MAP_RGB666; default: return -EINVAL; } @@ -404,6 +407,12 @@ int ipu_dc_init(struct ipu_soc *ipu, struct device *dev, ipu_dc_map_config(priv, IPU_DC_MAP_BGR24, 1, 15, 0xff); /* green */ ipu_dc_map_config(priv, IPU_DC_MAP_BGR24, 0, 23, 0xff); /* blue */ + /* rgb666 */ + ipu_dc_map_clear(priv, IPU_DC_MAP_RGB666); + ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 0, 5, 0xfc); /* blue */ + ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 1, 11, 0xfc); /* green */ + ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 2, 17, 0xfc); /* red */ + return 0; } diff --git a/drivers/staging/imx-drm/parallel-display.c b/drivers/staging/imx-drm/parallel-display.c index c60b6c6..01b7ce5 100644 --- a/drivers/staging/imx-drm/parallel-display.c +++ b/drivers/staging/imx-drm/parallel-display.c @@ -219,6 +219,8 @@ static int imx_pd_bind(struct device *dev, struct device *master, void *data) imxpd-interface_pix_fmt = V4L2_PIX_FMT_RGB565; else if (!strcmp(fmt, bgr666)) imxpd-interface_pix_fmt = V4L2_PIX_FMT_BGR666; + else if (!strcmp(fmt, rgb666)) + imxpd-interface_pix_fmt = V4L2_PIX_FMT_RGB666; } panel_node = of_parse_phandle(np, fsl,panel, 0); -- 1.7.9.5 -- 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 v10][ 09/10] imx-drm: parallel-display: retrive extra display-timings.
If de-active and/or pixelclk-active properties were set in the display-timings DT node, they were not used. Instead the data-enable and the pixel data clock polarity were hardcoded. Signed-off-by: Denis Carikli de...@eukrea.com --- ChangeLog v9-v10: - New patch from what's left of: staging: imx-drm: Use de-active and pixelclk-active - New patch title. --- drivers/staging/imx-drm/parallel-display.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/imx-drm/parallel-display.c b/drivers/staging/imx-drm/parallel-display.c index 871a737..09b07d5 100644 --- a/drivers/staging/imx-drm/parallel-display.c +++ b/drivers/staging/imx-drm/parallel-display.c @@ -85,7 +85,8 @@ static int imx_pd_connector_get_modes(struct drm_connector *connector) return -EINVAL; of_get_drm_display_mode(np, imxpd-mode, OF_USE_NATIVE_MODE); drm_mode_copy(mode, imxpd-mode); - imx_drm_set_default_timing_flags(mode); + imx_drm_of_get_extra_timing_flags(imxpd-connector, mode, + imxpd-dev-of_node); mode-type |= DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED, drm_mode_probed_add(connector, mode); num_modes++; -- 1.7.9.5 -- 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 v10][ 01/10] [media] v4l2: add new V4L2_PIX_FMT_RGB666 pixel format.
That new macro is needed by the imx_drm staging driver for supporting the QVGA display of the eukrea-cpuimx51 board. Signed-off-by: Denis Carikli de...@eukrea.com Acked-by: Mauro Carvalho Chehab m.che...@samsung.com Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com Acked-by: Philipp Zabel p.za...@pengutronix.de --- ChangeLog v9-v10: - Rebased on top of: 211e7f2 [media] DocBook media: drop the old incorrect packed RGB table - Added Philipp Zabel's Ack. ChangeLog v8-v9: - Removed the Cc. They are now set in git-send-email directly. ChangeLog v7-v8: - Added Mauro Carvalho Chehab back to the list of Cc ChangeLog v6-v7: - Shrinked even more the Cc list. ChangeLog v5-v6: - Remove people not concerned by this patch from the Cc list. ChangeLog v3-v4: - Added Laurent Pinchart's Ack. ChangeLog v2-v3: - Added some interested people in the Cc list. - Added Mauro Carvalho Chehab's Ack. - Added documentation. --- .../DocBook/media/v4l/pixfmt-packed-rgb.xml| 39 include/uapi/linux/videodev2.h |1 + 2 files changed, 40 insertions(+) diff --git a/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml b/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml index e1c4f8b..88a7fe1 100644 --- a/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml +++ b/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml @@ -279,6 +279,45 @@ colorspace constantV4L2_COLORSPACE_SRGB/constant./para entry/entry entry/entry /row + row id=V4L2-PIX-FMT-RGB666 + entryconstantV4L2_PIX_FMT_RGB666/constant/entry + entry'RGBH'/entry + entry/entry + entryrsubscript5/subscript/entry + entryrsubscript4/subscript/entry + entryrsubscript3/subscript/entry + entryrsubscript2/subscript/entry + entryrsubscript1/subscript/entry + entryrsubscript0/subscript/entry + entrygsubscript5/subscript/entry + entrygsubscript4/subscript/entry + entry/entry + entrygsubscript3/subscript/entry + entrygsubscript2/subscript/entry + entrygsubscript1/subscript/entry + entrygsubscript0/subscript/entry + entrybsubscript5/subscript/entry + entrybsubscript4/subscript/entry + entrybsubscript3/subscript/entry + entrybsubscript2/subscript/entry + entry/entry + entrybsubscript1/subscript/entry + entrybsubscript0/subscript/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + /row row id=V4L2-PIX-FMT-BGR24 entryconstantV4L2_PIX_FMT_BGR24/constant/entry entry'BGR3'/entry diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index 28abdf7..5293b81 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -299,6 +299,7 @@ struct v4l2_pix_format { #define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R', 'G', 'B', 'Q') /* 16 RGB-5-5-5 BE */ #define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R', 'G', 'B', 'R') /* 16 RGB-5-6-5 BE */ #define V4L2_PIX_FMT_BGR666 v4l2_fourcc('B', 'G', 'R', 'H') /* 18 BGR-6-6-6 */ +#define V4L2_PIX_FMT_RGB666 v4l2_fourcc('R', 'G', 'B', 'H') /* 18 RGB-6-6-6 */ #define V4L2_PIX_FMT_BGR24 v4l2_fourcc('B', 'G', 'R', '3') /* 24 BGR-8-8-8 */ #define V4L2_PIX_FMT_RGB24 v4l2_fourcc('R', 'G', 'B', '3') /* 24 RGB-8-8-8 */ #define V4L2_PIX_FMT_BGR32 v4l2_fourcc('B', 'G', 'R', '4') /* 32 BGR-8-8-8-8 */ -- 1.7.9.5 -- 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 v10][ 06/10] ARM: dts: imx5*, imx6*: correct display-timings nodes.
The imx-drm driver can't use the de-active and pixelclk-active display-timings properties yet. Instead the data-enable and the pixel data clock polarity are hardcoded in the imx-drm driver. So theses properties are now set to keep the same behaviour when imx-drm will start using them. Signed-off-by: Denis Carikli de...@eukrea.com --- ChangeLog v9-v10: - New patch that was splitted out of: staging imx-drm: Use de-active and pixelclk-active display-timings. --- arch/arm/boot/dts/imx51-babbage.dts |2 ++ arch/arm/boot/dts/imx53-m53evk.dts|2 ++ arch/arm/boot/dts/imx53-tx53-x03x.dts |2 +- arch/arm/boot/dts/imx6qdl-gw53xx.dtsi |2 ++ arch/arm/boot/dts/imx6qdl-gw54xx.dtsi |2 ++ arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi |2 ++ arch/arm/boot/dts/imx6qdl-sabreauto.dtsi |2 ++ arch/arm/boot/dts/imx6qdl-sabrelite.dtsi |2 ++ arch/arm/boot/dts/imx6qdl-sabresd.dtsi|2 ++ 9 files changed, 17 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/imx51-babbage.dts b/arch/arm/boot/dts/imx51-babbage.dts index 9e9deb2..4732a00 100644 --- a/arch/arm/boot/dts/imx51-babbage.dts +++ b/arch/arm/boot/dts/imx51-babbage.dts @@ -38,6 +38,8 @@ vfront-porch = 7; hsync-len = 60; vsync-len = 10; + de-active = 1; + pixelclk-active = 0; }; }; diff --git a/arch/arm/boot/dts/imx53-m53evk.dts b/arch/arm/boot/dts/imx53-m53evk.dts index 4646ea9..d6e1046 100644 --- a/arch/arm/boot/dts/imx53-m53evk.dts +++ b/arch/arm/boot/dts/imx53-m53evk.dts @@ -40,6 +40,8 @@ vfront-porch = 9; vsync-len = 3; vsync-active = 1; + de-active = 1; + pixelclk-active = 0; }; }; }; diff --git a/arch/arm/boot/dts/imx53-tx53-x03x.dts b/arch/arm/boot/dts/imx53-tx53-x03x.dts index 0217dde3..4092a81 100644 --- a/arch/arm/boot/dts/imx53-tx53-x03x.dts +++ b/arch/arm/boot/dts/imx53-tx53-x03x.dts @@ -93,7 +93,7 @@ hsync-active = 0; vsync-active = 0; de-active = 1; - pixelclk-active = 1; + pixelclk-active = 0; }; ET0500 { diff --git a/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi b/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi index c8e5ae0..43f48f2 100644 --- a/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi +++ b/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi @@ -494,6 +494,8 @@ vfront-porch = 7; hsync-len = 60; vsync-len = 10; + de-active = 1; + pixelclk-active = 0; }; }; }; diff --git a/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi b/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi index 2795dfc..59ecfd1 100644 --- a/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi +++ b/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi @@ -516,6 +516,8 @@ vfront-porch = 7; hsync-len = 60; vsync-len = 10; + de-active = 1; + pixelclk-active = 0; }; }; }; diff --git a/arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi b/arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi index 99be301..e9419a2 100644 --- a/arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi +++ b/arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi @@ -349,6 +349,8 @@ vfront-porch = 7; hsync-len = 60; vsync-len = 10; + de-active = 1; + pixelclk-active = 0; }; }; }; diff --git a/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi b/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi index 009abd6..230bbc6 100644 --- a/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi +++ b/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi @@ -405,6 +405,8 @@ vfront-porch = 7; hsync-len = 60; vsync-len = 10; + de-active = 1; + pixelclk-active = 0; }; }; }; diff --git a/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi b/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi index 3bec128..ed4c72f 100644 ---
[PATCH v10][ 08/10] imx-drm: imx-drm-core: provide a common display timings retrival function.
imx_drm_of_get_extra_timing_flags will be used to retrive the native-mode and de-active display-timings node properties in the device tree. Signed-off-by: Denis Carikli de...@eukrea.com --- ChangeLog v9-v10: - New patch that was splitted out of staging: imx-drm: Use de-active and pixelclk-active - When a IMXDRM_MODE_FLAG_ flag is set, its opposite flag is also unset. --- drivers/staging/imx-drm/imx-drm-core.c | 57 drivers/staging/imx-drm/imx-drm.h |2 ++ 2 files changed, 59 insertions(+) diff --git a/drivers/staging/imx-drm/imx-drm-core.c b/drivers/staging/imx-drm/imx-drm-core.c index 6a71cd9..d877b77 100644 --- a/drivers/staging/imx-drm/imx-drm-core.c +++ b/drivers/staging/imx-drm/imx-drm-core.c @@ -24,6 +24,7 @@ #include drm/drm_crtc_helper.h #include drm/drm_gem_cma_helper.h #include drm/drm_fb_cma_helper.h +#include video/of_display_timing.h #include imx-drm.h @@ -492,6 +493,62 @@ int imx_drm_encoder_parse_of(struct drm_device *drm, } EXPORT_SYMBOL_GPL(imx_drm_encoder_parse_of); +int imx_drm_of_get_extra_timing_flags(struct drm_connector *connector, +struct drm_display_mode *mode, +struct device_node *display_np) +{ + struct drm_display_mode *new_mode = drm_mode_create(connector-dev); + struct device_node *timings_np; + struct device_node *mode_np; + u32 val; + + if (!new_mode) + return -EINVAL; + + of_get_drm_display_mode(display_np, mode, OF_USE_NATIVE_MODE); + + timings_np = of_get_child_by_name(display_np, display-timings); + if (timings_np) { + /* get the display mode node */ + mode_np = of_parse_phandle(timings_np, + native-mode, 0); + if (!mode_np) + mode_np = of_get_next_child(timings_np, NULL); + + if (!of_property_read_u32(mode_np, de-active, val)) { + if (val) { + mode-private_flags |= + IMXDRM_MODE_FLAG_DE_HIGH; + mode-private_flags = + ~IMXDRM_MODE_FLAG_DE_LOW; + } else { + mode-private_flags = + ~IMXDRM_MODE_FLAG_DE_HIGH; + mode-private_flags |= + IMXDRM_MODE_FLAG_DE_LOW; + } + } + + if (!of_property_read_u32(mode_np, pixelclk-active, + val)) { + if (val) { + mode-private_flags |= + IMXDRM_MODE_FLAG_PIXDATA_POSEDGE; + mode-private_flags = + ~IMXDRM_MODE_FLAG_PIXDATA_NEGEDGE; + } else { + mode-private_flags = + ~IMXDRM_MODE_FLAG_PIXDATA_POSEDGE; + mode-private_flags |= + IMXDRM_MODE_FLAG_PIXDATA_NEGEDGE; + } + } + } + + return 0; +} +EXPORT_SYMBOL_GPL(imx_drm_of_get_extra_timing_flags); + void imx_drm_set_default_timing_flags(struct drm_display_mode *mode) { mode-private_flags = ~IMXDRM_MODE_FLAG_DE_LOW; diff --git a/drivers/staging/imx-drm/imx-drm.h b/drivers/staging/imx-drm/imx-drm.h index ae07d9d..ae01f4d 100644 --- a/drivers/staging/imx-drm/imx-drm.h +++ b/drivers/staging/imx-drm/imx-drm.h @@ -54,6 +54,8 @@ int imx_drm_encoder_get_mux_id(struct device_node *node, struct drm_encoder *encoder); int imx_drm_encoder_parse_of(struct drm_device *drm, struct drm_encoder *encoder, struct device_node *np); +int imx_drm_of_get_extra_timing_flags(struct drm_connector *connector, + struct drm_display_mode *mode, struct device_node *display_np); void imx_drm_set_default_timing_flags(struct drm_display_mode *mode); int imx_drm_connector_mode_valid(struct drm_connector *connector, -- 1.7.9.5 -- 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 v10][ 07/10] imx-drm: Prepare imx-drm for extra display-timings retrival.
The hardware behaviour was kept. Signed-off-by: Denis Carikli de...@eukrea.com --- ChangeLog v9-v10: - New patch that was splitted out of staging: imx-drm: Use de-active and pixelclk-active display-timings. - The IMXDRM_MODE_FLAG_ are now using the BIT macros. - The SET_CLK_POL and SET_DE_POL masks were removed. The code was updated accordingly. --- drivers/staging/imx-drm/imx-drm-core.c | 10 ++ drivers/staging/imx-drm/imx-drm.h |6 ++ drivers/staging/imx-drm/imx-hdmi.c |3 +++ drivers/staging/imx-drm/imx-ldb.c |3 +++ drivers/staging/imx-drm/imx-tve.c |3 +++ drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h |6 -- drivers/staging/imx-drm/ipu-v3/ipu-di.c |7 ++- drivers/staging/imx-drm/ipuv3-crtc.c| 12 ++-- drivers/staging/imx-drm/parallel-display.c |2 ++ 9 files changed, 47 insertions(+), 5 deletions(-) diff --git a/drivers/staging/imx-drm/imx-drm-core.c b/drivers/staging/imx-drm/imx-drm-core.c index 4144a75..6a71cd9 100644 --- a/drivers/staging/imx-drm/imx-drm-core.c +++ b/drivers/staging/imx-drm/imx-drm-core.c @@ -492,6 +492,16 @@ int imx_drm_encoder_parse_of(struct drm_device *drm, } EXPORT_SYMBOL_GPL(imx_drm_encoder_parse_of); +void imx_drm_set_default_timing_flags(struct drm_display_mode *mode) +{ + mode-private_flags = ~IMXDRM_MODE_FLAG_DE_LOW; + mode-private_flags = ~IMXDRM_MODE_FLAG_PIXDATA_POSEDGE; + + mode-private_flags |= IMXDRM_MODE_FLAG_DE_HIGH; + mode-private_flags |= IMXDRM_MODE_FLAG_PIXDATA_NEGEDGE; +} +EXPORT_SYMBOL_GPL(imx_drm_set_default_timing_flags); + /* * @node: device tree node containing encoder input ports * @encoder: drm_encoder diff --git a/drivers/staging/imx-drm/imx-drm.h b/drivers/staging/imx-drm/imx-drm.h index a322bac..ae07d9d 100644 --- a/drivers/staging/imx-drm/imx-drm.h +++ b/drivers/staging/imx-drm/imx-drm.h @@ -1,6 +1,11 @@ #ifndef _IMX_DRM_H_ #define _IMX_DRM_H_ +#define IMXDRM_MODE_FLAG_DE_HIGH BIT(0) +#define IMXDRM_MODE_FLAG_DE_LOWBIT(1) +#define IMXDRM_MODE_FLAG_PIXDATA_POSEDGE BIT(2) +#define IMXDRM_MODE_FLAG_PIXDATA_NEGEDGE BIT(3) + struct device_node; struct drm_crtc; struct drm_connector; @@ -49,6 +54,7 @@ int imx_drm_encoder_get_mux_id(struct device_node *node, struct drm_encoder *encoder); int imx_drm_encoder_parse_of(struct drm_device *drm, struct drm_encoder *encoder, struct device_node *np); +void imx_drm_set_default_timing_flags(struct drm_display_mode *mode); int imx_drm_connector_mode_valid(struct drm_connector *connector, struct drm_display_mode *mode); diff --git a/drivers/staging/imx-drm/imx-hdmi.c b/drivers/staging/imx-drm/imx-hdmi.c index 4540a9aa..0b215cc 100644 --- a/drivers/staging/imx-drm/imx-hdmi.c +++ b/drivers/staging/imx-drm/imx-hdmi.c @@ -1431,6 +1431,9 @@ static bool imx_hdmi_encoder_mode_fixup(struct drm_encoder *encoder, const struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode) { + drm_mode_copy(adjusted_mode, mode); + imx_drm_set_default_timing_flags(ajusted_mode); + return true; } diff --git a/drivers/staging/imx-drm/imx-ldb.c b/drivers/staging/imx-drm/imx-ldb.c index e6d7bc7..9845a6b 100644 --- a/drivers/staging/imx-drm/imx-ldb.c +++ b/drivers/staging/imx-drm/imx-ldb.c @@ -108,6 +108,9 @@ static int imx_ldb_connector_get_modes(struct drm_connector *connector) mode = drm_mode_create(connector-dev); if (!mode) return -EINVAL; + + imx_drm_set_default_timing_flags(imx_ldb_ch-mode); + drm_mode_copy(mode, imx_ldb_ch-mode); mode-type |= DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED; drm_mode_probed_add(connector, mode); diff --git a/drivers/staging/imx-drm/imx-tve.c b/drivers/staging/imx-drm/imx-tve.c index 575533f..605013c 100644 --- a/drivers/staging/imx-drm/imx-tve.c +++ b/drivers/staging/imx-drm/imx-tve.c @@ -294,6 +294,9 @@ static bool imx_tve_encoder_mode_fixup(struct drm_encoder *encoder, const struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode) { + drm_mode_copy(adjusted_mode, mode); + imx_drm_set_default_timing_flags(adjusted_mode); + return true; } diff --git a/drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h b/drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h index b95cba1..3abeea3 100644 --- a/drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h +++ b/drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h @@ -29,9 +29,11 @@ enum ipuv3_type { #define CLK_POL_ACTIVE_LOW 0 #define CLK_POL_ACTIVE_HIGH1 +#define CLK_POL_PRESERVE 2 #define ENABLE_POL_NEGEDGE 0 #define ENABLE_POL_POSEDGE 1 +#define ENABLE_POL_PRESERVE2 /* * Bitfield of Display
Re: [REVIEW PATCH 11/13] DocBook: document RF tuner bandwidth controls
Em Wed, 12 Mar 2014 16:23:14 +0200 Antti Palosaari cr...@iki.fi escreveu: On 12.03.2014 15:21, Mauro Carvalho Chehab wrote: Em Wed, 12 Mar 2014 15:07:02 +0200 Antti Palosaari cr...@iki.fi escreveu: On 12.03.2014 14:57, Antti Palosaari wrote: On 12.03.2014 14:47, Mauro Carvalho Chehab wrote: Em Wed, 12 Mar 2014 14:26:35 +0200 Antti Palosaari cr...@iki.fi escreveu: On 12.03.2014 13:02, Mauro Carvalho Chehab wrote: Em Mon, 10 Mar 2014 12:01:28 +0200 Antti Palosaari cr...@iki.fi escreveu: On 05.03.2014 20:49, Mauro Carvalho Chehab wrote: Em Thu, 27 Feb 2014 02:22:06 +0200 Antti Palosaari cr...@iki.fi escreveu: Add documentation for RF tuner bandwidth controls. These controls are used to set filters on tuner signal path. Cc: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Antti Palosaari cr...@iki.fi --- Documentation/DocBook/media/v4l/controls.xml | 19 +++ 1 file changed, 19 insertions(+) diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml index 6c9dbf6..5550fea 100644 --- a/Documentation/DocBook/media/v4l/controls.xml +++ b/Documentation/DocBook/media/v4l/controls.xml @@ -5007,6 +5007,25 @@ descriptor. Calling VIDIOC-QUERYCTRL; for this control will return a description of this control class./entry /row row + entry spanname=idconstantV4L2_CID_RF_TUNER_BANDWIDTH_AUTO/constantnbsp;/entry + entryboolean/entry +/row +row + entry spanname=descrEnables/disables tuner radio channel +bandwidth configuration. In automatic mode bandwidth configuration is performed +by the driver./entry +/row +row + entry spanname=idconstantV4L2_CID_RF_TUNER_BANDWIDTH/constantnbsp;/entry + entryinteger/entry +/row +row + entry spanname=descrFilter(s) on tuner signal path are used to +filter signal according to receiving party needs. Driver configures filters to +fulfill desired bandwidth requirement. Used when V4L2_CID_RF_TUNER_BANDWIDTH_AUTO is not +set. The range and step are driver-specific./entry Huh? If this is enable/disable, why the range and step are driver-specific? Because there is two controls grouped. That is situation of having AUTO/MANUAL. V4L2_CID_RF_TUNER_BANDWIDTH_AUTO V4L2_CID_RF_TUNER_BANDWIDTH V4L2_CID_RF_TUNER_BANDWIDTH is valid only when V4L2_CID_RF_TUNER_BANDWIDTH_AUTO == false. Sorry, but I'm not understanding what you're arguing. Yeah, it is clear at the patch that there are two controls, and that V4L2_CID_RF_TUNER_BANDWIDTH is valid only when AUTO is disabled, but this doesn't answer my question: Why V4L2_CID_RF_TUNER_BANDWIDTH's range and step are driver-specific? Hmmm. That control is used to configure RF filters. Filters set bandwidth of radio channel. There is usually quite limited set of available analog filters inside RF tuner. If you look for example FC0012/FC0013 possible filters are 6/7/8 MHz. E4000 has something 4-11 MHz. If you look those very old 1st gen silicon tuners like QT1010 / MT2060, there is no integrated filters at all - but there is external saw filter which is usually 8MHz at 36.125 MHz IF. Did you remember there is same parameter already in DVB API (struct dtv_frontend_properties bandwidth_hz)? That is control is currently used to set r820t, fc0012, fc10013 .bandwidth_hz value, e4000 implements it correctly as own control. I am quite astonished we have that big gap with our views. Well, on DVB, the bandwidth is specified in Hz, at DVBv5 (or via an enum on DVBv3). Here, there's no description about the unit to be used (Hz? kHz?). It just says that this is an integer, with a driver-specific range and step. So, one driver might choose to use Hz, other kHz, and other to expose some internal counter. That's bad. We should either use a V4L2_CTRL_TYPE_MENU type of control, where it would be possible to do something similar to DVBv3 way to specify the bandwidth filter, or to define that the bandwidth will be in Hz, kHz or MHz. Yeah, indeed. That was my mistake. The aim was Hz yes. Probably, a menu type is better, as it allows userspace to get all supported bandwidths. I though it too, but there is already a lot choices for some tuners, E4000 has over 30. What is maximum reasonable filter count for V4L2_CTRL_TYPE_MENU? I don't see any troubles on having 30 items there. Maybe Hans is aware of some troubles on having such number of items. The advantage of a menu type is that it helps userspace to select an existing range. One fear there is also what happens when there will be some day new RF tuner having DSP which does digital filtering ~1 Hz step? It is possible.
[PATCH] v4l: define unit for V4L2_CID_RF_TUNER_BANDWIDTH
Use Hertz as a unit for radio channel bandwidth. Cc: Hans Verkuil hverk...@xs4all.nl Cc: Mauro Carvalho Chehab m.che...@samsung.com Signed-off-by: Antti Palosaari cr...@iki.fi --- Documentation/DocBook/media/v4l/controls.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml index b3e222e..f4fa1ee 100644 --- a/Documentation/DocBook/media/v4l/controls.xml +++ b/Documentation/DocBook/media/v4l/controls.xml @@ -5062,7 +5062,7 @@ by the driver./entry entry spanname=descrFilter(s) on tuner signal path are used to filter signal according to receiving party needs. Driver configures filters to fulfill desired bandwidth requirement. Used when V4L2_CID_RF_TUNER_BANDWIDTH_AUTO is not -set. The range and step are driver-specific./entry +set. Unit is in Hz. The range and step are driver-specific./entry /row row entry spanname=idconstantV4L2_CID_RF_TUNER_LNA_GAIN_AUTO/constantnbsp;/entry -- 1.8.5.3 -- 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
Query: Mutiple CAPTURE ports on a single device
Hi I have a v4l2 driver for a hardware which is capable of taking one input and producing two outputs. Eg: Downscaler which takes one input @ 1080p and two outputs - one @ 720p and other at VGA. My driver is currently implemented as having two capabilities - 1. V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE 2. V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE Do you know if I can have two CAPTURE capabilities. In that case how do I distinguish between QBUF/DQBUF of each capability? Thanks Vinay -- 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] uvcvideo: Work around buggy Logitech C920 firmware
The uvcvideo webcam driver exposes the v4l2 control Exposure (Absolute) which allows the user to control the exposure time of the webcam, essentially controlling the brightness of the received image. By default the webcam automatically adjusts the exposure time automatically but the if you set the control Exposure, Auto=Manual Mode the user can fix the exposure time. Unfortunately it seems that the Logitech C920 has a firmware bug where it will forget that it's in manual mode temporarily during initialisation. This means that the camera doesn't respect the exposure time that the user requested if they request it before starting to stream video. They end up with a video stream which is either too bright or too dark and must reset the controls after video starts streaming. This patch works around this camera bug by re-uploading the cached controls to the camera immediately after initialising the camera. Signed-off-by: William Manley w...@williammanley.net --- drivers/media/usb/uvc/uvc_ctrl.c | 2 +- drivers/media/usb/uvc/uvc_driver.c | 2 +- drivers/media/usb/uvc/uvc_video.c | 5 + drivers/media/usb/uvc/uvcvideo.h | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c index a2f4501..f72d7eb 100644 --- a/drivers/media/usb/uvc/uvc_ctrl.c +++ b/drivers/media/usb/uvc/uvc_ctrl.c @@ -1795,7 +1795,7 @@ done: * - Handle restore order (Auto-Exposure Mode should be restored before * Exposure Time). */ -int uvc_ctrl_resume_device(struct uvc_device *dev) +int uvc_ctrl_restore_values(struct uvc_device *dev) { struct uvc_control *ctrl; struct uvc_entity *entity; diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c index c3bb250..9f8a87e 100644 --- a/drivers/media/usb/uvc/uvc_driver.c +++ b/drivers/media/usb/uvc/uvc_driver.c @@ -1981,7 +1981,7 @@ static int __uvc_resume(struct usb_interface *intf, int reset) int ret = 0; if (reset) { - ret = uvc_ctrl_resume_device(dev); + ret = uvc_ctrl_restore_values(dev); if (ret 0) return ret; } diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c index 3394c34..87cd57b 100644 --- a/drivers/media/usb/uvc/uvc_video.c +++ b/drivers/media/usb/uvc/uvc_video.c @@ -1660,6 +1660,11 @@ static int uvc_init_video(struct uvc_streaming *stream, gfp_t gfp_flags) } } + /* The Logitech C920 temporarily forgets that it should not be + adjusting Exposure Absolute during init so restore controls to + stored values. */ + uvc_ctrl_restore_values(stream-dev); + return 0; } diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvideo.h index 9e35982..3b365a3 100644 --- a/drivers/media/usb/uvc/uvcvideo.h +++ b/drivers/media/usb/uvc/uvcvideo.h @@ -676,7 +676,7 @@ extern int uvc_ctrl_add_mapping(struct uvc_video_chain *chain, const struct uvc_control_mapping *mapping); extern int uvc_ctrl_init_device(struct uvc_device *dev); extern void uvc_ctrl_cleanup_device(struct uvc_device *dev); -extern int uvc_ctrl_resume_device(struct uvc_device *dev); +extern int uvc_ctrl_restore_values(struct uvc_device *dev); extern int uvc_ctrl_begin(struct uvc_video_chain *chain); extern int __uvc_ctrl_commit(struct uvc_fh *handle, int rollback, -- 1.9.0 -- 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/5] ARM: lager: add vin1 node
On Fri, Mar 07, 2014 at 01:01:36PM +, Ben Dooks wrote: Add device-tree for vin1 (composite video in) on the lager board. Please update the prefix of the subject of this patch to: ARM: shmobile: lager: Signed-off-by: Ben Dooks ben.do...@codethink.co.uk --- arch/arm/boot/dts/r8a7790-lager.dts | 38 + 1 file changed, 38 insertions(+) diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts index a087421..7528cfc 100644 --- a/arch/arm/boot/dts/r8a7790-lager.dts +++ b/arch/arm/boot/dts/r8a7790-lager.dts @@ -158,6 +158,11 @@ renesas,groups = i2c2; renesas,function = i2c2; }; + + vin1_pins: vin { + renesas,groups = vin1_data8, vin1_clk; + renesas,function = vin1; + }; }; mmcif1 { @@ -239,8 +244,41 @@ status = ok; pinctrl-0 = i2c2_pins; pinctrl-names = default; + + adv7180: adv7180@0x20 { + compatible = adi,adv7180; + reg = 0x20; + remote = vin1; + + port { + adv7180_1: endpoint { + bus-width = 8; + remote-endpoint = vin1ep0; + }; + }; + }; + }; i2c3{ status = ok; }; + +/* composite video input */ +vin1 { + pinctrl-0 = vin1_pins; + pinctrl-names = default; + + status = ok; + + port { + #address-cells = 1; + #size-cells = 0; + + vin1ep0: endpoint { + remote-endpoint = adv7180_1; + bus-width = 8; + }; + }; +}; + -- 1.9.0 -- To unsubscribe from this list: send the line unsubscribe linux-sh 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 1/5] r8a7790.dtsi: add vin[0-3] nodes
On Fri, Mar 07, 2014 at 01:01:35PM +, Ben Dooks wrote: Add nodes for the four video input channels on the R8A7790. Please update the prefix of this subject of this patch to: ARM: shmobile: r8a7790: Signed-off-by: Ben Dooks ben.do...@codethink.co.uk --- arch/arm/boot/dts/r8a7790.dtsi | 32 1 file changed, 32 insertions(+) diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi index a1e7c39..4c3eafb 100644 --- a/arch/arm/boot/dts/r8a7790.dtsi +++ b/arch/arm/boot/dts/r8a7790.dtsi @@ -395,6 +395,38 @@ status = disabled; }; + vin0: vin@0xe6ef { + compatible = renesas,vin-r8a7790; + clocks = mstp8_clks R8A7790_CLK_VIN0; + reg = 0 0xe6ef 0 0x1000; + interrupts = 0 188 IRQ_TYPE_LEVEL_HIGH; + status = disabled; + }; + + vin1: vin@0xe6ef1000 { + compatible = renesas,vin-r8a7790; + clocks = mstp8_clks R8A7790_CLK_VIN1; + reg = 0 0xe6ef1000 0 0x1000; + interrupts = 0 189 IRQ_TYPE_LEVEL_HIGH; + status = disabled; + }; + + vin2: vin@0xe6ef2000 { + compatible = renesas,vin-r8a7790; + clocks = mstp8_clks R8A7790_CLK_VIN2; + reg = 0 0xe6ef2000 0 0x1000; + interrupts = 0 190 IRQ_TYPE_LEVEL_HIGH; + status = disabled; + }; + + vin3: vin@0xe6ef3000 { + compatible = renesas,vin-r8a7790; + clocks = mstp8_clks R8A7790_CLK_VIN3; + reg = 0 0xe6ef3000 0 0x1000; + interrupts = 0 191 IRQ_TYPE_LEVEL_HIGH; + status = disabled; + }; + clocks { #address-cells = 2; #size-cells = 2; -- 1.9.0 -- To unsubscribe from this list: send the line unsubscribe linux-sh 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
cron job: media_tree daily build: ERRORS
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: Thu Mar 13 04:00:15 CET 2014 git branch: test git hash: 8a1edc55c1ec1ff3624c25b4ac6c1ce776d872b8 gcc version:i686-linux-gcc (GCC) 4.8.2 sparse version: 0.4.5-rc1 host hardware: x86_64 host os:3.13-5.slh.4-amd64 linux-git-arm-at91: ERRORS linux-git-arm-davinci: ERRORS linux-git-arm-exynos: ERRORS linux-git-arm-mx: ERRORS linux-git-arm-omap: ERRORS linux-git-arm-omap1: ERRORS linux-git-arm-pxa: ERRORS linux-git-blackfin: OK linux-git-i686: OK linux-git-m32r: OK linux-git-mips: ERRORS linux-git-powerpc64: OK linux-git-sh: OK linux-git-x86_64: OK linux-2.6.31.14-i686: ERRORS linux-2.6.32.27-i686: ERRORS linux-2.6.33.7-i686: ERRORS linux-2.6.34.7-i686: ERRORS linux-2.6.35.9-i686: ERRORS linux-2.6.36.4-i686: ERRORS linux-2.6.37.6-i686: ERRORS linux-2.6.38.8-i686: ERRORS linux-2.6.39.4-i686: ERRORS linux-3.0.60-i686: ERRORS linux-3.1.10-i686: ERRORS linux-3.2.37-i686: ERRORS linux-3.3.8-i686: ERRORS linux-3.4.27-i686: ERRORS linux-3.5.7-i686: ERRORS linux-3.6.11-i686: ERRORS linux-3.7.4-i686: ERRORS linux-3.8-i686: ERRORS linux-3.9.2-i686: OK linux-3.10.1-i686: OK linux-3.11.1-i686: OK linux-3.12-i686: OK linux-3.13-i686: OK linux-3.14-rc1-i686: OK linux-2.6.31.14-x86_64: ERRORS linux-2.6.32.27-x86_64: ERRORS linux-2.6.33.7-x86_64: ERRORS linux-2.6.34.7-x86_64: ERRORS linux-2.6.35.9-x86_64: ERRORS linux-2.6.36.4-x86_64: ERRORS linux-2.6.37.6-x86_64: ERRORS linux-2.6.38.8-x86_64: ERRORS linux-2.6.39.4-x86_64: ERRORS linux-3.0.60-x86_64: ERRORS linux-3.1.10-x86_64: ERRORS linux-3.2.37-x86_64: ERRORS linux-3.3.8-x86_64: ERRORS linux-3.4.27-x86_64: ERRORS linux-3.5.7-x86_64: ERRORS linux-3.6.11-x86_64: ERRORS linux-3.7.4-x86_64: ERRORS linux-3.8-x86_64: ERRORS linux-3.9.2-x86_64: OK linux-3.10.1-x86_64: OK linux-3.11.1-x86_64: OK linux-3.12-x86_64: OK linux-3.13-x86_64: OK linux-3.14-rc1-x86_64: OK apps: OK spec-git: OK ABI WARNING: change for arm-at91 ABI WARNING: change for arm-davinci ABI WARNING: change for arm-exynos ABI WARNING: change for arm-mx ABI WARNING: change for arm-omap ABI WARNING: change for arm-omap1 ABI WARNING: change for arm-pxa ABI WARNING: change for blackfin ABI WARNING: change for i686 ABI WARNING: change for m32r ABI WARNING: change for mips ABI WARNING: change for powerpc64 ABI WARNING: change for sh ABI WARNING: change for x86_64 sparse version: 0.4.5-rc1 sparse: ERRORS Detailed results are available here: http://www.xs4all.nl/~hverkuil/logs/Thursday.log Full logs are available here: http://www.xs4all.nl/~hverkuil/logs/Thursday.tar.bz2 The Media Infrastructure API 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