Re: [PATCH 0/5] soc-camera: convert to platform device

2009-04-20 Thread Guennadi Liakhovetski
On Mon, 20 Apr 2009, Magnus Damm wrote:

 On Fri, Apr 17, 2009 at 7:43 PM, Guennadi Liakhovetski
 g.liakhovet...@gmx.de wrote:
  On Fri, 17 Apr 2009, Magnus Damm wrote:
  On Fri, Apr 17, 2009 at 4:51 PM, Guennadi Liakhovetski
  g.liakhovet...@gmx.de wrote:
   On Fri, 17 Apr 2009, Magnus Damm wrote:
   On Wed, Apr 15, 2009 at 9:17 PM, Guennadi Liakhovetski
   g.liakhovet...@gmx.de wrote:
This patch series is a preparation for the v4l2-subdev conversion. 
Please,
review and test. My current patch-stack in the form of a
(manually-created) quilt-series is at
http://www.open-technology.de/download/20090415/ based on linux-next
history branch, commit ID in -base file. Don't be surprised, that
patch-set also contains a few not directly related patches.
  
   Testing on Migo-R board with 2.6.30-rc2-git-something and the
   following cherry-picked patches:
  
   0007-driver-core-fix-driver_match_device.patch
   0033-soc-camera-host-driver-cleanup.patch
   0034-soc-camera-remove-an-extra-device-generation-from-s.patch
   0035-soc-camera-simplify-register-access-routines-in-mul.patch
   and part of 0036 (avoiding rejects, ap325 seems broken btw)
  
   Have I broken it or is it unrelated?
 
  2.6.30-rc seems broken on Migo-R. A quick check suggests the following:
 
  Ok, before we come to Migo-R, what is with ap325? Have I broken it with
  this my series or is it a different problem?
 
 Not sure. I used 2.6.30-rc but I guess your patches are aimed at linux-next.
 
  V4L/DVB (10141): OK
  V4L/DVB (10672): BAD
  V4L/DVB (11024): BAD
 
  These seem to be pretty random snapshots... Are they all on Linus' master
  or on next or on v4l-dvb? You did pick up the
 
  0007-driver-core-fix-driver_match_device.patch
 
 Yeah, I tried that one. I'm not sure what was the problem, but it's gone now.
 
 Today I've tested the following on top of linux-2.6 (stable 2.6.30-rc)
 d91dfbb41bb2e9bdbfbd2cc7078ed7436eab027a
 
 0033-soc-camera-host-driver-cleanup.patch
 0034-soc-camera-remove-an-extra-device-generation-from-s.patch
 0035-soc-camera-simplify-register-access-routines-in-mul.patch
 
 So far OK.
 However, applying 0036- or v2 from the mailing list results in rejects
 (probably because linux-next vs linux-2.6 differences) but the files
 should not affect Migo-R.
 
 So with 0036 or v2 applied it builds ok for Migo-R, but I can't open
 /dev/video0 for some reason. Reverting the patch and only using
 0033-0035 above results in ok /dev/video0 opening.

Did you have video drivers build in or as modules? If modules - in which 
order did you load them? Unfortunately, at the moment it might be 
important:-( What's in dmesg after loading all drivers?

 What are your dependencies?
 
 I'll try out your 20090415/series on top of the matching linux-next for now.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: libv4l release: 0.5.97: the whitebalance release!

2009-04-20 Thread Hans de Goede



On 04/20/2009 06:43 AM, Erik Andrén wrote:


Hans de Goede wrote:


On 04/19/2009 09:20 PM, Erik Andrén wrote:

2009/4/19 Hans de Goedehdego...@redhat.com:

On 04/18/2009 04:40 PM, Erik Andrén wrote:

Hans de Goede wrote:

On 04/17/2009 09:27 PM, Erik Andrén wrote:

Hans de Goede wrote:

On 04/16/2009 10:46 PM, Adam Baker wrote:

On Thursday 16 Apr 2009, Hans de Goede wrote:

On 04/16/2009 12:26 AM, Adam Baker wrote:

On Wednesday 15 Apr 2009, Hans de Goede wrote:

Currently only whitebalancing is enabled and only on Pixarts
(pac)
webcams (which benefit tremendously from this). To test this
with
other
webcams (after instaling this release) do:

export LIBV4LCONTROL_CONTROLS=15
LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so v4l2ucp

Strangely while those instructions give me a whitebalance control
for the
sq905 based camera I can't get it to appear for a pac207 based
camera
regardless of whether LIBV4LCONTROL_CONTROLS is set.

Thats weird, there is a small bug in the handling of pac207
cams with usb id 093a:2476 causing libv4l to not automatically
enable whitebalancing (and the control) for cams with that id,
but if you have LIBV4LCONTROL_CONTROLS set (exported!) both
when loading v4l2ucp (you must preload v4l2convert.so!) and
when loading your viewer, then it should work.


I've tested it by plugging in the sq905 camera, verifying the
whitebablance
control is present and working, unplugging the sq905 and
plugging in
the
pac207 and using up arrow to restart v4l2ucp and svv so I think
I've
eliminated most finger trouble possibilities. The pac207 is id
093a:2460 so
not the problem id. I'll have to investigate more thoroughly later.


Does the pac207 perhaps have a / in its card string (see v4l-info
output) ?
if so try out this patch:
http://linuxtv.org/hg/~hgoede/libv4l/rev/1e08d865690a


I have the same issue as Adam when trying to test this with my
gspca_stv06xx based Quickcam Web camera i. e no whitebalancing
controls show up. I'm attaching a dump which logs all available
pixformats and v4l2ctrls showing that libv4l is properly loaded.
(And yes, LIBV4LCONTROL_CONTROLS is exported and set to 15).

Best regards,
Erik


Ah, you are using v4l2-ctl, not v4l2ucp, and that uses
V4L2_CTRL_FLAG_NEXT_CTRL
control enumeration. My code doesn't handle V4L2_CTRL_FLAG_NEXT_CTRL
(which is
a bug). I'm not sure when I'll have time to fix this. Patches welcome,
or in
the mean time use v4l2ucp to play with the controls.


Actually, I've tried to use both without finding the controls.
I've only tried with v4l2ucp v. 1.2. Is 1.3 necessary?


Apparently there are different versions of v4l2ucp in different distro's
and some do use the V4L2_CTRL_FLAG_NEXT_CTRL, just like v4l2-ctl. See
Adam Baker's patch later in this thread. Which I will apply to my
tree after I've reviewed it (when I find some time currently I've a
lot of
$work$ )


Applying Adam Bakers patch makes the control appear _but_ I can't seem
to make out any difference when any of the whitebalancing and
normalize options, regardless of how i tweak the max / min values.


Did you also do the
export LIBV4LCONTROL_CONTROLS=15

In the terminal from where you are starting the viewing application ?



Yes.



Hmm,

Then the camera you are using probably already has some whitebalancing
itself using the same algorithm. What happens if you enable normalize
and then lower the high bound significantly? If that doesn't do anything
either then somehow things are not working.

Regards,

Hans
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: libv4l release: 0.5.97: the whitebalance release!

2009-04-20 Thread Erik Andrén
2009/4/20 Hans de Goede hdego...@redhat.com:


 On 04/20/2009 06:43 AM, Erik Andrén wrote:

 Hans de Goede wrote:

 On 04/19/2009 09:20 PM, Erik Andrén wrote:

 2009/4/19 Hans de Goedehdego...@redhat.com:

 On 04/18/2009 04:40 PM, Erik Andrén wrote:

 Hans de Goede wrote:

 On 04/17/2009 09:27 PM, Erik Andrén wrote:

 Hans de Goede wrote:

 On 04/16/2009 10:46 PM, Adam Baker wrote:

 On Thursday 16 Apr 2009, Hans de Goede wrote:

 On 04/16/2009 12:26 AM, Adam Baker wrote:

 On Wednesday 15 Apr 2009, Hans de Goede wrote:

 Currently only whitebalancing is enabled and only on Pixarts
 (pac)
 webcams (which benefit tremendously from this). To test this
 with
 other
 webcams (after instaling this release) do:

 export LIBV4LCONTROL_CONTROLS=15
 LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so v4l2ucp

 Strangely while those instructions give me a whitebalance
 control
 for the
 sq905 based camera I can't get it to appear for a pac207 based
 camera
 regardless of whether LIBV4LCONTROL_CONTROLS is set.

 Thats weird, there is a small bug in the handling of pac207
 cams with usb id 093a:2476 causing libv4l to not automatically
 enable whitebalancing (and the control) for cams with that id,
 but if you have LIBV4LCONTROL_CONTROLS set (exported!) both
 when loading v4l2ucp (you must preload v4l2convert.so!) and
 when loading your viewer, then it should work.

 I've tested it by plugging in the sq905 camera, verifying the
 whitebablance
 control is present and working, unplugging the sq905 and
 plugging in
 the
 pac207 and using up arrow to restart v4l2ucp and svv so I think
 I've
 eliminated most finger trouble possibilities. The pac207 is id
 093a:2460 so
 not the problem id. I'll have to investigate more thoroughly
 later.

 Does the pac207 perhaps have a / in its card string (see v4l-info
 output) ?
 if so try out this patch:
 http://linuxtv.org/hg/~hgoede/libv4l/rev/1e08d865690a

 I have the same issue as Adam when trying to test this with my
 gspca_stv06xx based Quickcam Web camera i. e no whitebalancing
 controls show up. I'm attaching a dump which logs all available
 pixformats and v4l2ctrls showing that libv4l is properly loaded.
 (And yes, LIBV4LCONTROL_CONTROLS is exported and set to 15).

 Best regards,
 Erik

 Ah, you are using v4l2-ctl, not v4l2ucp, and that uses
 V4L2_CTRL_FLAG_NEXT_CTRL
 control enumeration. My code doesn't handle V4L2_CTRL_FLAG_NEXT_CTRL
 (which is
 a bug). I'm not sure when I'll have time to fix this. Patches
 welcome,
 or in
 the mean time use v4l2ucp to play with the controls.

 Actually, I've tried to use both without finding the controls.
 I've only tried with v4l2ucp v. 1.2. Is 1.3 necessary?

 Apparently there are different versions of v4l2ucp in different
 distro's
 and some do use the V4L2_CTRL_FLAG_NEXT_CTRL, just like v4l2-ctl. See
 Adam Baker's patch later in this thread. Which I will apply to my
 tree after I've reviewed it (when I find some time currently I've a
 lot of
 $work$ )

 Applying Adam Bakers patch makes the control appear _but_ I can't seem
 to make out any difference when any of the whitebalancing and
 normalize options, regardless of how i tweak the max / min values.

 Did you also do the
 export LIBV4LCONTROL_CONTROLS=15

 In the terminal from where you are starting the viewing application ?


 Yes.


 Hmm,

 Then the camera you are using probably already has some whitebalancing
 itself using the same algorithm. What happens if you enable normalize
 and then lower the high bound significantly? If that doesn't do anything
 either then somehow things are not working.


I don't think this sensor/camera has any whitebalancing as the image
quality is fine in normal daylight but gets yellowtones when using
lightbulbs.
I'll add some printks to libv4l to verify that the whitebalance
processing routines are actually called and get back to you with the
results.

Best regards,
Erik

 Regards,

 Hans

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/5] soc-camera: convert to platform device

2009-04-20 Thread Magnus Damm
On Mon, Apr 20, 2009 at 4:22 PM, Guennadi Liakhovetski
g.liakhovet...@gmx.de wrote:
 On Mon, 20 Apr 2009, Magnus Damm wrote:
 On Fri, Apr 17, 2009 at 7:43 PM, Guennadi Liakhovetski
 g.liakhovet...@gmx.de wrote:
  On Fri, 17 Apr 2009, Magnus Damm wrote:
  On Fri, Apr 17, 2009 at 4:51 PM, Guennadi Liakhovetski
  g.liakhovet...@gmx.de wrote:
   On Fri, 17 Apr 2009, Magnus Damm wrote:
   On Wed, Apr 15, 2009 at 9:17 PM, Guennadi Liakhovetski
   g.liakhovet...@gmx.de wrote:
This patch series is a preparation for the v4l2-subdev conversion. 
Please,
review and test. My current patch-stack in the form of a
(manually-created) quilt-series is at
http://www.open-technology.de/download/20090415/ based on linux-next
history branch, commit ID in -base file. Don't be surprised, that
patch-set also contains a few not directly related patches.

 Today I've tested the following on top of linux-2.6 (stable 2.6.30-rc)
 d91dfbb41bb2e9bdbfbd2cc7078ed7436eab027a

 0033-soc-camera-host-driver-cleanup.patch
 0034-soc-camera-remove-an-extra-device-generation-from-s.patch
 0035-soc-camera-simplify-register-access-routines-in-mul.patch

 So far OK.
 However, applying 0036- or v2 from the mailing list results in rejects
 (probably because linux-next vs linux-2.6 differences) but the files
 should not affect Migo-R.

 So with 0036 or v2 applied it builds ok for Migo-R, but I can't open
 /dev/video0 for some reason. Reverting the patch and only using
 0033-0035 above results in ok /dev/video0 opening.

 Did you have video drivers build in or as modules? If modules - in which
 order did you load them? Unfortunately, at the moment it might be
 important:-( What's in dmesg after loading all drivers?

They are compiled-in. No modules.

 What are your dependencies?

 I'll try out your 20090415/series on top of the matching linux-next for now.

So linux-next fa169db2b277ebafa466d625ed2d16b2d2a4bc82 with
20090415/series applies without any rejects and compiles just fine for
Migo-R. However, during runtime I experience the same problem as with
2.6.30-rc plus 0033-0035 + 0036 or v2:

/ # /mplayer -flip -vf mirror -quiet tv://
MPlayer dev-SVN-rUNKNOWN-4.2-SH4-LINUX_v0701 (C) 2000-2008 MPlayer Team

Playing tv://.
TV file format detected.
Selected driver: v4l2
 name: Video 4 Linux 2 input
 author: Martin Olschewski olschew...@zpr.uni-koeln.de
 comment: first try, more to come ;-)
v4l2: unable to open '/dev/video0': No such device or address
v4l2: ioctl set mute failed: Bad file descriptor
v4l2: 0 frames successfully processed, 0 frames dropped.


Exiting... (End of file)
/ #

Removing 0036 unbreaks the code and mplayer/capture.c works as expected.

I also tried out v2 of your soc-camera-platform patch but it still
does not work.

Can you please test on your Migo-R board? I'd be happy to assist you
in setting up your environment.

/ magnus
--
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 0/5] soc-camera: convert to platform device

2009-04-20 Thread Guennadi Liakhovetski
On Mon, 20 Apr 2009, Magnus Damm wrote:

 So linux-next fa169db2b277ebafa466d625ed2d16b2d2a4bc82 with
 20090415/series applies without any rejects and compiles just fine for
 Migo-R. However, during runtime I experience the same problem as with
 2.6.30-rc plus 0033-0035 + 0036 or v2:
 
 / # /mplayer -flip -vf mirror -quiet tv://
 MPlayer dev-SVN-rUNKNOWN-4.2-SH4-LINUX_v0701 (C) 2000-2008 MPlayer Team
 
 Playing tv://.
 TV file format detected.
 Selected driver: v4l2
  name: Video 4 Linux 2 input
  author: Martin Olschewski olschew...@zpr.uni-koeln.de
  comment: first try, more to come ;-)
 v4l2: unable to open '/dev/video0': No such device or address
 v4l2: ioctl set mute failed: Bad file descriptor
 v4l2: 0 frames successfully processed, 0 frames dropped.
 
 
 Exiting... (End of file)
 / #
 
 Removing 0036 unbreaks the code and mplayer/capture.c works as expected.
 
 I also tried out v2 of your soc-camera-platform patch but it still
 does not work.
 
 Can you please test on your Migo-R board? I'd be happy to assist you
 in setting up your environment.

I did test it and it worked - exactly as you say - with the entire patch 
stack + v2 of soc-camera: convert to platform device, the only 
difference that I can see so far, is that I used modules. So, you can 
either look in dmesg for driver initialisation whether ov772x and tw9910 
have found theit i2c chips, or just wait until I test a monolitic build 
myself. It can be problematic if the i2c-host driver initialises too 
late... If you want to test a modular build it would be enough to just 
have sh_mobile_ceu_camera.ko as a module, the rest can stay built in.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/5] soc-camera: convert to platform device

2009-04-20 Thread Magnus Damm
On Mon, Apr 20, 2009 at 5:14 PM, Guennadi Liakhovetski
g.liakhovet...@gmx.de wrote:
 On Mon, 20 Apr 2009, Magnus Damm wrote:
 Can you please test on your Migo-R board? I'd be happy to assist you
 in setting up your environment.

 I did test it and it worked - exactly as you say - with the entire patch
 stack + v2 of soc-camera: convert to platform device, the only
 difference that I can see so far, is that I used modules. So, you can
 either look in dmesg for driver initialisation whether ov772x and tw9910
 have found theit i2c chips, or just wait until I test a monolitic build
 myself. It can be problematic if the i2c-host driver initialises too
 late... If you want to test a modular build it would be enough to just
 have sh_mobile_ceu_camera.ko as a module, the rest can stay built in.

I prefer to wait then. Please consider the built-in case broken.

Usually I get some output similar to this during boot:

camera 0-0: SuperH Mobile CEU driver attached to camera 0
camera 0-0: ov7725 Product ID 77:21 Manufacturer ID 7f:a2
camera 0-0: SuperH Mobile CEU driver detached from camera 0

But with the convert to platform device patch appied I see nothing like that.

The migor_defconfig should give you the static non-module
configuration that is broken.

Cheers,

/ magnus
--
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][RFC] videobuf-dma-config: zero copy USERPTR support

2009-04-20 Thread Magnus Damm
From: Magnus Damm d...@igel.co.jp

Zero copy video frame capture from user space using V4L2 USERPTR.

This patch adds USERPTR support to the videobuf-dma-contig buffer code.
Since videobuf-dma-contig is designed to handle physically contiguous
memory, this patch modifies the videobuf-dma-contig code to only accept
a pointer physically contiguous memory. For now only VM_PFNMAP vmas are
supported, so forget hotplug.

On SuperH Mobile we use this approach for our V4L2 CEU driver together
with various multimedia accelerator blocks that are exported to user 
space using UIO. The UIO kernel code exports physically contiugous memory
to user space and lets the user space application mmap() this memory and
pass a pointer using the USERPTR interface for V4L2 zero copy operation.

With this approach we support zero copy capture, hardware scaling and
various forms of hardware encoding.

Hopefully this patch is useful for other SoCs. For user space example
code I suggest having a look at the USERPTR implementation in capture.c.

Any comments? Does anyone need to use memory backed by struct page?

Signed-off-by: Magnus Damm d...@igel.co.jp
---

 drivers/media/video/videobuf-dma-contig.c |  138 +++--
 1 file changed, 131 insertions(+), 7 deletions(-)

--- 0001/drivers/media/video/videobuf-dma-contig.c
+++ work/drivers/media/video/videobuf-dma-contig.c  2009-04-20 
18:04:32.0 +0900
@@ -17,6 +17,8 @@
 #include linux/init.h
 #include linux/module.h
 #include linux/mm.h
+#include linux/hugetlb.h
+#include linux/pagemap.h
 #include linux/dma-mapping.h
 #include media/videobuf-dma-contig.h
 
@@ -25,6 +27,7 @@ struct videobuf_dma_contig_memory {
void *vaddr;
dma_addr_t dma_handle;
unsigned long size;
+   int is_userptr;
 };
 
 #define MAGIC_DC_MEM 0x0733ac61
@@ -108,6 +111,117 @@ static struct vm_operations_struct video
.close= videobuf_vm_close,
 };
 
