Re: [PATCH V2 2/2] dt-bindings: Document the Rockchip RK1608 bindings
Hi Sakari, Thanks for your advice, i'll revise it. Hi Wen, On Mon, Feb 26, 2018 at 04:25:04PM +0800, Wen Nuan wrote: From: Leo Wen <leo@rock-chips.com> Add DT bindings documentation for Rockchip RK1608. Changes V2: - Delete spi-min-frequency property. - Add the external sensor's control pin and clock properties. - Delete the '' node. Signed-off-by: Leo Wen <leo@rock-chips.com> --- Documentation/devicetree/bindings/media/rk1608.txt | 97 ++ MAINTAINERS| 1 + 2 files changed, 98 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/rk1608.txt diff --git a/Documentation/devicetree/bindings/media/rk1608.txt b/Documentation/devicetree/bindings/media/rk1608.txt new file mode 100644 index 000..a9721a8 --- /dev/null +++ b/Documentation/devicetree/bindings/media/rk1608.txt @@ -0,0 +1,97 @@ +Rockchip RK1608 as a PreISP to link on Soc +-- + +Required properties: + +- compatible : "rockchip,rk1608"; +- reg : SPI slave address of the rk1608; +- clocks : Must contain an entry for each entry in clock-names; +- clock-names : Must contain "mclk" for the device's master clock; +- reset-gpio : GPIO connected to reset pin; +- irq-gpio : GPIO connected to irq pin; +- sleepst-gpio : GPIO connected to sleepst pin; +- wakeup-gpio : GPIO connected to wakeup pin; +- powerdown-gpio : GPIO connected to powerdown pin; +- rockchip,powerdown0 : GPIO connected to the sensor0's powerdown pin; +- rockchip,reset0 : GPIO connected to the sensor0's reset pin; +- rockchip,powerdown1 : GPIO connected to the sensor1's powerdown pin; +- rockchip,reset1 : GPIO connected to the sensor1's reset pin; Aren't these sensor's properties and not related to the ISP? There not related to the ISP, just connected to the external sensor0/1. +- pinctrl-names: Should contain only one value - "default"; +- pinctrl-0: Pin control group to be used for this controller; + +Optional properties: + +- spi-max-frequency: Maximum SPI clocking speed of the device; + +The device node should contain one 'port' child node with one child 'endpoint' +node, according to the bindings defined in Documentation/devicetree/bindings/ +media/video-interfaces.txt. The following are properties specific to those +nodes. + +endpoint node +- + +- data-lanes : (optional) specifies MIPI CSI-2 data lanes as covered in + video-interfaces.txt. If present it should be <1> - the device + supports only one data lane without re-mapping. + +Note1: Since no data is generated in RK1608,so this is meaningful that you need +a extra sensor (such as a camera) mounted on RK1608. You need to use endpoint@x +to match these sensors. + +Note2:You must set the current value of the spi pins to be 8mA, if they are not. + +Example: + { + status = "okay"; + spi_rk1608@00 { + compatible = "rockchip,rk1608"; + status = "okay"; + reg = <0>; + spi-max-frequency = <2400>; + link-freqs = /bits/ 64 <4>; + clocks = < SCLK_SPI0>, < SCLK_VIP_OUT>, + < DCLK_VOP0>, < ACLK_VIP>, < HCLK_VIP>, + < PCLK_ISP_IN>, < PCLK_ISP_IN>, + < PCLK_ISP_IN>, < SCLK_MIPIDSI_24M>, + < PCLK_MIPI_CSI>; + clock-names = "mclk", "mipi_clk", "pd_cif", "aclk_cif", + "hclk_cif", "cif0_in", "g_pclkin_cif", + "cif0_out", "clk_mipi_24m", "hclk_mipiphy"; + reset-gpio = < 0 GPIO_ACTIVE_HIGH>; + irq-gpio = < 2 GPIO_ACTIVE_HIGH>; + sleepst-gpio = < 1 GPIO_ACTIVE_HIGH>; + wakeup-gpio = < 4 GPIO_ACTIVE_HIGH>; + powerdown-gpio = < 0 GPIO_ACTIVE_HIGH>; + + rockchip,powerdown1 = < 9 GPIO_ACTIVE_HIGH>; + rockchip,reset1 = < 8 GPIO_ACTIVE_HIGH>; + + rockchip,powerdown0 = < 8 GPIO_ACTIVE_HIGH>; + rockchip,reset0 = < 7 GPIO_ACTIVE_HIGH>; + + pinctrl-names = "default"; + pinctrl-0 = <_irq_gpios _wake_gpios +_sleep_gpios>; + + port@0 { + mipi_dphy_out: endpoint { + remote-endpoint = <_dphy_in>; + clock-lanes = <0>; + data-lanes = <1 2 3 4>; + c
[PATCH 0/2] Rockchip: Add rk1608 driver and DT-bindings
For RK1608 driver ,you can use the v4l2-ctl command to capture frames. Add DT bindings documentation for Rockchip RK1608. Add the information of the maintainer. Leo Wen (2): [media] Add Rockchip RK1608 driver dt-bindings: Document the Rockchip RK1608 bindings Documentation/devicetree/bindings/media/rk1608.txt | 143 +++ MAINTAINERS|7 + drivers/media/spi/Makefile |1 + drivers/media/spi/rk1608.c | 1165 drivers/media/spi/rk1608.h | 366 ++ 5 files changed, 1682 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/rk1608.txt create mode 100644 drivers/media/spi/rk1608.c create mode 100644 drivers/media/spi/rk1608.h -- 2.7.4
[PATCH 2/2] dt-bindings: Document the Rockchip RK1608 bindings
Add DT bindings documentation for Rockchip RK1608. Signed-off-by: Leo Wen <leo@rock-chips.com> --- Documentation/devicetree/bindings/media/rk1608.txt | 143 + MAINTAINERS| 1 + 2 files changed, 144 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/rk1608.txt diff --git a/Documentation/devicetree/bindings/media/rk1608.txt b/Documentation/devicetree/bindings/media/rk1608.txt new file mode 100644 index 000..bda5cdb --- /dev/null +++ b/Documentation/devicetree/bindings/media/rk1608.txt @@ -0,0 +1,143 @@ +Rockchip RK1608 as a PreISP to link on Soc +-- + +Required properties: + +- compatible : "rockchip,rk1608"; +- reg : SPI slave address of the rk1608; +- clocks : Must contain an entry for each entry in clock-names; +- clock-names: Must contain "mclk" for the device's master clock; +- reset-gpio : GPIO connected to reset pin; +- irq-gpio: GPIO connected to irq pin; +- sleepst-gpio: GPIO connected to sleepst pin; +- wakeup-gpio : GPIO connected to wakeup pin; +- powerdown-gpio : GPIO connected to powerdown pin; +- pinctrl-names : Should contain only one value - "default"; +- pinctrl-0 : Pin control group to be used for this controller; + +Optional properties: + +- spi-max-frequency: Maximum SPI clocking speed of the device; + (for RK1608) +- spi-min-frequency: Minimum SPI clocking speed of the device; + (for RK1608) + +The device node should contain one 'port' child node with one child 'endpoint' +node, according to the bindings defined in Documentation/devicetree/bindings/ +media/video-interfaces.txt. The following are properties specific to those +nodes. + +endpoint node +- + +- data-lanes : (optional) specifies MIPI CSI-2 data lanes as covered in + video-interfaces.txt. If present it should be <1> - the device + supports only one data lane without re-mapping. + +Note1: Since no data is generated in RK1608,so this is meaningful that you need +a extra sensor (such as a camera) mounted on RK1608. You need to use endpoint@x +to match these sensors. + +Note2:You must set the current value of the spi pins to be 8mA, if they are not. + +Example: + + { + status = "okay"; + + spi_rk1608@00 { + compatible = "rockchip,rk1608"; + reg = <0>; + status = "okay"; + spi-max-frequency = <2400>; + spi-min-frequency = <1200>; + clocks = < SCLK_SPI0>; + clock-names = "mclk"; + + reset-gpio = < 0 GPIO_ACTIVE_HIGH>; + irq-gpio = < 2 GPIO_ACTIVE_HIGH>; + sleepst-gpio = < 1 GPIO_ACTIVE_HIGH>; + wakeup-gpio = < 4 GPIO_ACTIVE_HIGH>; + powerdown-gpio = < 0 GPIO_ACTIVE_HIGH>; + + pinctrl-names = "default"; + pinctrl-0 = <_irq_gpios _wake_gpios +_sleep_gpios>; + + port { + isp_mipi_out: endpoint { + remote-endpoint = <_mipi_in>; + data-lanes = <1>; + }; + /*Example: we have two cameras*/ + sensor_in0: endpoint@0 { + remote-endpoint = <>; + }; + + sensor_in1: endpoint@1 { + remote-endpoint = <>; + }; + }; + }; +}; + +_phy_rx0 { + bus-width = <2>; + status = "okay"; + + port { + isp_mipi_in: endpoint { + remote-endpoint = <_mipi_out>; + data-lanes = <1>; + link-frequencies = + /bits/ 64 <10>; + }; + }; +}; + + { + rk1608_irq_gpios { + rk1608_irq_gpios: rk1608_irq_gpios { + rockchip,pins = <6 2 RK_FUNC_GPIO _pull_none>; + rockchip,pull = <1>; + }; + }; + + rk1608_wake_gpios { + rk1608_wake_gpios: rk1608_wake_gpios { + rockchip,pins = <6 4 RK_FUNC_GPIO _pull_none>; + rockchip,pull = <1>; + }; + }; + + rk1608_sleep_gpios { + rk1608_sleep_gpios: rk1608_sleep_gpios { + rockchip,pins = <6 1 RK_FUNC_GPIO _pull_none>; + rockchip,pull = <1>; +
[PATCH 1/2] [media] Add Rockchip RK1608 driver
Rk1608 is used as a PreISP to link on Soc, which mainly has two functions. One is to download the firmware of RK1608, and the other is to match the extra sensor such as camera and enable sensor by calling sensor's s_power. use below v4l2-ctl command to capture frames. v4l2-ctl --verbose -d /dev/video1 --stream-mmap=2 --stream-to=/tmp/stream.out --stream-count=60 --stream-poll use below command to playback the video on your PC. mplayer ./stream.out -loop 0 -demuxer rawvideo -rawvideo w=640:h=480:size=$((640*480*3/2)):format=NV12 Signed-off-by: Leo Wen <leo@rock-chips.com> --- MAINTAINERS|6 + drivers/media/spi/Makefile |1 + drivers/media/spi/rk1608.c | 1165 drivers/media/spi/rk1608.h | 366 ++ 4 files changed, 1538 insertions(+) create mode 100644 drivers/media/spi/rk1608.c create mode 100644 drivers/media/spi/rk1608.h diff --git a/MAINTAINERS b/MAINTAINERS index 82ad0ea..48235d8 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -128,6 +128,12 @@ Maintainers List (try to look for most precise areas first) --- +ROCKCHIP RK1608 DRIVER +M: Leo Wen <leo@rock-chips.com> +S: Maintained +F: drivers/media/platform/spi/rk1608.c +F: drivers/media/platform/spi/rk1608.h + 3C59X NETWORK DRIVER M: Steffen Klassert <klass...@mathematik.tu-chemnitz.de> L: net...@vger.kernel.org diff --git a/drivers/media/spi/Makefile b/drivers/media/spi/Makefile index ea64013..9d9d9ec 100644 --- a/drivers/media/spi/Makefile +++ b/drivers/media/spi/Makefile @@ -1 +1,2 @@ obj-$(CONFIG_VIDEO_GS1662) += gs1662.o +obj-$(CONFIG_ROCKCHIP_RK1608) += rk1608.o diff --git a/drivers/media/spi/rk1608.c b/drivers/media/spi/rk1608.c new file mode 100644 index 000..e646204 --- /dev/null +++ b/drivers/media/spi/rk1608.c @@ -0,0 +1,1165 @@ +/** + * Rockchip rk1608 driver + * + * Copyright (C) 2017 Rockchip Electronics Co., Ltd. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU + * General Public License (GPL) Version 2, available from the file + * COPYING in the main directory of this source tree, or the + * OpenIB.org BSD license below: + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above + *copyright notice, this list of conditions and the following + *disclaimer. + * + * - Redistributions in binary form must reproduce the above + *copyright notice, this list of conditions and the following + *disclaimer in the documentation and/or other materials + *provided with the distribution. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "rk1608.h" + +/** + * Rk1608 is used as the Pre-ISP to link on Soc, which mainly has two + * functions. One is to download the firmware of RK1608, and the other + * is to match the extra sensor such as camera and enable sensor by + * calling sensor's s_power. + * |---| + * | Sensor Camera | + * |---| + * |---||--| + * |---||--| + * |---\/--| + * | Pre-ISP RK1608| + * |---| + * |---||--| + * |---||--| + * |---\/--| + * | Rockchip Soc | + * |---| + * Data Transfer As shown above. In RK1608, the data received from the + * extra sensor,and it is passed to the Soc through ISP. + */ +struct rk1608_state { + struct v4l2_subdev sd; + struct v4l2_subdev *sensor_sd; + struct device *dev; + struct spi_device *spi; + struct media_padpad; + struct clk *mclk; + struct mutexlock; /* protect resource */ + struct mutexsensor_lock;/* protect sensor */ + struct mutexsend_msg_lock; /* protect msg */ + int power_count; + int reset_gpio; + int reset_active; + int irq_gpio; + int irq;
[PATCH] Staging: media: davinci_vpfe: fix indentation issue in vpfe_video.c
This is a patch to the vpfe_video.c file that fixes an indentation warning reported by checkpatch.pl Signed-off-by: Leo Sperling <leosperlin...@gmail.com> --- drivers/staging/media/davinci_vpfe/vpfe_video.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/media/davinci_vpfe/vpfe_video.c b/drivers/staging/media/davinci_vpfe/vpfe_video.c index 8be9f85..c34bf46 100644 --- a/drivers/staging/media/davinci_vpfe/vpfe_video.c +++ b/drivers/staging/media/davinci_vpfe/vpfe_video.c @@ -1143,8 +1143,8 @@ static int vpfe_buffer_prepare(struct vb2_buffer *vb) /* Initialize buffer */ vb2_set_plane_payload(vb, 0, video->fmt.fmt.pix.sizeimage); if (vb2_plane_vaddr(vb, 0) && - vb2_get_plane_payload(vb, 0) > vb2_plane_size(vb, 0)) - return -EINVAL; + vb2_get_plane_payload(vb, 0) > vb2_plane_size(vb, 0)) + return -EINVAL; addr = vb2_dma_contig_plane_dma_addr(vb, 0); /* Make sure user addresses are aligned to 32 bytes */ -- 2.1.4 -- 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] [media] hdpvr: Simplify the logic that checks for error
Hi Hans, Passing on the actual error code was intentional. My main goal was to give user space ability to distinguish between the no-lock and usb failure conditions. HDPVR firmware instability usually manifests itself as a usb failure, and passing the error code on gives the application ability, for example to use this device (https://sites.google.com/site/hdpvrkillerdevice/) as soon as firmware crash is detected and not loose the recording. Unfortunately today because of inability to see the usb failures the failed recording is only detected by the zero-length file after it's too late... If you remember I did a some research and testing with MythTV (email from Apr 17): *** ...I checked MythTV function that is monitoring video signal (AnalogSignalMonitor::handleHDPVR() in analogsignalmonitor.cpp). Please see below that the no-signal condition is checked as both - the ioctl failure and pix.width is equal to 0: if ((ioctl(videofd, VIDIOC_G_FMT, vfmt) == 0) vfmt.fmt.pix.width ... Then I tested MythTV for no-signal condition in two cases: 1. Loosing signal during live preview. 2. Trying to enter preview with no signal. Both cases showed the same behavior as with the current driver... *** So based on this, returning the actual error code will NOT break MythTV logic, it still will handle it as a no-lock condition. One thing I have not done though is I did not contact MythTV to confirm the above conclusions, but I wouldn't mind if that would help to shift the decision... Everything else in the patches looks good to me! Best regards, -Leo. Original Message Subject: Re: [PATCH] [media] hdpvr: Simplify the logic that checks for error From: Hans Verkuil hverk...@xs4all.nl Date: Mon, May 27, 2013 11:58 pm To: Mauro Carvalho Chehab mche...@redhat.com Cc: Linux Media Mailing List linux-media@vger.kernel.org, l...@lumanate.com On Mon May 27 2013 14:04:29 Mauro Carvalho Chehab wrote: At get_video_info, there's a somewhat complex logic that checks for error. That logic can be highly simplified, as usb_control_msg will only return a negative value, or the buffer length, as it does the transfers via DMA. While here, document why this particular driver is returning -EFAULT, instead of the USB error code. Nacked-by: Hans Verkuil hans.verk...@cisco.com The EFAULT comment is wrong. The way it is done today is that the error return of this function is never passed on to userspace. It's getting messy, so I think it is best if I make two patches based on this patch and on Leo's fourth patch and post those. If everyone agrees on my solution, then they can be merged. Sorry Leo, I wasn't aware when we discussed the usb_control_msg return values before that usb_control_msg() will either return an error or the buffer length, and nothing else. Your fourth patch introduced some bugs which I hadn't realized until yesterday. Which is why it wasn't merged. The main problem with your fourth patch was that it passed on the get_video_info error code to userspace, but that error code was for internal use only, and -EFAULT is an inappropriate error code to pass on. Regards, Hans Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com --- drivers/media/usb/hdpvr/hdpvr-control.c | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/drivers/media/usb/hdpvr/hdpvr-control.c b/drivers/media/usb/hdpvr/hdpvr-control.c index d1a3d84..a015a24 100644 --- a/drivers/media/usb/hdpvr/hdpvr-control.c +++ b/drivers/media/usb/hdpvr/hdpvr-control.c @@ -56,12 +56,6 @@ int get_video_info(struct hdpvr_device *dev, struct hdpvr_video_info *vidinf) 0x1400, 0x0003, dev-usbc_buf, 5, 1000); - if (ret == 5) { - vidinf-width = dev-usbc_buf[1] 8 | dev-usbc_buf[0]; - vidinf-height = dev-usbc_buf[3] 8 | dev-usbc_buf[2]; - vidinf-fps = dev-usbc_buf[4]; - } - #ifdef HDPVR_DEBUG if (hdpvr_debug MSG_INFO) { char print_buf[15]; @@ -73,11 +67,20 @@ int get_video_info(struct hdpvr_device *dev, struct hdpvr_video_info *vidinf) #endif mutex_unlock(dev-usbc_mutex); - if (ret 0 ret != 5) { /* fail if unexpected byte count returned */ - ret = -EFAULT; - } + /* + * Returning EFAULT is wrong. Unfortunately, MythTV hdpvr + * handling code was written to expect this specific error, + * instead of accepting any error code. So, we can't fix it + * in Kernel without breaking userspace. + */ + if (ret 0) + return -EFAULT; - return ret 0 ? ret : 0; + vidinf-width = dev-usbc_buf[1] 8 | dev-usbc_buf[0]; + vidinf-height = dev-usbc_buf[3] 8 | dev-usbc_buf[2]; + vidinf-fps = dev-usbc_buf[4]; + + return 0; } int get_input_lines_info(struct hdpvr_device *dev) -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line unsubscribe linux-media
RE: [PATCH] [media] hdpvr: Disable IR receiver by default.
Hans, Jeff, Yes, the FW instability is a known issue. It's not just the IR polling. For example frequent polling for video lock will cause FW crash as well. In windows driver there's a workaround for this issue - all USB calls are serialized and surrounded by small delays which makes HDPVR fairly stable. In fact, I implemented this same workaround on Linux driver about a month ago but stashed it due to lack of free time. If somebody is interested and willing to test - I can provide a patch. To answer the following email from Jeff - as far as I know HDPVR firmware was released by Ambarella as a binary image only. Best regards, -Leo. Original Message Subject: Re: [PATCH] [media] hdpvr: Disable IR receiver by default. From: Hans Verkuil hverk...@xs4all.nl Date: Thu, May 23, 2013 1:41 am To: Leonid Kegulskiy l...@lumanate.com Cc: Jeff Hansen x...@jeffhansen.com, linux-media@vger.kernel.org, Mauro Carvalho Chehab mche...@redhat.com On Tue 14 May 2013 06:44:19 Jeff Hansen wrote: All of the firmwares I've tested, including 0x1e, will inevitably crash before recording for even 10 minutes. There must be a race condition of IR RX vs. video-encoding in the firmware, because if you disable IR receiver polling, then the firmware is stable again. I'd guess that most people don't use this feature anyway, so we might as well disable it by default, and warn them that it might be unstable until Hauppauge fixes it in a future firmware. Leonid, have you ever seen this? Can you verify that this happens for you as well? Regards, Hans Signed-off-by: Jeff Hansen x...@jeffhansen.com --- drivers/media/usb/hdpvr/hdpvr-core.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/media/usb/hdpvr/hdpvr-core.c b/drivers/media/usb/hdpvr/hdpvr-core.c index 8247c19..3e80202 100644 --- a/drivers/media/usb/hdpvr/hdpvr-core.c +++ b/drivers/media/usb/hdpvr/hdpvr-core.c @@ -53,6 +53,10 @@ static bool boost_audio; module_param(boost_audio, bool, S_IRUGO|S_IWUSR); MODULE_PARM_DESC(boost_audio, boost the audio signal); +int ir_rx_enable; +module_param(ir_rx_enable, int, S_IRUGO|S_IWUSR); +MODULE_PARM_DESC(ir_rx_enable, Enable HDPVR IR receiver (firmware may be unstable)); + /* table of devices that work with this driver */ static struct usb_device_id hdpvr_table[] = { @@ -394,11 +398,13 @@ static int hdpvr_probe(struct usb_interface *interface, goto error; } - client = hdpvr_register_ir_rx_i2c(dev); - if (!client) { - v4l2_err(dev-v4l2_dev, i2c IR RX device register failed\n); - retval = -ENODEV; - goto reg_fail; + if (ir_rx_enable) { + client = hdpvr_register_ir_rx_i2c(dev); + if (!client) { + v4l2_err(dev-v4l2_dev, i2c IR RX device register failed\n); + retval = -ENODEV; + goto reg_fail; + } } client = hdpvr_register_ir_tx_i2c(dev); -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [REVIEWv2 PATCH 12/12] hdpvr: allow g/s_std when in legacy mode.
Hans, The current HEAD is working for both MythTV and gstreamer! Will you be doing more work on hdpvr? Should I start looking into error handling and kmallocs? Thank you, -Leo. Original Message Subject: Re: [REVIEWv2 PATCH 12/12] hdpvr: allow g/s_std when in legacy mode. From: Hans Verkuil hansv...@cisco.com Date: Wed, April 10, 2013 10:25 am To: linux-media@vger.kernel.org Cc: l...@lumanate.com, Janne Grunau j...@jannau.net, Hans Verkuil hans.verk...@cisco.com On Wed April 10 2013 18:27:43 Hans Verkuil wrote: Leo, can you verify that this works for you as well? I tested it without problems with MythTV and gstreamer. Thanks! Hans Both MythTV and gstreamer expect that they can set/get/query/enumerate the standards, even if the input is the component input for which standards really do not apply. Signed-off-by: Hans Verkuil hans.verk...@cisco.com --- drivers/media/usb/hdpvr/hdpvr-video.c | 40 - 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/drivers/media/usb/hdpvr/hdpvr-video.c b/drivers/media/usb/hdpvr/hdpvr-video.c index 4376309..38724d7 100644 --- a/drivers/media/usb/hdpvr/hdpvr-video.c +++ b/drivers/media/usb/hdpvr/hdpvr-video.c -static int vidioc_enum_input(struct file *file, void *priv, - struct v4l2_input *i) +static int vidioc_enum_input(struct file *file, void *_fh, struct v4l2_input *i) { + struct hdpvr_fh *fh = _fh; unsigned int n; n = i-index; @@ -758,13 +761,15 @@ static int vidioc_enum_input(struct file *file, void *priv, i-audioset = 1HDPVR_RCA_FRONT | 1HDPVR_RCA_BACK | 1HDPVR_SPDIF; + if (fh-legacy_mode) + n = 1; Oops, these two lines should be removed. Otherwise non-legacy apps like qv4l2 will break as they rely on accurate capability reporting. i-capabilities = n ? V4L2_IN_CAP_STD : V4L2_IN_CAP_DV_TIMINGS; i-std = n ? V4L2_STD_ALL : 0; return 0; } 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 -- 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
./build --main-git failed
Dear linux-media, I'm getting a fatal error with the ./build --main-git command (see log below). Please help! Thank you, -Leo. leo@ubaduba:~/ltv3$ git clone git://linuxtv.org/media_build.git Cloning into 'media_build'... remote: Counting objects: 1859, done. remote: Compressing objects: 100% (567/567), done. remote: Total 1859 (delta 1259), reused 1846 (delta 1253) Receiving objects: 100% (1859/1859), 426.07 KiB | 216 KiB/s, done. Resolving deltas: 100% (1259/1259), done. leo@ubaduba:~/ltv3$ cd media_build/ leo@ubaduba:~/ltv3/media_build$ ./build --main-git --verbose Checking if the needed tools for Ubuntu 12.10 are available Needed package dependencies are met. * building git://linuxtv.org/media_tree.git git tree * * All drivers and build system are under GPLv2 License * * Firmware files are under the license terms found at: * * http://www.linuxtv.org/downloads/firmware/ * * Please abort if you don't agree with the license * Getting the latest Kernel tree. This will take some time Cloning into 'media'... remote: Counting objects: 2938065, done. remote: Compressing objects: 100% (455617/455617), done. Receiving objects: 100% (2938065/2938065), 607.66 MiB | 1.63 MiB/s, done. remote: Total 2938065 (delta 2468257), reused 2924194 (delta 2454627) Resolving deltas: 100% (2468257/2468257), done. Checking out files: 100% (42425/42425), done. $ git --git-dir media/.git remote adding remote r_media_tree to track git://linuxtv.org/media_tree.git, staging/for_v3.9 $ git --git-dir media/.git remote add r_media_tree git://linuxtv.org/media_tree.git staging/for_v3.9 updating remote media_tree Fetching r_media_tree remote: Counting objects: 1847, done. remote: Compressing objects: 100% (617/617), done. remote: Total 1549 (delta 1376), reused 1044 (delta 932) Receiving objects: 100% (1549/1549), 229.24 KiB | 116 KiB/s, done. Resolving deltas: 100% (1376/1376), completed with 211 local objects. From git://linuxtv.org/media_tree * [new branch] master - r_media_tree/master * [new branch] origin - r_media_tree/origin * [new tag] staging/for_v2.6.37-rc1 - staging/for_v2.6.37-rc1 * [new tag] staging/for_v3.3 - staging/for_v3.3 * [new tag] staging/for_v3.5 - staging/for_v3.5 * [new tag] staging/for_v3.6 - staging/for_v3.6 * [new tag] staging/for_v3.7 - staging/for_v3.7 * [new tag] staging/for_v3.8 - staging/for_v3.8 * [new tag] staging/for_v3.9 - staging/for_v3.9 * [new tag] staging/v2.6.35 - staging/v2.6.35 creating a local branch media_tree $ git --git-dir media/.git branch $ (cd media; git checkout -b media_tree/staging/for_v3.9 remotes/r_media_tree/staging/for_v3.9) fatal: git checkout: updating paths is incompatible with switching branches. Did you intend to checkout 'remotes/r_media_tree/staging/for_v3.9' which can not be resolved as commit? Can't create local branch media_tree at ./build line 405. -- 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
AVerTV Hybrid Volar HD
I just did something stupid and bought this USB device, which according to AVerMedia has no Linux driver and no planned support. Other than trying to sell this on eBay, is there a way of getting this to work? I have searched the archives and google, but cannot find any reference to this device as its just been released. I don't need support for the remote, I just want to use MythTV I'm running 64Bit Ubuntu Karmic with kernel 2.6.31-21-generic lsusb lists the device as 07ca:0830 Thanks for your help Leo -- 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
inquiry about Creative WebCam Live!, model vf0330
Hi, 1. I've just installed Fedora 12, anticipating that my WebCam will finally work under linux. It does not. Perhaps it was not included in the list of WebCams for FC12. 2. Sorry that my qualification does not suffice to use the ov51x JPEG driver from http://www.rastageeks.org/ov51x-jpeg/index.php/Main_Page 3. Another option, I downloaded a window installer for vf0330: WCVI_0330_PCDrv_US_1_11_01.exe hoping to run it with wine (rund Wionows apps under linux). Any advice would be greatly appreciated. All in all Fedora 12 runs smoothly, beyond of my WebCam vf0330. Thanks. Leo PS This WebCam runs all right with Windows PC. So it is not broken. L. -- 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