Re: [PATCH] v4l2-ctrls: avoid a sparse complain due to __user ptr
On 09/04/2014 01:19 AM, Mauro Carvalho Chehab wrote: c-ptr was already copied to Kernelspace. So, this sparse warning is bogus: drivers/media/v4l2-core/v4l2-ctrls.c:1685:15: sparse: incorrect type in assignment (different address spaces) drivers/media/v4l2-core/v4l2-ctrls.c:1685:15:expected void *[assigned] p drivers/media/v4l2-core/v4l2-ctrls.c:1685:15:got void [noderef] asn:1*ptr Reported-by: kbuild test robot fengguang...@intel.com Signed-off-by: Mauro Carvalho Chehab m.che...@samsung.com Nacked-by: Hans Verkuil hans.verk...@cisco.com Unfortunately, c-ptr can be a true user pointer. For once, this sparse warning points to a real bug. It's not that easy to fix and I will need to think some more how this should be handled. Regards, Hans diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c index 35d1f3d5045b..ed10e4a9318c 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls.c +++ b/drivers/media/v4l2-core/v4l2-ctrls.c @@ -1682,7 +1682,7 @@ static int validate_new(const struct v4l2_ctrl *ctrl, break; } } - ptr.p = c-ptr; + ptr.p = (__force void *)c-ptr; for (idx = 0; !err idx c-size / ctrl-elem_size; idx++) err = ctrl-type_ops-validate(ctrl, idx, ptr); return err; -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 16/46] [media] smiapp-core: use true/false for boolean vars
On Wed, Sep 03, 2014 at 05:32:48PM -0300, Mauro Carvalho Chehab wrote: Instead of using 0 or 1 for boolean, use the true/false defines. Signed-off-by: Mauro Carvalho Chehab m.che...@samsung.com Thanks! Acked-by: Sakari Ailus sakari.ai...@linux.intel.com Would you like me to pick this patch to my tree, or would you like to apply it directly? I'm fine with either. -- Kind regards, Sakari Ailus e-mail: sakari.ai...@iki.fi XMPP: sai...@retiisi.org.uk -- 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 28/46] [media] lm3560: simplify boolean tests
On Wed, Sep 03, 2014 at 05:33:00PM -0300, Mauro Carvalho Chehab wrote: Instead of using if (on == true), just use if (on). That allows a faster mental parsing when analyzing the code. Signed-off-by: Mauro Carvalho Chehab m.che...@samsung.com Acked-by: Sakari Ailus sakari.ai...@linux.intel.com -- Sakari Ailus e-mail: sakari.ai...@iki.fi XMPP: sai...@retiisi.org.uk -- 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] fix enum_fmt for s5p-mfc
The patch remove the non-multiplanar api for enum_fmt in s5p-mfc. Now enum_fmt in the driver will only work with multiplanar. I think it is a bug, hverkuil think it is too. so I made this patch. Actually gstreamer doesn't care about it, it will merge the result from non-multiplanar and multiplanar. ayaka (1): media: fix enum_fmt for s5p-mfc drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 24 +++- drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 24 +++- 2 files changed, 6 insertions(+), 42 deletions(-) -- 1.9.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
[PATCH] [media] videobuf-dma-contig: replace vm_iomap_memory() with remap_pfn_range().
When user requests V4L2_MEMORY_MMAP type buffers, the videobuf-core will assign the corresponding offset to the 'boff' field of the videobuf_buffer for each requested buffer sequentially. Later, user may call mmap() to map one or all of the buffers with the 'offset' parameter which is equal to its 'boff' value. Obviously, the 'offset' value is only used to find the matched buffer instead of to be the real offset from the buffer's physical start address as used by vm_iomap_memory(). So, in some case that if the offset is not zero, vm_iomap_memory() will fail. Signed-off-by: Fancy Fang chen.f...@freescale.com --- drivers/media/v4l2-core/videobuf-dma-contig.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/v4l2-core/videobuf-dma-contig.c b/drivers/media/v4l2-core/videobuf-dma-contig.c index bf80f0f..8bd9889 100644 --- a/drivers/media/v4l2-core/videobuf-dma-contig.c +++ b/drivers/media/v4l2-core/videobuf-dma-contig.c @@ -305,7 +305,9 @@ static int __videobuf_mmap_mapper(struct videobuf_queue *q, /* Try to remap memory */ size = vma-vm_end - vma-vm_start; vma-vm_page_prot = pgprot_noncached(vma-vm_page_prot); - retval = vm_iomap_memory(vma, mem-dma_handle, size); + retval = remap_pfn_range(vma, vma-vm_start, +mem-dma_handle PAGE_SHIFT, +size, vma-vm_page_prot); if (retval) { dev_err(q-dev, mmap: remap failed with error %d. , retval); -- 1.9.1 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch] [media] staging: lirc: freeing ERR_PTRs
We call kfree(data_buf) in the error handling and that will oops if this is an error pointer. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/staging/media/lirc/lirc_imon.c b/drivers/staging/media/lirc/lirc_imon.c index 96c76b3..5441f40 100644 --- a/drivers/staging/media/lirc/lirc_imon.c +++ b/drivers/staging/media/lirc/lirc_imon.c @@ -414,6 +414,7 @@ static ssize_t vfd_write(struct file *file, const char __user *buf, data_buf = memdup_user(buf, n_bytes); if (IS_ERR(data_buf)) { retval = PTR_ERR(data_buf); + data_buf = NULL; goto exit; } diff --git a/drivers/staging/media/lirc/lirc_sasem.c b/drivers/staging/media/lirc/lirc_sasem.c index 81f90e1..c32e296 100644 --- a/drivers/staging/media/lirc/lirc_sasem.c +++ b/drivers/staging/media/lirc/lirc_sasem.c @@ -392,6 +392,7 @@ static ssize_t vfd_write(struct file *file, const char __user *buf, data_buf = memdup_user((void const __user *)buf, n_bytes); if (IS_ERR(data_buf)) { retval = PTR_ERR(data_buf); + data_buf = NULL; goto exit; } -- 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
Webcam problem
Hello, I’ve recently noticed a problem with Modecom Venus and A4Tech PK-333E webcams. Both can be put into a “bad state” in which they refuse to do anything until they’re reconnected to the usb port. The test case is simple: gst-launch-1.0 v4l2src ! videoconvert ! autovideosink Setting pipeline to PAUSED ... Pipeline is live and does not need PREROLL ... Setting pipeline to PLAYING ... New clock: GstSystemClock eKilled gst-launch-1.0 v4l2src ! videoconvert ! autovideosink Setting pipeline to PAUSED ... Pipeline is live and does not need PREROLL ... Setting pipeline to PLAYING ... New clock: GstSystemClock ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Could not read from resource. Additional debug info: gstv4l2bufferpool.c(994): gst_v4l2_buffer_pool_poll (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: poll error 1: Invalid argument (22) Execution ended after 0:00:00.046823946 Setting pipeline to PAUSED ... Setting pipeline to READY ... Setting pipeline to NULL ... Freeing pipeline ... The GStreamer process has to be killed with the -9: kill -9 `pidof gst-launch-1.0` The dmesg log shows this: [88000.804362] usb 3-3: new high-speed USB device number 4 using xhci_hcd [88000.864107] usb 3-3: New USB device found, idVendor=0ac8, idProduct=3460 [88000.864113] usb 3-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [88000.864116] usb 3-3: Product: Venus USB2.0 Camera [88000.864118] usb 3-3: Manufacturer: Vimicro Corp. [88000.865088] uvcvideo: Found UVC 1.00 device Venus USB2.0 Camera (0ac8:3460) [88000.866783] input: Venus USB2.0 Camera as /devices/pci:00/:00:14.0/usb3/3-3/3-3:1.0/input/input16 [88024.007404] uvcvideo: Failed to query (GET_DEF) UVC control 2 on unit 2: -110 (exp. 2). [88024.307041] uvcvideo: Failed to query (GET_DEF) UVC control 2 on unit 2: -110 (exp. 2). [88025.837884] uvcvideo: Failed to set UVC probe control : -32 (exp. 26). [88030.830854] uvcvideo: Failed to set UVC probe control : -110 (exp. 26). [88035.824615] uvcvideo: Failed to set UVC probe control : -110 (exp. 26). [88040.818399] uvcvideo: Failed to set UVC probe control : -110 (exp. 26). [88045.812171] uvcvideo: Failed to set UVC probe control : -110 (exp. 26). [88050.805941] uvcvideo: Failed to set UVC probe control : -110 (exp. 26). [88088.249967] xhci_hcd :00:14.0: Signal while waiting for configure endpoint command [88088.25] usb 3-3: Not enough bandwidth for altsetting 0 [88090.907927] xhci_hcd :00:14.0: ERROR Transfer event for disabled endpoint or incorrect stream ring [88090.907940] xhci_hcd :00:14.0: @000115c5f460 0c00 03058000 [88091.021791] xhci_hcd :00:14.0: xHCI xhci_drop_endpoint called with disabled ep 88006b0fa540 [88091.021797] xhci_hcd :00:14.0: Trying to add endpoint 0x82 without dropping it. [88091.021802] usb 3-3: Not enough bandwidth for altsetting 7 [88091.021805] xhci_hcd :00:14.0: xHCI xhci_drop_endpoint called with disabled ep 88006b0fa540 -- Best regards, Krzysztof Borowczyk -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 16/46] [media] smiapp-core: use true/false for boolean vars
Em Thu, 04 Sep 2014 10:03:40 +0300 Sakari Ailus sakari.ai...@iki.fi escreveu: On Wed, Sep 03, 2014 at 05:32:48PM -0300, Mauro Carvalho Chehab wrote: Instead of using 0 or 1 for boolean, use the true/false defines. Signed-off-by: Mauro Carvalho Chehab m.che...@samsung.com Thanks! Acked-by: Sakari Ailus sakari.ai...@linux.intel.com Would you like me to pick this patch to my tree, or would you like to apply it directly? I'm fine with either. I'll pick it myself. 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
[PATCH] hdpvr: reduce memory footprint when debugging
There is no need to use hex_dump_to_buffer() since we have a kernel helper to dump up to 64 bytes just via printk(). Signed-off-by: Andy Shevchenko andriy.shevche...@linux.intel.com --- drivers/media/usb/hdpvr/hdpvr-control.c | 21 ++--- drivers/media/usb/hdpvr/hdpvr-core.c| 27 ++- 2 files changed, 12 insertions(+), 36 deletions(-) diff --git a/drivers/media/usb/hdpvr/hdpvr-control.c b/drivers/media/usb/hdpvr/hdpvr-control.c index 6053661..6e86032 100644 --- a/drivers/media/usb/hdpvr/hdpvr-control.c +++ b/drivers/media/usb/hdpvr/hdpvr-control.c @@ -59,13 +59,10 @@ int get_video_info(struct hdpvr_device *dev, struct hdpvr_video_info *vidinf) 1000); #ifdef HDPVR_DEBUG - if (hdpvr_debug MSG_INFO) { - char print_buf[15]; - hex_dump_to_buffer(dev-usbc_buf, 5, 16, 1, print_buf, - sizeof(print_buf), 0); + if (hdpvr_debug MSG_INFO) v4l2_dbg(MSG_INFO, hdpvr_debug, dev-v4l2_dev, -get video info returned: %d, %s\n, ret, print_buf); - } +get video info returned: %d, %5ph\n, ret, +dev-usbc_buf); #endif mutex_unlock(dev-usbc_mutex); @@ -82,9 +79,6 @@ int get_video_info(struct hdpvr_device *dev, struct hdpvr_video_info *vidinf) int get_input_lines_info(struct hdpvr_device *dev) { -#ifdef HDPVR_DEBUG - char print_buf[9]; -#endif int ret, lines; mutex_lock(dev-usbc_mutex); @@ -96,13 +90,10 @@ int get_input_lines_info(struct hdpvr_device *dev) 1000); #ifdef HDPVR_DEBUG - if (hdpvr_debug MSG_INFO) { - hex_dump_to_buffer(dev-usbc_buf, 3, 16, 1, print_buf, - sizeof(print_buf), 0); + if (hdpvr_debug MSG_INFO) v4l2_dbg(MSG_INFO, hdpvr_debug, dev-v4l2_dev, -get input lines info returned: %d, %s\n, ret, -print_buf); - } +get input lines info returned: %d, %3ph\n, ret, +dev-usbc_buf); #else (void)ret; /* suppress compiler warning */ #endif diff --git a/drivers/media/usb/hdpvr/hdpvr-core.c b/drivers/media/usb/hdpvr/hdpvr-core.c index c563896..42b4cdf 100644 --- a/drivers/media/usb/hdpvr/hdpvr-core.c +++ b/drivers/media/usb/hdpvr/hdpvr-core.c @@ -124,14 +124,6 @@ static int device_authorization(struct hdpvr_device *dev) int ret, retval = -ENOMEM; char request_type = 0x38, rcv_request = 0x81; char *response; -#ifdef HDPVR_DEBUG - size_t buf_size = 46; - char *print_buf = kzalloc(5*buf_size+1, GFP_KERNEL); - if (!print_buf) { - v4l2_err(dev-v4l2_dev, Out of memory\n); - return retval; - } -#endif mutex_lock(dev-usbc_mutex); ret = usb_control_msg(dev-udev, @@ -147,11 +139,9 @@ static int device_authorization(struct hdpvr_device *dev) } #ifdef HDPVR_DEBUG else { - hex_dump_to_buffer(dev-usbc_buf, 46, 16, 1, print_buf, - 5*buf_size+1, 0); v4l2_dbg(MSG_INFO, hdpvr_debug, dev-v4l2_dev, -Status request returned, len %d: %s\n, -ret, print_buf); +Status request returned, len %d: %46ph\n, +ret, dev-usbc_buf); } #endif @@ -189,15 +179,13 @@ static int device_authorization(struct hdpvr_device *dev) response = dev-usbc_buf+38; #ifdef HDPVR_DEBUG - hex_dump_to_buffer(response, 8, 16, 1, print_buf, 5*buf_size+1, 0); - v4l2_dbg(MSG_INFO, hdpvr_debug, dev-v4l2_dev, challenge: %s\n, -print_buf); + v4l2_dbg(MSG_INFO, hdpvr_debug, dev-v4l2_dev, challenge: %8ph\n, +response); #endif challenge(response); #ifdef HDPVR_DEBUG - hex_dump_to_buffer(response, 8, 16, 1, print_buf, 5*buf_size+1, 0); - v4l2_dbg(MSG_INFO, hdpvr_debug, dev-v4l2_dev, response: %s\n, -print_buf); + v4l2_dbg(MSG_INFO, hdpvr_debug, dev-v4l2_dev, response: %8ph\n, +response); #endif msleep(100); @@ -213,9 +201,6 @@ static int device_authorization(struct hdpvr_device *dev) retval = ret != 8; unlock: mutex_unlock(dev-usbc_mutex); -#ifdef HDPVR_DEBUG - kfree(print_buf); -#endif return retval; } -- 2.1.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: [ANN] Created a patch to teach valgrind about V4L2 and the media API
On 08/04/14 10:47, Hans Verkuil wrote: See this bugreport for valgrind with the attached patch: https://bugs.kde.org/show_bug.cgi?id=338023 A quick follow-up: this patch has been committed in the valgrind repo, so I assume it will appear in the next valgrind release. 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
[PATCH 3/3] [media] tw68: don't assume that pagesize is always 4096
This code implicitly assumes that pagesize is 4096, but this is not true on all archs, as the PAGE_SHIFT can be different than 12 on all those architectures: alpha, arc, arm64, cris, frv, hexagon,ia64, m68k, metag, microblaze, mips, openrisc, parisc, powerpc, sh, sparc and tile. The real constrant here seems to be to limit the buffer size to 4MB. So, fix the code to reflect that, in a way that it will keep working with differnt values for PAGE_SIZE. Signed-off-by: Mauro Carvalho Chehab m.che...@samsung.com diff --git a/drivers/media/pci/tw68/tw68-video.c b/drivers/media/pci/tw68/tw68-video.c index 4dd38578cf1b..66658accdca9 100644 --- a/drivers/media/pci/tw68/tw68-video.c +++ b/drivers/media/pci/tw68/tw68-video.c @@ -366,7 +366,7 @@ static int tw68_buffer_pages(int size) { size = PAGE_ALIGN(size); size += PAGE_SIZE; /* for non-page-aligned buffers */ - size /= 4096; + size /= PAGE_SIZE; return size; } @@ -376,7 +376,7 @@ static int tw68_buffer_count(unsigned int size, unsigned int count) { unsigned int maxcount; - maxcount = 1024 / tw68_buffer_pages(size); + maxcount = (4096 * 1024 / PAGE_SIZE) / tw68_buffer_pages(size); if (count maxcount) count = maxcount; return count; -- 1.9.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
[PATCH 1/3] [media] tw68: make tw68_pci_tbl static and constify
drivers/media/pci/tw68/tw68-core.c:72:22: warning: symbol 'tw68_pci_tbl' was not declared. Should it be static? Signed-off-by: Mauro Carvalho Chehab m.che...@samsung.com diff --git a/drivers/media/pci/tw68/tw68-core.c b/drivers/media/pci/tw68/tw68-core.c index baf93af1d764..a6fb48cf7aae 100644 --- a/drivers/media/pci/tw68/tw68-core.c +++ b/drivers/media/pci/tw68/tw68-core.c @@ -69,7 +69,7 @@ static atomic_t tw68_instance = ATOMIC_INIT(0); * the PCI ID database up to date. Note that the entries must be * added under vendor 0x1797 (Techwell Inc.) as subsystem IDs. */ -struct pci_device_id tw68_pci_tbl[] = { +static const struct pci_device_id tw68_pci_tbl[] = { {PCI_DEVICE(PCI_VENDOR_ID_TECHWELL, PCI_DEVICE_ID_6800)}, {PCI_DEVICE(PCI_VENDOR_ID_TECHWELL, PCI_DEVICE_ID_6801)}, {PCI_DEVICE(PCI_VENDOR_ID_TECHWELL, PCI_DEVICE_ID_6804)}, -- 1.9.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
[PATCH 2/3] [media] tw68: Remove a sparse warning
drivers/media/pci/tw68/tw68-video.c:351:9: warning: incorrect type in argument 1 (different base types) drivers/media/pci/tw68/tw68-video.c:351:9:expected unsigned int [unsigned] val drivers/media/pci/tw68/tw68-video.c:351:9:got restricted __le32 [usertype] noident Signed-off-by: Mauro Carvalho Chehab m.che...@samsung.com diff --git a/drivers/media/pci/tw68/tw68-video.c b/drivers/media/pci/tw68/tw68-video.c index 66fae2345fdd..4dd38578cf1b 100644 --- a/drivers/media/pci/tw68/tw68-video.c +++ b/drivers/media/pci/tw68/tw68-video.c @@ -348,7 +348,7 @@ int tw68_video_start_dma(struct tw68_dev *dev, struct tw68_buf *buf) * a new address can be set. */ tw_clearl(TW68_DMAC, TW68_DMAP_EN); - tw_writel(TW68_DMAP_SA, cpu_to_le32(buf-dma)); + tw_writel(TW68_DMAP_SA, (__force u32)cpu_to_le32(buf-dma)); /* Clear any pending interrupts */ tw_writel(TW68_INTSTAT, dev-board_virqmask); /* Enable the risc engine and the fifo */ -- 1.9.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
Re: [PATCH 1/3] [media] tw68: make tw68_pci_tbl static and constify
Acked-by: Hans Verkuil hans.verk...@xs4all.nl Thanks! Hans On 09/04/14 16:46, Mauro Carvalho Chehab wrote: drivers/media/pci/tw68/tw68-core.c:72:22: warning: symbol 'tw68_pci_tbl' was not declared. Should it be static? Signed-off-by: Mauro Carvalho Chehab m.che...@samsung.com diff --git a/drivers/media/pci/tw68/tw68-core.c b/drivers/media/pci/tw68/tw68-core.c index baf93af1d764..a6fb48cf7aae 100644 --- a/drivers/media/pci/tw68/tw68-core.c +++ b/drivers/media/pci/tw68/tw68-core.c @@ -69,7 +69,7 @@ static atomic_t tw68_instance = ATOMIC_INIT(0); * the PCI ID database up to date. Note that the entries must be * added under vendor 0x1797 (Techwell Inc.) as subsystem IDs. */ -struct pci_device_id tw68_pci_tbl[] = { +static const struct pci_device_id tw68_pci_tbl[] = { {PCI_DEVICE(PCI_VENDOR_ID_TECHWELL, PCI_DEVICE_ID_6800)}, {PCI_DEVICE(PCI_VENDOR_ID_TECHWELL, PCI_DEVICE_ID_6801)}, {PCI_DEVICE(PCI_VENDOR_ID_TECHWELL, PCI_DEVICE_ID_6804)}, -- 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/3] [media] tw68: Remove a sparse warning
I'll need to review this as well. Perhaps tw_writel should expect a __le32? Hans On 09/04/14 16:46, Mauro Carvalho Chehab wrote: drivers/media/pci/tw68/tw68-video.c:351:9: warning: incorrect type in argument 1 (different base types) drivers/media/pci/tw68/tw68-video.c:351:9:expected unsigned int [unsigned] val drivers/media/pci/tw68/tw68-video.c:351:9:got restricted __le32 [usertype] noident Signed-off-by: Mauro Carvalho Chehab m.che...@samsung.com diff --git a/drivers/media/pci/tw68/tw68-video.c b/drivers/media/pci/tw68/tw68-video.c index 66fae2345fdd..4dd38578cf1b 100644 --- a/drivers/media/pci/tw68/tw68-video.c +++ b/drivers/media/pci/tw68/tw68-video.c @@ -348,7 +348,7 @@ int tw68_video_start_dma(struct tw68_dev *dev, struct tw68_buf *buf) * a new address can be set. */ tw_clearl(TW68_DMAC, TW68_DMAP_EN); - tw_writel(TW68_DMAP_SA, cpu_to_le32(buf-dma)); + tw_writel(TW68_DMAP_SA, (__force u32)cpu_to_le32(buf-dma)); /* Clear any pending interrupts */ tw_writel(TW68_INTSTAT, dev-board_virqmask); /* Enable the risc engine and the fifo */ -- 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 3/3] [media] tw68: don't assume that pagesize is always 4096
I need to review this more closely tomorrow. Hans On 09/04/14 16:46, Mauro Carvalho Chehab wrote: This code implicitly assumes that pagesize is 4096, but this is not true on all archs, as the PAGE_SHIFT can be different than 12 on all those architectures: alpha, arc, arm64, cris, frv, hexagon,ia64, m68k, metag, microblaze, mips, openrisc, parisc, powerpc, sh, sparc and tile. The real constrant here seems to be to limit the buffer size to 4MB. So, fix the code to reflect that, in a way that it will keep working with differnt values for PAGE_SIZE. Signed-off-by: Mauro Carvalho Chehab m.che...@samsung.com diff --git a/drivers/media/pci/tw68/tw68-video.c b/drivers/media/pci/tw68/tw68-video.c index 4dd38578cf1b..66658accdca9 100644 --- a/drivers/media/pci/tw68/tw68-video.c +++ b/drivers/media/pci/tw68/tw68-video.c @@ -366,7 +366,7 @@ static int tw68_buffer_pages(int size) { size = PAGE_ALIGN(size); size += PAGE_SIZE; /* for non-page-aligned buffers */ - size /= 4096; + size /= PAGE_SIZE; return size; } @@ -376,7 +376,7 @@ static int tw68_buffer_count(unsigned int size, unsigned int count) { unsigned int maxcount; - maxcount = 1024 / tw68_buffer_pages(size); + maxcount = (4096 * 1024 / PAGE_SIZE) / tw68_buffer_pages(size); if (count maxcount) count = maxcount; return count; -- 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/3] [media] tw68: Remove a sparse warning
Em Thu, 04 Sep 2014 16:54:38 +0200 Hans Verkuil hansv...@cisco.com escreveu: I'll need to review this as well. Perhaps tw_writel should expect a __le32? There are several other parts where it is using the address as CPU endian. Anyway, if you have some BE system, then you can test the board there and see what would work. Regards, Mauro Hans On 09/04/14 16:46, Mauro Carvalho Chehab wrote: drivers/media/pci/tw68/tw68-video.c:351:9: warning: incorrect type in argument 1 (different base types) drivers/media/pci/tw68/tw68-video.c:351:9:expected unsigned int [unsigned] val drivers/media/pci/tw68/tw68-video.c:351:9:got restricted __le32 [usertype] noident Signed-off-by: Mauro Carvalho Chehab m.che...@samsung.com diff --git a/drivers/media/pci/tw68/tw68-video.c b/drivers/media/pci/tw68/tw68-video.c index 66fae2345fdd..4dd38578cf1b 100644 --- a/drivers/media/pci/tw68/tw68-video.c +++ b/drivers/media/pci/tw68/tw68-video.c @@ -348,7 +348,7 @@ int tw68_video_start_dma(struct tw68_dev *dev, struct tw68_buf *buf) * a new address can be set. */ tw_clearl(TW68_DMAC, TW68_DMAP_EN); - tw_writel(TW68_DMAP_SA, cpu_to_le32(buf-dma)); + tw_writel(TW68_DMAP_SA, (__force u32)cpu_to_le32(buf-dma)); /* Clear any pending interrupts */ tw_writel(TW68_INTSTAT, dev-board_virqmask); /* Enable the risc engine and the fifo */ -- 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] dib0090: remove manual configuration system
Hi Paul, Em Thu, 22 May 2014 14:48:07 +0200 Paul Bolle pebo...@tiscali.nl escreveu: dib0900.c has always shipped with its own, manual, configuration system. There a three problems with it. 1) macros that are defined, but not used: CONFIG_SYS_DVBT CONFIG_DIB0090_USE_PWM_AGC 2) checks for macros that are always true: CONFIG_SYS_ISDBT CONFIG_BAND_CBAND CONFIG_BAND_VHF CONFIG_BAND_UHF 3) checks for macros that are never defined and are always false: CONFIG_BAND_SBAND CONFIG_STANDARD_DAB CONFIG_STANDARD_DVBT CONFIG_TUNER_DIB0090_P1B_SUPPORT CONFIG_BAND_LBAND Remove all references to these macros, and, of course, remove the code hidden behind the macros that are never defined too. IMHO, it is OK to remove the macros that are always true and the ones that aren't used. However, I don't like the idea of removing the other macros. This is a tuner driver that can be used on other bands, and some day we might end implementing analog support for the Dibcom driver or to add something that will require the code there. So, IMHO, better to keep the code there. Regards, Mauro Signed-off-by: Paul Bolle pebo...@tiscali.nl --- 0) Compile tested. I don't have the hardware. 1) This might be a bit hard to review. Should I split it in two or three patches? 2) dib0070.c has a reference to CONFIG_SYS_ISDBT. I'll remove it in a future patch. 3) If this gets accepted I might be inclined to clean up the coding style in a future patch. It needs cleaning up quite a bit. drivers/media/dvb-frontends/dib0090.c | 130 -- 1 file changed, 130 deletions(-) diff --git a/drivers/media/dvb-frontends/dib0090.c b/drivers/media/dvb-frontends/dib0090.c index 3ee22ff76315..bb50fec4f475 100644 --- a/drivers/media/dvb-frontends/dib0090.c +++ b/drivers/media/dvb-frontends/dib0090.c @@ -46,13 +46,6 @@ MODULE_PARM_DESC(debug, turn on debugging (default: 0)); } \ } while (0) -#define CONFIG_SYS_DVBT -#define CONFIG_SYS_ISDBT -#define CONFIG_BAND_CBAND -#define CONFIG_BAND_VHF -#define CONFIG_BAND_UHF -#define CONFIG_DIB0090_USE_PWM_AGC - #define EN_LNA0 0x8000 #define EN_LNA1 0x4000 #define EN_LNA2 0x2000 @@ -1165,24 +1158,14 @@ int dib0090_gain_control(struct dvb_frontend *fe) state-agc_freeze = 0; dib0090_write_reg(state, 0x04, 0x0); -#ifdef CONFIG_BAND_SBAND - if (state-current_band == BAND_SBAND) { - dib0090_set_rframp(state, rf_ramp_sband); - dib0090_set_bbramp(state, bb_ramp_boost); - } else -#endif -#ifdef CONFIG_BAND_VHF if (state-current_band == BAND_VHF !state-identity.p1g) { dib0090_set_rframp(state, rf_ramp_pwm_vhf); dib0090_set_bbramp(state, bb_ramp_pwm_normal); } else -#endif -#ifdef CONFIG_BAND_CBAND if (state-current_band == BAND_CBAND !state-identity.p1g) { dib0090_set_rframp(state, rf_ramp_pwm_cband); dib0090_set_bbramp(state, bb_ramp_pwm_normal); } else -#endif if ((state-current_band == BAND_CBAND || state-current_band == BAND_VHF) state-identity.p1g) { dib0090_set_rframp(state, rf_ramp_pwm_cband_7090p); dib0090_set_bbramp(state, bb_ramp_pwm_normal_socs); @@ -1220,14 +1203,12 @@ int dib0090_gain_control(struct dvb_frontend *fe) if (*tune_state == CT_AGC_STEP_0) { if (wbd_error 0 state-rf_gain_limit 0 !state-identity.p1g) { -#ifdef CONFIG_BAND_CBAND /* in case of CBAND tune reduce first the lt_gain2 before adjusting the RF gain */ u8 ltg2 = (state-rf_lt_def 10) 0x7; if (state-current_band == BAND_CBAND ltg2) { ltg2 = 1; state-rf_lt_def = ltg2 10; /* reduce in 3 steps from 7 to 0 */ } -#endif } else { state-agc_step = 0; *tune_state = CT_AGC_STEP_1; @@ -1238,16 +1219,6 @@ int dib0090_gain_control(struct dvb_frontend *fe) adc = (adc * ((s32) 355774) + (((s32) 1) 20)) 21; /* included in [0:-700] */ adc_error = (s16) (((s32) ADC_TARGET) - adc); -#ifdef CONFIG_STANDARD_DAB - if (state-fe-dtv_property_cache.delivery_system == STANDARD_DAB) - adc_error -= 10; -#endif -#ifdef CONFIG_STANDARD_DVBT - if (state-fe-dtv_property_cache.delivery_system == STANDARD_DVBT - (state-fe-dtv_property_cache.modulation == QAM_64 ||
Re: [PATCH 3/3] [media] tw68: don't assume that pagesize is always 4096
On 09/04/2014 04:46 PM, Mauro Carvalho Chehab wrote: This code implicitly assumes that pagesize is 4096, but this is not true on all archs, as the PAGE_SHIFT can be different than 12 on all those architectures: alpha, arc, arm64, cris, frv, hexagon,ia64, m68k, metag, microblaze, mips, openrisc, parisc, powerpc, sh, sparc and tile. The real constrant here seems to be to limit the buffer size to 4MB. So, fix the code to reflect that, in a way that it will keep working with differnt values for PAGE_SIZE. While your fix is OK, I have a better patch that makes the code a lot more readable. I'll post that soon. Regards, Hans Signed-off-by: Mauro Carvalho Chehab m.che...@samsung.com diff --git a/drivers/media/pci/tw68/tw68-video.c b/drivers/media/pci/tw68/tw68-video.c index 4dd38578cf1b..66658accdca9 100644 --- a/drivers/media/pci/tw68/tw68-video.c +++ b/drivers/media/pci/tw68/tw68-video.c @@ -366,7 +366,7 @@ static int tw68_buffer_pages(int size) { size = PAGE_ALIGN(size); size += PAGE_SIZE; /* for non-page-aligned buffers */ - size /= 4096; + size /= PAGE_SIZE; return size; } @@ -376,7 +376,7 @@ static int tw68_buffer_count(unsigned int size, unsigned int count) { unsigned int maxcount; - maxcount = 1024 / tw68_buffer_pages(size); + maxcount = (4096 * 1024 / PAGE_SIZE) / tw68_buffer_pages(size); if (count maxcount) count = maxcount; return count; -- 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/3] [media] tw68: Remove a sparse warning
On 09/04/2014 04:46 PM, Mauro Carvalho Chehab wrote: drivers/media/pci/tw68/tw68-video.c:351:9: warning: incorrect type in argument 1 (different base types) drivers/media/pci/tw68/tw68-video.c:351:9:expected unsigned int [unsigned] val drivers/media/pci/tw68/tw68-video.c:351:9:got restricted __le32 [usertype] noident Signed-off-by: Mauro Carvalho Chehab m.che...@samsung.com Nacked-by: Hans Verkuil hverk...@xs4all.nl tw_writel maps to writel which already does cpu_to_le32(), so doing it again is once too many. I'll post a patch that removes the bogus cpu_to_le32(). Hans diff --git a/drivers/media/pci/tw68/tw68-video.c b/drivers/media/pci/tw68/tw68-video.c index 66fae2345fdd..4dd38578cf1b 100644 --- a/drivers/media/pci/tw68/tw68-video.c +++ b/drivers/media/pci/tw68/tw68-video.c @@ -348,7 +348,7 @@ int tw68_video_start_dma(struct tw68_dev *dev, struct tw68_buf *buf) * a new address can be set. */ tw_clearl(TW68_DMAC, TW68_DMAP_EN); - tw_writel(TW68_DMAP_SA, cpu_to_le32(buf-dma)); + tw_writel(TW68_DMAP_SA, (__force u32)cpu_to_le32(buf-dma)); /* Clear any pending interrupts */ tw_writel(TW68_INTSTAT, dev-board_virqmask); /* Enable the risc engine and the fifo */ -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/2] tw68: simplify tw68_buffer_count
From: Hans Verkuil hans.verk...@cisco.com The code to calculate the maximum number of buffers allowed in 4 MB is 1) wrong if PAGE_SIZE != 4096 and 2) unnecessarily complex. Fix and simplify the code. Signed-off-by: Hans Verkuil hans.verk...@cisco.com --- drivers/media/pci/tw68/tw68-video.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/media/pci/tw68/tw68-video.c b/drivers/media/pci/tw68/tw68-video.c index 66fae23..498ead9 100644 --- a/drivers/media/pci/tw68/tw68-video.c +++ b/drivers/media/pci/tw68/tw68-video.c @@ -361,22 +361,13 @@ int tw68_video_start_dma(struct tw68_dev *dev, struct tw68_buf *buf) /* -- */ -/* nr of (tw68-)pages for the given buffer size */ -static int tw68_buffer_pages(int size) -{ - size = PAGE_ALIGN(size); - size += PAGE_SIZE; /* for non-page-aligned buffers */ - size /= 4096; - return size; -} - /* calc max # of buffers from size (must not exceed the 4MB virtual * address space per DMA channel) */ static int tw68_buffer_count(unsigned int size, unsigned int count) { unsigned int maxcount; - maxcount = 1024 / tw68_buffer_pages(size); + maxcount = (4 * 1024 * 1024) / roundup(size, PAGE_SIZE); if (count maxcount) count = maxcount; return count; -- 2.1.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
sale cisco switches
HI We sale cisco new and original switches and routers, following is the product and price list. If you are interested, please contact me! WS-C3750X-24S-S WS-C3750X-48P-S WS-C2960S-24TS-L WS-C2960S-48TS-L WS-C2960S-48LPS-L WS-C2960S-48FPS-L WS-C2960S-48LPD-L WS-C2960S-48FPD-L MY SKYPE ID:AMY122388 REGARD. AMY
Re: [PATCH] [media] dib0090: remove manual configuration system
Hi Mauro, On Thu, 2014-09-04 at 12:36 -0300, Mauro Carvalho Chehab wrote: Em Thu, 22 May 2014 14:48:07 +0200 Paul Bolle pebo...@tiscali.nl escreveu: dib0900.c has always shipped with its own, manual, configuration system. There a three problems with it. 1) macros that are defined, but not used: CONFIG_SYS_DVBT CONFIG_DIB0090_USE_PWM_AGC 2) checks for macros that are always true: CONFIG_SYS_ISDBT CONFIG_BAND_CBAND CONFIG_BAND_VHF CONFIG_BAND_UHF 3) checks for macros that are never defined and are always false: CONFIG_BAND_SBAND CONFIG_STANDARD_DAB CONFIG_STANDARD_DVBT CONFIG_TUNER_DIB0090_P1B_SUPPORT CONFIG_BAND_LBAND Remove all references to these macros, and, of course, remove the code hidden behind the macros that are never defined too. IMHO, it is OK to remove the macros that are always true and the ones that aren't used. I see. I hope to send a v2 that does that one of these days. However, I don't like the idea of removing the other macros. This is a tuner driver that can be used on other bands, and some day we might end implementing analog support for the Dibcom driver or to add something that will require the code there. So, IMHO, better to keep the code there. But would you consider a patch that at least moves those macros out of the CONFIG_* namespace (ie, a patch that prefixes those macros with, say, DIB0090_)? Paul Bolle -- 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: Corrupt images, when capturing images from multiple cameras using the V4L2 driver
Hi Karel, I suggest you to zero fill v4l2 structures before assign values also check the return value of all ioctl call. for example, struct v4l2_format fmt; memset(fmt, 0, sizeof fmt); fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; fmt.fmt.pix.width = xRes; ret = ioctl(fd, VIDIOC_S_FMT, fmt); if (ret 0) printf(VIDIOC_S_FMT failed: %d\n, ret); Please find comments in-line. On Tuesday 02 September 2014 05:36 PM, Mácha, Karel wrote: Hello, I would like to grab images from multiple cameras under using the V4L2 API. I followed the presentation under found on http://linuxtv.org/downloads/presentations/summit_jun_2010/20100206-fosdem.pdf used the code and adapted it sightly for my purpose. It works very well for 1 camera. However Once I begin to grab images from multiple cameras (successively) I get corrupt images. I uploaded an example image to http://www.directupload.net/file/d/3733/9c4jx3pv_png.htm Although I set the right resolution for the camera (744 x 480), the output of buffer.bytesused, after the VIDIOC_DQBUF does not correspond with the expected value (744x480 = 357120). This would probably explain the corrupt images. The more camera I use, the less buffer.bytesused I get and the more stripes are in the image. Could you please give me a hint, what am I doing wrong ? Thanks, Karel Here is the minimal C code I use for my application: int main() { /* # INIT # */ int numOfCameras = 6; As it works well for 1 camera, try with only 2 instead of 6 int xRes = 744; int yRes = 480; int exposure = 2000; unsigned int timeBetweenSnapshots = 2; // in sec char fileName[sizeof ./output/image 000 from camera 0.PNG]; static const char *devices[] = { /dev/video0, /dev/video1, /dev/video2, /dev/video3, /dev/video4, /dev/video5, /dev/video6, /dev/video7 }; struct v4l2_capability cap[8]; struct v4l2_control control[8]; struct v4l2_format format[8]; struct v4l2_requestbuffers req[8]; struct v4l2_buffer buffer[8]; int type = V4L2_BUF_TYPE_VIDEO_CAPTURE; // had to declare the type here because of the loop unsigned int i; unsigned int j; unsigned int k; int fd[8]; void **mem[8]; //unsigned char **mem[8]; /* # OPEN DEVICE # */ for (j = 0; j numOfCameras; ++j) { fd[j] = open(devices[j], O_RDWR); ioctl(fd[j], VIDIOC_QUERYCAP, cap[j]); check the return value /* # CAM CONTROLL ### */ zero fill control[j] memset(control[j], 0, sizeof control[j]); control[j].id = V4L2_CID_EXPOSURE_AUTO; control[j].value = V4L2_EXPOSURE_SHUTTER_PRIORITY; ioctl(fd[j], VIDIOC_S_CTRL, control[j]); control[j].id = V4L2_CID_EXPOSURE_ABSOLUTE; control[j].value = exposure; ioctl(fd[j], VIDIOC_S_CTRL, control[j]); /* # FORMAT # */ zero fill format[j] memset(format[j], 0, sizeof format[j]); ioctl(fd[j], VIDIOC_G_FMT, format[j]); format[j].type = V4L2_BUF_TYPE_VIDEO_CAPTURE; format[j].fmt.pix.width = xRes; format[j].fmt.pix.height = yRes; //format.fmt.pix.pixelformat = V4L2_PIX_FMT_YUYV; format[j].fmt.pix.pixelformat = V4L2_PIX_FMT_GREY; ioctl(fd[j], VIDIOC_S_FMT, format[j]); /* # REQ BUF */ memset(req[j], 0, sizeof req[j]); req[j].type = V4L2_BUF_TYPE_VIDEO_CAPTURE; req[j].count = 4; req[j].memory = V4L2_MEMORY_MMAP; ioctl(fd[j], VIDIOC_REQBUFS, req[j]); mem[j] = malloc(req[j].count * sizeof(*mem)); /* # MMAP # */ for (i = 0; i req[j].count; ++i) { memset(buffer[j], 0, sizeof buffer[j]); buffer[j].type = V4L2_BUF_TYPE_VIDEO_CAPTURE; buffer[j].memory = V4L2_MEMORY_MMAP; buffer[j].index = i; ioctl(fd[j], VIDIOC_QUERYBUF, buffer[j]); mem[j][i] = mmap(0, buffer[j].length, PROT_READ|PROT_WRITE, MAP_SHARED, fd[j], buffer[j].m.offset); } /* # CREATE QUEUE ### */ for (i = 0; i req[j].count; ++i) { memset(buffer[j], 0, sizeof buffer[j]); buffer[j].type = V4L2_BUF_TYPE_VIDEO_CAPTURE; buffer[j].memory = V4L2_MEMORY_MMAP; buffer[j].index = i;
[linuxtv-media:devel 360/499] drivers/media/platform/vivid/vivid-radio-rx.c:198 vivid_radio_rx_s_hw_freq_seek() error: buffer overflow 'vivid_radio_bands' 3 = 3
Hi Hans, First bad commit (maybe != root cause): tree: git://linuxtv.org/media_tree.git devel head: 160416682519b8b63693a47a13460384a2656dad commit: e75420dd25bc9d7b6f4e3b4c4f6c778b610c8cda [360/499] [media] vivid: enable the vivid driver drivers/media/platform/vivid/vivid-radio-rx.c:198 vivid_radio_rx_s_hw_freq_seek() error: buffer overflow 'vivid_radio_bands' 3 = 3 drivers/media/platform/vivid/vivid-radio-rx.c:199 vivid_radio_rx_s_hw_freq_seek() error: buffer overflow 'vivid_radio_bands' 3 = 3 drivers/media/platform/vivid/vivid-rds-gen.c:81 vivid_rds_generate() error: buffer overflow 'rds-psname' 9 = 43 drivers/media/platform/vivid/vivid-rds-gen.c:82 vivid_rds_generate() error: buffer overflow 'rds-psname' 9 = 42 drivers/media/platform/vivid/vivid-rds-gen.c:88 vivid_rds_generate() error: buffer overflow 'rds-radiotext' 65 = 84 drivers/media/platform/vivid/vivid-rds-gen.c:89 vivid_rds_generate() error: buffer overflow 'rds-radiotext' 65 = 85 drivers/media/platform/vivid/vivid-rds-gen.c:91 vivid_rds_generate() error: buffer overflow 'rds-radiotext' 65 = 86 drivers/media/platform/vivid/vivid-rds-gen.c:92 vivid_rds_generate() error: buffer overflow 'rds-radiotext' 65 = 87 git remote add linuxtv-media git://linuxtv.org/media_tree.git git remote update linuxtv-media git checkout e75420dd25bc9d7b6f4e3b4c4f6c778b610c8cda vim +/vivid_radio_bands +198 drivers/media/platform/vivid/vivid-radio-rx.c 55d58e98 Hans Verkuil 2014-08-25 192 high = a-rangehigh; 55d58e98 Hans Verkuil 2014-08-25 193 } else { 55d58e98 Hans Verkuil 2014-08-25 194 for (band = 0; band TOT_BANDS; band++) 55d58e98 Hans Verkuil 2014-08-25 195 if (dev-radio_rx_freq = vivid_radio_bands[band].rangelow 55d58e98 Hans Verkuil 2014-08-25 196 dev-radio_rx_freq = vivid_radio_bands[band].rangehigh) 55d58e98 Hans Verkuil 2014-08-25 197 break; 55d58e98 Hans Verkuil 2014-08-25 198 low = vivid_radio_bands[band].rangelow; 55d58e98 Hans Verkuil 2014-08-25 199 high = vivid_radio_bands[band].rangehigh; 55d58e98 Hans Verkuil 2014-08-25 200 } 55d58e98 Hans Verkuil 2014-08-25 201 spacing = band == BAND_AM ? 1600 : 16000; 55d58e98 Hans Verkuil 2014-08-25 202 freq = clamp(dev-radio_rx_freq, low, high); --- 0-DAY kernel build testing backend Open Source Technology Center http://lists.01.org/mailman/listinfo/kbuild Intel Corporation -- 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 18/46] [media] omap3isp: use true/false for boolean vars
Hi Mauro, Thank you for the patch. On Wednesday 03 September 2014 17:32:50 Mauro Carvalho Chehab wrote: Instead of using 0 or 1 for boolean, use the true/false defines. Signed-off-by: Mauro Carvalho Chehab m.che...@samsung.com Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com diff --git a/drivers/media/platform/omap3isp/ispccdc.c b/drivers/media/platform/omap3isp/ispccdc.c index cabf46b4b645..81a9dc053d58 100644 --- a/drivers/media/platform/omap3isp/ispccdc.c +++ b/drivers/media/platform/omap3isp/ispccdc.c @@ -1806,7 +1806,7 @@ static int ccdc_video_queue(struct isp_video *video, struct isp_buffer *buffer) spin_lock_irqsave(ccdc-lock, flags); if (ccdc-state == ISP_PIPELINE_STREAM_CONTINUOUS !ccdc-running ccdc-bt656) - restart = 1; + restart = true; else ccdc-underrun = 1; spin_unlock_irqrestore(ccdc-lock, flags); -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v4 2/2] V4L: uvcvideo: Add support for pan/tilt speed controls
Hi Vincent, Thank you for the patch. On Wednesday 03 September 2014 17:47:48 Vincent Palatin wrote: Map V4L2_CID_TILT_SPEED and V4L2_CID_PAN_SPEED to the standard UVC CT_PANTILT_RELATIVE_CONTROL terminal control request. Tested by plugging a Logitech ConferenceCam C3000e USB camera and controlling pan/tilt from the userspace using the VIDIOC_S_CTRL ioctl. Verified that it can pan and tilt at the same time in both directions. Signed-off-by: Vincent Palatin vpala...@chromium.org Small comment here, as Pawel has reviewed the previous version, you could have added his Reviewed-by tag to the patch. --- Changes from v1/v2: - rebased Changes from v3: - removed gerrit-id drivers/media/usb/uvc/uvc_ctrl.c | 58 ++--- 1 file changed, 55 insertions(+), 3 deletions(-) diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c index 0eb82106..d703cb0 100644 --- a/drivers/media/usb/uvc/uvc_ctrl.c +++ b/drivers/media/usb/uvc/uvc_ctrl.c @@ -309,9 +309,8 @@ static struct uvc_control_info uvc_ctrls[] = { .selector = UVC_CT_PANTILT_RELATIVE_CONTROL, .index = 12, .size = 4, - .flags = UVC_CTRL_FLAG_SET_CUR | UVC_CTRL_FLAG_GET_MIN - | UVC_CTRL_FLAG_GET_MAX | UVC_CTRL_FLAG_GET_RES - | UVC_CTRL_FLAG_GET_DEF + .flags = UVC_CTRL_FLAG_SET_CUR + | UVC_CTRL_FLAG_GET_RANGE | UVC_CTRL_FLAG_AUTO_UPDATE, }, { @@ -391,6 +390,35 @@ static void uvc_ctrl_set_zoom(struct uvc_control_mapping *mapping, data[2] = min((int)abs(value), 0xff); } +static __s32 uvc_ctrl_get_rel_speed(struct uvc_control_mapping *mapping, + __u8 query, const __u8 *data) +{ + int first = mapping-offset / 8; Nitpicking, I would use unsigned int instead of int here, as the value can't be negative (same comment for the next function). If you're fine with that there's no need to resubmit, I can modify this when applying. + __s8 rel = (__s8)data[first]; + + switch (query) { + case UVC_GET_CUR: + return (rel == 0) ? 0 : (rel 0 ? data[first+1] + : -data[first+1]); + case UVC_GET_MIN: + return -data[first+1]; + case UVC_GET_MAX: + case UVC_GET_RES: + case UVC_GET_DEF: + default: + return data[first+1]; + } +} + +static void uvc_ctrl_set_rel_speed(struct uvc_control_mapping *mapping, + __s32 value, __u8 *data) +{ + int first = mapping-offset / 8; + + data[first] = value == 0 ? 0 : (value 0) ? 1 : 0xff; + data[first+1] = min_t(int, abs(value), 0xff); +} + static struct uvc_control_mapping uvc_ctrl_mappings[] = { { .id = V4L2_CID_BRIGHTNESS, @@ -677,6 +705,30 @@ static struct uvc_control_mapping uvc_ctrl_mappings[] = { .data_type = UVC_CTRL_DATA_TYPE_SIGNED, }, { + .id = V4L2_CID_PAN_SPEED, + .name = Pan (Speed), + .entity = UVC_GUID_UVC_CAMERA, + .selector = UVC_CT_PANTILT_RELATIVE_CONTROL, + .size = 16, + .offset = 0, + .v4l2_type = V4L2_CTRL_TYPE_INTEGER, + .data_type = UVC_CTRL_DATA_TYPE_SIGNED, + .get= uvc_ctrl_get_rel_speed, + .set= uvc_ctrl_set_rel_speed, + }, + { + .id = V4L2_CID_TILT_SPEED, + .name = Tilt (Speed), + .entity = UVC_GUID_UVC_CAMERA, + .selector = UVC_CT_PANTILT_RELATIVE_CONTROL, + .size = 16, + .offset = 16, + .v4l2_type = V4L2_CTRL_TYPE_INTEGER, + .data_type = UVC_CTRL_DATA_TYPE_SIGNED, + .get= uvc_ctrl_get_rel_speed, + .set= uvc_ctrl_set_rel_speed, + }, + { .id = V4L2_CID_PRIVACY, .name = Privacy, .entity = UVC_GUID_UVC_CAMERA, -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v4 2/2] V4L: uvcvideo: Add support for pan/tilt speed controls
Hi Vincent, On Wednesday 03 September 2014 17:47:48 Vincent Palatin wrote: Map V4L2_CID_TILT_SPEED and V4L2_CID_PAN_SPEED to the standard UVC CT_PANTILT_RELATIVE_CONTROL terminal control request. Tested by plugging a Logitech ConferenceCam C3000e USB camera and controlling pan/tilt from the userspace using the VIDIOC_S_CTRL ioctl. Verified that it can pan and tilt at the same time in both directions. By the way, what is the control value reported by the device after it stops moving by itself due to reaching a limit position ? Signed-off-by: Vincent Palatin vpala...@chromium.org --- Changes from v1/v2: - rebased Changes from v3: - removed gerrit-id drivers/media/usb/uvc/uvc_ctrl.c | 58 ++--- 1 file changed, 55 insertions(+), 3 deletions(-) diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c index 0eb82106..d703cb0 100644 --- a/drivers/media/usb/uvc/uvc_ctrl.c +++ b/drivers/media/usb/uvc/uvc_ctrl.c @@ -309,9 +309,8 @@ static struct uvc_control_info uvc_ctrls[] = { .selector = UVC_CT_PANTILT_RELATIVE_CONTROL, .index = 12, .size = 4, - .flags = UVC_CTRL_FLAG_SET_CUR | UVC_CTRL_FLAG_GET_MIN - | UVC_CTRL_FLAG_GET_MAX | UVC_CTRL_FLAG_GET_RES - | UVC_CTRL_FLAG_GET_DEF + .flags = UVC_CTRL_FLAG_SET_CUR + | UVC_CTRL_FLAG_GET_RANGE | UVC_CTRL_FLAG_AUTO_UPDATE, }, { @@ -391,6 +390,35 @@ static void uvc_ctrl_set_zoom(struct uvc_control_mapping *mapping, data[2] = min((int)abs(value), 0xff); } +static __s32 uvc_ctrl_get_rel_speed(struct uvc_control_mapping *mapping, + __u8 query, const __u8 *data) +{ + int first = mapping-offset / 8; + __s8 rel = (__s8)data[first]; + + switch (query) { + case UVC_GET_CUR: + return (rel == 0) ? 0 : (rel 0 ? data[first+1] + : -data[first+1]); + case UVC_GET_MIN: + return -data[first+1]; + case UVC_GET_MAX: + case UVC_GET_RES: + case UVC_GET_DEF: + default: + return data[first+1]; + } +} + +static void uvc_ctrl_set_rel_speed(struct uvc_control_mapping *mapping, + __s32 value, __u8 *data) +{ + int first = mapping-offset / 8; + + data[first] = value == 0 ? 0 : (value 0) ? 1 : 0xff; + data[first+1] = min_t(int, abs(value), 0xff); +} + static struct uvc_control_mapping uvc_ctrl_mappings[] = { { .id = V4L2_CID_BRIGHTNESS, @@ -677,6 +705,30 @@ static struct uvc_control_mapping uvc_ctrl_mappings[] = { .data_type = UVC_CTRL_DATA_TYPE_SIGNED, }, { + .id = V4L2_CID_PAN_SPEED, + .name = Pan (Speed), + .entity = UVC_GUID_UVC_CAMERA, + .selector = UVC_CT_PANTILT_RELATIVE_CONTROL, + .size = 16, + .offset = 0, + .v4l2_type = V4L2_CTRL_TYPE_INTEGER, + .data_type = UVC_CTRL_DATA_TYPE_SIGNED, + .get= uvc_ctrl_get_rel_speed, + .set= uvc_ctrl_set_rel_speed, + }, + { + .id = V4L2_CID_TILT_SPEED, + .name = Tilt (Speed), + .entity = UVC_GUID_UVC_CAMERA, + .selector = UVC_CT_PANTILT_RELATIVE_CONTROL, + .size = 16, + .offset = 16, + .v4l2_type = V4L2_CTRL_TYPE_INTEGER, + .data_type = UVC_CTRL_DATA_TYPE_SIGNED, + .get= uvc_ctrl_get_rel_speed, + .set= uvc_ctrl_set_rel_speed, + }, + { .id = V4L2_CID_PRIVACY, .name = Privacy, .entity = UVC_GUID_UVC_CAMERA, -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/3] dvb-usb-v2: add frontend_detach callback
Add frontend_detach callback in order to allow custom detach. It is needed when demod driver is implemented I2C client or some other kernel bus, but not proprietary dvb_attach / dvb_detach. Signed-off-by: Antti Palosaari cr...@iki.fi --- drivers/media/usb/dvb-usb-v2/dvb_usb.h | 2 ++ drivers/media/usb/dvb-usb-v2/dvb_usb_core.c | 16 +--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/drivers/media/usb/dvb-usb-v2/dvb_usb.h b/drivers/media/usb/dvb-usb-v2/dvb_usb.h index 124b4ba..7e36ee0 100644 --- a/drivers/media/usb/dvb-usb-v2/dvb_usb.h +++ b/drivers/media/usb/dvb-usb-v2/dvb_usb.h @@ -214,6 +214,7 @@ struct dvb_usb_adapter_properties { * @read_config: called to resolve device configuration * @read_mac_address: called to resolve adapter mac-address * @frontend_attach: called to attach the possible frontends + * @frontend_detach: called to detach the possible frontends * @tuner_attach: called to attach the possible tuners * @frontend_ctrl: called to power on/off active frontend * @streaming_ctrl: called to start/stop the usb streaming of adapter @@ -254,6 +255,7 @@ struct dvb_usb_device_properties { int (*read_config) (struct dvb_usb_device *d); int (*read_mac_address) (struct dvb_usb_adapter *, u8 []); int (*frontend_attach) (struct dvb_usb_adapter *); + int (*frontend_detach)(struct dvb_usb_adapter *); int (*tuner_attach) (struct dvb_usb_adapter *); int (*frontend_ctrl) (struct dvb_frontend *, int); int (*streaming_ctrl) (struct dvb_frontend *, int); diff --git a/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c b/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c index 6c33d85..92bb297 100644 --- a/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c +++ b/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c @@ -664,9 +664,10 @@ err: static int dvb_usbv2_adapter_frontend_exit(struct dvb_usb_adapter *adap) { - int i; - dev_dbg(adap_to_d(adap)-udev-dev, %s: adap=%d\n, __func__, - adap-id); + int ret, i; + struct dvb_usb_device *d = adap_to_d(adap); + + dev_dbg(d-udev-dev, %s: adap=%d\n, __func__, adap-id); for (i = MAX_NO_OF_FE_PER_ADAP - 1; i = 0; i--) { if (adap-fe[i]) { @@ -675,6 +676,15 @@ static int dvb_usbv2_adapter_frontend_exit(struct dvb_usb_adapter *adap) } } + if (d-props-frontend_detach) { + ret = d-props-frontend_detach(adap); + if (ret 0) { + dev_dbg(d-udev-dev, + %s: frontend_detach() failed=%d\n, + __func__, ret); + } + } + return 0; } -- 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
[PATCH 2/3] dvb-usb-v2: add tuner_detach callback
Add tuner_detach callback in order to allow custom detach. It is needed when tuner driver is implemented I2C client or some other kernel bus, but not proprietary dvb_attach / dvb_detach. Signed-off-by: Antti Palosaari cr...@iki.fi --- drivers/media/usb/dvb-usb-v2/dvb_usb.h | 1 + drivers/media/usb/dvb-usb-v2/dvb_usb_core.c | 8 2 files changed, 9 insertions(+) diff --git a/drivers/media/usb/dvb-usb-v2/dvb_usb.h b/drivers/media/usb/dvb-usb-v2/dvb_usb.h index 7e36ee0..14e111e 100644 --- a/drivers/media/usb/dvb-usb-v2/dvb_usb.h +++ b/drivers/media/usb/dvb-usb-v2/dvb_usb.h @@ -257,6 +257,7 @@ struct dvb_usb_device_properties { int (*frontend_attach) (struct dvb_usb_adapter *); int (*frontend_detach)(struct dvb_usb_adapter *); int (*tuner_attach) (struct dvb_usb_adapter *); + int (*tuner_detach)(struct dvb_usb_adapter *); int (*frontend_ctrl) (struct dvb_frontend *, int); int (*streaming_ctrl) (struct dvb_frontend *, int); int (*init) (struct dvb_usb_device *); diff --git a/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c b/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c index 92bb297..a05be7d 100644 --- a/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c +++ b/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c @@ -676,6 +676,14 @@ static int dvb_usbv2_adapter_frontend_exit(struct dvb_usb_adapter *adap) } } + if (d-props-tuner_detach) { + ret = d-props-tuner_detach(adap); + if (ret 0) { + dev_dbg(d-udev-dev, %s: tuner_detach() failed=%d\n, + __func__, ret); + } + } + if (d-props-frontend_detach) { ret = d-props-frontend_detach(adap); if (ret 0) { -- 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
[PATCH 3/3] af9035: remove I2C client differently
It crash kernel when device was removed while it was streaming. That is because we removed driver and frontend thread was still running. Use new callback which allows I2C driver removal just after frontend is unregistered. Signed-off-by: Antti Palosaari cr...@iki.fi --- drivers/media/usb/dvb-usb-v2/af9035.c | 90 +-- 1 file changed, 64 insertions(+), 26 deletions(-) diff --git a/drivers/media/usb/dvb-usb-v2/af9035.c b/drivers/media/usb/dvb-usb-v2/af9035.c index 94563b2..aadabea 100644 --- a/drivers/media/usb/dvb-usb-v2/af9035.c +++ b/drivers/media/usb/dvb-usb-v2/af9035.c @@ -1074,15 +1074,13 @@ static int af9035_get_adapter_count(struct dvb_usb_device *d) return state-dual_mode + 1; } -static void af9035_exit(struct dvb_usb_device *d); - static int af9035_frontend_attach(struct dvb_usb_adapter *adap) { struct state *state = adap_to_priv(adap); struct dvb_usb_device *d = adap_to_d(adap); int ret; - dev_dbg(d-udev-dev, %s:\n, __func__); + dev_dbg(d-udev-dev, %s: adap-id=%d\n, __func__, adap-id); if (!state-af9033_config[adap-id].tuner) { /* unsupported tuner */ @@ -1109,12 +1107,46 @@ static int af9035_frontend_attach(struct dvb_usb_adapter *adap) return 0; err: - af9035_exit(d); /* remove I2C clients */ dev_dbg(d-udev-dev, %s: failed=%d\n, __func__, ret); return ret; } +static int af9035_frontend_detach(struct dvb_usb_adapter *adap) +{ + struct state *state = adap_to_priv(adap); + struct dvb_usb_device *d = adap_to_d(adap); + int demod2; + + dev_dbg(d-udev-dev, %s: adap-id=%d\n, __func__, adap-id); + + /* +* For dual tuner devices we have to resolve 2nd demod client, as there +* is two different kind of tuner drivers; one is using I2C binding +* and the other is using DVB attach/detach binding. +*/ + switch (state-af9033_config[adap-id].tuner) { + case AF9033_TUNER_IT9135_38: + case AF9033_TUNER_IT9135_51: + case AF9033_TUNER_IT9135_52: + case AF9033_TUNER_IT9135_60: + case AF9033_TUNER_IT9135_61: + case AF9033_TUNER_IT9135_62: + demod2 = 2; + default: + demod2 = 1; + } + + if (adap-id == 1) + if (state-i2c_client[demod2]) + af9035_del_i2c_dev(d); + if (adap-id == 0) + if (state-i2c_client[0]) + af9035_del_i2c_dev(d); + + return 0; +} + static struct tua9001_config af9035_tua9001_config = { .i2c_addr = 0x60, }; @@ -1174,7 +1206,7 @@ static int af9035_tuner_attach(struct dvb_usb_adapter *adap) struct i2c_msg msg[1]; u8 tuner_addr; - dev_dbg(d-udev-dev, %s:\n, __func__); + dev_dbg(d-udev-dev, %s: adap-id=%d\n, __func__, adap-id); /* * XXX: Hack used in that function: we abuse unused I2C address bit [7] @@ -1392,12 +1424,36 @@ static int af9035_tuner_attach(struct dvb_usb_adapter *adap) return 0; err: - af9035_exit(d); /* remove I2C clients */ dev_dbg(d-udev-dev, %s: failed=%d\n, __func__, ret); return ret; } +static int af9035_tuner_detach(struct dvb_usb_adapter *adap) +{ + struct state *state = adap_to_priv(adap); + struct dvb_usb_device *d = adap_to_d(adap); + + dev_dbg(d-udev-dev, %s: adap-id=%d\n, __func__, adap-id); + + switch (state-af9033_config[adap-id].tuner) { + case AF9033_TUNER_IT9135_38: + case AF9033_TUNER_IT9135_51: + case AF9033_TUNER_IT9135_52: + case AF9033_TUNER_IT9135_60: + case AF9033_TUNER_IT9135_61: + case AF9033_TUNER_IT9135_62: + if (adap-id == 1) + if (state-i2c_client[3]) + af9035_del_i2c_dev(d); + if (adap-id == 0) + if (state-i2c_client[1]) + af9035_del_i2c_dev(d); + } + + return 0; +} + static int af9035_init(struct dvb_usb_device *d) { struct state *state = d_to_priv(d); @@ -1445,25 +1501,6 @@ err: return ret; } -static void af9035_exit(struct dvb_usb_device *d) -{ - struct state *state = d_to_priv(d); - - dev_dbg(d-udev-dev, %s:\n, __func__); - - if (state-i2c_client[3]) - af9035_del_i2c_dev(d); - - if (state-i2c_client[2]) - af9035_del_i2c_dev(d); - - if (state-i2c_client[1]) - af9035_del_i2c_dev(d); - - if (state-i2c_client[0]) - af9035_del_i2c_dev(d); -} - #if IS_ENABLED(CONFIG_RC_CORE) static int af9035_rc_query(struct dvb_usb_device *d) { @@ -1636,11 +1673,12 @@ static const struct dvb_usb_device_properties af9035_props = { .i2c_algo = af9035_i2c_algo, .read_config = af9035_read_config, .frontend_attach = af9035_frontend_attach, + .frontend_detach =
[GIT PULL] af9035/it9135 changes
The following changes since commit 89fffac802c18caebdf4e91c0785b522c9f6399a: [media] drxk_hard: fix bad alignments (2014-09-03 19:19:18 -0300) are available in the git repository at: git://linuxtv.org/anttip/media_tree.git af9035 for you to fetch changes up to 9507ed6ce19644d0078e0d68af8e4ee73c7eba4b: af9035: remove I2C client differently (2014-09-05 00:45:49 +0300) Antti Palosaari (41): af9033: feed clock to RF tuner af9033: provide dyn0_clk clock source af9035: enable AF9033 demod clock source for IT9135 it913x: fix tuner sleep power leak it913x: avoid division by zero on error case it913x: fix IT9135 AX sleep af9035: remove AVerMedia eeprom override af9035: make checkpatch.pl happy af9033: make checkpatch.pl happy it913x: make checkpatch.pl happy it913x: rename tuner_it913x = it913x af9035: do not attach IT9135 tuner it913x: convert to I2C driver af9035: use I2C it913x tuner driver it913x: change reg read/write routines more common it913x: rename 'state' to 'dev' it913x: convert to RegMap API it913x: re-implement sleep it913x: remove dead code it913x: get rid of script loader and and private header file it913x: refactor code largely it913x: replace udelay polling with jiffies af9033: fix firmware version logging af9033: rename 'state' to 'dev' af9033: convert to I2C client af9033: clean up logging af9035: few small I2C master xfer changes af9033: remove I2C addr from config af9035: replace PCTV device model numbers with name MAINTAINERS: IT913X driver filenames af9033: implement DVBv5 statistic for signal strength af9033: implement DVBv5 statistic for CNR af9033: wrap DVBv3 read SNR to DVBv5 CNR af9033: implement DVBv5 stat block counters af9033: implement DVBv5 post-Viterbi BER af9033: wrap DVBv3 UCB to DVBv5 UCB stats af9033: wrap DVBv3 BER to DVBv5 BER af9033: remove all DVBv3 stat calculation logic dvb-usb-v2: add frontend_detach callback dvb-usb-v2: add tuner_detach callback af9035: remove I2C client differently Bimow Chen (3): af9033: update IT9135 tuner inittabs it913x: init tuner on attach get_dvb_firmware: Update firmware of ITEtech IT9135 Malcolm Priestley (1): af9035: new IDs: add support for PCTV 78e and PCTV 79e Documentation/dvb/get_dvb_firmware| 24 +++-- MAINTAINERS | 2 +- drivers/media/dvb-core/dvb-usb-ids.h | 2 + drivers/media/dvb-frontends/af9033.c | 738 +++ drivers/media/dvb-frontends/af9033.h | 58 -- drivers/media/dvb-frontends/af9033_priv.h | 21 ++-- drivers/media/tuners/Kconfig | 1 + drivers/media/tuners/Makefile | 2 +- drivers/media/tuners/it913x.c | 478 ++ drivers/media/tuners/{tuner_it913x.h = it913x.h} | 41 +--- drivers/media/tuners/tuner_it913x.c | 447 - drivers/media/tuners/tuner_it913x_priv.h | 78 -- drivers/media/usb/dvb-usb-v2/af9035.c | 322 --- drivers/media/usb/dvb-usb-v2/af9035.h | 6 +- drivers/media/usb/dvb-usb-v2/dvb_usb.h| 3 + drivers/media/usb/dvb-usb-v2/dvb_usb_core.c | 24 - 16 files changed, 1252 insertions(+), 995 deletions(-) create mode 100644 drivers/media/tuners/it913x.c rename drivers/media/tuners/{tuner_it913x.h = it913x.h} (67%) delete mode 100644 drivers/media/tuners/tuner_it913x.c delete mode 100644 drivers/media/tuners/tuner_it913x_priv.h -- http://palosaari.fi/ -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 3/3] af9035: remove I2C client differently
On Fri, Sep 05, 2014 at 12:43:43AM +0300, Antti Palosaari wrote: + switch (state-af9033_config[adap-id].tuner) { + case AF9033_TUNER_IT9135_38: + case AF9033_TUNER_IT9135_51: + case AF9033_TUNER_IT9135_52: + case AF9033_TUNER_IT9135_60: + case AF9033_TUNER_IT9135_61: + case AF9033_TUNER_IT9135_62: + demod2 = 2; + default: + demod2 = 1; + } Missing break? -- 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 3/3] af9035: remove I2C client differently
On 09/05/2014 01:50 AM, Daniel Glöckner wrote: On Fri, Sep 05, 2014 at 12:43:43AM +0300, Antti Palosaari wrote: + switch (state-af9033_config[adap-id].tuner) { + case AF9033_TUNER_IT9135_38: + case AF9033_TUNER_IT9135_51: + case AF9033_TUNER_IT9135_52: + case AF9033_TUNER_IT9135_60: + case AF9033_TUNER_IT9135_61: + case AF9033_TUNER_IT9135_62: + demod2 = 2; + default: + demod2 = 1; + } Missing break? YES! will fix... It does not have functionality error in that case, but sure it is wrong and may jump up later when some changes are done. 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
[PATCH] af9035: remove I2C client differently
It crash kernel when device was removed while it was streaming. That is because we removed driver and frontend thread was still running. Use new callback which allows I2C driver removal just after frontend is unregistered. V2: fixed by reported by Daniel Reported-by: Daniel Glöckner daniel...@gmx.net Signed-off-by: Antti Palosaari cr...@iki.fi --- drivers/media/usb/dvb-usb-v2/af9035.c | 93 +-- 1 file changed, 67 insertions(+), 26 deletions(-) diff --git a/drivers/media/usb/dvb-usb-v2/af9035.c b/drivers/media/usb/dvb-usb-v2/af9035.c index 94563b2..440ecb4 100644 --- a/drivers/media/usb/dvb-usb-v2/af9035.c +++ b/drivers/media/usb/dvb-usb-v2/af9035.c @@ -1074,15 +1074,13 @@ static int af9035_get_adapter_count(struct dvb_usb_device *d) return state-dual_mode + 1; } -static void af9035_exit(struct dvb_usb_device *d); - static int af9035_frontend_attach(struct dvb_usb_adapter *adap) { struct state *state = adap_to_priv(adap); struct dvb_usb_device *d = adap_to_d(adap); int ret; - dev_dbg(d-udev-dev, %s:\n, __func__); + dev_dbg(d-udev-dev, %s: adap-id=%d\n, __func__, adap-id); if (!state-af9033_config[adap-id].tuner) { /* unsupported tuner */ @@ -1109,12 +1107,48 @@ static int af9035_frontend_attach(struct dvb_usb_adapter *adap) return 0; err: - af9035_exit(d); /* remove I2C clients */ dev_dbg(d-udev-dev, %s: failed=%d\n, __func__, ret); return ret; } +static int af9035_frontend_detach(struct dvb_usb_adapter *adap) +{ + struct state *state = adap_to_priv(adap); + struct dvb_usb_device *d = adap_to_d(adap); + int demod2; + + dev_dbg(d-udev-dev, %s: adap-id=%d\n, __func__, adap-id); + + /* +* For dual tuner devices we have to resolve 2nd demod client, as there +* is two different kind of tuner drivers; one is using I2C binding +* and the other is using DVB attach/detach binding. +*/ + switch (state-af9033_config[adap-id].tuner) { + case AF9033_TUNER_IT9135_38: + case AF9033_TUNER_IT9135_51: + case AF9033_TUNER_IT9135_52: + case AF9033_TUNER_IT9135_60: + case AF9033_TUNER_IT9135_61: + case AF9033_TUNER_IT9135_62: + demod2 = 2; + break; + default: + demod2 = 1; + } + + if (adap-id == 1) { + if (state-i2c_client[demod2]) + af9035_del_i2c_dev(d); + } else if (adap-id == 0) { + if (state-i2c_client[0]) + af9035_del_i2c_dev(d); + } + + return 0; +} + static struct tua9001_config af9035_tua9001_config = { .i2c_addr = 0x60, }; @@ -1174,7 +1208,7 @@ static int af9035_tuner_attach(struct dvb_usb_adapter *adap) struct i2c_msg msg[1]; u8 tuner_addr; - dev_dbg(d-udev-dev, %s:\n, __func__); + dev_dbg(d-udev-dev, %s: adap-id=%d\n, __func__, adap-id); /* * XXX: Hack used in that function: we abuse unused I2C address bit [7] @@ -1392,12 +1426,37 @@ static int af9035_tuner_attach(struct dvb_usb_adapter *adap) return 0; err: - af9035_exit(d); /* remove I2C clients */ dev_dbg(d-udev-dev, %s: failed=%d\n, __func__, ret); return ret; } +static int af9035_tuner_detach(struct dvb_usb_adapter *adap) +{ + struct state *state = adap_to_priv(adap); + struct dvb_usb_device *d = adap_to_d(adap); + + dev_dbg(d-udev-dev, %s: adap-id=%d\n, __func__, adap-id); + + switch (state-af9033_config[adap-id].tuner) { + case AF9033_TUNER_IT9135_38: + case AF9033_TUNER_IT9135_51: + case AF9033_TUNER_IT9135_52: + case AF9033_TUNER_IT9135_60: + case AF9033_TUNER_IT9135_61: + case AF9033_TUNER_IT9135_62: + if (adap-id == 1) { + if (state-i2c_client[3]) + af9035_del_i2c_dev(d); + } else if (adap-id == 0) { + if (state-i2c_client[1]) + af9035_del_i2c_dev(d); + } + } + + return 0; +} + static int af9035_init(struct dvb_usb_device *d) { struct state *state = d_to_priv(d); @@ -1445,25 +1504,6 @@ err: return ret; } -static void af9035_exit(struct dvb_usb_device *d) -{ - struct state *state = d_to_priv(d); - - dev_dbg(d-udev-dev, %s:\n, __func__); - - if (state-i2c_client[3]) - af9035_del_i2c_dev(d); - - if (state-i2c_client[2]) - af9035_del_i2c_dev(d); - - if (state-i2c_client[1]) - af9035_del_i2c_dev(d); - - if (state-i2c_client[0]) - af9035_del_i2c_dev(d); -} - #if IS_ENABLED(CONFIG_RC_CORE) static int af9035_rc_query(struct dvb_usb_device *d) { @@ -1636,11 +1676,12 @@ static const struct dvb_usb_device_properties af9035_props = {
Re: [PATCH] af9035: remove I2C client differently
V2 * Fixed trivial bug reported by Daniel * if/if = if/if else. Compiler, very likely, could not see adap-id behind many pointers, cannot change between two consecutive if's. Adding exclusive if()/if else() makes sure compiler knows only one of if branches could taken. Antti On 09/05/2014 02:15 AM, Antti Palosaari wrote: It crash kernel when device was removed while it was streaming. That is because we removed driver and frontend thread was still running. Use new callback which allows I2C driver removal just after frontend is unregistered. V2: fixed by reported by Daniel Reported-by: Daniel Glöckner daniel...@gmx.net Signed-off-by: Antti Palosaari cr...@iki.fi --- drivers/media/usb/dvb-usb-v2/af9035.c | 93 +-- 1 file changed, 67 insertions(+), 26 deletions(-) diff --git a/drivers/media/usb/dvb-usb-v2/af9035.c b/drivers/media/usb/dvb-usb-v2/af9035.c index 94563b2..440ecb4 100644 --- a/drivers/media/usb/dvb-usb-v2/af9035.c +++ b/drivers/media/usb/dvb-usb-v2/af9035.c @@ -1074,15 +1074,13 @@ static int af9035_get_adapter_count(struct dvb_usb_device *d) return state-dual_mode + 1; } -static void af9035_exit(struct dvb_usb_device *d); - static int af9035_frontend_attach(struct dvb_usb_adapter *adap) { struct state *state = adap_to_priv(adap); struct dvb_usb_device *d = adap_to_d(adap); int ret; - dev_dbg(d-udev-dev, %s:\n, __func__); + dev_dbg(d-udev-dev, %s: adap-id=%d\n, __func__, adap-id); if (!state-af9033_config[adap-id].tuner) { /* unsupported tuner */ @@ -1109,12 +1107,48 @@ static int af9035_frontend_attach(struct dvb_usb_adapter *adap) return 0; err: - af9035_exit(d); /* remove I2C clients */ dev_dbg(d-udev-dev, %s: failed=%d\n, __func__, ret); return ret; } +static int af9035_frontend_detach(struct dvb_usb_adapter *adap) +{ + struct state *state = adap_to_priv(adap); + struct dvb_usb_device *d = adap_to_d(adap); + int demod2; + + dev_dbg(d-udev-dev, %s: adap-id=%d\n, __func__, adap-id); + + /* +* For dual tuner devices we have to resolve 2nd demod client, as there +* is two different kind of tuner drivers; one is using I2C binding +* and the other is using DVB attach/detach binding. +*/ + switch (state-af9033_config[adap-id].tuner) { + case AF9033_TUNER_IT9135_38: + case AF9033_TUNER_IT9135_51: + case AF9033_TUNER_IT9135_52: + case AF9033_TUNER_IT9135_60: + case AF9033_TUNER_IT9135_61: + case AF9033_TUNER_IT9135_62: + demod2 = 2; + break; + default: + demod2 = 1; + } + + if (adap-id == 1) { + if (state-i2c_client[demod2]) + af9035_del_i2c_dev(d); + } else if (adap-id == 0) { + if (state-i2c_client[0]) + af9035_del_i2c_dev(d); + } + + return 0; +} + static struct tua9001_config af9035_tua9001_config = { .i2c_addr = 0x60, }; @@ -1174,7 +1208,7 @@ static int af9035_tuner_attach(struct dvb_usb_adapter *adap) struct i2c_msg msg[1]; u8 tuner_addr; - dev_dbg(d-udev-dev, %s:\n, __func__); + dev_dbg(d-udev-dev, %s: adap-id=%d\n, __func__, adap-id); /* * XXX: Hack used in that function: we abuse unused I2C address bit [7] @@ -1392,12 +1426,37 @@ static int af9035_tuner_attach(struct dvb_usb_adapter *adap) return 0; err: - af9035_exit(d); /* remove I2C clients */ dev_dbg(d-udev-dev, %s: failed=%d\n, __func__, ret); return ret; } +static int af9035_tuner_detach(struct dvb_usb_adapter *adap) +{ + struct state *state = adap_to_priv(adap); + struct dvb_usb_device *d = adap_to_d(adap); + + dev_dbg(d-udev-dev, %s: adap-id=%d\n, __func__, adap-id); + + switch (state-af9033_config[adap-id].tuner) { + case AF9033_TUNER_IT9135_38: + case AF9033_TUNER_IT9135_51: + case AF9033_TUNER_IT9135_52: + case AF9033_TUNER_IT9135_60: + case AF9033_TUNER_IT9135_61: + case AF9033_TUNER_IT9135_62: + if (adap-id == 1) { + if (state-i2c_client[3]) + af9035_del_i2c_dev(d); + } else if (adap-id == 0) { + if (state-i2c_client[1]) + af9035_del_i2c_dev(d); + } + } + + return 0; +} + static int af9035_init(struct dvb_usb_device *d) { struct state *state = d_to_priv(d); @@ -1445,25 +1504,6 @@ err: return ret; } -static void af9035_exit(struct dvb_usb_device *d) -{ - struct state *state = d_to_priv(d); - - dev_dbg(d-udev-dev, %s:\n, __func__); - - if (state-i2c_client[3]) - af9035_del_i2c_dev(d); - - if (state-i2c_client[2]) - af9035_del_i2c_dev(d); -
Re: [GIT PULL] af9035/it9135 changes
Updated: for you to fetch changes up to ccf62c1bfc897f1d9eb22fa685362638c715e9db: af9035: remove I2C client differently (2014-09-05 02:13:03 +0300) On 09/05/2014 12:53 AM, Antti Palosaari wrote: The following changes since commit 89fffac802c18caebdf4e91c0785b522c9f6399a: [media] drxk_hard: fix bad alignments (2014-09-03 19:19:18 -0300) are available in the git repository at: git://linuxtv.org/anttip/media_tree.git af9035 for you to fetch changes up to 9507ed6ce19644d0078e0d68af8e4ee73c7eba4b: af9035: remove I2C client differently (2014-09-05 00:45:49 +0300) Antti Palosaari (41): af9033: feed clock to RF tuner af9033: provide dyn0_clk clock source af9035: enable AF9033 demod clock source for IT9135 it913x: fix tuner sleep power leak it913x: avoid division by zero on error case it913x: fix IT9135 AX sleep af9035: remove AVerMedia eeprom override af9035: make checkpatch.pl happy af9033: make checkpatch.pl happy it913x: make checkpatch.pl happy it913x: rename tuner_it913x = it913x af9035: do not attach IT9135 tuner it913x: convert to I2C driver af9035: use I2C it913x tuner driver it913x: change reg read/write routines more common it913x: rename 'state' to 'dev' it913x: convert to RegMap API it913x: re-implement sleep it913x: remove dead code it913x: get rid of script loader and and private header file it913x: refactor code largely it913x: replace udelay polling with jiffies af9033: fix firmware version logging af9033: rename 'state' to 'dev' af9033: convert to I2C client af9033: clean up logging af9035: few small I2C master xfer changes af9033: remove I2C addr from config af9035: replace PCTV device model numbers with name MAINTAINERS: IT913X driver filenames af9033: implement DVBv5 statistic for signal strength af9033: implement DVBv5 statistic for CNR af9033: wrap DVBv3 read SNR to DVBv5 CNR af9033: implement DVBv5 stat block counters af9033: implement DVBv5 post-Viterbi BER af9033: wrap DVBv3 UCB to DVBv5 UCB stats af9033: wrap DVBv3 BER to DVBv5 BER af9033: remove all DVBv3 stat calculation logic dvb-usb-v2: add frontend_detach callback dvb-usb-v2: add tuner_detach callback af9035: remove I2C client differently Bimow Chen (3): af9033: update IT9135 tuner inittabs it913x: init tuner on attach get_dvb_firmware: Update firmware of ITEtech IT9135 Malcolm Priestley (1): af9035: new IDs: add support for PCTV 78e and PCTV 79e Documentation/dvb/get_dvb_firmware| 24 +++-- MAINTAINERS | 2 +- drivers/media/dvb-core/dvb-usb-ids.h | 2 + drivers/media/dvb-frontends/af9033.c | 738 +++ drivers/media/dvb-frontends/af9033.h | 58 -- drivers/media/dvb-frontends/af9033_priv.h | 21 ++-- drivers/media/tuners/Kconfig | 1 + drivers/media/tuners/Makefile | 2 +- drivers/media/tuners/it913x.c | 478 ++ drivers/media/tuners/{tuner_it913x.h = it913x.h} | 41 +--- drivers/media/tuners/tuner_it913x.c | 447 - drivers/media/tuners/tuner_it913x_priv.h | 78 -- drivers/media/usb/dvb-usb-v2/af9035.c | 322 --- drivers/media/usb/dvb-usb-v2/af9035.h | 6 +- drivers/media/usb/dvb-usb-v2/dvb_usb.h| 3 + drivers/media/usb/dvb-usb-v2/dvb_usb_core.c | 24 - 16 files changed, 1252 insertions(+), 995 deletions(-) create mode 100644 drivers/media/tuners/it913x.c rename drivers/media/tuners/{tuner_it913x.h = it913x.h} (67%) delete mode 100644 drivers/media/tuners/tuner_it913x.c delete mode 100644 drivers/media/tuners/tuner_it913x_priv.h -- 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
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: Fri Sep 5 04:00:19 CEST 2014 git branch: test git hash: 89fffac802c18caebdf4e91c0785b522c9f6399a gcc version:i686-linux-gcc (GCC) 4.9.1 sparse version: v0.5.0-20-g7abd8a7 host hardware: x86_64 host os:3.16-1.slh.1-amd64 linux-git-arm-at91: OK linux-git-arm-davinci: OK linux-git-arm-exynos: OK linux-git-arm-mx: OK linux-git-arm-omap: OK linux-git-arm-omap1: OK linux-git-arm-pxa: OK linux-git-blackfin: OK linux-git-i686: OK linux-git-m32r: OK linux-git-mips: OK linux-git-powerpc64: OK linux-git-sh: OK linux-git-x86_64: WARNINGS 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: OK linux-3.9.2-i686: OK linux-3.10.1-i686: OK linux-3.11.1-i686: WARNINGS linux-3.12.23-i686: WARNINGS linux-3.13.11-i686: WARNINGS linux-3.14.9-i686: WARNINGS linux-3.15.2-i686: WARNINGS linux-3.16-i686: WARNINGS linux-3.17-rc1-i686: WARNINGS 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: OK linux-3.9.2-x86_64: OK linux-3.10.1-x86_64: OK linux-3.11.1-x86_64: WARNINGS linux-3.12.23-x86_64: WARNINGS linux-3.13.11-x86_64: WARNINGS linux-3.14.9-x86_64: WARNINGS linux-3.15.2-x86_64: WARNINGS linux-3.16-x86_64: WARNINGS linux-3.17-rc1-x86_64: WARNINGS apps: WARNINGS spec-git: OK sparse: ERRORS sparse: ERRORS Detailed results are available here: http://www.xs4all.nl/~hverkuil/logs/Friday.log Full logs are available here: http://www.xs4all.nl/~hverkuil/logs/Friday.tar.bz2 The 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
Added channel parsers for DVB-S2 and DVB-T2 at libdvbv5 and found some issues at dtv-scan-tables
Hi Oliver, I added some improvements at libdvbv5 to parse the DVB-T2 and DVB-S2 lines at dtv-scan-tables. It can now successully parse all correct files there. The patches for it are already merged upstream at: http://git.linuxtv.org/cgit.cgi/v4l-utils.git/ I also added there the Makefile from Jonathan that adds support for converting from DVBv3 to DVBv5, and added myself some logic there to convert back from DVBv5 into DVBv3 format. With that, we can compare and check if everything is being properly parsed on both ways. My hope is to remove the DVBv3 files, keeping everything stored at the DVBv5 format, adding a target to generate the DVBv3 format for the ones that need it. While doing that, I noticed that there are some troubles at some of the existing tables. I fixed most of them and added on my experimental dtv-scan-tables: http://git.linuxtv.org/cgit.cgi/mchehab/dtv-scan-tables.git/ The errors I found are: 1) The dvb-t/ca-AB-Calgary file has an invalid line: http://git.linuxtv.org/cgit.cgi/mchehab/dtv-scan-tables.git/commit/?id=b3eeab8ff0f87f0dd7207ff80aaed4e098052bab 2) One FEC on dvb-t/sk-Bratislava is marked as 2/1 (very likely instead of 1/2): http://git.linuxtv.org/cgit.cgi/mchehab/dtv-scan-tables.git/commit/?id=795628c5ea7b4f99e932b5b243b6ee3a8ebecf0c 3) The dvb-s/Astra-31.5E file has two extra parameters for a DVB-S stream: http://git.linuxtv.org/cgit.cgi/mchehab/dtv-scan-tables.git/commit/?id=9b6ba6016d092ce823a60b2eb537dd3ac2efa825 4) Most of the DVB-T2 lines put the PLP at the end, but one of them put it, together with another field (system ID?), at the beginning: http://git.linuxtv.org/cgit.cgi/mchehab/dtv-scan-tables.git/commit/?id=3c3cd4befd73a5e7fc906224082d197d6b510ea3 With regards to this extra system ID with is always 1 on this file, I'm assuming that this is bogus. Anyway, dvb-format-tool won't keep it (see dvb-t/ug-All diff): -T2 53800 8MHz AUTO AUTO AUTO 32k 1/16 AUTO 1 1 -T2 58600 8MHz AUTO AUTO AUTO 32k 1/16 AUTO 9 1 +T2 53800 8MHz AUTO AUTO AUTO 32k 1/16 AUTO 1 +T2 58600 8MHz AUTO AUTO AUTO 32k 1/16 AUTO 9 There is still one remaining issue affecting two DVB-S files: dvb-s/Hotbird-13.0E and dvb-s/Atlantic-Bird-3-5.0W. There, the DVB-S2 have one (or two) fields that are not part of the DVBv5 API: One extra field at Hotbird 13E: # EUTELSAT SkyPlex, Hotbird 13E # std freq pol sr fec rolloff mod is_id pls_code pls_mode S2 11432000 V 2750 2/3 AUTO 8PSK 1 8 S2 11432000 V 2750 2/3 AUTO 8PSK 2 8 And two extra fields at Atlantic Bird 3: # Atlantic Bird 3 @ 5.0W # std freq pol sr fec rolloff mod is_id pls_code pls_mode S2 11012000 V 3000 AUTO AUTO 8PSK 2 16416 S2 11012000 V 3000 AUTO AUTO 8PSK 3 16416 ... As those parameters don't exist at DVBv5 API, nor at libdvbv5, a conversion on those files will lose them. While it shouldn't be hard to add it to libdvbv5, letting it to parse back and forth, I'm not sure if this is the best way to proceed, as I'm not sure if they're useful and what program uses it, if any. Comments? Regards, Mauro --- As reference, those are the diffs between the original and the parsed files, after removing all comments with this small script: $ for i in atsc/* dvb-?/*; do echo $i; perl -ne 's/\s*#.*//; print $_;' $i a mv a $i; done --- dvb-s/Atlantic-Bird-3-5.0W 2014-09-04 23:48:54.359100590 -0300 +++ dvbv3/dvb-s/Atlantic-Bird-3-5.0W2014-09-04 23:49:02.740096400 -0300 @@ -1,33 +1,30 @@ - - - -S2 11012000 V 3000 AUTO AUTO 8PSK 2 16416 -S2 11012000 V 3000 AUTO AUTO 8PSK 3 16416 -S2 11012000 V 3000 AUTO AUTO 8PSK 11 16416 -S2 11179000 V 3000 AUTO AUTO 8PSK 4 16416 -S2 11179000 V 3000 AUTO AUTO 8PSK 5 16416 -S2 11179000 V 3000 AUTO AUTO 8PSK 12 16416 -S2 11637000 V 3000 AUTO AUTO 8PSK 1 16416 -S2 11637000 V 3000 AUTO AUTO 8PSK 2 16416 -S2 11637000 V 3000 AUTO AUTO 8PSK 3 16416 -S2 11637000 V 3000 AUTO AUTO 8PSK 4 16416 -S2 11637000 V 3000 AUTO AUTO 8PSK 5 16416 -S2 11637000 V 3000 AUTO AUTO 8PSK 6 16416 -S2 11675000 H 3000 AUTO AUTO 8PSK 7 16416 -S2 11675000 H 3000 AUTO AUTO 8PSK 8 16416 -S2 11675000 H 3000 AUTO AUTO 8PSK 9 16416 -S2 11675000 H 3000 AUTO AUTO 8PSK 10 16416 -S2 11675000 H 3000 AUTO AUTO 8PSK 11 16416 -S2 11675000 H 3000 AUTO AUTO 8PSK 12 16416 -S2 11675000 H 3000 AUTO AUTO 8PSK 13 16416 -S2 11675000 H 3000 AUTO AUTO 8PSK 14 16416 -S2 11675000 H 3000 AUTO AUTO 8PSK 15 16416 -S2 11675000 H 3000 AUTO AUTO 8PSK 16 16416 -S2 12585000 H 2750 AUTO AUTO 8PSK 1 8 -S2 12585000 H 2750 AUTO AUTO 8PSK 2 8 -S2 12606000 V 2990 AUTO AUTO 8PSK 1 8 -S2 12606000 V 2990 AUTO AUTO 8PSK 2 8 -S2 12648000 V 2950 AUTO AUTO 8PSK 1 121212 1 -S2 12648000 V 2950 AUTO AUTO 8PSK 2 121212 1 -S2 12669000 H 3008 AUTO AUTO 8PSK 1 8 -S2 12669000 H 3008 AUTO AUTO 8PSK 2 8 +S2 11012000 V 3000 AUTO AUTO 8PSK 2 +S2 11012000 V
Re: [PATCH 28/46] [media] lm3560: simplify boolean tests
Hi. On Wed, Sep 03, 2014 at 05:33:00PM -0300, Mauro Carvalho Chehab wrote: Instead of using if (on == true), just use if (on). That allows a faster mental parsing when analyzing the code. Signed-off-by: Mauro Carvalho Chehab m.che...@samsung.com Acked-by: Sakari Ailus sakari.ai...@linux.intel.com I will keep it in my mind for my next patch files. Thank you. Acked-by: Daniel Jeong gshark.je...@gmail.com -- 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