+static void videobuf_dma_contig_user_put(struct videobuf_dma_contig_memory 
*mem)
+{
+   mem-is_userptr = 0;
+   mem-dma_handle = 0;
+   mem-size = 0;
+}
+
+/* modelled after follow_phys() in mm/memory.c */
+static int get_pfn(struct vm_area_struct *vma,
+  unsigned long address, unsigned long *pfnp)
+{
+   struct mm_struct *mm = vma-vm_mm;
+   pgd_t *pgd;
+   pud_t *pud;
+   pmd_t *pmd;
+   pte_t *ptep, pte;
+   spinlock_t *ptl;
+
+   if (!(vma-vm_flags  (VM_IO | VM_PFNMAP)))
+   goto no_page_table;
+
+   pgd = pgd_offset(mm, address);
+   if (pgd_none(*pgd) || unlikely(pgd_bad(*pgd)))
+   goto no_page_table;
+
+   pud = pud_offset(pgd, address);
+   if (pud_none(*pud) || unlikely(pud_bad(*pud)))
+   goto no_page_table;
+
+   pmd = pmd_offset(pud, address);
+   if (pmd_none(*pmd) || unlikely(pmd_bad(*pmd)))
+   goto no_page_table;
+
+   /* We cannot handle huge page PFN maps. Luckily they don't exist. */
+   if (pmd_huge(*pmd))
+   goto no_page_table;
+
+   ptep = pte_offset_map_lock(mm, pmd, address, ptl);
+   if (!ptep)
+   goto no_page_table;
+
+   pte = *ptep;
+   if (!pte_present(pte))
+   goto unlock;
+
+   *pfnp = pte_pfn(pte);
+   pte_unmap_unlock(ptep, ptl);
+   return 0;
+unlock:
+   pte_unmap_unlock(ptep, ptl);
+no_page_table:
+   return -EINVAL;
+}
+
+
+static int videobuf_dma_contig_user_get(struct videobuf_dma_contig_memory *mem,
+   struct videobuf_buffer *vb)
+{
+   struct mm_struct *mm = current-mm;
+   struct vm_area_struct *vma;
+   unsigned long prev_pfn, this_pfn;
+   unsigned long pages_done, user_address;
+   int ret;
+
+   mem-size = PAGE_ALIGN(vb-size);
+   mem-is_userptr = 0;
+   ret = -EINVAL;
+
+   down_read(mm-mmap_sem);
+
+   vma = find_vma(mm, vb-baddr);
+   if (!vma)
+   goto out_up;
+
+   if ((vb-baddr + mem-size)  vma-vm_end)
+   goto out_up;
+
+   pages_done = 0;
+   prev_pfn = 0; /* kill warning */
+   user_address = vb-baddr;
+
+   while (pages_done  (mem-size  PAGE_SHIFT)) {
+   ret = get_pfn(vma, user_address, this_pfn);
+   if (ret)
+   break;
+
+   if (pages_done == 0) {
+   prev_pfn = this_pfn;
+   mem-dma_handle = this_pfn  PAGE_SHIFT;
+   } else {
+   if (this_pfn != (prev_pfn + 1))
+   ret = -EFAULT;
+   }
+
+   if (ret)
+   break;
+
+   prev_pfn = this_pfn;
+   user_address += PAGE_SIZE;
+   pages_done++;
+   }
+
+   if (!ret  pages_done)
+   mem-is_userptr = 1;
+
+ out_up:
+   up_read(current-mm-mmap_sem);
+
+   return ret;
+}
+
 static void *__videobuf_alloc(size_t size)

RE: [RFC] Stand-alone Resizer/Previewer Driver support under V4L2 framework

2009-04-20 Thread Hiremath, Vaibhav


Thanks,
Vaibhav Hiremath

 -Original Message-
 From: linux-media-ow...@vger.kernel.org [mailto:linux-media-
 ow...@vger.kernel.org] On Behalf Of Dongsoo Kim
 Sent: Sunday, April 19, 2009 12:06 PM
 To: Hans Verkuil
 Cc: Hiremath, Vaibhav; linux-media@vger.kernel.org; Aguirre
 Rodriguez, Sergio Alberto; Toivonen Tuukka.O (Nokia-D/Oulu); linux-
 o...@vger.kernel.org; Nagalla, Hari; Sakari Ailus; Jadav, Brijesh R;
 R, Sivaraj; Hadli, Manjunath; Shah, Hardik; Kumar, Purushotam
 Subject: Re: [RFC] Stand-alone Resizer/Previewer Driver support
 under V4L2 framework
 
 Hello Hans and Hiremath,
 
 One of my recent job is making S3C64XX camera interface driver (even
 though other jobs of mine are not finished yet...;-()
 And, what a incident! S3C64XX has also similar H/W block in camera
 interface.
 Resizer in S3C camera interface can be used in system wide like the
 one in Omap3.
 
[Hiremath, Vaibhav] Can you share the spec for the same; I wanted to verify the 
configuration part of it? What all configuration is exported to the user?

 But in case of mine, I decided to make it as a TYPE_VIDEO_CAPTURE
 and
 TYPE_VIDEO_OUTPUT.
 I thought that is was enough. Actually I took omap video out (vout?)
 for reference :-)

[Hiremath, Vaibhav] I have also implemented the driver is the same way and also 
working with Hans to get it reviewed. But there are some configuration like 
coeff., luma enhancement, etc... need to export to the user, where we need to 
add mechanism in V4L2 framework.

Since we have one more device where we are demanding for M-to-M operation, I 
think it is important to go through it. Can you share some documents of your IP 
for better understanding.


 Cheers,
 
 Nate
 
 
 2009. 04. 19, 오전 12:53, Hans Verkuil 작성:
 
  On Tuesday 31 March 2009 10:53:02 Hiremath, Vaibhav wrote:
  Thanks,
  Vaibhav Hiremath
 
  APPROACH 3 -
  --
 
  .
 
  (Any other approach which I could not think of would be
 
  appreciated)
 
  I would prefer second approach, since this will provide
 standard
  interface to applications independent on underneath hardware.
 
  There may be many number of such configuration parameters
 required
 
  for
 
  different such devices, we need to work on this and come up
 with
 
  some
 
  standard capability fields covering most of available devices.
 
  Does anybody have some other opinions on this?
  Any suggestions will be helpful here,
 
  FYI: I have very little time to look at this for the next 2-3
 weeks.
  As you
  know I'm working on the last pieces of the v4l2_subdev
 conversion
  for 2.6.30
  that should be finished this week. After that I'm attending the
  Embedded
  Linux Conference in San Francisco.
 
  But I always thought that something like this would be just a
  regular video
  device that can do both 'output' and 'capture'. For a resizer I
  would
  expect that you set the 'output' size (the size of your source
  image) and
  the 'capture' size (the size of the resized image), then just
 send
  the
  frames to the device (== resizer) and get them back on the
 capture
  side.
 
  [Hiremath, Vaibhav] Yes, it is possible to do that.
 
  Hans,
 
  I went through the link referred by Sergio and I think we should
  inherit
  some implementation for CODECs here for such devices.
 
  V4L2_BUF_TYPE_CODECIN - To access the input format.
  V4L2_BUF_TYPE_CODECOUT - To access the output format.
 
  It makes sense, since such memory-to-memory devices will mostly
 being
  used from codecs context. And this would be more clear from user
  application.
 
  To be honest, I don't see the need for this. I think
  TYPE_VIDEO_CAPTURE and
  TYPE_VIDEO_OUTPUT are perfectly fine.
 
  And as acknowledged by you, we can use VIDIOC_S_FMT for setting
  parameters.
 
  One thing I am not able to convince myself is that, using priv
  field
  for custom configuration.
 
  I agree. Especially since you cannot use it as a pointer to
 addition
  information.
 
  I would prefer and recommend capability based
  interface, where application will query the capability of the
  device for
  luma enhancement, filter coefficients (number of coeff and
 depth),
  interpolation type, etc...
 
  This way we can make sure that, any such future devices can be
  adapted by
  this framework.
 
  The big question is how many of these capabilities are 'generic'
 and
  how
  many are very much hardware specific. I am leaning towards using
 the
  extended control API for this. It's a bit awkward to implement in
  drivers
  at the moment, but that should improve in the future when a lot of
 the
  control handling code will move into the new core framework.
 
  I really need to know more about the sort of features that omap/
  davinci
  offer (and preferably also for similar devices by other
  manufacturers).
 
 
 
  Hans,
  Have you get a chance to look at Video-Buf layer issues I
 mentioned
  in
  original draft?
 
  I've asked Magnus Damm to take a look at this. I know he did some
  work in
  this area and 

RE: [RFC] Stand-alone Resizer/Previewer Driver support under V4L2 framework

2009-04-20 Thread Hiremath, Vaibhav


Thanks,
Vaibhav Hiremath

 -Original Message-
 From: Hans Verkuil [mailto:hverk...@xs4all.nl]
 Sent: Saturday, April 18, 2009 9:24 PM
 To: Hiremath, Vaibhav
 Cc: linux-media@vger.kernel.org; Aguirre Rodriguez, Sergio Alberto;
 DongSoo(Nathaniel) Kim; Toivonen Tuukka.O (Nokia-D/Oulu); linux-
 o...@vger.kernel.org; Nagalla, Hari; Sakari Ailus; Jadav, Brijesh R;
 R, Sivaraj; Hadli, Manjunath; Shah, Hardik; Kumar, Purushotam
 Subject: Re: [RFC] Stand-alone Resizer/Previewer Driver support
 under V4L2 framework
 
 On Tuesday 31 March 2009 10:53:02 Hiremath, Vaibhav wrote:
  Thanks,
  Vaibhav Hiremath
 
APPROACH 3 -
--
   
.
  It makes sense, since such memory-to-memory devices will mostly
 being
  used from codecs context. And this would be more clear from user
  application.
 
 To be honest, I don't see the need for this. I think
 TYPE_VIDEO_CAPTURE and
 TYPE_VIDEO_OUTPUT are perfectly fine.
 
[Hiremath, Vaibhav] Agreed, and you will also find implementation of driver 
aligned to this which I have shared with you.

  And as acknowledged by you, we can use VIDIOC_S_FMT for setting
  parameters.
 
  One thing I am not able to convince myself is that, using priv
 field
  for custom configuration.
 
 I agree. Especially since you cannot use it as a pointer to addition
 information.
 
  I would prefer and recommend capability based
  interface, where application will query the capability of the
 device for
  luma enhancement, filter coefficients (number of coeff and depth),
  interpolation type, etc...
 
  This way we can make sure that, any such future devices can be
 adapted by
  this framework.
 
 The big question is how many of these capabilities are 'generic' and
 how
 many are very much hardware specific. I am leaning towards using the
 extended control API for this. It's a bit awkward to implement in
 drivers
 at the moment, but that should improve in the future when a lot of
 the
 control handling code will move into the new core framework.
 
 I really need to know more about the sort of features that
 omap/davinci
 offer (and preferably also for similar devices by other
 manufacturers).
 
[Hiremath, Vaibhav] Hans, Can we have IRC session for this? We will discuss 
this in detail and try to get closure on it.

Again I would request you to join me and mauro on IRC chat, I will be staying 
online tomorrow.

 
 
 Regards,
 
   Hans
 
 --
 Hans Verkuil - video4linux developer - sponsored by TANDBERG

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC] Stand-alone Resizer/Previewer Driver support under V4L2 framework

2009-04-20 Thread Dongsoo, Nathaniel Kim
Hello Vaibhav,

This is user manual of S3C6400 (not much different from S3C6410)
http://www.ebv.com/fileadmin/products/Products/Samsung/S3C6400/S3C6400X_UserManual_rev1-0_2008-02_661558um.pdf

That SoC is from my company but not from the same division of mine.
Actually I'm doing this driver job without any request from chip
delivering division. I'm doing this because this is so challenging and
want better generic driver :-)

Take a look at the user manual and please let me know your opinion.
In my understanding scaler and some camera interface feature in
S3C64XX are very similar to the features in Omap3.

Cheers,

Nate

On Mon, Apr 20, 2009 at 7:11 PM, Hiremath, Vaibhav hvaib...@ti.com wrote:


 Thanks,
 Vaibhav Hiremath

 -Original Message-
 From: linux-media-ow...@vger.kernel.org [mailto:linux-media-
 ow...@vger.kernel.org] On Behalf Of Dongsoo Kim
 Sent: Sunday, April 19, 2009 12:06 PM
 To: Hans Verkuil
 Cc: Hiremath, Vaibhav; linux-media@vger.kernel.org; Aguirre
 Rodriguez, Sergio Alberto; Toivonen Tuukka.O (Nokia-D/Oulu); linux-
 o...@vger.kernel.org; Nagalla, Hari; Sakari Ailus; Jadav, Brijesh R;
 R, Sivaraj; Hadli, Manjunath; Shah, Hardik; Kumar, Purushotam
 Subject: Re: [RFC] Stand-alone Resizer/Previewer Driver support
 under V4L2 framework

 Hello Hans and Hiremath,

 One of my recent job is making S3C64XX camera interface driver (even
 though other jobs of mine are not finished yet...;-()
 And, what a incident! S3C64XX has also similar H/W block in camera
 interface.
 Resizer in S3C camera interface can be used in system wide like the
 one in Omap3.

 [Hiremath, Vaibhav] Can you share the spec for the same; I wanted to verify 
 the configuration part of it? What all configuration is exported to the user?

 But in case of mine, I decided to make it as a TYPE_VIDEO_CAPTURE
 and
 TYPE_VIDEO_OUTPUT.
 I thought that is was enough. Actually I took omap video out (vout?)
 for reference :-)

 [Hiremath, Vaibhav] I have also implemented the driver is the same way and 
 also working with Hans to get it reviewed. But there are some configuration 
 like coeff., luma enhancement, etc... need to export to the user, where we 
 need to add mechanism in V4L2 framework.

 Since we have one more device where we are demanding for M-to-M operation, I 
 think it is important to go through it. Can you share some documents of your 
 IP for better understanding.


 Cheers,

 Nate


 2009. 04. 19, 오전 12:53, Hans Verkuil 작성:

  On Tuesday 31 March 2009 10:53:02 Hiremath, Vaibhav wrote:
  Thanks,
  Vaibhav Hiremath
 
  APPROACH 3 -
  --
 
  .
 
  (Any other approach which I could not think of would be
 
  appreciated)
 
  I would prefer second approach, since this will provide
 standard
  interface to applications independent on underneath hardware.
 
  There may be many number of such configuration parameters
 required
 
  for
 
  different such devices, we need to work on this and come up
 with
 
  some
 
  standard capability fields covering most of available devices.
 
  Does anybody have some other opinions on this?
  Any suggestions will be helpful here,
 
  FYI: I have very little time to look at this for the next 2-3
 weeks.
  As you
  know I'm working on the last pieces of the v4l2_subdev
 conversion
  for 2.6.30
  that should be finished this week. After that I'm attending the
  Embedded
  Linux Conference in San Francisco.
 
  But I always thought that something like this would be just a
  regular video
  device that can do both 'output' and 'capture'. For a resizer I
  would
  expect that you set the 'output' size (the size of your source
  image) and
  the 'capture' size (the size of the resized image), then just
 send
  the
  frames to the device (== resizer) and get them back on the
 capture
  side.
 
  [Hiremath, Vaibhav] Yes, it is possible to do that.
 
  Hans,
 
  I went through the link referred by Sergio and I think we should
  inherit
  some implementation for CODECs here for such devices.
 
  V4L2_BUF_TYPE_CODECIN - To access the input format.
  V4L2_BUF_TYPE_CODECOUT - To access the output format.
 
  It makes sense, since such memory-to-memory devices will mostly
 being
  used from codecs context. And this would be more clear from user
  application.
 
  To be honest, I don't see the need for this. I think
  TYPE_VIDEO_CAPTURE and
  TYPE_VIDEO_OUTPUT are perfectly fine.
 
  And as acknowledged by you, we can use VIDIOC_S_FMT for setting
  parameters.
 
  One thing I am not able to convince myself is that, using priv
  field
  for custom configuration.
 
  I agree. Especially since you cannot use it as a pointer to
 addition
  information.
 
  I would prefer and recommend capability based
  interface, where application will query the capability of the
  device for
  luma enhancement, filter coefficients (number of coeff and
 depth),
  interpolation type, etc...
 
  This way we can make sure that, any such future devices can be
  adapted by
  this framework.
 
  The big question 

RE: [RFC] Stand-alone Resizer/Previewer Driver support under V4L2 framework

2009-04-20 Thread Hiremath, Vaibhav


Thanks,
Vaibhav Hiremath

 -Original Message-
 From: Dongsoo, Nathaniel Kim [mailto:dongsoo@gmail.com]
 Sent: Monday, April 20, 2009 4:15 PM
 To: Hiremath, Vaibhav
 Cc: Hans Verkuil; linux-media@vger.kernel.org; Aguirre Rodriguez,
 Sergio Alberto; Toivonen Tuukka.O (Nokia-D/Oulu); linux-
 o...@vger.kernel.org; Nagalla, Hari; Sakari Ailus; Jadav, Brijesh R;
 R, Sivaraj; Hadli, Manjunath; Shah, Hardik; Kumar, Purushotam
 Subject: Re: [RFC] Stand-alone Resizer/Previewer Driver support
 under V4L2 framework
 
 Hello Vaibhav,
 
 This is user manual of S3C6400 (not much different from S3C6410)
 http://www.ebv.com/fileadmin/products/Products/Samsung/S3C6400/S3C64
 00X_UserManual_rev1-0_2008-02_661558um.pdf
 
 That SoC is from my company but not from the same division of mine.
 Actually I'm doing this driver job without any request from chip
 delivering division. I'm doing this because this is so challenging
 and
 want better generic driver :-)
 
 Take a look at the user manual and please let me know your opinion.
 In my understanding scaler and some camera interface feature in
 S3C64XX are very similar to the features in Omap3.
 
[Hiremath, Vaibhav] Thanks for the link, I will go though it and get back to 
you.

 Cheers,
 
 Nate
 
 On Mon, Apr 20, 2009 at 7:11 PM, Hiremath, Vaibhav hvaib...@ti.com
 wrote:
 
 
  Thanks,
  Vaibhav Hiremath
 
  -Original Message-
  From: linux-media-ow...@vger.kernel.org [mailto:linux-media-
  ow...@vger.kernel.org] On Behalf Of Dongsoo Kim
  Sent: Sunday, April 19, 2009 12:06 PM
  To: Hans Verkuil
  Cc: Hiremath, Vaibhav; linux-media@vger.kernel.org; Aguirre
  Rodriguez, Sergio Alberto; Toivonen Tuukka.O (Nokia-D/Oulu);
 linux-
  o...@vger.kernel.org; Nagalla, Hari; Sakari Ailus; Jadav, Brijesh
 R;
  R, Sivaraj; Hadli, Manjunath; Shah, Hardik; Kumar, Purushotam
  Subject: Re: [RFC] Stand-alone Resizer/Previewer Driver support
  under V4L2 framework
 
  Hello Hans and Hiremath,
 
  One of my recent job is making S3C64XX camera interface driver
 (even
  though other jobs of mine are not finished yet...;-()
  And, what a incident! S3C64XX has also similar H/W block in
 camera
  interface.
  Resizer in S3C camera interface can be used in system wide like
 the
  one in Omap3.
 
  [Hiremath, Vaibhav] Can you share the spec for the same; I wanted
 to verify the configuration part of it? What all configuration is
 exported to the user?
 
  But in case of mine, I decided to make it as a TYPE_VIDEO_CAPTURE
  and
  TYPE_VIDEO_OUTPUT.
  I thought that is was enough. Actually I took omap video out
 (vout?)
  for reference :-)
 
  [Hiremath, Vaibhav] I have also implemented the driver is the same
 way and also working with Hans to get it reviewed. But there are
 some configuration like coeff., luma enhancement, etc... need to
 export to the user, where we need to add mechanism in V4L2
 framework.
 
  Since we have one more device where we are demanding for M-to-M
 operation, I think it is important to go through it. Can you share
 some documents of your IP for better understanding.
 
 
  Cheers,
 
  Nate
 
 
  2009. 04. 19, 오전 12:53, Hans Verkuil 작성:
 
   On Tuesday 31 March 2009 10:53:02 Hiremath, Vaibhav wrote:
   Thanks,
   Vaibhav Hiremath
  
   APPROACH 3 -
   --
  
   .
  
   (Any other approach which I could not think of would be
  
   appreciated)
  
   I would prefer second approach, since this will provide
  standard
   interface to applications independent on underneath
 hardware.
  
   There may be many number of such configuration parameters
  required
  
   for
  
   different such devices, we need to work on this and come up
  with
  
   some
  
   standard capability fields covering most of available
 devices.
  
   Does anybody have some other opinions on this?
   Any suggestions will be helpful here,
  
   FYI: I have very little time to look at this for the next 2-3
  weeks.
   As you
   know I'm working on the last pieces of the v4l2_subdev
  conversion
   for 2.6.30
   that should be finished this week. After that I'm attending
 the
   Embedded
   Linux Conference in San Francisco.
  
   But I always thought that something like this would be just a
   regular video
   device that can do both 'output' and 'capture'. For a resizer
 I
   would
   expect that you set the 'output' size (the size of your
 source
   image) and
   the 'capture' size (the size of the resized image), then just
  send
   the
   frames to the device (== resizer) and get them back on the
  capture
   side.
  
   [Hiremath, Vaibhav] Yes, it is possible to do that.
  
   Hans,
  
   I went through the link referred by Sergio and I think we
 should
   inherit
   some implementation for CODECs here for such devices.
  
   V4L2_BUF_TYPE_CODECIN - To access the input format.
   V4L2_BUF_TYPE_CODECOUT - To access the output format.
  
   It makes sense, since such memory-to-memory devices will
 mostly
  being
   used from codecs context. And this would be more clear from
 user

Re: [linux-dvb] [PATCH] firmware: convert av7110 driver to request_firmware()

2009-04-20 Thread Mauro Carvalho Chehab
On Sun, 19 Apr 2009 23:41:58 +0200
Román roman.pena.pe...@gmail.com wrote:

 2009/4/19 David Woodhouse dw...@infradead.org:
  On Sun, 2009-04-19 at 13:40 -0700, VDR User wrote:
 
  To be absolutely clear; users compiling dvb drivers outside of the
  kernel should copy v4l-dvb/linux/firmware/av7110/bootcode.bin.ihex to
  /lib/firmware/av7110/bootcode.bin correct?
 
  Run 'objcopy -Iihex -Obinary bootcode.bin.ihex bootcode.bin' first, then
  copy the resulting bootcode.bin file to /lib/firmware/av7110/
 
 
 That doesn't seem very *obvious* to me, actually.

If you see INSTALL file at v4l-dvb tree, you'll see:

...
Firmware rules:

firmware- Create the firmware files that are enclosed at the
  tree.
  Notice: Only a very few firmwares are currently here

firmware_install- Install firmware files under /lib/firmware
...

So, all you would need to do to install firmwares with -hg is to run:
make firmware_install

Anyway, since firmware install is very fast, and in order to avoid such issues,
I've just committed a patch that will run firmware_install when you do a make
install.



Cheers,
Mauro
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [linux-dvb] [PATCH] firmware: convert av7110 driver to request_firmware()

2009-04-20 Thread Román
2009/4/20 Mauro Carvalho Chehab mche...@infradead.org:
 On Sun, 19 Apr 2009 23:41:58 +0200
 Román roman.pena.pe...@gmail.com wrote:

 2009/4/19 David Woodhouse dw...@infradead.org:
  On Sun, 2009-04-19 at 13:40 -0700, VDR User wrote:
 
  To be absolutely clear; users compiling dvb drivers outside of the
  kernel should copy v4l-dvb/linux/firmware/av7110/bootcode.bin.ihex to
  /lib/firmware/av7110/bootcode.bin correct?
 
  Run 'objcopy -Iihex -Obinary bootcode.bin.ihex bootcode.bin' first, then
  copy the resulting bootcode.bin file to /lib/firmware/av7110/
 

 That doesn't seem very *obvious* to me, actually.

 If you see INSTALL file at v4l-dvb tree, you'll see:

 ...
 Firmware rules:

 firmware        - Create the firmware files that are enclosed at the
                  tree.
                  Notice: Only a very few firmwares are currently here

 firmware_install- Install firmware files under /lib/firmware
 ...

 So, all you would need to do to install firmwares with -hg is to run:
        make firmware_install

 Anyway, since firmware install is very fast, and in order to avoid such 
 issues,
 I've just committed a patch that will run firmware_install when you do a make
 install.



 Cheers,
 Mauro


I'm sorry, my fault. As I said, I never had the necessity to install
any firmware.
The patch sounds good, I don't need it myself, but thank you anyway.

Regards,
Román
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


v4l2-subdev Re: [PATCH 0/5] soc-camera: convert to platform device

2009-04-20 Thread Guennadi Liakhovetski
On Mon, 20 Apr 2009, Magnus Damm wrote:

 On Mon, Apr 20, 2009 at 5:14 PM, Guennadi Liakhovetski
 g.liakhovet...@gmx.de wrote:
  On Mon, 20 Apr 2009, Magnus Damm wrote:
  Can you please test on your Migo-R board? I'd be happy to assist you
  in setting up your environment.
 
  I did test it and it worked - exactly as you say - with the entire patch
  stack + v2 of soc-camera: convert to platform device, the only
  difference that I can see so far, is that I used modules. So, you can
  either look in dmesg for driver initialisation whether ov772x and tw9910
  have found theit i2c chips, or just wait until I test a monolitic build
  myself. It can be problematic if the i2c-host driver initialises too
  late... If you want to test a modular build it would be enough to just
  have sh_mobile_ceu_camera.ko as a module, the rest can stay built in.
 
 I prefer to wait then. Please consider the built-in case broken.
 
 Usually I get some output similar to this during boot:
 
 camera 0-0: SuperH Mobile CEU driver attached to camera 0
 camera 0-0: ov7725 Product ID 77:21 Manufacturer ID 7f:a2
 camera 0-0: SuperH Mobile CEU driver detached from camera 0
 
 But with the convert to platform device patch appied I see nothing like 
 that.
 
 The migor_defconfig should give you the static non-module
 configuration that is broken.

Ok, static build is indeed broken. The reason is the wrong initialisation 
order. First, internally we have to link camera host drivers after camera 
device drivers, that's easy. But unfortunately that alone doesn't help. 
The second problem is that i2c is linked after media, or, maybe rather 
media is linked before i2c. Currently in drivers/Makefile media is on 
the same line as base and block, way before IDE, ATA, SCSI, firewire, 
mtd, spi, usb, input... Is there a reason for that? Mauro, would anything 
break if we move it down right after i2c? Another hackish interim solution 
would be to replace module_init with subsys_init in i2c-sh_mobile.c like 
some other i2c adapters do (including MXC, PXA). That's certainly easier, 
but then we'd also have to modify i2c-imx, later maybe i2c-at91.c...

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: v4l2-subdev Re: [PATCH 0/5] soc-camera: convert to platform device

2009-04-20 Thread Mark Brown
On Mon, Apr 20, 2009 at 03:50:44PM +0200, Guennadi Liakhovetski wrote:

 break if we move it down right after i2c? Another hackish interim solution 
 would be to replace module_init with subsys_init in i2c-sh_mobile.c like 
 some other i2c adapters do (including MXC, PXA). That's certainly easier, 
 but then we'd also have to modify i2c-imx, later maybe i2c-at91.c...

That'd be sensible long term anyway - voltage and current regulators are
often I2C devices and they need to be initialised very early in order to
be available for general use.
--
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: v4l2-subdev Re: [PATCH 0/5] soc-camera: convert to platform device

2009-04-20 Thread Guennadi Liakhovetski
On Mon, 20 Apr 2009, Mark Brown wrote:

 On Mon, Apr 20, 2009 at 03:50:44PM +0200, Guennadi Liakhovetski wrote:
 
  break if we move it down right after i2c? Another hackish interim solution 
  would be to replace module_init with subsys_init in i2c-sh_mobile.c like 
  some other i2c adapters do (including MXC, PXA). That's certainly easier, 
  but then we'd also have to modify i2c-imx, later maybe i2c-at91.c...
 
 That'd be sensible long term anyway - voltage and current regulators are
 often I2C devices and they need to be initialised very early in order to
 be available for general use.

If there are other requirements to have i2c initialise early we can well 
move it up the chain. I think it would be preferable to modifying each i2c 
host adapter driver to use subsys_init().

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Add Elgato EyeTV DTT deluxe to dibcom driver

2009-04-20 Thread Patrick Boettcher

On Sun, 19 Apr 2009, Antti Palosaari wrote:


Armin Schenker kirjoitti:

-.num_device_descs = 11,
+.num_device_descs = 12,



-struct dvb_usb_device_description devices[11];
+struct dvb_usb_device_description devices[12];


I don't comment about this patch but general.

I didn't realized this value is allowed to increase when adding new devices. 
Due to that there is now three dvb_usb_device_properties in af9015 which 
makes driver a little bit complex.


What we should do? Can I remove code from af9015 and increase 
dvb_usb_device_description count to about 30? What is biggest suitable value 
we want use, how much memory one entry will take.


One dvb_usb_device_description is (2*15+1) * pointer-size. For 
PC-architecture it seems not big for me, but for other architectures it 
can be a problem.


After 4 years in place I think we could evaluate whether another method 
for the module_device_id-table in all those dvb-usb-modules cannot be made 
differently, best case, without any fixed array-sizes.


One very convenient option would be the driver_info-field in the 
usb_device_id-table, but it will be hard to convert all drivers and to 
keep some information we have today (like the device name) at the same 
time .


Beside the size-problem there is still the issue of having the fixed 
indexes referenced by the dvb_usb_device_descriptor.


No matter how I think about it, I still have such a link between the 
mod_id_table and the dvb_usb_device_description.


If someone comes up with a good idea how to replace the current way of 
doing things, it'll be more than welcome. :)


Patrick.

--
  Mail: patrick.boettc...@desy.de
  WWW:  http://www.wi-bw.tfh-wildau.de/~pboettch/
--
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] Enabling of the Winfast TV2000 XP Global TV capture card remote control

2009-04-20 Thread hermann pitton
Hi Pieter,

Am Montag, den 20.04.2009, 09:47 +0200 schrieb Pieter Van Schaik:
 The Winfast TV2000 XP Global video capture card IR remote keys were
 not initialized and handled in cx88-input.c; added two corresponding
 case statements, where this card's remote works exactly the same as
 the DTV1000's.
 
 Signed-off-by: Pieter C van Schaik vanste...@gmail.com
 ---
 --- linux-2.6.29/drivers/media/video/cx88/cx88-input.c.orig
 2009-04-01 12:38:34.0 +0200
 +++ linux-2.6.29/drivers/media/video/cx88/cx88-input.c  2009-04-01
 12:39:07.0 +0200
 @@ -92,6 +92,7 @@ static void cx88_ir_handle_key(struct cx
   gpio=(gpio  0x7fd) + (auxgpio  0xef);
   break;
   case CX88_BOARD_WINFAST_DTV1000:
 + case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL:
   gpio = (gpio  0x6ff) | ((cx_read(MO_GP1_IO)  8)  0x900);
   auxgpio = gpio;
   break;
 @@ -239,6 +240,7 @@ int cx88_ir_init(struct cx88_core *core,
   break;
   case CX88_BOARD_WINFAST2000XP_EXPERT:
   case CX88_BOARD_WINFAST_DTV1000:
 + case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL:
   ir_codes = ir_codes_winfast;
   ir-gpio_addr = MO_GP0_IO;
   ir-mask_keycode = 0x8f8;

this is at least your third try on it, but it doesn't make it into
http://patchwork.kernel.org/project/linux-media/list

Broken lines and indentation with spaces instead of tabs for what I get.

Also it has an offset of four lines for the second hunk on recent
mercurial v4l-dvb. Use hg diff to create it on that and don't send
patches against 2.6.29. Try README.patches and run at least make
checkpatch once. This gives an ERROR for wrong indentation and so on.

Else try to tweak your mailer or also send as .patch attachment like the
one below for testing.

Cheers,
Hermann

diff -r ac3865b16886 linux/drivers/media/video/cx88/cx88-input.c
--- a/linux/drivers/media/video/cx88/cx88-input.c	Mon Apr 20 08:47:22 2009 -0300
+++ b/linux/drivers/media/video/cx88/cx88-input.c	Mon Apr 20 15:25:19 2009 +0200
@@ -92,6 +92,7 @@
 		gpio=(gpio  0x7fd) + (auxgpio  0xef);
 		break;
 	case CX88_BOARD_WINFAST_DTV1000:
+	case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL:
 		gpio = (gpio  0x6ff) | ((cx_read(MO_GP1_IO)  8)  0x900);
 		auxgpio = gpio;
 		break;
@@ -243,6 +244,7 @@
 		break;
 	case CX88_BOARD_WINFAST2000XP_EXPERT:
 	case CX88_BOARD_WINFAST_DTV1000:
+	case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL:
 		ir_codes = ir_codes_winfast;
 		ir-gpio_addr = MO_GP0_IO;
 		ir-mask_keycode = 0x8f8;


Re: v4l2-subdev Re: [PATCH 0/5] soc-camera: convert to platform device

2009-04-20 Thread Mark Brown
On Mon, Apr 20, 2009 at 04:18:41PM +0200, Guennadi Liakhovetski wrote:

 If there are other requirements to have i2c initialise early we can well 
 move it up the chain. I think it would be preferable to modifying each i2c 
 host adapter driver to use subsys_init().

IIRC there are other ordering constraints on I2C in general that cause
problems there in non-embedded cases but I might be misremembering.
--
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


PULL request http://linuxtv.org/hg/~pb/v4l-dvb/

2009-04-20 Thread Patrick Boettcher

Hi Mauro,

please pull from my repo for the following change:

Add Elgato EyeTV DTT deluxe to dibcom driver

thanks,
Patrick.

--
  Mail: patrick.boettc...@desy.de
  WWW:  http://www.wi-bw.tfh-wildau.de/~pboettch/
--
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: Add Elgato EyeTV DTT deluxe to dibcom driver

2009-04-20 Thread Patrick Boettcher

Hi Armin,

On Sun, 19 Apr 2009, Armin Schenker wrote:


This patch introduces support for DVB-T for the following dibcom based card:
Elgato EyeTV DTT deluxe (USB-ID: 0fd9:0020)


Thanks for the patch - I just applied it.

Patrick.

--
  Mail: patrick.boettc...@desy.de
  WWW:  http://www.wi-bw.tfh-wildau.de/~pboettch/
--
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] [0904_7] Siano: smsdvb - modify license header and included file list.

2009-04-20 Thread Mauro Carvalho Chehab
On Sun, 5 Apr 2009 01:37:23 -0700 (PDT)
Uri Shkolnik uri...@yahoo.com wrote:

 
 # HG changeset patch
 # User Uri Shkolnik u...@siano-ms.com
 # Date 1238695774 -10800
 # Node ID 7b5d5a3a7b8e80359e770041ca4c8cf407d893d6
 # Parent  4a0b207a424af7f05d8eb417a698a82a61dd086f
 [PATCH] [0904_7] Siano: smsdvb - modify license header
 and included file list.
 
 From: Uri Shkolnik u...@siano-ms.com
 
 smsdvb.c (client for DVB-API v3) - modify license header
 and included file list. Removing white spaces.
 There are no implementation changes.

Please split it into different patches:
license changes;
whitespacing and CodingStyle cleanups;
compat patch;
init_completion patch.

 
 
 Priority: normal
 
 Signed-off-by: Uri Shkolnik u...@siano-ms.com
 
 +
 +#ifndef DVB_DEFINE_MOD_OPT_ADAPTER_NR
 +#define DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr) \
 + static short adapter_nr[] = \
 + {[0 ... (8 - 1)] = -1 }; \
 + module_param_array(adapter_nr, short, NULL, 0444); \
 + MODULE_PARM_DESC(adapter_nr, DVB adapter numbers)
 +#define SMS_DVB_OLD_DVB_REGISTER_ADAPTER
 +#endif
  

Why do you need to add such test? If this is due to compat issues, please add
it into a separate patch, and patch also v4l/scripts/gentree.pl to discard
those changes when submitting it upstream.

 + /*
 +  if (client-fe_status  FE_HAS_LOCK)
 +  sms_board_dvb3_event(client-coredev, DVB3_EVENT_FE_LOCK);
 +  else
 +  sms_board_dvb3_event(client-coredev, DVB3_EVENT_FE_UNLOCK);
 +  if (client-sms_stat_dvb.ReceptionData.ErrorTSPackets == 0)
 +  sms_board_dvb3_event(client-coredev, DVB3_EVENT_UNC_OK);
 +  else
 +  sms_board_dvb3_event(client-coredev, DVB3_EVENT_UNC_ERR);
 +  */

The indentation of the above code is completely wrong. Also, it is much better 
to comment experimental codes like the above with:

#if 0
/* Some reason why the code is commented */

(the code)
#endif

 - .caps = FE_CAN_INVERSION_AUTO |
 - FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 |
 - FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO |
 - FE_CAN_QPSK | FE_CAN_QAM_16 | FE_CAN_QAM_64 |
 - FE_CAN_QAM_AUTO | FE_CAN_TRANSMISSION_MODE_AUTO |
 - FE_CAN_GUARD_INTERVAL_AUTO |
 - FE_CAN_RECOVER |
 - FE_CAN_HIERARCHY_AUTO,
 +  FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 |
 +  FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO |
 +  FE_CAN_QPSK | FE_CAN_QAM_16 | FE_CAN_QAM_64 |
 +  FE_CAN_QAM_AUTO | FE_CAN_TRANSMISSION_MODE_AUTO |
 +  FE_CAN_GUARD_INTERVAL_AUTO |
 +  FE_CAN_RECOVER | FE_CAN_HIERARCHY_AUTO,

I suspect that you run some tool like indent to fix indentation. It should be
noticed that sometimes indent produces very bad results. 

In the above, the previous way is correct.

 @@ -541,7 +563,6 @@ static int smsdvb_hotplug(struct smscore
   client-coredev = coredev;
  
   init_completion(client-tune_done);
 - init_completion(client-stat_done);
  
   kmutex_lock(g_smsdvb_clientslock);

The above is unrelated to the other changes. Please break it into a separate
changeset, providing an explanation: why do we need to remove it.

Cheers,
Mauro
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] [0904_6] Siano: smsdvb - new device status mechanism

2009-04-20 Thread Mauro Carvalho Chehab
On Sun, 5 Apr 2009 01:30:42 -0700 (PDT)
Uri Shkolnik uri...@yahoo.com wrote:

 
 # HG changeset patch
 # User Uri Shkolnik u...@siano-ms.com
 # Date 1238694624 -10800
 # Node ID 4a0b207a424af7f05d8eb417a698a82a61dd086f
 # Parent  eb9fed366b2bb2b8a99760f52b9c0e40d72a71e0
 siano: smsdvb - new device status mechanism
 [PATCH] [0904_6] Siano: smsdvb - new device status mechanism
 
 From: Uri Shkolnik u...@siano-ms.com
 
 This is quite large patch, but it atomic. The patch introduces
 new , and much better way to be updated about SMS device status.
 Instead of pulling (by submitting statistics_request message),
 the driver use the information which is pushed by the device.
 Changes are: updated statistics structure (header file) and
 the implementation in the smsdvb which use this information.

Due to the requested changes on the previous patch changing the licensing
terms, this patch doesn't apply anymore.

Also, in big patches like this one, it is a good idea to split codingstyle only
changes from the real code changes, in order to speedup analysing time by the
reviewers. On my case, I use some advanced diff tools (like kdiff3) to hide
codingstyle changes for such patches, but this works only if the patch applies
cleanly.

Cheers,
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


Current state of DVB-C support

2009-04-20 Thread Christian Lyra
Hi there,

I´d like to share with you my recent experience with DVB-C cards and a 
Brazilian Provider.

My first attempt to use a DVB-C was with a KNC1 card. I just had to 
download the latest source from dvb repository, compile and install. 
The card was identified, I could scan channels and watch TV. BUT some 
channels works very badly, as the card couldnt lock properly on a few 
transponders (309mhz and 321mhz). Running a czap on those channels 
shows that the card keep locking and loosing the lock.
I thought that the problem could be something with my cabling, so I 
tried my card at a friend´s house with the same results. I also tried a 
attenuator, but without success too.
  
On my second attempt I bought a twinhan CAB ci card. Card identified, 
but scan didnt worked. Some googleing later, I got it working by 
commenting the line 1360 in dst.c (!(state-dst_type == 
DST_TYPE_IS_CABLE) ). To my surprise this card has NO problem locking 
on 309mhz and 321mhz channels. It seems to take a little longer to 
lock/changing channels compared to my twinhan DVB-S card (I´m comparing 
apples and oranges, right?), but so far it´s working ok.

My third attempt was with a technisat cablestar HD2 card. I used the 
mantis repository to get the card working (is the mantis driver already 
merged with v4l-dvb?). Again, I can scan channels, but the card could 
not  lock on those Transponders. In fact it also take a lot longer to 
lock on a channel, but after it got a lock, it works right.

Since twinhan works fine, I supose that there´s no problem with my 
cable/splitter. Also, I supose that the chance of two disctinct broken 
tuners is low. A recent thread on TT-1501 shows that, if I understood 
it right, there´s a kind of table where a power level is set to each 
frequency range. Is it possible that my two cards didnt worked on those 
especif transporders because of this kind of setting?  BTW, the two non 
working cards have a TDA10023 demodulator. 

I´m not a dev, but I would like to help to debug this. How can I help?

p.s. posting to linux-media, as I was told that linux-dvb is deprecated.

-- 
Christian Lyra
POP-PR - RNP
--
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


Does anyone know of a Microtune MT2067 based adapter?

2009-04-20 Thread Brandon Jenkins
Good day all!

I saw an article this morning that MPH is being rolled out in the US
and I am interested in creating a car PC capable of DVR functionality
based on Microtune's MT2067. I tried searching for adapters online,
but only found articles related to the chip itself. Has anyone seen a
Linux adapter which will work with this tuner? Is anyone working on a
driver for the tuner?

Thanks in advance,

Brandon
--
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: Hauppauge HVR-1500 (aka HP RM436AA#ABA)

2009-04-20 Thread Ben Heggy
I'm having the same issues (recognized - but won't turn on) with the same card
and would be delighted to join the open discussion and to try to help to provide
any information necessary to debug this issue. 

To this point, I have enabled debug options on what I think are the related
modules and have seen nothing that appears to be an error, but am also noticing
that there should be some messages about loading firmware for the various chips
and they don't appear (I did put the firmware files in /lib/firmware but I
cannot find references to their correct md5sums to verify they are correct)

I'm a newbie to linux, but was once (20 years ago) a system manager on a
vax/unix system, so I can find my way around a bit better than average.

Tell me what info you want to see or what actions to try and I will gladly act
immediately.

Ben (pgh...@yahoo.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


Re: topro 6800 driver

2009-04-20 Thread Thomas Champagne
Hello Anders

I found a small time for testing your code. But your code doesn't work
with my webcam. :-(
I think it doesn't have the same sensor. Can you add in the sd_init
method the check of the sensor id ? You can adjust this patch with
your sensor id :
diff -r 5a9a52f1277e linux/drivers/media/video/gspca/tp6800.c
--- a/linux/drivers/media/video/gspca/tp6800.c  Sat Apr 18 18:21:49 2009 +0200
+++ b/linux/drivers/media/video/gspca/tp6800.c  Mon Apr 20 17:33:15 2009 +0200
@@ -1601,8 +1601,21 @@
 /* this function is called at probe and resume time */
 static int sd_init(struct gspca_dev *gspca_dev)
 {
+   int res = 0;
+   __u8 value;
+
/* check if the device responds */
+   REG_W(gspca_dev, TP6800_SIF_TYPE, 0x01);
+   REG_W(gspca_dev, TP6800_SIF_CONTROL, 0x01);
+   REG_W(gspca_dev, TP6800_GPIO_IO, 0x9f);
+   REG_R(gspca_dev, TP6800_GPIO_DATA, value);
+   if ((value  7) != 0x00) {
+   PDEBUG(D_ERR, init reg: 0x%02x. Unrecognized sensor., value);
+   return -1;
+   }
return 0;
+out:
+   return res;
 }

 /* -- start the camera -- */



Please, tell me what is your sensor id.

Thomas
--
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] [0904_8] Siano: add messages handling for big-endian target

2009-04-20 Thread Mauro Carvalho Chehab
On Sun, 5 Apr 2009 01:59:50 -0700 (PDT)
Uri Shkolnik uri...@yahoo.com wrote:

 
 Add code that modify the content of Siano's protocol
 messages when running with big-endian target.

Maybe due to one of the other patches that weren't applied, but this one didn't 
compile: 

/home/v4l/master/v4l/smsdvb.c:49: error: field 'sms_stat_dvb' has incomplete 
type
/home/v4l/master/v4l/smsdvb.c: In function 'smsdvb_onresponse':
/home/v4l/master/v4l/smsdvb.c:95: error: invalid application of 'sizeof' to 
incomplete type 'struct TRANSMISSION_STATISTICS_S' 
/home/v4l/master/v4l/smsdvb.c:95: error: invalid application of 'sizeof' to 
incomplete type 'struct TRANSMISSION_STATISTICS_S' 
/home/v4l/master/v4l/smsdvb.c:101: error: implicit declaration of function 
'CORRECT_STAT_BANDWIDTH'
/home/v4l/master/v4l/smsdvb.c:102: error: implicit declaration of function 
'CORRECT_STAT_TRANSMISSON_MODE'
/home/v4l/master/v4l/smsdvb.c:109: error: storage size of 'SignalStatusData' 
isn't known
/home/v4l/master/v4l/smsdvb.c:125: error: dereferencing pointer to incomplete 
type
/home/v4l/master/v4l/smsdvb.c:126: error: dereferencing pointer to incomplete 
type
/home/v4l/master/v4l/smsdvb.c:127: error: dereferencing pointer to incomplete 
type
/home/v4l/master/v4l/smsdvb.c:128: error: dereferencing pointer to incomplete 
type
/home/v4l/master/v4l/smsdvb.c:129: error: dereferencing pointer to incomplete 
type
/home/v4l/master/v4l/smsdvb.c:130: error: dereferencing pointer to incomplete 
type
/home/v4l/master/v4l/smsdvb.c:131: error: implicit declaration of function 
'CORRECT_STAT_RSSI'
/home/v4l/master/v4l/smsdvb.c:133: error: dereferencing pointer to incomplete 
type
/home/v4l/master/v4l/smsdvb.c:134: error: dereferencing pointer to incomplete 
type
/home/v4l/master/v4l/smsdvb.c:135: error: dereferencing pointer to incomplete 
type
/home/v4l/master/v4l/smsdvb.c:136: error: dereferencing pointer to incomplete 
type
/home/v4l/master/v4l/smsdvb.c:141: error: dereferencing pointer to incomplete 
type
/home/v4l/master/v4l/smsdvb.c:145: error: dereferencing pointer to incomplete 
type
/home/v4l/master/v4l/smsdvb.c:148: error: dereferencing pointer to incomplete 
type
/home/v4l/master/v4l/smsdvb.c:149: error: dereferencing pointer to incomplete 
type
/home/v4l/master/v4l/smsdvb.c:151: error: dereferencing pointer to incomplete 
type
/home/v4l/master/v4l/smsdvb.c:152: error: dereferencing pointer to incomplete 
type
/home/v4l/master/v4l/smsdvb.c:153: error: dereferencing pointer to incomplete 
type
/home/v4l/master/v4l/smsdvb.c:109: warning: unused variable 'SignalStatusData'
make[3]: *** [/home/v4l/master/v4l/smsdvb.o] Error 1


Cheers,
Mauro
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Hauppauge HVR-1500 (aka HP RM436AA#ABA)

2009-04-20 Thread Steven Toth

Ben Heggy wrote:

I'm having the same issues (recognized - but won't turn on) with the same card
and would be delighted to join the open discussion and to try to help to provide
any information necessary to debug this issue. 


To this point, I have enabled debug options on what I think are the related
modules and have seen nothing that appears to be an error, but am also noticing
that there should be some messages about loading firmware for the various chips
and they don't appear (I did put the firmware files in /lib/firmware but I
cannot find references to their correct md5sums to verify they are correct)

I'm a newbie to linux, but was once (20 years ago) a system manager on a
vax/unix system, so I can find my way around a bit better than average.

Tell me what info you want to see or what actions to try and I will gladly act
immediately.


Connect the card.

Cold boot the system, boot linux, use the dmesg command.

Do you see any evidence of the cx23885 driver recognizing your card?

Use the lspci -vn command to display attached PCI(e) devices, is the card 
present?

- Steve
--
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] [0904_8] Siano: add messages handling for big-endian target

2009-04-20 Thread Mauro Carvalho Chehab
On Mon, 20 Apr 2009 12:48:39 -0300
Mauro Carvalho Chehab mche...@infradead.org wrote:

 On Sun, 5 Apr 2009 01:59:50 -0700 (PDT)
 Uri Shkolnik uri...@yahoo.com wrote:
 
  
  Add code that modify the content of Siano's protocol
  messages when running with big-endian target.
 
 Maybe due to one of the other patches that weren't applied, but this one 
 didn't compile: 

Sorry, my fault. This is some trash from a previous patch that got rejected. 
Patch added, thanks.

Cheers,
Mauro
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] [0904_10] Siano: smsdvb - add events mechanism

2009-04-20 Thread Mauro Carvalho Chehab
On Sun, 5 Apr 2009 03:18:01 -0700 (PDT)
Uri Shkolnik uri...@yahoo.com wrote:

 
 # HG changeset patch
 # User Uri Shkolnik u...@siano-ms.com
 # Date 1238742622 -10800
 # Node ID ec7ee486fb86d51bdb48e6a637a6ddd52e9e08c2
 # Parent  020ba7b31c963bd36d607848198e9e4258a6f80e
 [PATCH] [0904_10] Siano: smsdvb - add events mechanism
 
 From: Uri Shkolnik u...@siano-ms.com
 
 Add events mechanism that will notify the cards component
 (which represent the specific hardware target) for DVB related
 events.


This patch contains unrelated coding style fixes. Some of them seem to be
related to previous changesets not applied.

It is better to split coding style and real changes into separate patches. 

 +/* Events that may come from DVB v3 adapter */
 +static void sms_board_dvb3_event(struct smscore_device_t *coredev,
 + enum SMS_DVB3_EVENTS event) {
 + switch (event) {
 + case DVB3_EVENT_INIT:
 + sms_debug(DVB3_EVENT_INIT);
 + /* sms_board_event(coredev, BOARD_EVENT_BIND); */
 + break;
 + case DVB3_EVENT_SLEEP:
 + sms_debug(DVB3_EVENT_SLEEP);
 + /* sms_board_event(coredev, BOARD_EVENT_POWER_SUSPEND); */
 + break;
 + case DVB3_EVENT_HOTPLUG:
 + sms_debug(DVB3_EVENT_HOTPLUG);
 + /* sms_board_event(coredev, BOARD_EVENT_POWER_INIT); */
 + break;
 + case DVB3_EVENT_FE_LOCK:
 + sms_debug(DVB3_EVENT_FE_LOCK);
 + /* sms_board_event(coredev, BOARD_EVENT_FE_LOCK); */
 + break;
 + case DVB3_EVENT_FE_UNLOCK:
 + sms_debug(DVB3_EVENT_FE_UNLOCK);
 + /* sms_board_event(coredev, BOARD_EVENT_FE_UNLOCK); */
 + break;
 + case DVB3_EVENT_UNC_OK:
 + sms_debug(DVB3_EVENT_UNC_OK);
 + /* sms_board_event(coredev, BOARD_EVENT_MULTIPLEX_OK); */
 + break;
 + case DVB3_EVENT_UNC_ERR:
 + sms_debug(DVB3_EVENT_UNC_ERR);
 + /* sms_board_event(coredev, BOARD_EVENT_MULTIPLEX_ERRORS); */
 + break;
 +
 + default:
 + sms_err(Unknown dvb3 api event);
 + break;
 + }
 +}

This seems to be the core of this changeset. However, it just prints debug
messages, since the real call to the event notification mechanism is commented.


Cheers,
Mauro
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] [0904_1] Siano: core header - update license and include files

2009-04-20 Thread Uri Shkolnik



--- On Mon, 4/20/09, Mauro Carvalho Chehab mche...@infradead.org wrote:

 From: Mauro Carvalho Chehab mche...@infradead.org
 Subject: Re: [PATCH] [0904_1] Siano: core header - update license and include 
 files
 To: Uri Shkolnik uri...@yahoo.com
 Cc: linux-media@vger.kernel.org
 Date: Monday, April 20, 2009, 5:42 PM
 On Sun, 5 Apr 2009 01:09:16 -0700
 (PDT)
 Uri Shkolnik uri...@yahoo.com
 wrote:
 
  
  # HG changeset patch
  # User Uri Shkolnik u...@siano-ms.com
  # Date 1238689930 -10800
  # Node ID c3f0f50d46058f07fb355d8e5531f35cfd0ca37e
  # Parent 
 7311d23c3355629b617013cd51223895a2423770
  [PATCH] [0904_1] Siano: core header - update license
 and included files
  
  From: Uri Shkolnik u...@siano-ms.com
  
  This patch does not include any implementation
 changes.
  It update the smscoreapi.h license to be identical to
 
  other Siano's headers and the #include files list.
 
 s/update/updates/
 
   #include linux/version.h
   #include linux/device.h
  @@ -28,15 +28,23 @@
   #include linux/mm.h
   #include linux/scatterlist.h
   #include linux/types.h
  +#include linux/mutex.h
  +#include linux/compat.h
  +#include linux/wait.h
  +#include linux/timer.h
  +
   #include asm/page.h
  -#include linux/mutex.h
  -#include compat.h
 
 Hmm... Why do you need the above changes? Also, #include
 compat.h is
 required, in order to compile inside the out-of-tree kernel
 tree.
 
 Also, the header changes should be on a different
 changeset, since they aren't
 related to what's described, e. g. this has nothing to do
 with licensing change.
 
 
 Cheers,
 Mauro
 

1) compat.h became linux/compat.h as result of old ML review
--- +#include linux/compat.h

2) There were a mail exchanged, back in mid-summer 2008, regarding the license. 
One template has been approved both by Siano and the reviewers back then, and 
the patch comes the align this particular file with that old decision.  

Regarding the change-set - since there were no implementation changes (only 
license text modification and re-arranging the include files list (I hadn't 
counted compat.h -- linux/compat.h as an implementation change) I decided 
to put them in one patch. If higher resolution is needed, I'll do so,

Regards,

Uri




  
--
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: Hauppauge HVR-1500 (aka HP RM436AA#ABA)

2009-04-20 Thread Steven Toth

Benster  Jeremy wrote:

Here is the relevant part of dmesg output:
snip
[   18.088998] Linux video capture interface: v2.00
snip
[   18.455776] cx23885 driver version 0.0.1 loaded
[   18.459188] ACPI: PCI Interrupt Link [LK2E] enabled at IRQ 17
[   18.459205] cx23885 :01:00.0: PCI INT A - Link[LK2E] - GSI 17 
(level, high) - IRQ 17
[   18.461662] CORE cx23885[0]: subsystem: 0070:7717, board: Hauppauge 
WinTV-HVR1500 [card=6,autodetected]

[   18.570050] cx23885[0]: i2c bus 0 registered
[   18.570196] cx23885[0]: i2c bus 1 registered
[   18.570252] cx23885[0]: i2c bus 2 registered
[   18.596795] tveeprom 2-0050: Hauppauge model 77001, rev D3C0, serial# 
1624435

[   18.596800] tveeprom 2-0050: MAC address is 00-0D-FE-18-C9-73
[   18.596803] tveeprom 2-0050: tuner model is Xceive XC3028 (idx 120, 
type 71)
[   18.596807] tveeprom 2-0050: TV standards NTSC(M) ATSC/DVB Digital 
(eeprom 0x88)

[   18.596810] tveeprom 2-0050: audio processor is CX23885 (idx 39)
[   18.596813] tveeprom 2-0050: decoder processor is CX23885 (idx 33)
[   18.596816] tveeprom 2-0050: has no radio
[   18.596818] cx23885[0]: hauppauge eeprom: model=77001
[   18.596822] cx23885[0]: cx23885 based dvb card
snip
[   18.765151] phy0: Selected rate control algorithm 'pid'
[   18.801503] xc2028 3-0061: creating new instance
[   18.801509] xc2028 3-0061: type set to XCeive xc2028/xc3028 tuner
[   18.801517] DVB: registering new adapter (cx23885[0])
[   18.801522] DVB: registering frontend 0 (Samsung S5H1409 QAM/8VSB 
Frontend)...

[   18.802148] cx23885_dev_checkrevision() Hardware revision = 0xb0
[   18.802157] cx23885[0]/0: found at :01:00.0, rev: 2, irq: 17, 
latency: 0, mmio: 0xc400

[   19.802164] cx23885 :01:00.0: setting latency timer to 64

and lspci:

snip
#I'm leaving this in since it mentions i2c
00:0a.1 0c05: 10de:0264 (rev a3)
Subsystem: 103c:30b7
Flags: 66MHz, fast devsel, IRQ 10
I/O ports at 3040 [size=64]
I/O ports at 3000 [size=64]
Capabilities: [44] Power Management version 2
Kernel driver in use: nForce2_smbus
Kernel modules: i2c-nforce2
snip
01:00.0 0400: 14f1:8852 (rev 02)
Subsystem: 0070:7717
Flags: bus master, fast devsel, latency 0, IRQ 17
Memory at c400 (64-bit, non-prefetchable) [size=2M]
Capabilities: [40] Express Endpoint, MSI 00
Capabilities: [80] Power Management version 2
Capabilities: [90] Vital Product Data ?
Capabilities: [a0] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 
Enable-

Capabilities: [100] Advanced Error Reporting ?
Capabilities: [200] Virtual Channel ?
Kernel driver in use: cx23885
Kernel modules: cx23885
snip
07:05.4 0880: 1180:0852 (rev ff) (prog-if ff)
!!! Unknown header type 7f
snip

I think I may not have the debug=1 options turned on right now. I will 
turn them on and re-post if that would help you.


Ben

On Mon, 2009-04-20 at 11:51 -0400, Steven Toth wrote:

Ben Heggy wrote:
 I'm having the same issues (recognized - but won't turn on) with the same card
 and would be delighted to join the open discussion and to try to help to 
provide
 any information necessary to debug this issue. 
 
 To this point, I have enabled debug options on what I think are the related

 modules and have seen nothing that appears to be an error, but am also 
noticing
 that there should be some messages about loading firmware for the various 
chips
 and they don't appear (I did put the firmware files in /lib/firmware but I
 cannot find references to their correct md5sums to verify they are correct)
 
 I'm a newbie to linux, but was once (20 years ago) a system manager on a

 vax/unix system, so I can find my way around a bit better than average.
 
 Tell me what info you want to see or what actions to try and I will gladly act

 immediately.

Connect the card.

Cold boot the system, boot linux, use the dmesg command.

Do you see any evidence of the cx23885 driver recognizing your card?

Use the lspci -vn command to display attached PCI(e) devices, is the card 
present?

- Steve


(A minor thing, please don't top post. Replies go under the previous messages - 
that's mailing list protocol)


Thanks, initialization looks good.

Step 2. What happens when you try to use azap and what does syslog subsequently 
look like?


- Steve
--
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] [0904_10] Siano: smsdvb - add events mechanism

2009-04-20 Thread Uri Shkolnik



--- On Mon, 4/20/09, Mauro Carvalho Chehab mche...@infradead.org wrote:

 From: Mauro Carvalho Chehab mche...@infradead.org
 Subject: Re: [PATCH] [0904_10] Siano: smsdvb - add events mechanism
 To: Uri Shkolnik uri...@yahoo.com
 Cc: LinuxML linux-media@vger.kernel.org
 Date: Monday, April 20, 2009, 7:21 PM
 On Sun, 5 Apr 2009 03:18:01 -0700
 (PDT)
 Uri Shkolnik uri...@yahoo.com
 wrote:
 
  
  # HG changeset patch
  # User Uri Shkolnik u...@siano-ms.com
  # Date 1238742622 -10800
  # Node ID ec7ee486fb86d51bdb48e6a637a6ddd52e9e08c2
  # Parent 
 020ba7b31c963bd36d607848198e9e4258a6f80e
  [PATCH] [0904_10] Siano: smsdvb - add events
 mechanism
  
  From: Uri Shkolnik u...@siano-ms.com
  
  Add events mechanism that will notify the cards
 component
  (which represent the specific hardware target) for DVB
 related
  events.
 
 
 This patch contains unrelated coding style fixes. Some of
 them seem to be
 related to previous changesets not applied.
 
 It is better to split coding style and real changes into
 separate patches. 
 
  +/* Events that may come from DVB v3 adapter */
  +static void sms_board_dvb3_event(struct
 smscore_device_t *coredev,
  +        enum
 SMS_DVB3_EVENTS event) {
  +    switch (event) {
  +    case DVB3_EVENT_INIT:
  +       
 sms_debug(DVB3_EVENT_INIT);
  +        /*
 sms_board_event(coredev, BOARD_EVENT_BIND); */
  +        break;
  +    case DVB3_EVENT_SLEEP:
  +       
 sms_debug(DVB3_EVENT_SLEEP);
  +        /*
 sms_board_event(coredev, BOARD_EVENT_POWER_SUSPEND); */
  +        break;
  +    case DVB3_EVENT_HOTPLUG:
  +       
 sms_debug(DVB3_EVENT_HOTPLUG);
  +        /*
 sms_board_event(coredev, BOARD_EVENT_POWER_INIT); */
  +        break;
  +    case DVB3_EVENT_FE_LOCK:
  +       
 sms_debug(DVB3_EVENT_FE_LOCK);
  +        /*
 sms_board_event(coredev, BOARD_EVENT_FE_LOCK); */
  +        break;
  +    case DVB3_EVENT_FE_UNLOCK:
  +       
 sms_debug(DVB3_EVENT_FE_UNLOCK);
  +        /*
 sms_board_event(coredev, BOARD_EVENT_FE_UNLOCK); */
  +        break;
  +    case DVB3_EVENT_UNC_OK:
  +       
 sms_debug(DVB3_EVENT_UNC_OK);
  +        /*
 sms_board_event(coredev, BOARD_EVENT_MULTIPLEX_OK); */
  +        break;
  +    case DVB3_EVENT_UNC_ERR:
  +       
 sms_debug(DVB3_EVENT_UNC_ERR);
  +        /*
 sms_board_event(coredev, BOARD_EVENT_MULTIPLEX_ERRORS); */
  +        break;
  +
  +    default:
  +       
 sms_err(Unknown dvb3 api event);
  +        break;
  +    }
  +}
 
 This seems to be the core of this changeset. However, it
 just prints debug
 messages, since the real call to the event notification
 mechanism is commented.
 
 
 Cheers,
 Mauro
 

The Siano driver  is composed from several components. The sms_board_event() is 
called from one component (dvb3 in this case) to the cards component.
The series of patches I submitted, came to bring the 'dvb3' component as close 
as possible to the current file used by Siano. Since the cards has not been 
patched (yet), those functions have been add, but commented out.

I did the same with the endian and IR calls in other patches (add 'place 
holders' e.g. a comment, to be un-comment later when those component will be 
patches and avaliable).

Regards,

Uri



  
--
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] [0904_1] Siano: core header - update license and include files

2009-04-20 Thread Mauro Carvalho Chehab
On Mon, 20 Apr 2009 09:40:42 -0700 (PDT)
Uri Shkolnik uri...@yahoo.com wrote:

 
 
 
 --- On Mon, 4/20/09, Mauro Carvalho Chehab mche...@infradead.org wrote:
 
  From: Mauro Carvalho Chehab mche...@infradead.org
  Subject: Re: [PATCH] [0904_1] Siano: core header - update license and 
  include files
  To: Uri Shkolnik uri...@yahoo.com
  Cc: linux-media@vger.kernel.org
  Date: Monday, April 20, 2009, 5:42 PM
  On Sun, 5 Apr 2009 01:09:16 -0700
  (PDT)
  Uri Shkolnik uri...@yahoo.com
  wrote:
  
   
   # HG changeset patch
   # User Uri Shkolnik u...@siano-ms.com
   # Date 1238689930 -10800
   # Node ID c3f0f50d46058f07fb355d8e5531f35cfd0ca37e
   # Parent 
  7311d23c3355629b617013cd51223895a2423770
   [PATCH] [0904_1] Siano: core header - update license
  and included files
   
   From: Uri Shkolnik u...@siano-ms.com
   
   This patch does not include any implementation
  changes.
   It update the smscoreapi.h license to be identical to
  
   other Siano's headers and the #include files list.
  
  s/update/updates/
  
    #include linux/version.h
    #include linux/device.h
   @@ -28,15 +28,23 @@
    #include linux/mm.h
    #include linux/scatterlist.h
    #include linux/types.h
   +#include linux/mutex.h
   +#include linux/compat.h
   +#include linux/wait.h
   +#include linux/timer.h
   +
    #include asm/page.h
   -#include linux/mutex.h
   -#include compat.h
  
  Hmm... Why do you need the above changes? Also, #include
  compat.h is
  required, in order to compile inside the out-of-tree kernel
  tree.
  
  Also, the header changes should be on a different
  changeset, since they aren't
  related to what's described, e. g. this has nothing to do
  with licensing change.
  
  
  Cheers,
  Mauro
  
 
 1) compat.h became linux/compat.h as result of old ML review
 --- +#include linux/compat.h

I have no idea when do you need to include linux/compat.h. However, as
compilation is currently fine, I see no reasons why to add it. I also don't
have any idea why do you need to add other include files, since it is properly
compiling without adding any other header.

In the case of compat.h, this is local to the out-of-tree compilation, having
some needed defines to compile against older kernel versions. This header it is
automatically stripped from upstream changes. 

 2) There were a mail exchanged, back in mid-summer 2008, regarding the 
 license. One template has been approved both by Siano and the reviewers back 
 then, and the patch comes the align this particular file with that old 
 decision.  

This seems fine to my eyes.

 Regarding the change-set - since there were no implementation changes (only 
 license text modification and re-arranging the include files list (I hadn't 
 counted compat.h -- linux/compat.h as an implementation change) I 
 decided to put them in one patch. If higher resolution is needed, I'll do so,

If all you're doing is rearranging, it would be fine to add it at the same
changeset, but you should explicitly mention this at the description.

Also, fyi, the proper include sequence is:

1) Include all kernel headers that aren't at -hg (no particular order here - I
generally use some alphabetic order, but this is just my personal preference);

2) #include compat.h

3) The other v4l/dvb core headers and local headers.

 Cheers,
Mauro
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] [0904_1] Siano: core header - update license and include files

2009-04-20 Thread Uri Shkolnik



--- On Mon, 4/20/09, Mauro Carvalho Chehab mche...@infradead.org wrote:

 From: Mauro Carvalho Chehab mche...@infradead.org
 Subject: Re: [PATCH] [0904_1] Siano: core header - update license and include 
 files
 To: Uri Shkolnik uri...@yahoo.com
 Cc: linux-media@vger.kernel.org
 Date: Monday, April 20, 2009, 8:01 PM
 On Mon, 20 Apr 2009 09:40:42 -0700
 (PDT)
 Uri Shkolnik uri...@yahoo.com
 wrote:
 
  
  
  
  --- On Mon, 4/20/09, Mauro Carvalho Chehab mche...@infradead.org
 wrote:
  
   From: Mauro Carvalho Chehab mche...@infradead.org
   Subject: Re: [PATCH] [0904_1] Siano: core header
 - update license and include files
   To: Uri Shkolnik uri...@yahoo.com
   Cc: linux-media@vger.kernel.org
   Date: Monday, April 20, 2009, 5:42 PM
   On Sun, 5 Apr 2009 01:09:16 -0700
   (PDT)
   Uri Shkolnik uri...@yahoo.com
   wrote:
   

# HG changeset patch
# User Uri Shkolnik u...@siano-ms.com
# Date 1238689930 -10800
# Node ID
 c3f0f50d46058f07fb355d8e5531f35cfd0ca37e
# Parent 
   7311d23c3355629b617013cd51223895a2423770
[PATCH] [0904_1] Siano: core header - update
 license
   and included files

From: Uri Shkolnik u...@siano-ms.com

This patch does not include any
 implementation
   changes.
It update the smscoreapi.h license to be
 identical to
   
other Siano's headers and the #include files
 list.
   
   s/update/updates/
   
     #include linux/version.h
     #include linux/device.h
@@ -28,15 +28,23 @@
     #include linux/mm.h
     #include linux/scatterlist.h
     #include linux/types.h
+#include linux/mutex.h
+#include linux/compat.h
+#include linux/wait.h
+#include linux/timer.h
+
     #include asm/page.h
-#include linux/mutex.h
-#include compat.h
   
   Hmm... Why do you need the above changes? Also,
 #include
   compat.h is
   required, in order to compile inside the
 out-of-tree kernel
   tree.
   
   Also, the header changes should be on a
 different
   changeset, since they aren't
   related to what's described, e. g. this has
 nothing to do
   with licensing change.
   
   
   Cheers,
   Mauro
   
  
  1) compat.h became linux/compat.h as result
 of old ML review
  --- +#include linux/compat.h
 
 I have no idea when do you need to include linux/compat.h.
 However, as
 compilation is currently fine, I see no reasons why to add
 it. I also don't
 have any idea why do you need to add other include files,
 since it is properly
 compiling without adding any other header.
 
 In the case of compat.h, this is local to the out-of-tree
 compilation, having
 some needed defines to compile against older kernel
 versions. This header it is
 automatically stripped from upstream changes. 
 
  2) There were a mail exchanged, back in mid-summer
 2008, regarding the license. One template has been approved
 both by Siano and the reviewers back then, and the patch
 comes the align this particular file with that old
 decision.  
 
 This seems fine to my eyes.
 
  Regarding the change-set - since there were no
 implementation changes (only license text modification and
 re-arranging the include files list (I hadn't counted
 compat.h -- linux/compat.h as an
 implementation change) I decided to put them in one patch.
 If higher resolution is needed, I'll do so,
 
 If all you're doing is rearranging, it would be fine to add
 it at the same
 changeset, but you should explicitly mention this at the
 description.
 
 Also, fyi, the proper include sequence is:
 
 1) Include all kernel headers that aren't at -hg (no
 particular order here - I
 generally use some alphabetic order, but this is just my
 personal preference);
 
 2) #include compat.h
 
 3) The other v4l/dvb core headers and local headers.
 
  Cheers,
 Mauro
 

Just to make sure (sorry to be a little nagger about it...)
Should I ignore the old request to replace compat.h with linux/compat.h, 
and stay with compat.h ?

10x,

Uri


  
--
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] [0904_1] Siano: core header - update license and include files

2009-04-20 Thread Mauro Carvalho Chehab
On Mon, 20 Apr 2009 10:11:46 -0700 (PDT)
Uri Shkolnik uri...@yahoo.com wrote:

 Just to make sure (sorry to be a little nagger about it...)
 Should I ignore the old request to replace compat.h with linux/compat.h, 
 and stay with compat.h ?

Yes. I never requested such change, nor I understand why someone suggested you
to do such change.

Cheers,
Mauro
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch review] uvc_driver: fix compile warning

2009-04-20 Thread Laurent Pinchart
Hi Alexey,

On Sunday 19 April 2009 22:03:09 Alexey Klimov wrote:
 Hello, all
 I saw warnings in v4l-dvb daily build.
 May this patch be helpful?

I can't reproduce the problem with gcc 4.3.2.

Hans, what's the policy for fixing gcc-related issues ? Should the code use 
uninitialized_var() to make every gcc version happy, or can ignore the 
warnings when a newer gcc version fixes the problem 

 Signed-off-by: Alexey Klimov klimov.li...@gmail.com

 --
 diff -r cda79523a93c linux/drivers/media/video/uvc/uvc_driver.c
 --- a/linux/drivers/media/video/uvc/uvc_driver.c  Thu Apr 16 18:30:38 2009
 +0200 +++ b/linux/drivers/media/video/uvc/uvc_driver.cSun Apr 19 
 23:58:02
 2009 +0400 @@ -1726,7 +1726,7 @@
  static int __uvc_resume(struct usb_interface *intf, int reset)
  {
   struct uvc_device *dev = usb_get_intfdata(intf);
 - int ret;
 + int ret = 0;

   uvc_trace(UVC_TRACE_SUSPEND, Resuming interface %u\n,
   intf-cur_altsetting-desc.bInterfaceNumber);

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] [0904_12] Siano: unified the debug filter module parameter (dvb and core)

2009-04-20 Thread Mauro Carvalho Chehab
On Sun, 5 Apr 2009 03:25:06 -0700 (PDT)
Uri Shkolnik uri...@yahoo.com wrote:

 [PATCH] [0904_12] Siano: unified the debug filter module parameter (dvb and 
 core)
 
 From: Uri Shkolnik u...@siano-ms.com
 
 The sms_debug module parameter sets the debug filter
 for the smsmdtv module. It has been moved to the core
 component, and replace the smsdvb's.
 
 Priority: normal
 
 Signed-off-by: Uri Shkolnik u...@siano-ms.com

The changeset created breakage on both modules:

WARNING: sms_debug [/home/v4l/master/v4l/smsusb.ko] undefined!
WARNING: sms_debug [/home/v4l/master/v4l/smsdvb.ko] undefined!

Reverted.


Cheers,
Mauro
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] [0904_13] Siano: move DVB_API and remove redundant code

2009-04-20 Thread Mauro Carvalho Chehab
On Sun, 5 Apr 2009 03:31:32 -0700 (PDT)
Uri Shkolnik uri...@yahoo.com wrote:

 
 # HG changeset patch
 # User Uri Shkolnik u...@siano-ms.com
 # Date 1238755204 -10800
 # Node ID f65a29f0f9a66f82a91525ae0085a15f00ac91c2
 # Parent  897669fdeb3be75a2bde978557b5398a4a7d8914
 [PATCH] [0904_13] Siano: move DVB_API and remove redundant code
 
 From: Uri Shkolnik u...@siano-ms.com
 
 The DVB-API related information has been moved from the core header
 to the smsdvb, and the redundant code has been removed from the
 core header.
 
 This code has been moved since it is used only by
 the smsdvb client component.

This patch depends on the previous patches that I asked some changes. Please
re-submit it together with the other patches that weren't committed. It is
probably not much valuable to commit the later patches, so I'll stop analysing
the code here.

The patch itself looks sane to my eyes.
 
 Priority: normal
 
 Signed-off-by: Uri Shkolnik u...@siano-ms.com
 
 diff -r 897669fdeb3b -r f65a29f0f9a6 
 linux/drivers/media/dvb/siano/smscoreapi.h
 --- a/linux/drivers/media/dvb/siano/smscoreapi.h  Fri Apr 03 13:31:13 
 2009 +0300
 +++ b/linux/drivers/media/dvb/siano/smscoreapi.h  Fri Apr 03 13:40:04 
 2009 +0300
 @@ -36,15 +36,6 @@ along with this program.  If not, see h
  #include asm/page.h
  
  /* #include smsir.h */
 -
 -#define SMS_DVB3_SUBSYS
 -#ifdef SMS_DVB3_SUBSYS
 -#include dmxdev.h
 -#include dvbdev.h
 -#include dvb_demux.h
 -#include dvb_frontend.h
 -
 -#endif
  
  #define kmutex_init(_p_) mutex_init(_p_)
  #define kmutex_lock(_p_) mutex_lock(_p_)
 diff -r 897669fdeb3b -r f65a29f0f9a6 linux/drivers/media/dvb/siano/smsdvb.c
 --- a/linux/drivers/media/dvb/siano/smsdvb.c  Fri Apr 03 13:31:13 2009 +0300
 +++ b/linux/drivers/media/dvb/siano/smsdvb.c  Fri Apr 03 13:40:04 2009 +0300
 @@ -22,6 +22,11 @@ along with this program.  If not, see h
  #include linux/module.h
  #include linux/init.h
  #include asm/byteorder.h
 +
 +#include dmxdev.h
 +#include dvbdev.h
 +#include dvb_demux.h
 +#include dvb_frontend.h
  
  #include smscoreapi.h
  /*#include smsendian.h*/
 @@ -52,7 +57,7 @@ struct smsdvb_client_t {
   fe_status_t fe_status;
   int fe_ber, fe_snr, fe_unc, fe_signal_strength;
  
 - struct completion tune_done, stat_done;
 + struct completion tune_done;
  
   /* todo: save freq/band instead whole struct */
   struct dvb_frontend_parameters fe_params;
 
 
 
   
 --
 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




Cheers,
Mauro
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] [0904_14] Siano: assemble all components to one kernel module

2009-04-20 Thread Mauro Carvalho Chehab
On Sun, 5 Apr 2009 04:42:11 -0700 (PDT)
Uri Shkolnik uri...@yahoo.com wrote:

 
 # HG changeset patch
 # User Uri Shkolnik u...@siano-ms.com
 # Date 1238756860 -10800
 # Node ID 616e696ce6f0c0d76a1aaea8b36e0345112c5ab6
 # Parent  f65a29f0f9a66f82a91525ae0085a15f00ac91c2
 [PATCH] [0904_14] Siano: assemble all components to one kernel module
 
 From: Uri Shkolnik u...@siano-ms.com
 
 Previously, the support for Siano-based devices
 has been combined from several kernel modules. 
 This patch assembles all into single kernel module.

Why? It seems better to keep it more modular.

Cheers,
Mauro
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] uvc: Add Microsoft VX 500 webcam

2009-04-20 Thread Laurent Pinchart
Hi Douglas,

On Wednesday 15 April 2009 15:48:08 Douglas Schilling Landgraf wrote:
 Hello Laurent,

 On Wed, 15 Apr 2009 11:46:52 +0200

 Laurent Pinchart laurent.pinch...@skynet.be wrote:
  Hi Douglas,
 
  On Wednesday 15 April 2009 09:03:45 Douglas Schilling Landgraf wrote:
   Hello Laurent,
  
   Attached patch for the following:
  
   Added Microsoft VX 500 webcam to uvc driver.
  
   Signed-off-by: Douglas Schilling Landgraf dougsl...@redhat.com
 
  Could you please send me the output of
 
  lsusb -v -d 045e:074a
 
  using usbutils 0.72 or newer (0.73+ preferred) ?

 usbutils-0.73-2

  Have you tried the latest driver ?

 Yes

  The MINMAX quirk isn't required
  anymore for most cameras (although the two supported Microsoft
  webcams still need it, so I doubt it will work as-is).

 Indeed, attached new patch.

The new patch shouldn't be needed at all, as it doesn't declare any quirk. The 
camera should work out of the box using the latest driver.

Best 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] [0904_13] Siano: move DVB_API and remove redundant code

2009-04-20 Thread Uri Shkolnik



--- On Mon, 4/20/09, Mauro Carvalho Chehab mche...@infradead.org wrote:

 From: Mauro Carvalho Chehab mche...@infradead.org
 Subject: Re: [PATCH] [0904_13] Siano: move DVB_API and remove redundant code
 To: Uri Shkolnik uri...@yahoo.com
 Cc: LinuxML linux-media@vger.kernel.org
 Date: Monday, April 20, 2009, 9:02 PM
 On Sun, 5 Apr 2009 03:31:32 -0700
 (PDT)
 Uri Shkolnik uri...@yahoo.com
 wrote:
 
  
  # HG changeset patch
  # User Uri Shkolnik u...@siano-ms.com
  # Date 1238755204 -10800
  # Node ID f65a29f0f9a66f82a91525ae0085a15f00ac91c2
  # Parent 
 897669fdeb3be75a2bde978557b5398a4a7d8914
  [PATCH] [0904_13] Siano: move DVB_API and remove
 redundant code
  
  From: Uri Shkolnik u...@siano-ms.com
  
  The DVB-API related information has been moved from
 the core header
  to the smsdvb, and the redundant code has been removed
 from the
  core header.
  
  This code has been moved since it is used only by
  the smsdvb client component.
 
 This patch depends on the previous patches that I asked
 some changes. Please
 re-submit it together with the other patches that weren't
 committed. It is
 probably not much valuable to commit the later patches, so
 I'll stop analysing
 the code here.
 
 The patch itself looks sane to my eyes.
  
  Priority: normal
  
  Signed-off-by: Uri Shkolnik u...@siano-ms.com
  
  diff -r 897669fdeb3b -r f65a29f0f9a6
 linux/drivers/media/dvb/siano/smscoreapi.h
  ---
 a/linux/drivers/media/dvb/siano/smscoreapi.h   
 Fri Apr 03 13:31:13 2009 +0300
  +++
 b/linux/drivers/media/dvb/siano/smscoreapi.h   
 Fri Apr 03 13:40:04 2009 +0300
  @@ -36,15 +36,6 @@ along with this program.  If
 not, see h
   #include asm/page.h
   
   /* #include smsir.h */
  -
  -#define SMS_DVB3_SUBSYS
  -#ifdef SMS_DVB3_SUBSYS
  -#include dmxdev.h
  -#include dvbdev.h
  -#include dvb_demux.h
  -#include dvb_frontend.h
  -
  -#endif
   
   #define kmutex_init(_p_) mutex_init(_p_)
   #define kmutex_lock(_p_) mutex_lock(_p_)
  diff -r 897669fdeb3b -r f65a29f0f9a6
 linux/drivers/media/dvb/siano/smsdvb.c
  ---
 a/linux/drivers/media/dvb/siano/smsdvb.c   
 Fri Apr 03 13:31:13 2009 +0300
  +++
 b/linux/drivers/media/dvb/siano/smsdvb.c   
 Fri Apr 03 13:40:04 2009 +0300
  @@ -22,6 +22,11 @@ along with this program.  If
 not, see h
   #include linux/module.h
   #include linux/init.h
   #include asm/byteorder.h
  +
  +#include dmxdev.h
  +#include dvbdev.h
  +#include dvb_demux.h
  +#include dvb_frontend.h
   
   #include smscoreapi.h
   /*#include smsendian.h*/
  @@ -52,7 +57,7 @@ struct smsdvb_client_t {
       fe_status_t fe_status;
       int fe_ber, fe_snr, fe_unc,
 fe_signal_strength;
   
  -    struct completion tune_done,
 stat_done;
  +    struct completion tune_done;
   
       /* todo: save freq/band
 instead whole struct */
       struct
 dvb_frontend_parameters fe_params;
  
  
  
        
  --
  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
 
 
 
 
 Cheers,
 Mauro
 

OK

I'll submit patches to fix the various rejects on the coming Wednesday (I'm ooo 
tomorrow).

BTW - is it possible for me to clone the current tree you currently have? 
(after applying the approved patches), it will help me for future patches.


Regards,

Uri


  
--
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: Siano's patches

2009-04-20 Thread Mauro Carvalho Chehab
On Sun, 5 Apr 2009 07:19:59 -0700 (PDT)
Uri Shkolnik uri...@yahoo.com wrote:

 
  Hi Mauro,
  
  
  Please note patches (1..19) series @ 
 http://patchwork.kernel.org/project/linux-media/list/?submitter=uri
  
  I'll wait for reviews and commit for this series before submitting 
 additional patches.

Uri,

I've finished reviewing and applying the patches. I had to skip some patches,
since they don't apply without some previous patches that I asked for changes.

Please re-submit those missing patches later.

I strongly suggest that you submit first all the patches that changes only
CodingStyle, and wait for my review before sending other patches (or otherwise
let them to happen only after merging all other patches).

In general, such patches won't generate discussions, provided
that checkpatch.pl doesn't complain, and that you manually review the results
of automatic tools like indent (that, in some cases, cause CodingStyle
regressions - such tool should be used with care).

The rationale is that patches that touches on CodingStyle replaces things on
almost everywhere. If a patch with CodingStyle changes got rejected by some
reason, the subsequent patches won't apply and will also be rejected.

Cheers,
Mauro
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] [0904_14] Siano: assemble all components to one kernel module

2009-04-20 Thread Uri Shkolnik



--- On Mon, 4/20/09, Mauro Carvalho Chehab mche...@infradead.org wrote:

 From: Mauro Carvalho Chehab mche...@infradead.org
 Subject: Re: [PATCH] [0904_14] Siano: assemble all components to one kernel 
 module
 To: Uri Shkolnik uri...@yahoo.com
 Cc: LinuxML linux-media@vger.kernel.org
 Date: Monday, April 20, 2009, 9:03 PM
 On Sun, 5 Apr 2009 04:42:11 -0700
 (PDT)
 Uri Shkolnik uri...@yahoo.com
 wrote:
 
  
  # HG changeset patch
  # User Uri Shkolnik u...@siano-ms.com
  # Date 1238756860 -10800
  # Node ID 616e696ce6f0c0d76a1aaea8b36e0345112c5ab6
  # Parent 
 f65a29f0f9a66f82a91525ae0085a15f00ac91c2
  [PATCH] [0904_14] Siano: assemble all components to
 one kernel module
  
  From: Uri Shkolnik u...@siano-ms.com
  
  Previously, the support for Siano-based devices
  has been combined from several kernel modules. 
  This patch assembles all into single kernel module.
 
 Why? It seems better to keep it more modular.
 
 Cheers,
 Mauro
 

The driver remains as modular as it was before (regarding sources files).
Why to load smsusb.ko and than load smsdvb.ko and than load usbcore.ko? (and ir 
and endian... and...)

The driver handles any device (or devices) with Siano silicon on it, simple as 
that.

The new build method (Makefile and Kconfig) after the patches (yet to be fully 
submitted), build the driver to match the system it targets. (If USB exist than 
it builds the USB interface driver (otherwise it doesn't) and links it to the 
single module, same for SDIO, and any other interface driver, same for any 
clients and any other component).

Regards,

Uri


  
--
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] [0904_13] Siano: move DVB_API and remove redundant code

2009-04-20 Thread Mauro Carvalho Chehab
On Mon, 20 Apr 2009 11:24:11 -0700 (PDT)
Uri Shkolnik uri...@yahoo.com wrote:

 
 
 
 --- On Mon, 4/20/09, Mauro Carvalho Chehab mche...@infradead.org wrote:
 
  From: Mauro Carvalho Chehab mche...@infradead.org
  Subject: Re: [PATCH] [0904_13] Siano: move DVB_API and remove redundant code
  To: Uri Shkolnik uri...@yahoo.com
  Cc: LinuxML linux-media@vger.kernel.org
  Date: Monday, April 20, 2009, 9:19 PM
  On Mon, 20 Apr 2009 11:07:57 -0700
  (PDT)
  Uri Shkolnik uri...@yahoo.com
  wrote:
  
   
   
   
   --- On Mon, 4/20/09, Mauro Carvalho Chehab mche...@infradead.org
  wrote:
   
From: Mauro Carvalho Chehab mche...@infradead.org
Subject: Re: [PATCH] [0904_13] Siano: move
  DVB_API and remove redundant code
To: Uri Shkolnik uri...@yahoo.com
Cc: LinuxML linux-media@vger.kernel.org
Date: Monday, April 20, 2009, 9:02 PM
On Sun, 5 Apr 2009 03:31:32 -0700
(PDT)
Uri Shkolnik uri...@yahoo.com
wrote:

 
 # HG changeset patch
 # User Uri Shkolnik u...@siano-ms.com
 # Date 1238755204 -10800
 # Node ID
  f65a29f0f9a66f82a91525ae0085a15f00ac91c2
 # Parent 
897669fdeb3be75a2bde978557b5398a4a7d8914
 [PATCH] [0904_13] Siano: move DVB_API and
  remove
redundant code
 
 From: Uri Shkolnik u...@siano-ms.com
 
 The DVB-API related information has been
  moved from
the core header
 to the smsdvb, and the redundant code has
  been removed
from the
 core header.
 
 This code has been moved since it is used
  only by
 the smsdvb client component.

This patch depends on the previous patches that I
  asked
some changes. Please
re-submit it together with the other patches that
  weren't
committed. It is
probably not much valuable to commit the later
  patches, so
I'll stop analysing
the code here.

The patch itself looks sane to my eyes.
 
 Priority: normal
 
 Signed-off-by: Uri Shkolnik u...@siano-ms.com
 
 diff -r 897669fdeb3b -r f65a29f0f9a6
linux/drivers/media/dvb/siano/smscoreapi.h
 ---
   
  a/linux/drivers/media/dvb/siano/smscoreapi.h   
Fri Apr 03 13:31:13 2009 +0300
 +++
   
  b/linux/drivers/media/dvb/siano/smscoreapi.h   
Fri Apr 03 13:40:04 2009 +0300
 @@ -36,15 +36,6 @@ along with this
  program.  If
not, see h
  #include asm/page.h
  
  /* #include smsir.h */
 -
 -#define SMS_DVB3_SUBSYS
 -#ifdef SMS_DVB3_SUBSYS
 -#include dmxdev.h
 -#include dvbdev.h
 -#include dvb_demux.h
 -#include dvb_frontend.h
 -
 -#endif
  
  #define kmutex_init(_p_) mutex_init(_p_)
  #define kmutex_lock(_p_) mutex_lock(_p_)
 diff -r 897669fdeb3b -r f65a29f0f9a6
linux/drivers/media/dvb/siano/smsdvb.c
 ---
a/linux/drivers/media/dvb/siano/smsdvb.c   
Fri Apr 03 13:31:13 2009 +0300
 +++
b/linux/drivers/media/dvb/siano/smsdvb.c   
Fri Apr 03 13:40:04 2009 +0300
 @@ -22,6 +22,11 @@ along with this
  program.  If
not, see h
  #include linux/module.h
  #include linux/init.h
  #include asm/byteorder.h
 +
 +#include dmxdev.h
 +#include dvbdev.h
 +#include dvb_demux.h
 +#include dvb_frontend.h
  
  #include smscoreapi.h
  /*#include smsendian.h*/
 @@ -52,7 +57,7 @@ struct smsdvb_client_t {
      fe_status_t fe_status;
      int fe_ber, fe_snr, fe_unc,
fe_signal_strength;
  
 -    struct completion tune_done,
stat_done;
 +    struct completion tune_done;
  
      /* todo: save freq/band
instead whole struct */
      struct
dvb_frontend_parameters fe_params;
 
 
 
       
 --
 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




Cheers,
Mauro

   
   OK
   
   I'll submit patches to fix the various rejects on the
  coming Wednesday (I'm ooo tomorrow).
   
   BTW - is it possible for me to clone the current tree
  you currently have? (after applying the approved patches),
  it will help me for future patches.
  
  Sure. The better is to apply your patches over the fresh
  clone. You can use
  the ./hgimport script to help you to pick the patches from
  your old tree.
  
  Cheers,
  Mauro
  
 
 Regarding the ./hgimport script - how do I tell that script to refer to your 
 tree and not to any other hg tree? Isn't the default look-up is the dvb-api 
 trunk?

It has no defaults. You can point it to a remote URL or to a local path.
 
 
 Regards,
 
 Uri
 
 
   




Cheers,
Mauro
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: soc-camera to v4l2-subdev conversion

2009-04-20 Thread Hans Verkuil
Hi Guennadi,

Sorry for the late reply, but this got buried beneath a pile of other 
emails...

On Thursday 16 April 2009 21:20:38 Guennadi Liakhovetski wrote:
 Hi Hans,

 I have so far partially converted a couple of example setups, namely the
 i.MX31-based pcm037/pcm970 and PXA270-based pcm027/pcm990 boards.

 Partially means, that I use v4l2_i2c_new_subdev() to register new cameras
 and v4l2_device_register() to register hosts, I use some core and video
 operations, but there are still quite a few extra bonds that tie camera
 drivers and soc-camera core, that have to be broken. The current diff is
 at http://download.open-technology.de/testing/20090416-4.gitdiff,
 although, you, probably, don't want to look at it:-)

 A couple of minor general remarks first:

 Shouldn't v4l2_device_call_until_err() return an error if the call is
 unimplemented?

It's my opinion that in general if no subdev needs to handle a particular 
call, then that's OK. I'm assuming that if it is wrong, then the device 
won't work anyway.

 There's no counterpart to v4l2_i2c_new_subdev() in the API, so one is
 supposed to call i2c_unregister_device() directly?

You don't need to call that. It's done automatically when the i2c adapter is 
deleted. It might be that in the future this will have to be called, but if 
so then it will go through v4l2_device_unregister.

 We'll have to extend v4l2_subdev_video_ops with [gs]_crop.

No problem. Just add it.

 Now I'm thinking about how best to break those remaining ties in
 soc-camera. The remaining bindings that have to be torn are in
 struct soc_camera_device. Mostly these are:

 1. current geometry and geometry limits - as seen on the canera host -
 camera client interfase. I think, these are common to all video devices,
 so, maybe we could put them meaningfully in a struct video_data,
 accessible for both v4l2 subdevices and devices - one per subdevice?

See notes under 3.

 2. current exposure and gain. There are of course other video parameters
 similar to these, like gamma, saturation, hue... Actually, these are only
 needed in the sensor driver, the only reason why I keep them globally
 available it to reply to V4L2_CID_GAIN and V4L2_CID_EXPOSURE G_CTRL
 requests. So, if I pass these down to the sensor drivers just like all
 other control requests, they can be removed from soc_camera_device.

Agreed.

 3. format negotiation. This is a pretty important part of the soc-camera
 framework. Currently, sensor drivers provide a list of supported pixel
 formats, based on it camera host drivers build translation tables and
 calculate user pixel formats. I'd like to preserve this functionality in
 some form. I think, we could make an optional common data block, which,
 if available, can be used also for the format negotiation and conversion.
 If it is not available, I could just pass format requests one-to-one down
 to sensor drivers.

 Maybe a more universal approach would be to just keep synthetic formats
 in each camera host driver. Then, on any format request first just
 request it from the sensor trying to pass it one-to-one to the user. If
 this doesn't work, look through the possible conversion table, if the
 requested format is found among output formats, try to request all input
 formats, that can be converted to it, one by one from the sensor. Hm...

Both 1 and 3 touch on the basic reason for creating the framework: one can 
build on it to move common driver code into framework. But the order in 
which I prefer to do this is to first move everything over to the framework 
first, before starting on refactoring drivers. The reason is that that way 
to have a really good overview of what everyone is doing.

My question is: is it possible without too much effort to fix 1 and 3 
without modifying the framework? It will be suboptimal, I know, but it will 
also be faster. The alternative is to move support for this into the core 
framework, but that will mean a lot more work because then I want to do it 
right the first time, which means going through all the existing drivers, 
see how they do it, see how the framework can assist with that, and then 
come up with a good solution.

 4. bus parameter negotiation. Also an important thing. Should do the
 same: if available - use it, if not - use platform-provided defaults.

This is something for which I probably need to make changes. I think it is 
reasonable to add something like a s_bus_param call for this.

An alternative is to use platform_data in board_info. This will mean an 
extra argument to the new_subdev functions. And since this is only 
available for 2.6.26 and up it is not as general.

 I think, I just finalise this partial conversion and we commit it,
 because if I keep it locally for too long, I'll be getting multiple merge
 conflicts, because this conversion also touches platform code... Then,
 when the first step is in the tree we can work on breaking the remaining
 bonds.

Agreed. Do it step by step, that makes it much easier 

Re: [RFC] Stand-alone Resizer/Previewer Driver support under V4L2 framework

2009-04-20 Thread Hans Verkuil
On Monday 20 April 2009 12:31:53 Hiremath, Vaibhav wrote:
 Thanks,
 Vaibhav Hiremath

  -Original Message-
  From: Hans Verkuil [mailto:hverk...@xs4all.nl]
  Sent: Saturday, April 18, 2009 9:24 PM
  To: Hiremath, Vaibhav
  Cc: linux-media@vger.kernel.org; Aguirre Rodriguez, Sergio Alberto;
  DongSoo(Nathaniel) Kim; Toivonen Tuukka.O (Nokia-D/Oulu); linux-
  o...@vger.kernel.org; Nagalla, Hari; Sakari Ailus; Jadav, Brijesh R;
  R, Sivaraj; Hadli, Manjunath; Shah, Hardik; Kumar, Purushotam
  Subject: Re: [RFC] Stand-alone Resizer/Previewer Driver support
  under V4L2 framework
 
  On Tuesday 31 March 2009 10:53:02 Hiremath, Vaibhav wrote:
   Thanks,
   Vaibhav Hiremath
  
 APPROACH 3 -
 --

 .
  
   It makes sense, since such memory-to-memory devices will mostly
 
  being
 
   used from codecs context. And this would be more clear from user
   application.
 
  To be honest, I don't see the need for this. I think
  TYPE_VIDEO_CAPTURE and
  TYPE_VIDEO_OUTPUT are perfectly fine.

 [Hiremath, Vaibhav] Agreed, and you will also find implementation of
 driver aligned to this which I have shared with you.

   And as acknowledged by you, we can use VIDIOC_S_FMT for setting
   parameters.
  
   One thing I am not able to convince myself is that, using priv
 
  field
 
   for custom configuration.
 
  I agree. Especially since you cannot use it as a pointer to addition
  information.
 
   I would prefer and recommend capability based
   interface, where application will query the capability of the
 
  device for
 
   luma enhancement, filter coefficients (number of coeff and depth),
   interpolation type, etc...
  
   This way we can make sure that, any such future devices can be
 
  adapted by
 
   this framework.
 
  The big question is how many of these capabilities are 'generic' and
  how
  many are very much hardware specific. I am leaning towards using the
  extended control API for this. It's a bit awkward to implement in
  drivers
  at the moment, but that should improve in the future when a lot of
  the
  control handling code will move into the new core framework.
 
  I really need to know more about the sort of features that
  omap/davinci
  offer (and preferably also for similar devices by other
  manufacturers).

 [Hiremath, Vaibhav] Hans, Can we have IRC session for this? We will
 discuss this in detail and try to get closure on it.

 Again I would request you to join me and mauro on IRC chat, I will be
 staying online tomorrow.

No problem (assuming we don't have another major network outage as we had 
today at work). It would be helpful if you could mail a summary of the 
capabilities that are needed but are not yet in the API. Also note that I 
have to leave at 16:15 (UTC+2).

Magnus, does the SuperH also have resizing/previewer capabilities? And if 
so, is there a datasheet available with detailed information?

Regards,

Hans

-- 
Hans Verkuil - video4linux developer - sponsored by TANDBERG
--
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: s2255drv high quality mode and video status querying

2009-04-20 Thread Mauro Carvalho Chehab
On Tue, 7 Apr 2009 10:56:36 -0700 (PDT)
Dean A. d...@sensoray.com wrote:

 From: Dean Anderson d...@sensoray.com
 
 This patch adds V4L2 video status capability and V4L2_MODE_HIGHQUALITY
 operation.

Hi Dean,

I have a few comments to add over Trent's one.

 
 Signed-off-by: Dean Anderson d...@sensoray.com
 
 --- v4l-dvb-1e670024659d/linux/drivers/media/video/s2255drv.c.orig
 2009-04-07 10:38:42.0 -0700
 +++ v4l-dvb-1e670024659d/linux/drivers/media/video/s2255drv.c 2009-04-07 
 10:42:51.0 -0700
 @@ -57,7 +57,8 @@
  
  #define FIRMWARE_FILE_NAME f2255usb.bin
  
 -
 +#define S2255_REV_MAJOR 1
 +#define S2255_REV_MINOR 20
  
 +
  #define S2255_MAJOR_VERSION  1
  #define S2255_MINOR_VERSION  13

Hmm... Why you need two different major/minor versions on your driver?


 @@ -1207,8 +1236,8 @@ static int s2255_set_mode(struct s2255_d
 struct s2255_mode *mode)
  {
   int res;
 - u32 *buffer;
 - unsigned long chn_rev;
 + __le32 *buffer;
 + u32 chn_rev;

Also, please don't mix more than one thing at the same patch. Clearly, you did
some endiannes fix at the same patch. Please split it into different patches.

 +static int s2255_cmd_status(struct s2255_dev *dev, unsigned long chn,
 + u32 *pstatus)
 +{
 + int res;
 + __le32 *buffer;
 + u32 chn_rev;
 +
 + mutex_lock(dev-lock);
 + chn_rev = G_chnmap[chn];
 + dprintk(4, s2255_get_status: chan %d\n, chn_rev);
 + buffer = kzalloc(512, GFP_KERNEL);
 + if (buffer == NULL) {
 + dev_err(dev-udev-dev, out of mem\n);
 + mutex_unlock(dev-lock);
 + return -ENOMEM;
 + }
 + /* form the get vid status command */
 + buffer[0] = IN_DATA_TOKEN;
 + buffer[1] = cpu_to_le32(chn_rev);
 + buffer[2] = CMD_STATUS;
 + *pstatus = 0;
 + dev-vidstatus_ready[chn] = 0;
 + res = s2255_write_config(dev-udev, (unsigned char *)buffer, 512);
 + kfree(buffer);
 + wait_event_timeout(dev-wait_vidstatus[chn],
 +(dev-vidstatus_ready[chn] != 0),
 +msecs_to_jiffies(S2255_VIDSTATUS_TIMEOUT));
 + if (dev-vidstatus_ready[chn] != 1) {
 + printk(KERN_DEBUG s2255: no vidstatus response\n);
 + res = -EFAULT;
 + }
 + *pstatus = dev-vidstatus[chn];
 + dprintk(4, s2255: vid status %d\n, *pstatus);
 + mutex_unlock(dev-lock);
 + return res;
 +}
 +

Also, please split high quality mode from video status querying. You should
provide one patch per different feature you're adding.


Cheers,
Mauro
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: soc-camera to v4l2-subdev conversion

2009-04-20 Thread Guennadi Liakhovetski
Hi Hans,

On Mon, 20 Apr 2009, Hans Verkuil wrote:

 On Thursday 16 April 2009 21:20:38 Guennadi Liakhovetski wrote:
  Hi Hans,
 
  I have so far partially converted a couple of example setups, namely the
  i.MX31-based pcm037/pcm970 and PXA270-based pcm027/pcm990 boards.
 
  Partially means, that I use v4l2_i2c_new_subdev() to register new cameras
  and v4l2_device_register() to register hosts, I use some core and video
  operations, but there are still quite a few extra bonds that tie camera
  drivers and soc-camera core, that have to be broken. The current diff is
  at http://download.open-technology.de/testing/20090416-4.gitdiff,
  although, you, probably, don't want to look at it:-)
 
  A couple of minor general remarks first:
 
  Shouldn't v4l2_device_call_until_err() return an error if the call is
  unimplemented?
 
 It's my opinion that in general if no subdev needs to handle a particular 
 call, then that's OK. I'm assuming that if it is wrong, then the device 
 won't work anyway.

In fact, what I actually need is to call a specific method, if it is 
implemented, from one specific subdevice, and get its error code - not 
from all and not until the first error. I am currently abusing your grp_id 
for this, but it might eventually be better to add such a wrapper.

  There's no counterpart to v4l2_i2c_new_subdev() in the API, so one is
  supposed to call i2c_unregister_device() directly?
 
 You don't need to call that. It's done automatically when the i2c adapter is 
 deleted. It might be that in the future this will have to be called, but if 
 so then it will go through v4l2_device_unregister.

Adapter might never be deleted - remember, this is just a generic CPU i2c 
controller.

  We'll have to extend v4l2_subdev_video_ops with [gs]_crop.
 
 No problem. Just add it.
 
  Now I'm thinking about how best to break those remaining ties in
  soc-camera. The remaining bindings that have to be torn are in
  struct soc_camera_device. Mostly these are:
 
  1. current geometry and geometry limits - as seen on the canera host -
  camera client interface. I think, these are common to all video devices,
  so, maybe we could put them meaningfully in a struct video_data,
  accessible for both v4l2 subdevices and devices - one per subdevice?
 
 See notes under 3.
 
  2. current exposure and gain. There are of course other video parameters
  similar to these, like gamma, saturation, hue... Actually, these are only
  needed in the sensor driver, the only reason why I keep them globally
  available it to reply to V4L2_CID_GAIN and V4L2_CID_EXPOSURE G_CTRL
  requests. So, if I pass these down to the sensor drivers just like all
  other control requests, they can be removed from soc_camera_device.
 
 Agreed.
 
  3. format negotiation. This is a pretty important part of the soc-camera
  framework. Currently, sensor drivers provide a list of supported pixel
  formats, based on it camera host drivers build translation tables and
  calculate user pixel formats. I'd like to preserve this functionality in
  some form. I think, we could make an optional common data block, which,
  if available, can be used also for the format negotiation and conversion.
  If it is not available, I could just pass format requests one-to-one down
  to sensor drivers.
 
  Maybe a more universal approach would be to just keep synthetic formats
  in each camera host driver. Then, on any format request first just
  request it from the sensor trying to pass it one-to-one to the user. If
  this doesn't work, look through the possible conversion table, if the
  requested format is found among output formats, try to request all input
  formats, that can be converted to it, one by one from the sensor. Hm...
 
 Both 1 and 3 touch on the basic reason for creating the framework: one can 
 build on it to move common driver code into framework. But the order in 
 which I prefer to do this is to first move everything over to the framework 
 first, before starting on refactoring drivers. The reason is that that way 
 to have a really good overview of what everyone is doing.
 
 My question is: is it possible without too much effort to fix 1 and 3 
 without modifying the framework?

You mean to implement 1 and 3 without modifying the v4l2-(sub)dev 
framework? (1) wouldn't be too difficult, but (3) would require quite a 
bit of re-design and re-work of all three levels of soc-camera: core, 
client and host drivers. Same holds for (4) below. (3) can be implemented 
with some kind of enumeration similar to what v4l2 is currently doing in 
the user API. We could do the following:

1. clients keep their formats internally in some arbitrary indexed list

2. on initialisation the core enumerates those formats using .enum_fmt 
from struct v4l2_subdev_video_ops and queries the host if it can handle 
each of those formats and which ones it can produce out of them for the 
user

3. the core then creates a list of user formats with fourcc codes and 
indices of respective 

Re: Hauppauge HVR-1500 (aka HP RM436AA#ABA)

2009-04-20 Thread Benster Jeremy
On Mon, 2009-04-20 at 16:04 -0400, Steven Toth wrote:
  So, under MCE find a major network ABC, NBC or CBS that works perfectly 
  for you 
  then locate the RF channel on antenna web.org.
 
  These all come in fine on mce.
  
  KDKA-DT2.125
  WTAE-DT4.151
  WQED-DT 13.138
 
 (Rule #2, always CC the mailing list. Don't drop them off, even by accident. 
 An 
 honest mistake on your part so I've added them back in.)
 
 Modify your $HOME/.azap/channels.conf to look like this:
 
 ch25:53900:8VSB:65:68:4
 ch38:61400:8VSB:65:68:4
 ch51:69500:8VSB:65:68:4
 
 The use the following command to tune ch25:
 
 azap -r ch25
 
 What happens next?
 
 - Steve
 
No indicator light - I know this is probably just a bit set somewhere
that turns on/off the light and has nothing to do with actual operation
of the card, but thought I would mention it.

using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0'
tuning to 53900 Hz
video pid 0x0041, audio pid 0x0044
status 00 | signal 7fe2 | snr  | ber  | unc  |
status 00 | signal 008c | snr 0082 | ber  | unc  |
last line repeats indefinitely.I hit ^c.

tried a second time - now all lines match last line and again I hit ^c.
also the same as the second line for the other two channels.

Something I forgot to mention, if you remove the card with the system
running linux it results in a freeze with a blinking caps lock led (btw
it's a hp dv9208nr laptop). It's ok under windows (32bit). I am running
64 bit linux.

If I insert the card after booting linux without it, the lines
referencing the card do not get added to dmesg's output, and the /dev
entries do not appear. udevd issue or driver?

I don't have any other expresscards that I could plug-in to see if hot
swap works on other things.

Ben
oops on the reply list. It has been a long time since I wrote to a mail
list. I did catch one thing before you needed to tell me - i switched to
plain text from html mail. 

 --
 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: [linux-dvb] SkyStar HD2 issues, signal sensitivity, etc.

2009-04-20 Thread David Lister
Hello all,

I took my time with this reply to gather verified data and information.
I wanted to be sure of my facts and have pristine HW for testing (you
mentioned the possibility of broken/fake HW).

1) My cards are 100% genuine - confirmed by Twinhan.
2) I had one of the cards replaced for tests using new mantis-v4l S2API
3) Testing was conducted using mantis-v4l exclusively, with a single
card and with both cards connected (same results).

Manu Abraham wrote:
 Manu Abraham wrote:
 Dave Lister wrote:
 On Sat, Apr 11, 2009 at 5:47 AM, Dave Lister foc...@gmail.com wrote:
 RESULTS (using s2 dvb-apps):
 - scanning DVB-S works
 - scanning DVB-S2 doesn't work
 - zapping DVB-S is fast

 For other SkyStar HD2 users, this is a summary as of 2009.04.14:
   - kernel 2.6.29 + mantis-v4l works (except DiSEqC as far as I can tell)

 Diseqc works fine over here, with the VP-1041 and other cards, using
 the mantis-v4l tree.

You were right, DiSEqC is working. The reason was forgotten loop through
my STB. Once removed from the cable, DiSEqC started working.

 The s2-liplianin tree doesn't use an updated tree for the mantis
 based devices unfortunately. It is stuck with older changesets of
 the mantis tree.

Driver mantis-v4l suffers from the same issues as s2-liplianin (see the
next paragraph).

 Common issues:
   - zapping DVB-S2 channel causes tuner HW lockup (loss of signal until 
 reboot)
   - zap DVB-S2 channel = AWFUL ultra-high pitched noise emitted from
 the card (capacitors or coils?) - makes your head hurt in about 30mins
   - very poor TS (picture data) quality; signal = 95%, SNR = 70%,
 STB/TV gives superb picture, but SkyStar/PC picture is corrupted every
 few seconds, sound glitches, etc. (as if the signal was like 40% on
 STB) - confirmed in VDR (Xine), MythTV, mplayer.

- Unusable DVB-S2 is a fact. It locks up the card and prevents further
usage. Some S2 transponders cannot be locked even after reboot, which
means this card is basically just DVB-S. There are MANY better supported
DVB-S and even DVB-S2 cards out there.

- High-pitched noise is NOT present with the new card + mantis-v4l. That
might have been HW or s2-liplianin issue.

- Poor TS quality is a fact. This card doesn't even have freq. shielding
on the board, which might be the reason on its own.

 * If you had those changes on your hardware and your card was
 susceptible to such issues, then that could be a possible reason.
 * There are quite some hardware pirates, as noted here ..

Not possible, I have a new card (verified by Twinhan as genuine), which
has been used with mantis-v4l only and has the same issues.

 In any of your cases, If you have hardware related issues please
 contact to your supplier to have it checked/replaced by them.

My problems are not caused by defective or fake HW. This has been
confirmed above all suspicions.

 NOTE: Always try to stick with a tree that's a mainline tree or the
 development tree, rather than tree's with unknown changes.

When there are 3-4 different driver trees of various maturity, none of
which is working properly, one has no other alternative than to try
everything. Not to mention that mantis-v4l was first uploaded several
day AFTER I began installations. Back then, s2-liplianin was the only
S2API choice.

My signal is now at 95-99% and SNR reported by the STB is 70%. With
SkyStar I can see these numbers:

# femon -a0
FE: STB0899 Multistandard (DVBS)
Problem retrieving frontend information: Operation not supported
status  CVYL | signal 014c | snr 006b | ber  | unc  |
FE_HAS_LOCK
Problem retrieving frontend information: Operation not supported
status  CVYL | signal 014c | snr 006b | ber  | unc  |
FE_HAS_LOCK
Problem retrieving frontend information: Operation not supported
status  CVYL | signal 014c | snr 006a | ber  | unc  |
FE_HAS_LOCK

From other people reports, I can only conclude that this is an
exceptionally good signal and almost ideal conditions. Unfortunately,
SkyStar is unable to provide acceptable picture. VDR reports TS
continuity errors every few seconds and MPlayer is spouting warnings
like these all the time:

[mpeg2video @ 0x8963220]ac-tex damaged at 12 22 43  3%  1%  5.2% 0 0



[mpeg2video @ 0x8963220]Warning MVs not available



[mpeg2video @ 0x8963220]concealing 495 DC, 495 AC, 495 MV errors



[mpeg2video @ 0x8963220]concealing 0 DC, 0 AC, 0 MV errors 16.3% 0 0



[mpeg2video @ 0x8963220]Warning MVs not available7  3%  0% 18.0% 0 0



[mpeg2video @ 0x8963220]concealing 0 DC, 0 AC, 0 MV errors



[mpeg2video @ 0x8963220]concealing 0 DC, 0 AC, 0 MV errors 18.6% 0 0



[mpeg2video @ 0x8963220]concealing 0 DC, 0 AC, 0 MV errors 18.9% 0 0



[mpeg2video @ 0x8963220]concealing 0 DC, 0 AC, 0 MV errors 20.6% 0 0



[mpeg2video @ 0x8963220]ac-tex damaged at 29 8/745  3%  0% 22.6% 0 0



[mpeg2video @ 0x8963220]concealing 0 DC, 0 AC, 0 MV errors



[mpeg2video @ 0x8963220]00 motion_type at 26 34/1097  3%  0% 32.9% 6 0



[mpeg2video @ 

Re: [PATCH] [0904_14] Siano: assemble all components to one kernel module

2009-04-20 Thread Mauro Carvalho Chehab
On Mon, 20 Apr 2009 11:16:32 -0700 (PDT)
Uri Shkolnik uri...@yahoo.com wrote:

  From: Mauro Carvalho Chehab mche...@infradead.org
  Subject: Re: [PATCH] [0904_14] Siano: assemble all components to one kernel 
  module
  To: Uri Shkolnik uri...@yahoo.com
  Cc: LinuxML linux-media@vger.kernel.org
  Date: Monday, April 20, 2009, 9:03 PM
  On Sun, 5 Apr 2009 04:42:11 -0700
  (PDT)
  Uri Shkolnik uri...@yahoo.com
  wrote:
  
   
   # HG changeset patch
   # User Uri Shkolnik u...@siano-ms.com
   # Date 1238756860 -10800
   # Node ID 616e696ce6f0c0d76a1aaea8b36e0345112c5ab6
   # Parent 
  f65a29f0f9a66f82a91525ae0085a15f00ac91c2
   [PATCH] [0904_14] Siano: assemble all components to
  one kernel module
   
   From: Uri Shkolnik u...@siano-ms.com
   
   Previously, the support for Siano-based devices
   has been combined from several kernel modules. 
   This patch assembles all into single kernel module.
  
  Why? It seems better to keep it more modular.
  
  Cheers,
  Mauro
  
 
 The driver remains as modular as it was before (regarding sources files).
 Why to load smsusb.ko and than load smsdvb.ko and than load usbcore.ko? (and 
 ir and endian... and...)
 
 The driver handles any device (or devices) with Siano silicon on it, simple 
 as that.
 
 The new build method (Makefile and Kconfig) after the patches (yet to be 
 fully submitted), build the driver to match the system it targets. (If USB 
 exist than it builds the USB interface driver (otherwise it doesn't) and 
 links it to the single module, same for SDIO, and any other interface driver, 
 same for any clients and any other component).

Before seeing the other patches, it is hard for me to manifest, but, IMO, it is
better to have the BUS configurable, e. g. just because you have USB interface,
it doesn't mean that you want siano for USB, instead of using SDIO.

Cheers,
Mauro
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: soc-camera to v4l2-subdev conversion

2009-04-20 Thread Hans Verkuil
On Monday 20 April 2009 22:19:23 Guennadi Liakhovetski wrote:
 Hi Hans,

 On Mon, 20 Apr 2009, Hans Verkuil wrote:
  On Thursday 16 April 2009 21:20:38 Guennadi Liakhovetski wrote:
   Hi Hans,
  
   I have so far partially converted a couple of example setups, namely
   the i.MX31-based pcm037/pcm970 and PXA270-based pcm027/pcm990 boards.
  
   Partially means, that I use v4l2_i2c_new_subdev() to register new
   cameras and v4l2_device_register() to register hosts, I use some core
   and video operations, but there are still quite a few extra bonds
   that tie camera drivers and soc-camera core, that have to be broken.
   The current diff is at
   http://download.open-technology.de/testing/20090416-4.gitdiff,
   although, you, probably, don't want to look at it:-)
  
   A couple of minor general remarks first:
  
   Shouldn't v4l2_device_call_until_err() return an error if the call is
   unimplemented?
 
  It's my opinion that in general if no subdev needs to handle a
  particular call, then that's OK. I'm assuming that if it is wrong, then
  the device won't work anyway.

 In fact, what I actually need is to call a specific method, if it is
 implemented, from one specific subdevice, and get its error code - not
 from all and not until the first error. I am currently abusing your
 grp_id for this, but it might eventually be better to add such a wrapper.

That's actually what grp_id is intended for (or one of the intended uses at 
least). The alternative method is to keep a pointer to the v4l2_subdev and 
use that directly through v4l2_subdev_call(). The third method is to create 
your own macro based on __v4l2_device_call_until_err. There is nothing 
special about it.

   There's no counterpart to v4l2_i2c_new_subdev() in the API, so one is
   supposed to call i2c_unregister_device() directly?
 
  You don't need to call that. It's done automatically when the i2c
  adapter is deleted. It might be that in the future this will have to be
  called, but if so then it will go through v4l2_device_unregister.

 Adapter might never be deleted - remember, this is just a generic CPU i2c
 controller.

Ah yes. Good point. I have to think about this. It should probably be done 
through v4l2_device_unregister().

   We'll have to extend v4l2_subdev_video_ops with [gs]_crop.
 
  No problem. Just add it.
 
   Now I'm thinking about how best to break those remaining ties in
   soc-camera. The remaining bindings that have to be torn are in
   struct soc_camera_device. Mostly these are:
  
   1. current geometry and geometry limits - as seen on the canera host
   - camera client interface. I think, these are common to all video
   devices, so, maybe we could put them meaningfully in a struct
   video_data, accessible for both v4l2 subdevices and devices - one per
   subdevice?
 
  See notes under 3.
 
   2. current exposure and gain. There are of course other video
   parameters similar to these, like gamma, saturation, hue... Actually,
   these are only needed in the sensor driver, the only reason why I
   keep them globally available it to reply to V4L2_CID_GAIN and
   V4L2_CID_EXPOSURE G_CTRL requests. So, if I pass these down to the
   sensor drivers just like all other control requests, they can be
   removed from soc_camera_device.
 
  Agreed.
 
   3. format negotiation. This is a pretty important part of the
   soc-camera framework. Currently, sensor drivers provide a list of
   supported pixel formats, based on it camera host drivers build
   translation tables and calculate user pixel formats. I'd like to
   preserve this functionality in some form. I think, we could make an
   optional common data block, which, if available, can be used also for
   the format negotiation and conversion. If it is not available, I
   could just pass format requests one-to-one down to sensor drivers.
  
   Maybe a more universal approach would be to just keep synthetic
   formats in each camera host driver. Then, on any format request first
   just request it from the sensor trying to pass it one-to-one to the
   user. If this doesn't work, look through the possible conversion
   table, if the requested format is found among output formats, try to
   request all input formats, that can be converted to it, one by one
   from the sensor. Hm...
 
  Both 1 and 3 touch on the basic reason for creating the framework: one
  can build on it to move common driver code into framework. But the
  order in which I prefer to do this is to first move everything over to
  the framework first, before starting on refactoring drivers. The reason
  is that that way to have a really good overview of what everyone is
  doing.
 
  My question is: is it possible without too much effort to fix 1 and 3
  without modifying the framework?

 You mean to implement 1 and 3 without modifying the v4l2-(sub)dev
 framework? 

Correct.

 (1) wouldn't be too difficult, but (3) would require quite a 
 bit of re-design and re-work of all three levels of soc-camera: core,
 

Re: Hauppauge HVR-1500 (aka HP RM436AA#ABA)

2009-04-20 Thread Steven Toth

Benster  Jeremy wrote:

On Mon, 2009-04-20 at 16:04 -0400, Steven Toth wrote:
So, under MCE find a major network ABC, NBC or CBS that works perfectly for you 
then locate the RF channel on antenna web.org.

These all come in fine on mce.

KDKA-DT2.125
WTAE-DT4.151
WQED-DT 13.138
(Rule #2, always CC the mailing list. Don't drop them off, even by accident. An 
honest mistake on your part so I've added them back in.)


Modify your $HOME/.azap/channels.conf to look like this:

ch25:53900:8VSB:65:68:4
ch38:61400:8VSB:65:68:4
ch51:69500:8VSB:65:68:4

The use the following command to tune ch25:

azap -r ch25

What happens next?

- Steve


No indicator light - I know this is probably just a bit set somewhere
that turns on/off the light and has nothing to do with actual operation
of the card, but thought I would mention it.

using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0'
tuning to 53900 Hz
video pid 0x0041, audio pid 0x0044
status 00 | signal 7fe2 | snr  | ber  | unc  |
status 00 | signal 008c | snr 0082 | ber  | unc  |
last line repeats indefinitely.I hit ^c.

tried a second time - now all lines match last line and again I hit ^c.
also the same as the second line for the other two channels.

Something I forgot to mention, if you remove the card with the system
running linux it results in a freeze with a blinking caps lock led (btw
it's a hp dv9208nr laptop). It's ok under windows (32bit). I am running
64 bit linux.

If I insert the card after booting linux without it, the lines
referencing the card do not get added to dmesg's output, and the /dev
entries do not appear. udevd issue or driver?


Hot swap is not supported, always cold boot with the device inserted.



I don't have any other expresscards that I could plug-in to see if hot
swap works on other things.

Ben
oops on the reply list. It has been a long time since I wrote to a mail
list. I did catch one thing before you needed to tell me - i switched to
plain text from html mail. 


I tested a 77001 D3C0 rev and it doesn't locked for me either.

This used to work. Either the xc3028 or s5h1409 driver has a regression.

End result: Bug, broken. Thanks for highlighting this.

- Steve
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: RFC on proposed patches to mr97310a.c for gspca and v4l (headers)

2009-04-20 Thread Theodore Kilgore



On Fri, 17 Apr 2009, Kyle Guinn wrote:


On Friday 17 April 2009 12:50:51 Theodore Kilgore wrote:


snip



But I have never seen the 0x64 0xX0 bytes used to count the frames.
Could you tell me how to repeat that? It certainly would knock down the
validity of the above table wouldn't it?





I've modified libv4l to print out the 12-byte header before it skips over
it.


Good idea, and an obvious one. Why did I not think of that?



OK, below are some results for several cameras. They will agree, more or 
less, with what you get.





Then when I fire up mplayer it prints out each header as each frame is
received.  The framerate is only about 5 fps so there isn't a ton of data
to parse through.  When I point the camera into a light I get this (at
640x480):

...
ff ff 00 ff 96 64 d0 c1 5c c6 00 00
ff ff 00 ff 96 65 50 c1 5c c6 00 00
ff ff 00 ff 96 65 d0 c1 5c c6 00 00
ff ff 00 ff 96 66 50 c1 5c c6 00 00
ff ff 00 ff 96 66 d0 c1 5c c6 00 00
ff ff 00 ff 96 67 50 c1 5c c6 00 00
ff ff 00 ff 96 67 d0 c1 5c c6 00 00
ff ff 00 ff 96 64 50 c1 5c c6 00 00
ff ff 00 ff 96 64 d0 c1 5c c6 00 00
ff ff 00 ff 96 65 50 c1 5c c6 00 00
...


Which camera is this? Is it the Aiptek Pencam VGA+? If so, then I can try
it, too, because I also have one of them.



Yes, that's the one.  Try your others if you can and let me know what happens.



Some results follow now for various cameras. For some of them I have taken 
the trouble to give both 640x480 and 320x240 results. The one camera for 
which I have only given one result is a CIF camera for which we don't know 
how to do the decompression.


Some headers from the Aiptek Pencam VGA+ (0x08ca: 0x0111) at 640x480

Header:   ff ff 00 ff 96 64 d0 37 5a 27 48 91 
Header:   ff ff 00 ff 96 65 50 2c ce 1a 78 5d 
Header:   ff ff 00 ff 96 65 d0 1b 22 02 1a 4e 
Header:   ff ff 00 ff 96 66 50 0b b0 02 5c 01 
Header:   ff ff 00 ff 96 66 d0 0a 90 01 ec 09 
Header:   ff ff 00 ff 96 67 50 0b 81 02 7b fb 
Header:   ff ff 00 ff 96 67 d0 0c 64 01 ec 00 
Header:   ff ff 00 ff 96 64 50 0c 4e 02 fb f7 
Header:   ff ff 00 ff 96 64 d0 0c a3 02 eb f2 
Header:   ff ff 00 ff 96 65 50 0e c5 01 db d5 
Header:   ff ff 00 ff 96 65 d0 0f b3 03 8b bc 
Header:   ff ff 00 ff 96 66 50 10 03 03 ab bb 
Header:   ff ff 00 ff 96 66 d0 10 28 03 6b c0 
Header:   ff ff 00 ff 96 67 50 10 9a 03 5b b2 
Header:   ff ff 00 ff 96 67 d0 11 2a 03 eb 96 
Header:   ff ff 00 ff 96 64 50 11 54 03 fb 90 
Header:   ff ff 00 ff 96 64 d0 11 36 03 fb 92 
Header:   ff ff 00 ff 96 65 50 11 3c 03 fb 8f 
Header:   ff ff 00 ff 96 65 d0 11 41 04 4b 84 
Header:   ff ff 00 ff 96 66 50 11 5c 04 1b 84 
Header:   ff ff 00 ff 96 66 d0 11 69 04 3b 80 
Header:   ff ff 00 ff 96 67 50 11 75 03 fb 7e 
Header:   ff ff 00 ff 96 67 d0 10 b9 03 5b 90 
Header:   ff ff 00 ff 96 64 50 10 83 03 3b 98 
Header:   ff ff 00 ff 96 64 d0 11 0e 03 1b 99 
Header:   ff ff 00 ff 96 65 50 11 70 03 7b 92 
Header:   ff ff 00 ff 96 65 d0 11 68 03 1b a9 
Header:   ff ff 00 ff 96 66 50 11 1d 03 9b b2 
Header:   ff ff 00 ff 96 66 d0 10 e4 03 8b ba 
Header:   ff ff 00 ff 96 67 50 10 ad 03 2b cb


Some headers from the Aiptek Pencam VGA+ (0x08ca: 0x0111) at 320x240

Header:   ff ff 00 ff 96 64 d0 35 5f 2e 48 a9 
Header:   ff ff 00 ff 96 65 50 23 f4 11 e9 69 
Header:   ff ff 00 ff 96 65 d0 17 bf 0a 6b 1d 
Header:   ff ff 00 ff 96 66 50 18 31 0a 5b 11 
Header:   ff ff 00 ff 96 66 d0 1c df 0d aa 87 
Header:   ff ff 00 ff 96 67 50 19 71 09 aa db 
Header:   ff ff 00 ff 96 67 d0 12 6f 00 5b cf 
Header:   ff ff 00 ff 96 64 50 0c 46 01 1c 41 
Header:   ff ff 00 ff 96 64 d0 0e 48 02 5c 09 
Header:   ff ff 00 ff 96 65 50 0e cf 02 6b fd 
Header:   ff ff 00 ff 96 65 d0 0e 82 02 5c 05 
Header:   ff ff 00 ff 96 66 50 0e 45 02 5c 08 
Header:   ff ff 00 ff 96 66 d0 0e 94 02 6c 02 
Header:   ff ff 00 ff 96 67 50 0e 83 02 7b fd 
Header:   ff ff 00 ff 96 67 d0 0e 6f 02 7c 00 
Header:   ff ff 00 ff 96 64 50 0e 6e 02 7c 03 
Header:   ff ff 00 ff 96 64 d0 0e 61 02 4c 04 
Header:   ff ff 00 ff 96 65 50 0e 86 02 4c 00 
Header:   ff ff 00 ff 96 65 d0 0e e3 02 8b f2 
Header:   ff ff 00 ff 96 66 50 0f 62 02 fb e9 
Header:   ff ff 00 ff 96 66 d0 0e c2 02 ab f6 
Header:   ff ff 00 ff 96 67 50 0e 76 02 3c 07


Some headers from the Ion Digital Camera 0x093a:0x010f, at 640x480

Header:   ff ff 00 ff 96 64 d0 20 82 0c e9 af 
Header:   ff ff 00 ff 96 65 50 17 bd 00 a9 c6 
Header:   ff ff 00 ff 96 65 d0 11 90 00 1c 0c 
Header:   ff ff 00 ff 96 66 50 05 f7 00 7c 2b 
Header:   ff ff 00 ff 96 66 d0 07 4e 01 5c 17 
Header:   ff ff 00 ff 96 67 50 07 b9 01 8b fb 
Header:   ff ff 00 ff 96 67 d0 08 90 00 fc 05 
Header:   ff ff 00 ff 96 64 50 09 fc 00 db ef 
Header:   ff ff 00 ff 96 64 d0 0c e6 00 2c 05 
Header:   ff ff 00 ff 96 65 50 13 10 01 db 98 
Header:   ff ff 00 ff 96 65 d0 13 54 02 0b 82 
Header:   ff ff 00 ff 96 66 50 10 d2 02 8b b3 
Header:   ff ff 00 ff 96 66 d0 0c 46 01 7b e7 
Header:   ff ff 00 ff 96 67 50 07 1a 00 0c 5d 
Header:   ff ff 00 ff 96 67 d0 06 e4 00 0c 5f 
Header:   ff ff 00 ff 96 64 50 07 8b 00 

Applying SoC camera framework on multi-functional camera interface

2009-04-20 Thread Dongsoo, Nathaniel Kim
Hello,

One of my recent work is making S3C64XX camera interface driver with
SoC camera framework. Thanks to Guennadi, SoC camera framework is so
clear and easy to follow. Actually I didn't need to worry about my
whole driver structure, the framework almost has everything that I
need.

But here is a problem that I couldn't make up my mind while
implementing some of the features of S3C64XX camera IP.
As you know, S3C64XX camera IP has scaler and rotator capability on
it's own which can be used standalone even memory to memory scaling
and rotating jobs.
If you want to know in detail please take a look at the user manual
(just remind if you have already seen this)  :
http://www.ebv.com/fileadmin/products/Products/Samsung/S3C6400/S3C6400X_UserManual_rev1-0_2008-02_661558um.pdf

Telling you about the driver concept that I wanted to make is like following:

(I want to select inputs like external camera and MSDMA using
S_INPUT'/G_INPUT but we don't have them in SoC camera framework.
So this should be the version of design with current SoC camera framework.)

1. S3C64XX has preview and codec path
2. Each preview and codec path can have external camera and MSDMA for input
3. make external camera and MSDMA device nodes for each preview and codec.
  = Let's assume that we have camera A and B, then it should go like this
  /dev/video0 (camera A on preview device)
  /dev/video1 (camera B on preview device)
  /dev/video2 (MSDMA on preview device)
  /dev/video3 (camera A on codec device)
  /dev/video4 (camera B on codec device)
  /dev/video5 (MSDMA on codec device)

4. Those device nodes are device in SoC camera framework (and S3C
camera interface should be host device)
 = External camera devices can be made in SoC camera device. Fair enough.

  But MSMDA? what should I do If I want to make it as a device
driver in SoC camera framework?
  Any reference that I could have? because I can't find any device
drivers besides camera sensor,isp drivers.
  Please let me know if there is any.

Cheers,

Nate

-- 
=
DongSoo, Nathaniel Kim
Engineer
Mobile S/W Platform Lab.
Digital Media  Communications RD Centre
Samsung Electronics CO., LTD.
e-mail : dongsoo@gmail.com
  dongsoo45@samsung.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


Re: RFC on proposed patches to mr97310a.c for gspca and v4l (headers)

2009-04-20 Thread Theodore Kilgore



Replying to myself:

Apologies that copying using the Cntrl-R option (read file) in pine made 
such a mess of the formatting. This was really a mess when I got a copy 
back again. Sorry, each header _was_ on a separate line :-/






Header:   ff ff 00 ff 96 64 d0 37 5a 27 48 91 Header:   ff ff 00 ff 96 65 50 
2c ce 1a 78 5d Header:   ff ff 00 ff 96 65 d0 1b 22 02 1a 4e Header:   ff ff 
00 ff 96 66 50 0b b0 02 5c 01 Header:   ff ff 00 ff 96 66 d0 0a 90 01 ec 09 
Header:   ff ff 00 ff 96 67 50 0b 81 02 7b fb Header:   ff ff 00 ff 96 67 d0 
0c 64 01 ec 00 Header:   ff ff 00 ff 96 64 50 0c 4e 02 fb f7 Header:   ff ff 
00 ff 96 64 d0 0c a3 02 eb f2 Header:   ff ff 00 ff 96 65 50 0e c5 01 db d5


...

and so on...


Theodore Kilgore
--
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


need help for omap3 isp-camera interface

2009-04-20 Thread Weng, Wending
Hi All,
 
   I'm working on video image capture(omap3 isp) interface(PSP 1.0.2), and have 
met many difficulties. At the camera side, the 8 bits BT656 signal are 
connected to cam_d[0-7], which looks OK. The cam_fld, cam_hs and cam_vs are 
also connected, At the omap3 side, I use saMmapLoopback.c, it runs, however, it 
receives only HS_VS_IRQ, but no any image data. I checked 
FLDSTAT(CCDC_SYN_MODE), it's never changed.
Right now, I don't know what to check, if you can give some suggestions, your 
help will be greatly appreciated. Thanks in advance.
 
Wending Weng
--
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] [0904_14] Siano: assemble all components to one kernel module

2009-04-20 Thread Trent Piepho
On Mon, 20 Apr 2009, Uri Shkolnik wrote:

 better to have the BUS configurable, e. g. just because you have USB 
 interface, it doesn't mean that you want siano for USB, instead of using 
 SDIO.

 Since the module is using dynamic registration, I don't find it a problem.
 When the system has both USB and SDIO buses, both USB and SDIO interface 
 driver will be compiled and linked to the module. When a Siano based device 
 (or multiple Siano devices) will be connected, they will be register 
 internally in the core and activated. Any combination is allow (multiple 
 SDIO, multiple USB and any mix).

This is not the way linux drivers normally work.  Usually there are
multiple modules so that only the ones that need to be loaded are loaded.
It sounds like you are designing this to be custom compiled for each
system, but that's not usually they way things work.
--
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: need help for omap3 isp-camera interface

2009-04-20 Thread Dongsoo, Nathaniel Kim
Hi,

First of all you have to specify which version of camera interface
driver you are using.
Because, there are two versions of omap3 camera interface.
First one is from TI, and second one is from Sakari Ailus. (second one
is the latest)
Besides the version issue, there are some point that you can check.

1. make sure that you are using parallel mode (if you are not using MIPI)
2. check your dataline shift
3. check your H/W connection and check parallel bridge setting

And in case of you are using Sakari's new driver, you can check for
the wait_hs_vs in isp_interface_config.

Cheers,

Nate



On Tue, Apr 21, 2009 at 12:01 PM, Weng, Wending ww...@rheinmetall.ca wrote:
 Hi All,

   I'm working on video image capture(omap3 isp) interface(PSP 1.0.2), and 
 have met many difficulties. At the camera side, the 8 bits BT656 signal are 
 connected to cam_d[0-7], which looks OK. The cam_fld, cam_hs and cam_vs are 
 also connected, At the omap3 side, I use saMmapLoopback.c, it runs, however, 
 it receives only HS_VS_IRQ, but no any image data. I checked 
 FLDSTAT(CCDC_SYN_MODE), it's never changed.
 Right now, I don't know what to check, if you can give some suggestions, your 
 help will be greatly appreciated. Thanks in advance.

 Wending Weng
 --
 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




-- 
=
DongSoo, Nathaniel Kim
Engineer
Mobile S/W Platform Lab.
Digital Media  Communications RD Centre
Samsung Electronics CO., LTD.
e-mail : dongsoo@gmail.com
  dongsoo45@samsung.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


RE: need help for omap3 isp-camera interface

2009-04-20 Thread Hiremath, Vaibhav
Hi Weng,

Thanks,
Vaibhav Hiremath
Platform Support Products
Texas Instruments Inc
Ph: +91-80-25099927

 -Original Message-
 From: linux-media-ow...@vger.kernel.org [mailto:linux-media-
 ow...@vger.kernel.org] On Behalf Of Weng, Wending
 Sent: Tuesday, April 21, 2009 8:32 AM
 To: linux-media@vger.kernel.org
 Subject: need help for omap3 isp-camera interface
 
 Hi All,
 
I'm working on video image capture(omap3 isp) interface(PSP
 1.0.2), and have met many difficulties. At the camera side, the 8
 bits BT656 signal are connected to cam_d[0-7], which looks OK. The
 cam_fld, cam_hs and cam_vs are also connected, At the omap3 side, I
 use saMmapLoopback.c, it runs, however, it receives only HS_VS_IRQ,
 but no any image data. I checked FLDSTAT(CCDC_SYN_MODE), it's never
 changed.


[Hiremath, Vaibhav] Depends on above description I believe you are using 8 bit 
interface in BT656 mode, where CAM[0-7] goes to OMAP_CAM[0-7].

You will have to check for data_shift register configuration, look into the 
function omap34xxcamisp_configure_interface where we are configuring this 
value. 

In PSP1.0.2 the configuration -
--
Interface - TVP[0-9] - CAM[D2-D11]
CCDC_SYN_MODE.INMODE[12-13] = 0x2 -- YCbCr data in 8 bit mode
TVP5146 FMT1[ -- Configured to 10 bit 4:2:2 mode
ISP_CNTRL.SHIFT[6-7] = 0x2 -- 4 bit shift, CamExt[13-4] - Cam[9-0]

With above configuration we are ignoring 2 LSB's from TVP5146 and processing 
8bits (MSB's) coming from it.
 

For your configuration -
--
Interface - CAM_BT[7-0] -- CAM[7-0]
CCDC_SYN_MODE.INMODE[12-13] = 0x2 -- YCbCr data in 8 bit mode
ISP_CNTRL.SHIFT[6-7] = 0x0 -- 0 bit shift, CamExt[13-0] - Cam[13-0]

It should work.


 Right now, I don't know what to check, if you can give some
 suggestions, your help will be greatly appreciated. Thanks in
 advance.
 
 Wending Weng
 --
 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