Re: WinTV HVR-900 USB (B3C0)

2009-12-09 Thread Lukasz Sokol
Rob Beard wrote:
 Hi folks,
 
 I've borrowed a WinTV HVR-900 USB stick from a friend of mine to see if
 I can get any reception in my area before forking out for one however
 I've run in to a couple of problems and wondered if anyone had used one
 of these sticks?
 
[snip]
 
 I just wondered if anyone else had one of these sticks actually working
 under Ubuntu 9.10?  (I'm running kernel 2.6.31-16-generic-pae).
 
 Rob
 


Hi Rob,
this device uses empia chips.

I have a similar situation with Pinnacle Hybrid Pro 330e (yes, 3_3_0e) : the 
only
driver that works (and was great at it) was Markus Rechberger's em28xx-new 
project.
(my device has cx88 tuner IIRC). The em28xx-new project had some modifications 
to
some tuner drivers too. They were based both on RE and documentation for which
Markus had NDA's signed (a vague recollection of past googling).

The mainline kernel unfortunately does not support it out of the box, and it is 
not only
about the firmware you have to download; There is something severely 
nonfunctional.

Why am I writing in past tense ?
This driver (em28xx-new) has recently been abandoned, and its author went 
proprietary.
I was using a ubuntu package prepared by some ubuntu user, named gborzi.
Unfortunately the package cannot apply to more recent kernels any more.
The last kernel it worked with, was 2.6.27-14 (Ubuntu terminology) and I'm 
stuck with it.

I have emailed Markus but he seems to have lost any interest in the 
em28xx-new...
can't blame him though, he gave his reasons, some of them unfortunately true. 

To v4l developers : as it is the case now that we can consider em28xx-new 
abandonware,
could somebody see, what got devices like ours working in his driver, and push 
it to 
mainline, please ? Just the DVB support would be fine...

To Markus : the above is not a call to _steal_your_code_ but merely to somebody 
have
a look and modify the mainline drivers so it could support A 5 YEAR OLD DEVICE 
like mine.
People could employ a 'clean room' like in alternative to Broadcom (b43) 
development.

At least mine, is a 5 YEARS OLD design (bought in 2006).
On my computer, which was middle spec 5 years ago, I've always had problems 
with this device
under Windows (XP) : 100% CPU on max frequency (1.6GHz) all the time, when 
playing.
Under Linux, stock Ubuntu 8.10 Kaffeine, and em28xx-new, it is max 30% CPU at 
lowest freq (800MHz)).

Stock em28xx driver only supports analog (with no sound under stock tvtime, 
supposedly patched tvtime required).

el es
--
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: WinTV HVR-900 USB (B3C0)

2009-12-09 Thread Rob Beard

On 09/12/2009 09:16, Lukasz Sokol wrote:

Rob Beard wrote:
   

Hi folks,

I've borrowed a WinTV HVR-900 USB stick from a friend of mine to see if
I can get any reception in my area before forking out for one however
I've run in to a couple of problems and wondered if anyone had used one
of these sticks?

 

[snip]
   

I just wondered if anyone else had one of these sticks actually working
under Ubuntu 9.10?  (I'm running kernel 2.6.31-16-generic-pae).

Rob

 


Hi Rob,
this device uses empia chips.

I have a similar situation with Pinnacle Hybrid Pro 330e (yes, 3_3_0e) : the 
only
driver that works (and was great at it) was Markus Rechberger's em28xx-new 
project.
(my device has cx88 tuner IIRC). The em28xx-new project had some modifications 
to
some tuner drivers too. They were based both on RE and documentation for which
Markus had NDA's signed (a vague recollection of past googling).

The mainline kernel unfortunately does not support it out of the box, and it is 
not only
about the firmware you have to download; There is something severely 
nonfunctional.

Why am I writing in past tense ?
This driver (em28xx-new) has recently been abandoned, and its author went 
proprietary.
I was using a ubuntu package prepared by some ubuntu user, named gborzi.
Unfortunately the package cannot apply to more recent kernels any more.
The last kernel it worked with, was 2.6.27-14 (Ubuntu terminology) and I'm 
stuck with it.

I have emailed Markus but he seems to have lost any interest in the 
em28xx-new...
can't blame him though, he gave his reasons, some of them unfortunately true.

To v4l developers : as it is the case now that we can consider em28xx-new 
abandonware,
could somebody see, what got devices like ours working in his driver, and push 
it to
mainline, please ? Just the DVB support would be fine...

To Markus : the above is not a call to _steal_your_code_ but merely to somebody 
have
a look and modify the mainline drivers so it could support A 5 YEAR OLD DEVICE 
like mine.
People could employ a 'clean room' like in alternative to Broadcom (b43) 
development.

At least mine, is a 5 YEARS OLD design (bought in 2006).
On my computer, which was middle spec 5 years ago, I've always had problems 
with this device
under Windows (XP) : 100% CPU on max frequency (1.6GHz) all the time, when 
playing.
Under Linux, stock Ubuntu 8.10 Kaffeine, and em28xx-new, it is max 30% CPU at 
lowest freq (800MHz)).

Stock em28xx driver only supports analog (with no sound under stock tvtime, 
supposedly patched tvtime required).

el es
   


Thanks for the heads up, I think I'll have a look and see what else is 
available out there then, luckily I only borrowed it to test if it would 
work.


Regards,

Rob

--
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] WinTV HVR-900 USB (B3C0)

2009-12-09 Thread Stu Fleming




Thanks for the heads up, I think I'll have a look and see what else is 
available out there then, luckily I only borrowed it to test if it 
would work.


Regards,

Rob

http://www.kernellabs.com/blog/?p=761
--
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] Use dev-bus_id instead of dev_name in pre 2.6.26 kernels

2009-12-09 Thread Laurent Pinchart
From: Laurent Pinchart laurent.pinch...@ideasonboard.com

dev_name() is not available before 2.6.26. Daily builds get particularly
noisy due to the function being called in include/media/v4l2-dev.h. Fix
this with a kernel version check instead of including compat.h as that
would increase compilation time.

Priority: normal
kernel-sync

Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com

diff -r 065f9e34e07b linux/include/media/v4l2-dev.h
--- a/linux/include/media/v4l2-dev.hMon Dec 07 10:08:33 2009 -0200
+++ b/linux/include/media/v4l2-dev.hWed Dec 09 11:04:51 2009 +0100
@@ -156,8 +156,12 @@
 #if LINUX_VERSION_CODE  KERNEL_VERSION(2, 6, 19)
return vdev-dev.class_id;
 #else
+#if LINUX_VERSION_CODE  KERNEL_VERSION(2, 6, 26)
+   return vdev-dev.bus_id;
+#else
return dev_name(vdev-dev);
 #endif
+#endif
 }
 
 static inline int video_is_registered(struct video_device *vdev)

-- 
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: New DVB-Statistics API

2009-12-09 Thread Manu Abraham
On Wed, Dec 9, 2009 at 3:43 AM, Mauro Carvalho Chehab
mche...@redhat.com wrote:
 Manu Abraham wrote:

 Not true. As pointed at the previous answer, the difference between a new 
 ioctl
 and S2API is basically the code at dtv_property_prepare_get_stats() and
 dtv_property_process_get(). This is a pure code that uses a continuous 
 struct
 that will likely be at L3 cache, inside the CPU chip. So, this code will run
 really quickly.



 AFAIK, cache eviction occurs with syscalls: where content in the
 caches near the CPU cores is pushed to the outer cores, resulting in
 cache misses. Not all CPU's are equipped with L3 caches. Continuous
 syscalls can result in TLB cache misses from what i understand, which
 is expensive.

 It is very likely that the contents of struct fe to go into the cache during 
 the
 syscall. I was conservative when I talked about L3. Depending on the cache 
 sizes,
 I won't doubt that the needed fields of the fe struct will go to L1 cache.



Ah, so the data structure which is there in the ioctl approach as well
and less likely to get cache hits since the calls are lesser.


 As current CPU's runs at the order of Teraflops (as the CPU clocks are at 
 gigahertz
 order, and CPU's can handle multiple instructions per clock cycle), the 
 added delay
 is in de order of nanosseconds.


 Consider STB's where DVB is generally deployed rather than the small
 segment of home users running a stack on a generic PC.

 Even with STB, let's assume a very slow cpu that runs at 100 
 Megabytes/second. So, the clock
 speed is 10 nanoseconds. Assuming that this CPU doesn't have a good pipeline, 
 being
 capable of handling only one instruction per second, you'll have one 
 instruction at executed
 at each 10 nanoseconds (as a reference, a Pentium 1, running at 133 Mbps is 
 faster than this).

Incorrect.
A CPU doesn't execute instruction per clock cycle. Clock cycles
required to execute an instruction do vary from 2 cycles 12 cycles
varying from CPU to CPU.


 An I/O operation at i2c is of the order of 10^-3. Assuming that an additional 
 delay of 10%
 (10 ^ -4) will deadly affect realtime capability (with it is very doubtful), 
 this means that
 the CPU can run up to 10,000 (!!!) instructions to generate such delay. If 
 you compile that code
 and check the number or extra instructions I bet it will be shorter enough to 
 not cause any
 practical effect.

 So, even on such bad hardware that is at least 20x slower than a netbook 
 running at 1Gbps,
 what determines the delay is the amount of I/O you're doing, and not the 
 number of extra
 code.


The I/O overhead required to read 4 registers from hardware is the
same whether you use the ioctl approach or s2api.


   Hardware I/O is the most expensive operation involved.

 True. That's what I said.

 Case #1: the ioctl approach
code stripped

 Now Case #2: based on s2api
code stripped

 Now that we can see the actual code flow, we can see the s2api
 approach requires an unnecessary large tokenizer/serializer, involving
 multiple function calls.

 Are you seeing there 10.000 assembler instructions or so? If not, the size of 
 the code is
 not relevant.

 Also: gcc optimizer transforms switches into a binary tree. So, if you have 64
 cases on switch, it will require 7 comparations (log2(64)) to get a match.

 For example, a quick look at the code you've presented, let's just calculate
 the number of operations on the dtv_property_proccess_get() routine, without
 debug stuff:

 static int dtv_property_process_get() {
CMP (if fe-ops.get_property)
CMP (if r  0)    This if only happens if the 
 first one is executed. On my patch, it is not executed
(the code you posted is the 
 one before my patch)
SWITCH (7 CMP's)  due to binary tree optimization 
 done by gcc
MOV
 }

 So, that entire code (that has about 200 lines) has, in fact
 9 comparations and one move instruction.

 At dtv_property_prepare_get_stats(), the code is even cheaper: just a switch 
 with 8
 elements (log2(8) = 3), so 3 comparations, and one move instruction.

 The additional cost on dvb_frontend_ioctl_properties is:
2 MOVs
One loop calling dtv_property_prepare_get_stats() - up to 4 times to 
 retrieve
 all quality values
one INC
one CMP and function CALL (the same cost exists also with the struct)
One loop calling dtv_property_get_stats() - up to 4 times to retrieve
 all quality values

 So, if I've calculated it right, we're talking about 2+1+16+1+2+1+40 = 63 
 instructions.

 2) the userspace-kernelspace payload.

 Case #1: The size of S2API structs. It will range from 24 to 84 (depending on 
 what
 you want to get, from one to 4 different value pairs).

 Case #2: The size of the ioctl struct: about 30 bytes (If I summed the size 
 of all structs correctly).

 payload of S2API is generally bigger, except if just one 

Re: IR Receiver on an Tevii S470

2009-12-09 Thread Andy Walls
On Tue, 2009-12-08 at 19:59 +0200, Igor M. Liplianin wrote:
 On 7 декабря 2009 05:35:46 Andy Walls wrote:

  Igor and Matthias,
 
  Please try the changes that I have for the TeVii S470 that are here:
 
  http://linuxtv.org/hg/~awalls/cx23885-ir
 
  You will want to modprobe the driver modules like this to get debugging
  information:
 
  # modprobe cx25840 ir_debug=2
  # modprobe cx23885 ir_input_debug=1
 
  With that debugging you will get output something like this in dmesg or
  your logs when you press a button on the remote (this is RC-5 using a
  CX23888 chip not NEC using a CX23885 chip):
 
  cx23885[0]/888-ir: IRQ Status:  tsr rsr rby
  cx23885[0]/888-ir: IRQ Enables: rse rte roe
  cx23885[0]/888-ir: IRQ Status:  tsr rsr rby
  cx23885[0]/888-ir: IRQ Enables: rse rte roe
  cx23885[0]/888-ir: IRQ Status:  tsr rsr rby
  cx23885[0]/888-ir: IRQ Enables: rse rte roe
  cx23885[0]/888-ir: IRQ Status:  tsr rsr rby
  cx23885[0]/888-ir: IRQ Enables: rse rte roe
  cx23885[0]/888-ir: IRQ Status:  tsr rsr rby
  cx23885[0]/888-ir: IRQ Enables: rse rte roe
  cx23885[0]/888-ir: IRQ Status:  tsr rto
  cx23885[0]/888-ir: IRQ Enables: rse rte roe
  cx23885[0]/888-ir: rx read: 817000 ns  mark
  cx23885[0]/888-ir: rx read: 838926 ns  space
  cx23885[0]/888-ir: rx read:1572259 ns  mark
  cx23885[0]/888-ir: rx read:1705296 ns  space
  [...]
  cx23885[0]/888-ir: rx read: 838037 ns  space
  cx23885[0]/888-ir: rx read: 746333 ns  mark
  cx23885[0]/888-ir: rx read:1705741 ns  space
  cx23885[0]/888-ir: rx read:1619370 ns  mark
  cx23885[0]/888-ir: rx read: end of rx

  If you do not see good or many NEC timing measurments in the logs, the
  first thing to try is to change lines 533-534 of
  linux/drivers/media/cx23885/cx23885-input.c:
 
 params.modulation = true;
 params.invert_level = false;
 
  If you see no timing measurements or few timing measurements, change the
  modulation to false.  If the chip is expecting carrier pulses and an
  external circuit or capacitor is smoothing carrier bursts into baseband
  pulses, then the hardware won't make measurements properly.
 
  If you see inverted mark and space inverted when modulation is set to
  false, then set invert_level to true.
 
  Those are the two things I had to really guess at.

  Regards,
  Andy
 
 No luck :(
 Nothing in logs

:(

OK.

1. I assume you have the v4l-cx23885-avcore-01.fw file available for the
cx25840 module, just so there is no problem initializing the CX23885 AV
core.


2. Does dmesg or the logs show the input device being created?
Somewhere in the log you should see:

cx23885 IR (TeVii S470)

when the input device is created.


3. With the debug=7 option to the cx23885 module, do you see any IR
interrupts coming in?  In dmesg or the log you should see:

(PCI_MSK_IR0x...)

when an IR interrupt happens.


Tonight I will:

a. Add a guess at HVR-1800 support so maybe Steve can help us debug as
well.  I know the NEC decoder works; I tested it.  What I don't know is
if the CX23885 AV IR implementation works (I don't have CX23885 hardware
at the moment).

b. Add a temporary patch to add a /dev/videoN node for the TeVii S470 so
you can use v4l2-ctl --log-status to show the status of the IR
controller and v4l2-dbg to dump the cx23885 and cx23885-av-core
registers, so I can see if everthying is set right.

c. Review the register settings to make sure interrupts should be
enabled for the IR controller.

Regards,
Andy

--
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 - v1] V4L-Fix videobuf_dma_contig_user_get() for non-aligned offsets

2009-12-09 Thread Magnus Damm
On Wed, Dec 9, 2009 at 6:36 AM,  m-kariche...@ti.com wrote:
 From: Muralidharan Karicheri m-kariche...@ti.com

 If a USERPTR address that is not aligned to page boundary is passed to the
 videobuf_dma_contig_user_get() function, it saves a page aligned address to
 the dma_handle. This is not correct. This issue is observed when using USERPTR
 IO machism for buffer exchange.

 Updates from last version:-

 Adding offset for size calculation as per comment from Magnus Damm. This
 ensures the last page is also included for checking if memory is
 contiguous.

 Signed-off-by: Muralidharan Karicheri m-kariche...@ti.com

Hi Murali,

I've spent some time testing this patch with the SuperH CEU driver in
USERPTR mode. My test case is based on capture.c with places a bunch
of QVGA frames directly after each other. The size of each QVGA frame
is not an even multiple of 4k page size, so some of the frames will
use a non-aligned start addresses. Currently the CEU driver page
aligns the size of each frame, but I'll fix that in an upcoming patch.
Thank you!

Acked-by: Magnus Damm d...@opensource.se
--
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: New DVB-Statistics API

2009-12-09 Thread Mauro Carvalho Chehab
Manu Abraham wrote:
 On Wed, Dec 9, 2009 at 3:43 AM, Mauro Carvalho Chehab
 mche...@redhat.com wrote:

 Even with STB, let's assume a very slow cpu that runs at 100 
 Megabytes/second. So, the clock
 speed is 10 nanoseconds. Assuming that this CPU doesn't have a good 
 pipeline, being
 capable of handling only one instruction per second, you'll have one 
 instruction at executed
 at each 10 nanoseconds (as a reference, a Pentium 1, running at 133 Mbps is 
 faster than this).
 
 Incorrect.
 A CPU doesn't execute instruction per clock cycle. Clock cycles
 required to execute an instruction do vary from 2 cycles 12 cycles
 varying from CPU to CPU.

See the description of an old Pentium MMX processor (the sucessor of i586, 
running up to 200 MHz):
http://www.intel.com/design/archives/processors/mmx/docs/243185.htm

Thanks to superscalar architecture, it runs 2 instructions per clock cycle 
(IPC).

Newer processors can run more instructions per clock cycle. For example, any 
Pentium-4 processor,
can do 3 IPC:
http://www.intel.com/support/processors/pentium4/sb/CS-017371.htm

 So, even on such bad hardware that is at least 20x slower than a netbook 
 running at 1Gbps,
 what determines the delay is the amount of I/O you're doing, and not the 
 number of extra
 code.
 
 
 The I/O overhead required to read 4 registers from hardware is the
 same whether you use the ioctl approach or s2api.

It seems you got my point. What will determinate the delay is the number of 
I/O's, and not the
amount of instructions.
 
 Eventually, as you have pointed out yourself, The data struct will be
 in the cache all the time for the ioctl approach. The only new
 addition to the existing API in the ioctl case is a CALL instruction
 as compared to the numerous instructions in comparison to that you
 have pointed out as with the s2api approach.

True, but, as shown, the additional delay introduced by the code is less than 
0.01%, even on
a processor that has half of the speed of a 12-year old very slow CPU (a 
Pentium MMX @ 100 MHz
is capable of 2 IPC. My calculus assumed 1 IPC).

So, what will affect the delay is the number of I/O you need to do.

To get all data that the ioctl approach struct has, the delay for S2API will be 
equal.
To get less data, S2API will have a small delay.

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


[PATCH] sh_mobile_ceu_camera: Add physical address alignment checks

2009-12-09 Thread Magnus Damm
From: Magnus Damm d...@opensource.se

Make sure physical addresses are 32-bit aligned in the
SuperH Mobile CEU driver. The lowest two bits of the
address registers are fixed to zero so frame buffers
have to bit 32-bit aligned. The V4L2 mmap() case is
using dma_alloc_coherent() for this driver which will
return aligned addresses, but in the USERPTR case we
must make sure that the user space pointer is valid.

Signed-off-by: Magnus Damm d...@opensource.se
---

 drivers/media/video/sh_mobile_ceu_camera.c |   16 
 1 file changed, 12 insertions(+), 4 deletions(-)

--- 0001/drivers/media/video/sh_mobile_ceu_camera.c
+++ work/drivers/media/video/sh_mobile_ceu_camera.c 2009-12-09 
17:16:47.0 +0900
@@ -278,9 +278,14 @@ static int sh_mobile_ceu_capture(struct 
 
phys_addr_top = videobuf_to_dma_contig(pcdev-active);
ceu_write(pcdev, CDAYR, phys_addr_top);
+   if (phys_addr_top  3)
+   return -EINVAL;
+
if (pcdev-is_interlaced) {
phys_addr_bottom = phys_addr_top + icd-user_width;
ceu_write(pcdev, CDBYR, phys_addr_bottom);
+   if (phys_addr_bottom  3)
+   return -EINVAL;
}
 
switch (icd-current_fmt-fourcc) {
@@ -288,13 +293,16 @@ static int sh_mobile_ceu_capture(struct 
case V4L2_PIX_FMT_NV21:
case V4L2_PIX_FMT_NV16:
case V4L2_PIX_FMT_NV61:
-   phys_addr_top += icd-user_width *
-   icd-user_height;
+   phys_addr_top += icd-user_width * icd-user_height;
ceu_write(pcdev, CDACR, phys_addr_top);
+   if (phys_addr_top  3)
+   return -EINVAL;
+
if (pcdev-is_interlaced) {
-   phys_addr_bottom = phys_addr_top +
-   icd-user_width;
+   phys_addr_bottom = phys_addr_top + icd-user_width;
ceu_write(pcdev, CDBCR, phys_addr_bottom);
+   if (phys_addr_bottom  3)
+   return -EINVAL;
}
}
 
--
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] sh_mobile_ceu_camera: Remove frame size page alignment

2009-12-09 Thread Magnus Damm
From: Magnus Damm d...@opensource.se

This patch updates the SuperH Mobile CEU driver to
not page align the frame size. Useful in the case of
USERPTR with non-page aligned frame sizes and offsets.

Signed-off-by: Magnus Damm d...@opensource.se
---

 drivers/media/video/sh_mobile_ceu_camera.c |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

--- 0010/drivers/media/video/sh_mobile_ceu_camera.c
+++ work/drivers/media/video/sh_mobile_ceu_camera.c 2009-12-09 
17:54:37.0 +0900
@@ -199,14 +199,13 @@ static int sh_mobile_ceu_videobuf_setup(
struct sh_mobile_ceu_dev *pcdev = ici-priv;
int bytes_per_pixel = (icd-current_fmt-depth + 7)  3;
 
-   *size = PAGE_ALIGN(icd-user_width * icd-user_height *
-  bytes_per_pixel);
+   *size = icd-user_width * icd-user_height * bytes_per_pixel;
 
if (0 == *count)
*count = 2;
 
if (pcdev-video_limit) {
-   while (*size * *count  pcdev-video_limit)
+   while (PAGE_ALIGN(*size) * *count  pcdev-video_limit)
(*count)--;
}
 
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


v4l-dvb from source on 2.6.31.5 opensuse kernel - not working

2009-12-09 Thread Valerio Bontempi
Hi all,

I am trying to install v4l-dvb drivers from source because my device
(Terratec Cinergy T XS, usb device DVB only) isn't supported by
official v4l-dvb released in last kernel version yet: it is simply
detected with the wrong firmware, but modifing the source code of the
driver is works fine, tested successfully on ubuntu 9.10 (I have
already submitted the patch to v4l team).

I compiled v4l-dvb drivers and installed them through make install,
but then v4l-dvb driver is not working anymore: the video device is
not created, and I don't find any information about my device in dmesg
(neither the message about the wrong firmware). So I am supposing that
v4l-dvb is not working at all.

Does someone know how I can understand where is the problem?

Best regards

Valerio
--
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] [resend] radio-sf16fmi: add autoprobing

2009-12-09 Thread Ondrej Zary
Add automatic probing of ports 0x284 and 0x384 to radio-sf16fmi if no card is
found using PnP.

Signed-off-by: Ondrej Zary li...@rainbow-software.org

--- linux-source-2.6.31/drivers/media/radio/Kconfig.1   2009-11-28 
21:40:32.0 +0100
+++ linux-source-2.6.31/drivers/media/radio/Kconfig 2009-11-28 
21:32:58.0 +0100
@@ -199,10 +199,7 @@
tristate SF16-FMI/SF16-FMP Radio
depends on ISA  VIDEO_V4L2
---help---
- Choose Y here if you have one of these FM radio cards.  If you
- compile the driver into the kernel and your card is not PnP one, you
- have to add sf16fm=io to the kernel command line (I/O address is
- 0x284 or 0x384).
+ Choose Y here if you have one of these FM radio cards.
 
  In order to control your radio card, you will need to use programs
  that are compatible with the Video For Linux API.  Information on
--- linux-source-2.6.31/drivers/media/radio/radio-sf16fmi.c.1   2009-11-28 
21:27:22.0 +0100
+++ linux-source-2.6.31/drivers/media/radio/radio-sf16fmi.c 2009-11-28 
22:15:57.0 +0100
@@ -54,6 +54,7 @@ struct fmi
 
 static struct fmi fmi_card;
 static struct pnp_dev *dev;
+bool pnp_attached;
 
 /* freq is in 1/16 kHz to internal number, hw precision is 50 kHz */
 /* It is only useful to give freq in interval of 800 (=0.05Mhz),
@@ -316,26 +317,54 @@ static int __init fmi_init(void)
 {
struct fmi *fmi = fmi_card;
struct v4l2_device *v4l2_dev = fmi-v4l2_dev;
-   int res;
+   int res, i;
+   int probe_ports[] = { 0, 0x284, 0x384 };
 
-   if (io  0)
-   io = isapnp_fmi_probe();
-   strlcpy(v4l2_dev-name, sf16fmi, sizeof(v4l2_dev-name));
-   fmi-io = io;
-   if (fmi-io  0) {
-   v4l2_err(v4l2_dev, No PnP card found.\n);
-   return fmi-io;
+   if (io  0) {
+   for (i = 0; i  ARRAY_SIZE(probe_ports); i++) {
+   io = probe_ports[i];
+   if (io == 0) {
+   io = isapnp_fmi_probe();
+   if (io  0)
+   continue;
+   pnp_attached = 1;
+   }
+   if (!request_region(io, 2, radio-sf16fmi)) {
+   if (pnp_attached)
+   pnp_device_detach(dev);
+   io = -1;
+   continue;
+   }
+   if (pnp_attached ||
+   ((inb(io)  0xf9) == 0xf9  (inb(io)  0x4) == 0))
+   break;
+   release_region(io, 2);
+   io = -1;
+   }
+   } else {
+   if (!request_region(io, 2, radio-sf16fmi)) {
+   printk(KERN_ERR radio-sf16fmi: port %#x already in 
use\n, io);
+   return -EBUSY;
+   }
+   if (inb(io) == 0xff) {
+   printk(KERN_ERR radio-sf16fmi: card not present at 
%#x\n, io);
+   release_region(io, 2);
+   return -ENODEV;
+   }
}
-   if (!request_region(io, 2, radio-sf16fmi)) {
-   v4l2_err(v4l2_dev, port 0x%x already in use\n, fmi-io);
-   pnp_device_detach(dev);
-   return -EBUSY;
+   if (io  0) {
+   printk(KERN_ERR radio-sf16fmi: no cards found\n);
+   return -ENODEV;
}
 
+   strlcpy(v4l2_dev-name, sf16fmi, sizeof(v4l2_dev-name));
+   fmi-io = io;
+
res = v4l2_device_register(NULL, v4l2_dev);
if (res  0) {
release_region(fmi-io, 2);
-   pnp_device_detach(dev);
+   if (pnp_attached)
+   pnp_device_detach(dev);
v4l2_err(v4l2_dev, Could not register v4l2_device\n);
return res;
}
@@ -352,7 +381,8 @@ static int __init fmi_init(void)
if (video_register_device(fmi-vdev, VFL_TYPE_RADIO, radio_nr)  0) {
v4l2_device_unregister(v4l2_dev);
release_region(fmi-io, 2);
-   pnp_device_detach(dev);
+   if (pnp_attached)
+   pnp_device_detach(dev);
return -EINVAL;
}
 
@@ -369,7 +399,7 @@ static void __exit fmi_exit(void)
video_unregister_device(fmi-vdev);
v4l2_device_unregister(fmi-v4l2_dev);
release_region(fmi-io, 2);
-   if (dev)
+   if (dev  pnp_attached)
pnp_device_detach(dev);
 }
 


-- 
Ondrej Zary
--
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] [resend] radio-sf16fmi: fix mute, add SF16-FMP to texts

2009-12-09 Thread Ondrej Zary
Fix completely broken mute handling radio-sf16fmi.
The sound was muted immediately after tuning in KRadio.
Also fix typos and add SF16-FMP to the texts.

Signed-off-by: Ondrej Zary li...@rainbow-software.org

diff -urp linux-source-2.6.31-orig/drivers/media/radio/Kconfig 
linux-source-2.6.31/drivers/media/radio/Kconfig
--- linux-source-2.6.31-orig/drivers/media/radio/Kconfig2009-09-10 
00:13:59.0 +0200
+++ linux-source-2.6.31/drivers/media/radio/Kconfig 2009-11-28 
11:51:42.0 +0100
@@ -196,7 +196,7 @@ config RADIO_MAESTRO
  module will be called radio-maestro.
 
 config RADIO_SF16FMI
-   tristate SF16FMI Radio
+   tristate SF16-FMI/SF16-FMP Radio
depends on ISA  VIDEO_V4L2
---help---
  Choose Y here if you have one of these FM radio cards.  If you
diff -urp linux-source-2.6.31-orig/drivers/media/radio/radio-sf16fmi.c 
linux-source-2.6.31/drivers/media/radio/radio-sf16fmi.c
--- linux-source-2.6.31-orig/drivers/media/radio/radio-sf16fmi.c
2009-09-10 00:13:59.0 +0200
+++ linux-source-2.6.31/drivers/media/radio/radio-sf16fmi.c 2009-11-28 
11:39:35.0 +0100
@@ -1,4 +1,4 @@
-/* SF16FMI radio driver for Linux radio support
+/* SF16-FMI and SF16-FMP radio driver for Linux radio support
  * heavily based on rtrack driver...
  * (c) 1997 M. Kirkwood
  * (c) 1998 Petr Vandrovec, vandr...@vc.cvut.cz
@@ -11,7 +11,7 @@
  *
  *  Frequency control is done digitally -- ie out(port,encodefreq(95.8));
  *  No volume control - only mute/unmute - you have to use line volume
- *  control on SB-part of SF16FMI
+ *  control on SB-part of SF16-FMI/SF16-FMP
  *
  * Converted to V4L2 API by Mauro Carvalho Chehab mche...@infradead.org
  */
@@ -30,14 +30,14 @@
 #include media/v4l2-ioctl.h
 
 MODULE_AUTHOR(Petr Vandrovec, vandr...@vc.cvut.cz and M. Kirkwood);
-MODULE_DESCRIPTION(A driver for the SF16MI radio.);
+MODULE_DESCRIPTION(A driver for the SF16-FMI and SF16-FMP radio.);
 MODULE_LICENSE(GPL);
 
 static int io = -1;
 static int radio_nr = -1;
 
 module_param(io, int, 0);
-MODULE_PARM_DESC(io, I/O address of the SF16MI card (0x284 or 0x384));
+MODULE_PARM_DESC(io, I/O address of the SF16-FMI or SF16-FMP card (0x284 or 
0x384));
 module_param(radio_nr, int, 0);
 
 #define RADIO_VERSION KERNEL_VERSION(0, 0, 2)
@@ -47,7 +47,7 @@ struct fmi
struct v4l2_device v4l2_dev;
struct video_device vdev;
int io;
-   int curvol; /* 1 or 0 */
+   bool mute;
unsigned long curfreq; /* freq in kHz */
struct mutex lock;
 };
@@ -105,7 +105,7 @@ static inline int fmi_setfreq(struct fmi
outbits(8, 0xC0, fmi-io);
msleep(143);/* was schedule_timeout(HZ/7) */
mutex_unlock(fmi-lock);
-   if (fmi-curvol)
+   if (!fmi-mute)
fmi_unmute(fmi);
return 0;
 }
@@ -116,7 +116,7 @@ static inline int fmi_getsigstr(struct f
int res;
 
mutex_lock(fmi-lock);
-   val = fmi-curvol ? 0x08 : 0x00;/* unmute/mute */
+   val = fmi-mute ? 0x00 : 0x08;  /* mute/unmute */
outb(val, fmi-io);
outb(val | 0x10, fmi-io);
msleep(143);/* was schedule_timeout(HZ/7) */
@@ -204,7 +204,7 @@ static int vidioc_g_ctrl(struct file *fi
 
switch (ctrl-id) {
case V4L2_CID_AUDIO_MUTE:
-   ctrl-value = fmi-curvol;
+   ctrl-value = fmi-mute;
return 0;
}
return -EINVAL;
@@ -221,7 +221,7 @@ static int vidioc_s_ctrl(struct file *fi
fmi_mute(fmi);
else
fmi_unmute(fmi);
-   fmi-curvol = ctrl-value;
+   fmi-mute = ctrl-value;
return 0;
}
return -EINVAL;

-- 
Ondrej Zary
--
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: TBS 6980 Dual DVB-S2 PCIe card

2009-12-09 Thread Thomas Kernen

Ian Richardson wrote:

On 2009-12-08 13:31, Thomas Kernen wrote:

Matthias Wächter wrote:

Hallo Thomas!

Am 02.12.2009 15:31, schrieb Thomas Kernen:

Is someone already working on supporting the TBS 6980 Dual DVB-S2 PCIe
card? http://www.tbsdtv.com/english/product/6980.html


I got one last Thursday, also direct from TBS. They provide a mini CD 
with their own V4L which has support for it included, together with 
versions of scan-s2 and szap-s2, but I'm a relative newbie and I've 
already managed to break my MythTV 0.22 setup trying to get it working. 
Any tips on how to get it working with Ubuntu 9.10 and kernel 
2.6.31-16.52 would be very handy.


With their V4L I can only get as far as a successful channel scan.



Ian,

I got my card today and have installed it. Works fine with the drivers 
from the mini CD and the streamer I'm testing against (DVBlast). So 
unfortunately I can't help you with MythTV since I don't use it.


Note that I'm using Ubuntu 9.10 with 2.6.31-16-server

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 - v1] V4L-Fix videobuf_dma_contig_user_get() for non-aligned offsets

2009-12-09 Thread Karicheri, Muralidharan
Magnus,

Thanks for testing and approving the patch.

Mauro,

Could you merge this bug fix?

Murali Karicheri
Software Design Engineer
Texas Instruments Inc.
Germantown, MD 20874
phone: 301-407-9583
email: m-kariche...@ti.com

-Original Message-
From: Magnus Damm [mailto:magnus.d...@gmail.com]
Sent: Wednesday, December 09, 2009 8:00 AM
To: Karicheri, Muralidharan
Cc: linux-media@vger.kernel.org
Subject: Re: [PATCH - v1] V4L-Fix videobuf_dma_contig_user_get() for non-
aligned offsets

On Wed, Dec 9, 2009 at 6:36 AM,  m-kariche...@ti.com wrote:
 From: Muralidharan Karicheri m-kariche...@ti.com

 If a USERPTR address that is not aligned to page boundary is passed to
the
 videobuf_dma_contig_user_get() function, it saves a page aligned address
to
 the dma_handle. This is not correct. This issue is observed when using
USERPTR
 IO machism for buffer exchange.

 Updates from last version:-

 Adding offset for size calculation as per comment from Magnus Damm. This
 ensures the last page is also included for checking if memory is
 contiguous.

 Signed-off-by: Muralidharan Karicheri m-kariche...@ti.com

Hi Murali,

I've spent some time testing this patch with the SuperH CEU driver in
USERPTR mode. My test case is based on capture.c with places a bunch
of QVGA frames directly after each other. The size of each QVGA frame
is not an even multiple of 4k page size, so some of the frames will
use a non-aligned start addresses. Currently the CEU driver page
aligns the size of each frame, but I'll fix that in an upcoming patch.
Thank you!

Acked-by: Magnus Damm d...@opensource.se
--
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: IR Receiver on an Tevii S470

2009-12-09 Thread Igor M. Liplianin
On 9 декабря 2009 13:47:46 Andy Walls wrote:
 On Tue, 2009-12-08 at 19:59 +0200, Igor M. Liplianin wrote:
  On 7 декабря 2009 05:35:46 Andy Walls wrote:
   Igor and Matthias,
  
   Please try the changes that I have for the TeVii S470 that are here:
  
 http://linuxtv.org/hg/~awalls/cx23885-ir
  
   You will want to modprobe the driver modules like this to get debugging
   information:
  
 # modprobe cx25840 ir_debug=2
 # modprobe cx23885 ir_input_debug=1
  
   With that debugging you will get output something like this in dmesg or
   your logs when you press a button on the remote (this is RC-5 using a
   CX23888 chip not NEC using a CX23885 chip):
  
   cx23885[0]/888-ir: IRQ Status:  tsr rsr rby
   cx23885[0]/888-ir: IRQ Enables: rse rte roe
   cx23885[0]/888-ir: IRQ Status:  tsr rsr rby
   cx23885[0]/888-ir: IRQ Enables: rse rte roe
   cx23885[0]/888-ir: IRQ Status:  tsr rsr rby
   cx23885[0]/888-ir: IRQ Enables: rse rte roe
   cx23885[0]/888-ir: IRQ Status:  tsr rsr rby
   cx23885[0]/888-ir: IRQ Enables: rse rte roe
   cx23885[0]/888-ir: IRQ Status:  tsr rsr rby
   cx23885[0]/888-ir: IRQ Enables: rse rte roe
   cx23885[0]/888-ir: IRQ Status:  tsr rto
   cx23885[0]/888-ir: IRQ Enables: rse rte roe
   cx23885[0]/888-ir: rx read: 817000 ns  mark
   cx23885[0]/888-ir: rx read: 838926 ns  space
   cx23885[0]/888-ir: rx read:1572259 ns  mark
   cx23885[0]/888-ir: rx read:1705296 ns  space
   [...]
   cx23885[0]/888-ir: rx read: 838037 ns  space
   cx23885[0]/888-ir: rx read: 746333 ns  mark
   cx23885[0]/888-ir: rx read:1705741 ns  space
   cx23885[0]/888-ir: rx read:1619370 ns  mark
   cx23885[0]/888-ir: rx read: end of rx
  
   If you do not see good or many NEC timing measurments in the logs, the
   first thing to try is to change lines 533-534 of
   linux/drivers/media/cx23885/cx23885-input.c:
  
  params.modulation = true;
  params.invert_level = false;
  
   If you see no timing measurements or few timing measurements, change
   the modulation to false.  If the chip is expecting carrier pulses
   and an external circuit or capacitor is smoothing carrier bursts into
   baseband pulses, then the hardware won't make measurements properly.
  
   If you see inverted mark and space inverted when modulation is set to
   false, then set invert_level to true.
  
   Those are the two things I had to really guess at.
  
   Regards,
   Andy
 
  No luck :(
  Nothing in logs
 
 :(

 OK.

 1. I assume you have the v4l-cx23885-avcore-01.fw file available for the
 cx25840 module, just so there is no problem initializing the CX23885 AV
 core.


 2. Does dmesg or the logs show the input device being created?
 Somewhere in the log you should see:

   cx23885 IR (TeVii S470)

 when the input device is created.


 3. With the debug=7 option to the cx23885 module, do you see any IR
 interrupts coming in?  In dmesg or the log you should see:

   (PCI_MSK_IR0x...)

 when an IR interrupt happens.

cx25840 3-0044: cx23885 A/V decoder found @ 0x88 (cx23885[0])
cx25840 3-0044: firmware: requesting v4l-cx23885-avcore-01.fw
cx25840 3-0044: loaded v4l-cx23885-avcore-01.fw firmware (16382 bytes)
cx23885_dvb_register() allocating 1 frontend(s)
cx23885[0]: cx23885 based dvb card
DS3000 chip version: 0.192 attached.
DVB: registering new adapter (cx23885[0])
dvb_register_frontend
DVB: registering adapter 0 frontend 0 (Montage Technology DS3000/TS2020)...
cx23885_dev_checkrevision() Hardware revision = 0xb0
cx23885[0]/0: found at :02:00.0, rev: 2, irq: 16, latency: 0, mmio: 
0xfea0
cx23885 :02:00.0: setting latency timer to 64
IRQ 16/cx23885[0]: IRQF_DISABLED is not guaranteed on shared IRQs
input: cx23885 IR (TeVii S470) as /class/input/input5

That's all.

In fact some time ago I was writing some code for cx23885 IR, but not reached 
IR interrupts to 
work. Though I used PCI_MSK_AV_CORE (1  27), then test register PIN_CTRL for 
field 
FLD_IR_IRQ_STAT.

I have Compro E650F with RC6 remote, also have RC5 remote from TV set.
I will made little hack to test Compro  RC5.




 Tonight I will:

 a. Add a guess at HVR-1800 support so maybe Steve can help us debug as
 well.  I know the NEC decoder works; I tested it.  What I don't know is
 if the CX23885 AV IR implementation works (I don't have CX23885 hardware
 at the moment).

 b. Add a temporary patch to add a /dev/videoN node for the TeVii S470 so
 you can use v4l2-ctl --log-status to show the status of the IR
 controller and v4l2-dbg to dump the cx23885 and cx23885-av-core
 registers, so I can see if everthying is set right.

 c. Review the register settings to make sure interrupts should be
 enabled for the IR controller.

 Regards,
 Andy

-- 
Igor M. Liplianin
Microsoft Windows Free Zone - Linux used for all Computing Tasks
--
To unsubscribe from this list: send the line unsubscribe linux-media in

Re: [PATCH - v1 1/2] V4L - vpfe capture - make clocks configurable

2009-12-09 Thread Kevin Hilman
m-kariche...@ti.com writes:

 From: Muralidharan Karicheri m-kariche...@ti.com

 v1  - updated based on comments from Vaibhav Hiremath.

 On DM365 we use only vpss master clock, where as on DM355 and
 DM6446, we use vpss master and slave clocks for vpfe capture and AM3517
 we use internal clock and pixel clock. So this patch makes it configurable
 on a per platform basis. This is needed for supporting DM365 for which patches
 will be available soon.

 Tested-by: Vaibhav Hiremath hvaib...@ti.com, Muralidharan Karicheri 
 m-kariche...@ti.com
 Acked-by: Vaibhav Hiremath hvaib...@ti.com
 Signed-off-by: Muralidharan Karicheri m-kariche...@ti.com

Sorry for jumping late into this thread, but I have a couple comments.

First, we should *never* pass clock names from platform code to driver
code.  We have the clkdevs for this.  Using clkdev, the right clock
is determined from the driver being used and any additional info.

Rather than passing the strings along, you should add the driver name
to the 'dev_id' field of the clkdev node, and then use the 'con_id' field
to distinguish between the two clocks:

-   CLK(NULL, vpss_master, vpss_master_clk),
-   CLK(NULL, vpss_slave, vpss_slave_clk),
+   CLK(vpfe-capture, master, vpss_master_clk),
+   CLK(vpfe-capture, slave, vpss_slave_clk),

NOTE: this assumes clks are used from VPFE.  When you move to CCDC, this
should change accordingly.

More on the usage below...



 ---
  drivers/media/video/davinci/vpfe_capture.c |   98 +--
  include/media/davinci/vpfe_capture.h   |   11 ++-
  2 files changed, 70 insertions(+), 39 deletions(-)

 diff --git a/drivers/media/video/davinci/vpfe_capture.c 
 b/drivers/media/video/davinci/vpfe_capture.c
 index 12a1b3d..c3468ee 100644
 --- a/drivers/media/video/davinci/vpfe_capture.c
 +++ b/drivers/media/video/davinci/vpfe_capture.c
 @@ -1787,61 +1787,87 @@ static struct vpfe_device *vpfe_initialize(void)
   return vpfe_dev;
  }
  
 +/**
 + * vpfe_disable_clock() - Disable clocks for vpfe capture driver
 + * @vpfe_dev - ptr to vpfe capture device
 + *
 + * Disables clocks defined in vpfe configuration.
 + */
  static void vpfe_disable_clock(struct vpfe_device *vpfe_dev)
  {
   struct vpfe_config *vpfe_cfg = vpfe_dev-cfg;
 + int i;
  
 - clk_disable(vpfe_cfg-vpssclk);
 - clk_put(vpfe_cfg-vpssclk);
 - clk_disable(vpfe_cfg-slaveclk);
 - clk_put(vpfe_cfg-slaveclk);
 - v4l2_info(vpfe_dev-pdev-driver,
 -  vpfe vpss master  slave clocks disabled\n);
 + for (i = 0; i  vpfe_cfg-num_clocks; i++) {
 + clk_disable(vpfe_dev-clks[i]);
 + clk_put(vpfe_dev-clks[i]);

While cleaning this up, you should move the clk_put() to module
disable/unload time.  You dont' need to put he clock on every disable.
The same for clk_get(). You don't need to get the clock for every
enable.  Just do a clk_get() at init time.

 + }
 + kfree(vpfe_dev-clks);
 + v4l2_info(vpfe_dev-pdev-driver, vpfe capture clocks disabled\n);
  }
  
 +/**
 + * vpfe_enable_clock() - Enable clocks for vpfe capture driver
 + * @vpfe_dev - ptr to vpfe capture device
 + *
 + * Enables clocks defined in vpfe configuration. The function
 + * assumes that at least one clock is to be defined which is
 + * true as of now. re-visit this if this assumption is not true
 + */
  static int vpfe_enable_clock(struct vpfe_device *vpfe_dev)
  {
   struct vpfe_config *vpfe_cfg = vpfe_dev-cfg;
 - int ret = -ENOENT;
 + int i;
  
 - vpfe_cfg-vpssclk = clk_get(vpfe_dev-pdev, vpss_master);

Using my clkdevs from above, you just need to change this to:

vpfe_cfg-vpssclk = clk_get(vpfe_dev-pdev, master);

Now that the device name is in the clkdev node, clk_get() will
find the right clock based on the device name.

 - if (NULL == vpfe_cfg-vpssclk) {
 - v4l2_err(vpfe_dev-pdev-driver, No clock defined for
 -  vpss_master\n);
 - return ret;
 - }

 + if (!vpfe_cfg-num_clocks)
 + return 0;
  
 - if (clk_enable(vpfe_cfg-vpssclk)) {
 - v4l2_err(vpfe_dev-pdev-driver,
 - vpfe vpss master clock not enabled\n);
 - goto out;
 - }
 - v4l2_info(vpfe_dev-pdev-driver,
 -  vpfe vpss master clock enabled\n);
 + vpfe_dev-clks = kzalloc(vpfe_cfg-num_clocks *
 +sizeof(struct clock *), GFP_KERNEL);
  
 - vpfe_cfg-slaveclk = clk_get(vpfe_dev-pdev, vpss_slave);

And here:

vpfe_cfg-slaveclk = clk_get(vpfe_dev-pdev, slave);

 - if (NULL == vpfe_cfg-slaveclk) {
 - v4l2_err(vpfe_dev-pdev-driver,
 - No clock defined for vpss slave\n);
 - goto out;
 + if (NULL == vpfe_dev-clks) {
 + v4l2_err(vpfe_dev-pdev-driver, Memory allocation failed\n);
 + return -ENOMEM;
   }
  
 - if (clk_enable(vpfe_cfg-slaveclk)) {
 - 

Re: v4l-dvb from source on 2.6.31.5 opensuse kernel - not working

2009-12-09 Thread Paulo Assis
2009/12/9 Valerio Bontempi valerio.bonte...@gmail.com:
 2009/12/9 Paulo Assis pj.as...@gmail.com:
 Hi,
 I've just responded to a similar issue in the linux-uvc list:
 https://lists.berlios.de/pipermail/linux-uvc-devel/2009-December/005391.html

 Do you also have insertion errors when modprobing the driver under opensuse?
 If so just follow the instructions :D, they worked in the above case.

 Best regards,
 Paulo

 2009/12/9 Valerio Bontempi valerio.bonte...@gmail.com:
 Hi all,

 I am trying to install v4l-dvb drivers from source because my device
 (Terratec Cinergy T XS, usb device DVB only) isn't supported by
 official v4l-dvb released in last kernel version yet: it is simply
 detected with the wrong firmware, but modifing the source code of the
 driver is works fine, tested successfully on ubuntu 9.10 (I have
 already submitted the patch to v4l team).

 I compiled v4l-dvb drivers and installed them through make install,
 but then v4l-dvb driver is not working anymore: the video device is
 not created, and I don't find any information about my device in dmesg
 (neither the message about the wrong firmware). So I am supposing that
 v4l-dvb is not working at all.

 Does someone know how I can understand where is the problem?

 Best regards

 Valerio
 --
 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



 I checked I have no .gz file in whole /lib/modules dir and in its 
 subdirectories
 but the ouput of 'modprobe em28xx' is

 #modprobe em28xx
 WARNING: Error inserting ir_common
 (/lib/modules/2.6.31.5-0.1-desktop/updates/kernel/drivers/media/common/ir-common.ko):
 Unknown symbol in module, or unknown parameter (see dmesg)
 WARNING: Error inserting v4l2_compat_ioctl32
 (/lib/modules/2.6.31.5-0.1-desktop/updates/kernel/drivers/media/video/v4l2-compat-ioctl32.ko):
 Unknown symbol in module, or unknown parameter (see dmesg)
 WARNING: Error inserting v4l1_compat
 (/lib/modules/2.6.31.5-0.1-desktop/updates/kernel/drivers/media/video/v4l1-compat.ko):
 Unknown symbol in module, or unknown parameter (see dmesg)
 WARNING: Error inserting videodev
 (/lib/modules/2.6.31.5-0.1-desktop/updates/kernel/drivers/media/video/videodev.ko):
 Unknown symbol in module, or unknown parameter (see dmesg)
 WARNING: Error inserting v4l2_common
 (/lib/modules/2.6.31.5-0.1-desktop/updates/kernel/drivers/media/video/v4l2-common.ko):
 Unknown symbol in module, or unknown parameter (see dmesg)
 FATAL: Error inserting em28xx
 (/lib/modules/2.6.31.5-0.1-desktop/updates/kernel/drivers/media/video/em28xx/em28xx.ko):
 Unknown symbol in module, or unknown parameter (see dmesg)

 and from dmesg

 [ 2080.998842] videobuf_vmalloc: disagrees about version of symbol
 videobuf_queue_core_init
 [ 2080.998864] videobuf_vmalloc: Unknown symbol videobuf_queue_core_init
 [ 2080.999053] videobuf_vmalloc: disagrees about version of symbol
 videobuf_queue_cancel
 [ 2080.999064] videobuf_vmalloc: Unknown symbol videobuf_queue_cancel
 [ 2476.403046] videobuf_vmalloc: disagrees about version of symbol
 videobuf_queue_core_init
 [ 2476.403066] videobuf_vmalloc: Unknown symbol videobuf_queue_core_init
 [ 2476.403277] videobuf_vmalloc: disagrees about version of symbol
 videobuf_queue_cancel
 [ 2476.403290] videobuf_vmalloc: Unknown symbol videobuf_queue_cancel


Valerio,
This is clearly caused by old modules still laying around.
In the case of Chris he just uninstalled then reinstalled everything
related to v4l then build v4l-dvb by following the instructions on the
v4l-dvb wiki 
(http://www.linuxtv.org/wiki/index.php/How_to_Obtain,_Build_and_Install_V4L-DVB_Device_Drivers):

# make distclean
# make menuconfig[this is optional]
# make
# make install
# make unload
# modprobe em28xx

That solved is problem.

Best regards,
Paulo
--
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


Make libv4l

2009-12-09 Thread Hector Oses
When i try to:
make PREFIX=/usr/hector
or make PREFIX=/usr

# make install PREFIX=/usr/hector

make -C libv4lconvert V4L2_LIB_VERSION=0.6.3 install
make[1]: se ingresa al directorio `/home/hector/Comando para webcam con
libv4l/libv4l-0.6.3/libv4lconvert'
cc -Wp,-MMD,libv4lconvert.d,-MQ,libv4lconvert.o,-MP -c -I../include
-I../../../include -fvisibility=hidden -fPIC
-DLIBDIR=\/usr/hector/lib\ -DLIBSUBDIR=\libv4l\ -g -O1 -Wall
-Wno-unused -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -o
libv4lconvert.o libv4lconvert.c
/bin/sh: cc: no se encontró la orden
make[1]: *** [libv4lconvert.o] Error 127
make[1]: se sale del directorio `/home/hector/Comando para webcam con
libv4l/libv4l-0.6.3/libv4lconvert'
make: *** [install] Error 2

And i cant compile the program. I need it cose my webcam is inverted. Thanks
--
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: v4l-dvb from source on 2.6.31.5 opensuse kernel - not working

2009-12-09 Thread Valerio Bontempi
2009/12/9 Paulo Assis pj.as...@gmail.com:
 2009/12/9 Valerio Bontempi valerio.bonte...@gmail.com:
 2009/12/9 Paulo Assis pj.as...@gmail.com:
 Hi,
 I've just responded to a similar issue in the linux-uvc list:
 https://lists.berlios.de/pipermail/linux-uvc-devel/2009-December/005391.html

 Do you also have insertion errors when modprobing the driver under opensuse?
 If so just follow the instructions :D, they worked in the above case.

 Best regards,
 Paulo

 2009/12/9 Valerio Bontempi valerio.bonte...@gmail.com:
 Hi all,

 I am trying to install v4l-dvb drivers from source because my device
 (Terratec Cinergy T XS, usb device DVB only) isn't supported by
 official v4l-dvb released in last kernel version yet: it is simply
 detected with the wrong firmware, but modifing the source code of the
 driver is works fine, tested successfully on ubuntu 9.10 (I have
 already submitted the patch to v4l team).

 I compiled v4l-dvb drivers and installed them through make install,
 but then v4l-dvb driver is not working anymore: the video device is
 not created, and I don't find any information about my device in dmesg
 (neither the message about the wrong firmware). So I am supposing that
 v4l-dvb is not working at all.

 Does someone know how I can understand where is the problem?

 Best regards

 Valerio
 --
 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



 I checked I have no .gz file in whole /lib/modules dir and in its 
 subdirectories
 but the ouput of 'modprobe em28xx' is

 #modprobe em28xx
 WARNING: Error inserting ir_common
 (/lib/modules/2.6.31.5-0.1-desktop/updates/kernel/drivers/media/common/ir-common.ko):
 Unknown symbol in module, or unknown parameter (see dmesg)
 WARNING: Error inserting v4l2_compat_ioctl32
 (/lib/modules/2.6.31.5-0.1-desktop/updates/kernel/drivers/media/video/v4l2-compat-ioctl32.ko):
 Unknown symbol in module, or unknown parameter (see dmesg)
 WARNING: Error inserting v4l1_compat
 (/lib/modules/2.6.31.5-0.1-desktop/updates/kernel/drivers/media/video/v4l1-compat.ko):
 Unknown symbol in module, or unknown parameter (see dmesg)
 WARNING: Error inserting videodev
 (/lib/modules/2.6.31.5-0.1-desktop/updates/kernel/drivers/media/video/videodev.ko):
 Unknown symbol in module, or unknown parameter (see dmesg)
 WARNING: Error inserting v4l2_common
 (/lib/modules/2.6.31.5-0.1-desktop/updates/kernel/drivers/media/video/v4l2-common.ko):
 Unknown symbol in module, or unknown parameter (see dmesg)
 FATAL: Error inserting em28xx
 (/lib/modules/2.6.31.5-0.1-desktop/updates/kernel/drivers/media/video/em28xx/em28xx.ko):
 Unknown symbol in module, or unknown parameter (see dmesg)

 and from dmesg

 [ 2080.998842] videobuf_vmalloc: disagrees about version of symbol
 videobuf_queue_core_init
 [ 2080.998864] videobuf_vmalloc: Unknown symbol videobuf_queue_core_init
 [ 2080.999053] videobuf_vmalloc: disagrees about version of symbol
 videobuf_queue_cancel
 [ 2080.999064] videobuf_vmalloc: Unknown symbol videobuf_queue_cancel
 [ 2476.403046] videobuf_vmalloc: disagrees about version of symbol
 videobuf_queue_core_init
 [ 2476.403066] videobuf_vmalloc: Unknown symbol videobuf_queue_core_init
 [ 2476.403277] videobuf_vmalloc: disagrees about version of symbol
 videobuf_queue_cancel
 [ 2476.403290] videobuf_vmalloc: Unknown symbol videobuf_queue_cancel


 Valerio,
 This is clearly caused by old modules still laying around.
 In the case of Chris he just uninstalled then reinstalled everything
 related to v4l then build v4l-dvb by following the instructions on the
 v4l-dvb wiki 
 (http://www.linuxtv.org/wiki/index.php/How_to_Obtain,_Build_and_Install_V4L-DVB_Device_Drivers):

 # make distclean
 # make menuconfig    [this is optional]
 # make
 # make install
 # make unload
 # modprobe em28xx

 That solved is problem.

 Best regards,
 Paulo


Hi Paulo,

no luck with your suggestion, I have no errors compiling and
installing the drivers but after rebooting it is not working at all.
Modprobe em28xx produces the same error already sent in the previous 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


RE: [PATCH - v1 1/2] V4L - vpfe capture - make clocks configurable

2009-12-09 Thread Karicheri, Muralidharan
Kevin,

After sending out my last patch (moving clocks to ccdc driver), I thought of 
reworking it in similar lines. I will re-send the patch after incorporating
this.

Murali Karicheri
Software Design Engineer
Texas Instruments Inc.
Germantown, MD 20874
phone: 301-407-9583
email: m-kariche...@ti.com

-Original Message-
From: Kevin Hilman [mailto:khil...@deeprootsystems.com]
Sent: Wednesday, December 09, 2009 11:00 AM
To: Karicheri, Muralidharan
Cc: linux-media@vger.kernel.org; hverk...@xs4all.nl; davinci-linux-open-
sou...@linux.davincidsp.com; Hiremath, Vaibhav
Subject: Re: [PATCH - v1 1/2] V4L - vpfe capture - make clocks configurable

m-kariche...@ti.com writes:

 From: Muralidharan Karicheri m-kariche...@ti.com

 v1  - updated based on comments from Vaibhav Hiremath.

 On DM365 we use only vpss master clock, where as on DM355 and
 DM6446, we use vpss master and slave clocks for vpfe capture and AM3517
 we use internal clock and pixel clock. So this patch makes it
configurable
 on a per platform basis. This is needed for supporting DM365 for which
patches
 will be available soon.

 Tested-by: Vaibhav Hiremath hvaib...@ti.com, Muralidharan Karicheri m-
kariche...@ti.com
 Acked-by: Vaibhav Hiremath hvaib...@ti.com
 Signed-off-by: Muralidharan Karicheri m-kariche...@ti.com

Sorry for jumping late into this thread, but I have a couple comments.

First, we should *never* pass clock names from platform code to driver
code.  We have the clkdevs for this.  Using clkdev, the right clock
is determined from the driver being used and any additional info.

Rather than passing the strings along, you should add the driver name
to the 'dev_id' field of the clkdev node, and then use the 'con_id' field
to distinguish between the two clocks:

-  CLK(NULL, vpss_master, vpss_master_clk),
-  CLK(NULL, vpss_slave, vpss_slave_clk),
+  CLK(vpfe-capture, master, vpss_master_clk),
+  CLK(vpfe-capture, slave, vpss_slave_clk),

NOTE: this assumes clks are used from VPFE.  When you move to CCDC, this
should change accordingly.

More on the usage below...



 ---
  drivers/media/video/davinci/vpfe_capture.c |   98 +-
-
  include/media/davinci/vpfe_capture.h   |   11 ++-
  2 files changed, 70 insertions(+), 39 deletions(-)

 diff --git a/drivers/media/video/davinci/vpfe_capture.c
b/drivers/media/video/davinci/vpfe_capture.c
 index 12a1b3d..c3468ee 100644
 --- a/drivers/media/video/davinci/vpfe_capture.c
 +++ b/drivers/media/video/davinci/vpfe_capture.c
 @@ -1787,61 +1787,87 @@ static struct vpfe_device *vpfe_initialize(void)
  return vpfe_dev;
  }

 +/**
 + * vpfe_disable_clock() - Disable clocks for vpfe capture driver
 + * @vpfe_dev - ptr to vpfe capture device
 + *
 + * Disables clocks defined in vpfe configuration.
 + */
  static void vpfe_disable_clock(struct vpfe_device *vpfe_dev)
  {
  struct vpfe_config *vpfe_cfg = vpfe_dev-cfg;
 +int i;

 -clk_disable(vpfe_cfg-vpssclk);
 -clk_put(vpfe_cfg-vpssclk);
 -clk_disable(vpfe_cfg-slaveclk);
 -clk_put(vpfe_cfg-slaveclk);
 -v4l2_info(vpfe_dev-pdev-driver,
 - vpfe vpss master  slave clocks disabled\n);
 +for (i = 0; i  vpfe_cfg-num_clocks; i++) {
 +clk_disable(vpfe_dev-clks[i]);
 +clk_put(vpfe_dev-clks[i]);

While cleaning this up, you should move the clk_put() to module
disable/unload time.  You dont' need to put he clock on every disable.
The same for clk_get(). You don't need to get the clock for every
enable.  Just do a clk_get() at init time.

 +}
 +kfree(vpfe_dev-clks);
 +v4l2_info(vpfe_dev-pdev-driver, vpfe capture clocks disabled\n);
  }

 +/**
 + * vpfe_enable_clock() - Enable clocks for vpfe capture driver
 + * @vpfe_dev - ptr to vpfe capture device
 + *
 + * Enables clocks defined in vpfe configuration. The function
 + * assumes that at least one clock is to be defined which is
 + * true as of now. re-visit this if this assumption is not true
 + */
  static int vpfe_enable_clock(struct vpfe_device *vpfe_dev)
  {
  struct vpfe_config *vpfe_cfg = vpfe_dev-cfg;
 -int ret = -ENOENT;
 +int i;

 -vpfe_cfg-vpssclk = clk_get(vpfe_dev-pdev, vpss_master);

Using my clkdevs from above, you just need to change this to:

   vpfe_cfg-vpssclk = clk_get(vpfe_dev-pdev, master);

Now that the device name is in the clkdev node, clk_get() will
find the right clock based on the device name.

 -if (NULL == vpfe_cfg-vpssclk) {
 -v4l2_err(vpfe_dev-pdev-driver, No clock defined for
 - vpss_master\n);
 -return ret;
 -}

 +if (!vpfe_cfg-num_clocks)
 +return 0;

 -if (clk_enable(vpfe_cfg-vpssclk)) {
 -v4l2_err(vpfe_dev-pdev-driver,
 -vpfe vpss master clock not enabled\n);
 -goto out;
 -}
 -v4l2_info(vpfe_dev-pdev-driver,
 - vpfe vpss master clock enabled\n);
 +vpfe_dev-clks = kzalloc(vpfe_cfg-num_clocks *
 + 

Re: v4l-dvb from source on 2.6.31.5 opensuse kernel - not working

2009-12-09 Thread Devin Heitmueller
On Wed, Dec 9, 2009 at 12:14 PM, Valerio Bontempi
 Hi Paulo,

 no luck with your suggestion, I have no errors compiling and
 installing the drivers but after rebooting it is not working at all.
 Modprobe em28xx produces the same error already sent in the previous mail

You're seeing an error when you modprobe?  What is the error?  Your
dmesg did not show any errors, just that the driver didn't load.

Devin

-- 
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.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: [PATCH - v1 1/2] V4L - vpfe capture - make clocks configurable

2009-12-09 Thread Karicheri, Muralidharan
Kevin,

 +/**
 + * vpfe_disable_clock() - Disable clocks for vpfe capture driver
 + * @vpfe_dev - ptr to vpfe capture device
 + *
 + * Disables clocks defined in vpfe configuration.
 + */
  static void vpfe_disable_clock(struct vpfe_device *vpfe_dev)
  {
  struct vpfe_config *vpfe_cfg = vpfe_dev-cfg;
 +int i;

 -clk_disable(vpfe_cfg-vpssclk);
 -clk_put(vpfe_cfg-vpssclk);
 -clk_disable(vpfe_cfg-slaveclk);
 -clk_put(vpfe_cfg-slaveclk);
 -v4l2_info(vpfe_dev-pdev-driver,
 - vpfe vpss master  slave clocks disabled\n);
 +for (i = 0; i  vpfe_cfg-num_clocks; i++) {
 +clk_disable(vpfe_dev-clks[i]);
 +clk_put(vpfe_dev-clks[i]);

While cleaning this up, you should move the clk_put() to module
disable/unload time. 

[MK] vpfe_disable_clock() is called from remove(). In the new
patch, from ccdc driver remove() function, clk_put() will be called.
Why do you think it should be moved to exit() function of the module?

You dont' need to put he clock on every disable.
The same for clk_get(). You don't need to get the clock for every
enable.  Just do a clk_get() at init time.

Are you suggesting to call clk_get() during init() and call clk_put()
from exit()? What is wrong with calling clk_get() from probe()?
I thought following is correct:-
Probe()
clk_get() followed by clk_enable()  
Remove()
clk_disable() followed by clk_put()
Suspend()
clk_disable()
Resume()
clk_enable()
Please confirm.
--
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: v4l-dvb from source on 2.6.31.5 opensuse kernel - not working

2009-12-09 Thread Valerio Bontempi
2009/12/9 Devin Heitmueller dheitmuel...@kernellabs.com:
 On Wed, Dec 9, 2009 at 12:14 PM, Valerio Bontempi
 Hi Paulo,

 no luck with your suggestion, I have no errors compiling and
 installing the drivers but after rebooting it is not working at all.
 Modprobe em28xx produces the same error already sent in the previous mail

 You're seeing an error when you modprobe?  What is the error?  Your
 dmesg did not show any errors, just that the driver didn't load.

 Devin

 --
 Devin J. Heitmueller - Kernel Labs
 http://www.kernellabs.com


Here is the error after modprobe

modprobe em28xx
WARNING: Error inserting ir_common
(/lib/modules/2.6.31.5-0.1-desktop/updates/kernel/drivers/media/common/ir-common.ko):
Unknown symbol in module, or unknown parameter (see dmesg)
WARNING: Error inserting v4l2_compat_ioctl32
(/lib/modules/2.6.31.5-0.1-desktop/updates/kernel/drivers/media/video/v4l2-compat-ioctl32.ko):
Unknown symbol in module, or unknown parameter (see dmesg)
WARNING: Error inserting v4l1_compat
(/lib/modules/2.6.31.5-0.1-desktop/updates/kernel/drivers/media/video/v4l1-compat.ko):
Unknown symbol in module, or unknown parameter (see dmesg)
WARNING: Error inserting videodev
(/lib/modules/2.6.31.5-0.1-desktop/updates/kernel/drivers/media/video/videodev.ko):
Unknown symbol in module, or unknown parameter (see dmesg)
WARNING: Error inserting v4l2_common
(/lib/modules/2.6.31.5-0.1-desktop/updates/kernel/drivers/media/video/v4l2-common.ko):
Unknown symbol in module, or unknown parameter (see dmesg)
FATAL: Error inserting em28xx
(/lib/modules/2.6.31.5-0.1-desktop/updates/kernel/drivers/media/video/em28xx/em28xx.ko):
Unknown symbol in module, or unknown parameter (see dmesg)
--
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: v4l-dvb from source on 2.6.31.5 opensuse kernel - not working

2009-12-09 Thread Devin Heitmueller
On Wed, Dec 9, 2009 at 12:49 PM, Valerio Bontempi
 Hi Devin

 attached you find the output.log requested

 Thanks a lot


Ah, there is your problem.  You have updates installed, presumably by
your distro.

/lib/modules/2.6.31.5-0.1-desktop/updates/kernel/drivers/media/video/em28xx
/lib/modules/2.6.31.5-0.1-desktop/updates/kernel/drivers/media/video/em28xx/em28xx-alsa.ko
/lib/modules/2.6.31.5-0.1-desktop/updates/kernel/drivers/media/video/em28xx/em28xx-dvb.ko
/lib/modules/2.6.31.5-0.1-desktop/updates/kernel/drivers/media/video/em28xx/em28xx.ko

Those modules are conflicting with the base modules you replaced when
you installed the latest v4l-dvb tree.

Devin

-- 
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.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: [PATCH 06/11] add the generic file

2009-12-09 Thread Mauro Carvalho Chehab
Sorry for not analysing this module earlier.

The way you ordered your patch series is weird and will break git bisect,
if committed on your order. So, I'm starting analizing with this patch.
I'll let the initial ones to the end.

You should send Makefile/Kconfig changes at the end of the patch series, to
avoid breaking compilation in the middle of your patch series.



Cheers,
Mauro.

Huang Shijie wrote:
 pd-main.c contains the -probe(), it privides the generic
 functions for analog TV,DVB-T and radio.
 
 Signed-off-by: Huang Shijie shij...@gmail.com
 ---
  drivers/media/video/tlg2300/pd-main.c |  546 
 +
  1 files changed, 546 insertions(+), 0 deletions(-)
  create mode 100644 drivers/media/video/tlg2300/pd-main.c
 
 diff --git a/drivers/media/video/tlg2300/pd-main.c 
 b/drivers/media/video/tlg2300/pd-main.c
 new file mode 100644
 index 000..f997e2d
 --- /dev/null
 +++ b/drivers/media/video/tlg2300/pd-main.c
 @@ -0,0 +1,546 @@
 +/*
 + * device driver for Telegent tlg2300 based TV cards
 + *
 + * Author :
 + *   Kang Yong   kangy...@telegent.com
 + *   Zhang Xiaobing  xbzh...@telegent.com
 + *   Huang Shijiezyz...@telegent.com or shij...@hotmail.com
 + *
 + *   (c) 2009 Telegent Systems
 + *
 + *  This program is free software; you can redistribute it and/or modify
 + *  it under the terms of the GNU General Public License as published by
 + *  the Free Software Foundation; either version 2 of the License, or
 + *  (at your option) any later version.
 + *
 + *  This program is distributed in the hope that it will be useful,
 + *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 + *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 + *  GNU General Public License for more details.
 + *
 + *  You should have received a copy of the GNU General Public License
 + *  along with this program; if not, write to the Free Software
 + *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 + */
 +
 +#include linux/version.h
 +#include linux/kernel.h
 +#include linux/errno.h
 +#include linux/init.h
 +#include linux/slab.h
 +#include linux/module.h
 +#include linux/kref.h
 +#include linux/usb.h
 +#include linux/suspend.h
 +#include linux/usb/quirks.h
 +#include linux/ctype.h
 +#include linux/string.h
 +#include linux/types.h
 +#include linux/firmware.h
 +#include linux/smp_lock.h
 +#include vendorcmds.h
 +#include pd-common.h
 +
 +#define VENDOR_ID0x1B24
 +#define PRODUCT_ID   0x4001
 +static struct usb_device_id id_table[] = {
 + { USB_DEVICE_AND_INTERFACE_INFO(VENDOR_ID, PRODUCT_ID, 255, 1, 0) },
 + { USB_DEVICE_AND_INTERFACE_INFO(VENDOR_ID, PRODUCT_ID, 255, 1, 1) },
 + { },
 +};
 +MODULE_DEVICE_TABLE(usb, id_table);
 +
 +int debug_mode;
 +module_param(debug_mode, int, 0644);
 +MODULE_PARM_DESC(debug_mode, 0 = disable, 1 = enable, 2 = verbose);
 +
 +const char *firmware_name = tlg2300_firmware.bin;
 +struct usb_driver poseidon_driver;
 +LIST_HEAD(pd_device_list); /*should add a lock*/
 +
 +/*
 + * send set request to USB firmware.
 + */
 +s32 send_set_req(struct poseidon *pd, u8 cmdid, s32 param, s32 *cmd_status)
 +{
 + s32 ret;
 + s8  data[32] = {};
 + u16 lower_16, upper_16;
 +
 + if (pd-state  POSEIDON_STATE_DISCONNECT)
 + return -ENODEV;
 +
 + mdelay(30);
 +
 + if (param == 0) {
 + upper_16 = lower_16 = 0;
 + } else {
 + /* send 32 bit param as  two 16 bit param,little endian */
 + lower_16 = (unsigned short)(param  0x);
 + upper_16 = (unsigned short)((param  16)  0x);
 + }
 + ret = usb_control_msg(pd-udev,
 +  usb_rcvctrlpipe(pd-udev, 0),
 +  REQ_SET_CMD | cmdid,
 +  USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
 +  lower_16,
 +  upper_16,
 +  data,
 +  sizeof(*cmd_status),
 +  USB_CTRL_GET_TIMEOUT);
 +
 + if (!ret) {
 + return -ENXIO;
 + } else {
 + /*  1st 4 bytes into cmd_status   */
 + memcpy((char *)cmd_status, (data[0]), sizeof(*cmd_status));
 + }
 + return 0;
 +}
 +
 +/*
 + * send get request to Poseidon firmware.
 + */
 +s32 send_get_req(struct poseidon *pd, u8 cmdid, s32 param,
 + void *buf, s32 *cmd_status, s32 datalen)
 +{
 + s32 ret;
 + s8 data[128] = {};
 + u16 lower_16, upper_16;
 +
 + if (pd-state  POSEIDON_STATE_DISCONNECT)
 + return -ENODEV;
 +
 + mdelay(30);
 + if (param == 0) {
 + upper_16 = lower_16 = 0;
 + } else {
 + /*send 32 bit param as two 16 bit param, little endian */
 + lower_16 = (unsigned short)(param  0x);
 + upper_16 = (unsigned short)((param  16)  0x);
 + }

You're using host endian here, not little endian. If you want to use little 
endian,
you should 

RE: [PATCH - v1 1/2] V4L - vpfe capture - make clocks configurable

2009-12-09 Thread Karicheri, Muralidharan
Kevin,

I tried the following and I get error in clk_enable(). Do you know what might 
be wrong?

in DM365.c

CLK(isif, master, vpss_master_clk)

The driver name is isif. I call clk_get(pdev-dev, master) from isif driver. 
The platform device name is isif. This call succeeds, but clk_enable() 
fails...

clk_ptr = clk_get(pdev-dev, master);
clk_enable(clk_ptr);

r...@dm355-evm:~# cat /proc/davinci_clocks
ref_clk   users= 7  2400 Hz
  pll1users= 6 pll 48600 Hz
pll1_aux_clk  users= 3 pll  2400 Hz
  uart0   users= 1 psc  2400 Hz
  i2c users= 1 psc  2400 Hz
  spi4users= 0 psc  2400 Hz
  pwm0users= 0 psc  2400 Hz
  pwm1users= 0 psc  2400 Hz
  pwm2users= 0 psc  2400 Hz
  timer0  users= 1 psc  2400 Hz
  timer1  users= 0 psc  2400 Hz
  timer2  users= 1 psc  2400 Hz
  timer3  users= 0 psc  2400 Hz
  usb users= 0 psc  2400 Hz
pll1_sysclkbp users= 0 pll  2400 Hz
clkout0   users= 0 pll  2400 Hz
pll1_sysclk1  users= 0 pll 48600 Hz
pll1_sysclk2  users= 0 pll 24300 Hz
pll1_sysclk3  users= 0 pll 24300 Hz
  vpss_dacusers= 0 psc 24300 Hz
  mjcpusers= 0 psc 24300 Hz
pll1_sysclk4  users= 3 pll 12150 Hz
  uart1   users= 0 psc 12150 Hz
  mmcsd1  users= 0 psc 12150 Hz
  spi0users= 0 psc 12150 Hz
  spi1users= 0 psc 12150 Hz
  spi2users= 0 psc 12150 Hz
  spi3users= 0 psc 12150 Hz
  gpiousers= 1 psc 12150 Hz
  aemif   users= 1 psc 12150 Hz
  emacusers= 1 psc 12150 Hz
  asp0users= 0 psc 12150 Hz
  rto users= 0 psc 12150 Hz
pll1_sysclk5  users= 0 pll 24300 Hz
  vpss_master users= 0 psc 24300 Hz
pll1_sysclk6  users= 0 pll  2700 Hz
pll1_sysclk7  users= 0 pll 48600 Hz
pll1_sysclk8  users= 0 pll 12150 Hz
  mmcsd0  users= 0 psc 12150 Hz
pll1_sysclk9  users= 0 pll 24300 Hz
  pll2users= 1 pll 59400 Hz
pll2_aux_clk  users= 0 pll  2400 Hz
clkout1   users= 0 pll  2400 Hz
pll2_sysclk1  users= 0 pll 59400 Hz
pll2_sysclk2  users= 1 pll 29700 Hz
  arm_clk users= 1 psc 29700 Hz
pll2_sysclk3  users= 0 pll 59400 Hz
pll2_sysclk4  users= 0 pll  20482758 Hz
  voice_codec users= 0 psc  20482758 Hz
pll2_sysclk5  users= 0 pll  7425 Hz
pll2_sysclk6  users= 0 pll 59400 Hz
pll2_sysclk7  users= 0 pll 59400 Hz
pll2_sysclk8  users= 0 pll 59400 Hz
pll2_sysclk9  users= 0 pll 59400 Hz
  pwm3users= 0 psc  2400 Hz
r...@dm355-evm:~#



Murali Karicheri
Software Design Engineer
Texas Instruments Inc.
Germantown, MD 20874
phone: 301-407-9583
email: m-kariche...@ti.com

-Original Message-
From: davinci-linux-open-source-boun...@linux.davincidsp.com
[mailto:davinci-linux-open-source-boun...@linux.davincidsp.com] On Behalf
Of Karicheri, Muralidharan
Sent: Wednesday, December 09, 2009 12:45 PM
To: Kevin Hilman
Cc: davinci-linux-open-sou...@linux.davincidsp.com; linux-
me...@vger.kernel.org
Subject: RE: [PATCH - v1 1/2] V4L - vpfe capture - make clocks configurable

Kevin,

 +/**
 + * vpfe_disable_clock() - Disable clocks for vpfe capture driver
 + * @vpfe_dev - ptr to vpfe capture device
 + *
 + * Disables clocks defined in vpfe configuration.
 + */
  static void vpfe_disable_clock(struct vpfe_device *vpfe_dev)
  {
 struct vpfe_config *vpfe_cfg = vpfe_dev-cfg;
 +   int i;

 -   clk_disable(vpfe_cfg-vpssclk);
 -   clk_put(vpfe_cfg-vpssclk);
 -   clk_disable(vpfe_cfg-slaveclk);
 -   clk_put(vpfe_cfg-slaveclk);
 -   v4l2_info(vpfe_dev-pdev-driver,
 -vpfe vpss master  slave clocks disabled\n);
 +   for (i = 0; i  vpfe_cfg-num_clocks; i++) {
 +   clk_disable(vpfe_dev-clks[i]);
 +   clk_put(vpfe_dev-clks[i]);

While cleaning this up, you should move the clk_put() to module
disable/unload time.

[MK] vpfe_disable_clock() is called from remove(). In the new
patch, from ccdc driver remove() function, clk_put() will be called.
Why do you think it should be moved to exit() function of the module?

You dont' need to put he clock on every disable.
The same for clk_get(). You don't need to get the clock for every
enable.  Just do a clk_get() at init time.

Are you suggesting to call clk_get() during init() and call clk_put()
from exit()? What is wrong with calling clk_get() from probe()?
I thought following is correct:-
Probe()
clk_get() followed by clk_enable()
Remove()
clk_disable() followed by clk_put()
Suspend()
clk_disable()
Resume()
clk_enable()
Please confirm.
___
Davinci-linux-open-source mailing list
davinci-linux-open-sou...@linux.davincidsp.com

Re: v4l-dvb from source on 2.6.31.5 opensuse kernel - not working

2009-12-09 Thread Valerio Bontempi
2009/12/9 Devin Heitmueller dheitmuel...@kernellabs.com:
 On Wed, Dec 9, 2009 at 12:51 PM, Devin Heitmueller
 dheitmuel...@kernellabs.com wrote:
 On Wed, Dec 9, 2009 at 12:49 PM, Valerio Bontempi
 Hi Devin

 attached you find the output.log requested

 Thanks a lot


 Ah, there is your problem.  You have updates installed, presumably by
 your distro.

 /lib/modules/2.6.31.5-0.1-desktop/updates/kernel/drivers/media/video/em28xx
 /lib/modules/2.6.31.5-0.1-desktop/updates/kernel/drivers/media/video/em28xx/em28xx-alsa.ko
 /lib/modules/2.6.31.5-0.1-desktop/updates/kernel/drivers/media/video/em28xx/em28xx-dvb.ko
 /lib/modules/2.6.31.5-0.1-desktop/updates/kernel/drivers/media/video/em28xx/em28xx.ko

 Those modules are conflicting with the base modules you replaced when
 you installed the latest v4l-dvb tree.

 Devin

 Also, looks like you somehow managed to simultaneously have both the
 in-kernel em28xx driver installed at the same time as the mrec driver:

 /lib/modules/2.6.31.5-0.1-desktop/updates/em28xx-alsa.ko
 /lib/modules/2.6.31.5-0.1-desktop/updates/em28xx-audio.ko
 /lib/modules/2.6.31.5-0.1-desktop/updates/em28xx-audioep.ko
 /lib/modules/2.6.31.5-0.1-desktop/updates/em28xx-dvb.ko
 /lib/modules/2.6.31.5-0.1-desktop/updates/em28xx-aad.ko
 /lib/modules/2.6.31.5-0.1-desktop/updates/em28xx.ko

 You cannot have both of these installed at the same time.

 Devin

 --
 Devin J. Heitmueller - Kernel Labs
 http://www.kernellabs.com


I don't know how it is happened, because I followed the normal way to
compile v4l-dvb, so it seems a very strange behaviour...

however, how can I solve, cleaning out all the in-kernel modules and
all the modules I need to remove?

Thanks a lot

Valerio
--
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: v4l-dvb from source on 2.6.31.5 opensuse kernel - not working

2009-12-09 Thread Devin Heitmueller
On Wed, Dec 9, 2009 at 1:21 PM, Valerio Bontempi
 I don't know how it is happened, because I followed the normal way to
 compile v4l-dvb, so it seems a very strange behaviour...

 however, how can I solve, cleaning out all the in-kernel modules and
 all the modules I need to remove?

Well, the problem wasn't that you compiled v4l-dvb.  It's that you had
these third party em28xx modules installed (which rely on v4l-dvb).
And a recompile of v4l-dvb breaks compatibility for those third party
modules.

Without knowing how you installed the third party em28xx stuff, I
cannot really advise you on the best way to remove them.  If it were
me, I would probably just move all of those files to some temporary
directory and reboot (which would allow me to restore them if I
screwed something up).  However, I wouldn't want to be held
responsible for a user screwing up his machine.

Devin

-- 
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.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: [PATCH 10/11] add DVB-T support for tlg2300

2009-12-09 Thread Mauro Carvalho Chehab
Huang Shijie wrote:
 This module contains the code for DVB-T.
 
 Signed-off-by: Huang Shijie shij...@gmail.com
 ---
  drivers/media/video/tlg2300/pd-dvb.c |  649 
 ++
  1 files changed, 649 insertions(+), 0 deletions(-)
  create mode 100644 drivers/media/video/tlg2300/pd-dvb.c
 
 diff --git a/drivers/media/video/tlg2300/pd-dvb.c 
 b/drivers/media/video/tlg2300/pd-dvb.c
 new file mode 100644
 index 000..933fff0
 --- /dev/null
 +++ b/drivers/media/video/tlg2300/pd-dvb.c
 @@ -0,0 +1,649 @@
 +#include pd-common.h
 +#include linux/kernel.h
 +#include linux/usb.h
 +#include linux/dvb/dmx.h
 +#include linux/delay.h
 +
 +#include vendorcmds.h
 +#include linux/sched.h
 +#include asm/atomic.h
 +
 +static void dvb_urb_cleanup(struct pd_dvb_adapter *pd_dvb);
 +
 +static int dvb_bandwidth[][2] = {
 + { TLG_BW_8, BANDWIDTH_8_MHZ },
 + { TLG_BW_7, BANDWIDTH_7_MHZ },
 + { TLG_BW_6, BANDWIDTH_6_MHZ }
 +};
 +static int dvb_bandwidth_length = ARRAY_SIZE(dvb_bandwidth);
 +
 +static s32 dvb_start_streaming(struct pd_dvb_adapter *pd_dvb);
 +static int poseidon_check_mode_dvbt(struct poseidon *pd)
 +{
 + s32 ret = 0, cmd_status = 0;
 +
 + set_current_state(TASK_INTERRUPTIBLE);
 + schedule_timeout(HZ/4);
 +
 + ret = usb_set_interface(pd-udev, 0, BULK_ALTERNATE_IFACE);
 + if (ret != 0)
 + return ret;
 +
 + ret = set_tuner_mode(pd, TLG_MODE_CAPS_DVB_T);
 + if (ret)
 + return ret;
 +
 + /* signal source */
 + ret = send_set_req(pd, SGNL_SRC_SEL, TLG_SIG_SRC_ANTENNA, cmd_status);
 + if (ret|cmd_status)
 + return ret;
 +
 + return 0;
 +}
 +
 +/* acquire :
 + *   1 == open
 + *   0 == release
 + */
 +static int poseidon_ts_bus_ctrl(struct dvb_frontend *fe, int acquire)
 +{
 + struct poseidon *pd = fe-demodulator_priv;
 + struct pd_dvb_adapter *pd_dvb;
 + int ret = 0;
 +
 + if (!pd)
 + return -ENODEV;
 +
 + pd_dvb = container_of(fe, struct pd_dvb_adapter, dvb_fe);
 + if (acquire) {
 + mutex_lock(pd-lock);
 + if (pd-state  POSEIDON_STATE_DISCONNECT) {
 + ret = -ENODEV;
 + goto open_out;
 + }
 +
 + if (pd-state  !(pd-state  POSEIDON_STATE_DVBT)) {
 + ret = -EBUSY;
 + goto open_out;
 + }
 +
 + usb_autopm_get_interface(pd-interface);
 + if (0 == pd-state) {
 + ret = poseidon_check_mode_dvbt(pd);
 + if (ret  0)
 + goto open_out;
 + pd-state |= POSEIDON_STATE_DVBT;
 + pd_dvb-bandwidth = 0;
 + pd_dvb-prev_freq = 0;
 + }
 + atomic_inc(pd_dvb-users);
 + kref_get(pd-kref);
 +open_out:
 + mutex_unlock(pd-lock);
 + } else {
 + dvb_stop_streaming(pd_dvb);
 +
 + if (atomic_dec_and_test(pd_dvb-users)) {
 + mutex_lock(pd-lock);
 + pd-state = ~POSEIDON_STATE_DVBT;
 + mutex_unlock(pd-lock);
 + }
 + kref_put(pd-kref, poseidon_delete);
 + usb_autopm_put_interface(pd-interface);
 + }
 + return ret;
 +}
 +
 +static void poseidon_fe_release(struct dvb_frontend *fe)
 +{
 + struct poseidon *pd = fe-demodulator_priv;
 +
 +#ifdef CONFIG_PM
 + pd-pm_suspend = NULL;
 + pd-pm_resume  = NULL;
 +#endif
 +}
 +
 +static s32 poseidon_fe_sleep(struct dvb_frontend *fe)
 +{
 + return 0;
 +}
 +
 +/*
 + * return true if we can satisfy the conditions, else return false.
 + */
 +static bool check_scan_ok(__u32 freq, int bandwidth,
 + struct pd_dvb_adapter *adapter)
 +{
 + if (bandwidth  0)
 + return false;
 +
 + if (adapter-prev_freq == freq
 +  adapter-bandwidth == bandwidth) {
 + long nl = jiffies - adapter-last_jiffies;
 + unsigned int msec ;
 +
 + msec = jiffies_to_msecs(abs(nl));
 + return msec  15000 ? true : false;
 + }
 + return true;
 +}
 +
 +/*
 + * Check if the firmware delays too long for an invalid frequency.
 + */
 +static int fw_delay_overflow(struct pd_dvb_adapter *adapter)
 +{
 + long nl = jiffies - adapter-last_jiffies;
 + unsigned int msec ;
 +
 + msec = jiffies_to_msecs(abs(nl));
 + return msec  800 ? true : false;
 +}
 +
 +static int pm_dvb_suspend(struct poseidon *pd)
 +{
 + struct pd_dvb_adapter *pd_dvb = pd-dvb_data;
 + dvb_stop_streaming(pd_dvb);
 + dvb_urb_cleanup(pd_dvb);
 + mdelay(2000);

Use msleep()

 + return 0;
 +}
 +
 +
 +static int poseidon_set_fe(struct dvb_frontend *fe,
 + struct dvb_frontend_parameters *fep)
 +{
 + s32 ret = 0, cmd_status = 0;
 + s32 i, bandwidth = -1;
 + struct poseidon *pd = fe-demodulator_priv;
 + struct 

Re: [PATCH 11/11] add FM support for tlg2300

2009-12-09 Thread Mauro Carvalho Chehab
Huang Shijie wrote:
 This module contains codes for radio.
 The radio use the ALSA audio as input.
 
  The mplayer should be compiled with --enable-radio and
--enable-radio-capture.
 The command runs as this(assume the alsa audio registers to card 1):
   #mplayer radio://103.7/capture/ -radio
adevice=hw=1,0:arate=48000 -rawaudio rate=48000:channels=2
 
 Signed-off-by: Huang Shijie shij...@gmail.com
 ---
  drivers/media/video/tlg2300/pd-radio.c |  383 
 
  1 files changed, 383 insertions(+), 0 deletions(-)
  create mode 100644 drivers/media/video/tlg2300/pd-radio.c
 
 diff --git a/drivers/media/video/tlg2300/pd-radio.c 
 b/drivers/media/video/tlg2300/pd-radio.c
 new file mode 100644
 index 000..2576f3a
 --- /dev/null
 +++ b/drivers/media/video/tlg2300/pd-radio.c
 @@ -0,0 +1,383 @@
 +#include linux/init.h
 +#include linux/list.h
 +#include linux/module.h
 +#include linux/kernel.h
 +#include linux/bitmap.h
 +#include linux/usb.h
 +#include linux/i2c.h
 +#include media/v4l2-dev.h
 +#include linux/version.h
 +#include linux/mm.h
 +#include linux/mutex.h
 +#include media/v4l2-ioctl.h
 +#include linux/sched.h
 +
 +#include pd-common.h
 +#include vendorcmds.h
 +
 +static int set_frequency(struct poseidon *p, __u32 frequency);
 +static int poseidon_fm_close(struct file *filp);
 +static int poseidon_fm_open(struct file *filp);
 +static int __poseidon_fm_close(struct file *filp);
 +
 +#define TUNER_FREQ_MIN_FM 7600
 +#define TUNER_FREQ_MAX_FM 10800
 +
 +static int poseidon_check_mode_radio(struct poseidon *p)
 +{
 + int ret, radiomode;
 + u32 status;
 +
 + set_current_state(TASK_INTERRUPTIBLE);
 + schedule_timeout(HZ/2);
 + ret = usb_set_interface(p-udev, 0, BULK_ALTERNATE_IFACE);
 + if (ret  0)
 + goto out;
 +
 + ret = set_tuner_mode(p, TLG_MODE_FM_RADIO);
 + if (ret != 0)
 + goto out;
 +
 + ret = send_set_req(p, SGNL_SRC_SEL, TLG_SIG_SRC_ANTENNA, status);
 + radiomode = get_audio_std(TLG_MODE_FM_RADIO, p-country_code);
 + ret = send_set_req(p, TUNER_AUD_ANA_STD, radiomode, status);
 + ret |= send_set_req(p, TUNER_AUD_MODE,
 + TLG_TUNE_TVAUDIO_MODE_STEREO, status);
 + ret |= send_set_req(p, AUDIO_SAMPLE_RATE_SEL,
 + ATV_AUDIO_RATE_48K, status);
 + ret |= send_set_req(p, TUNE_FREQ_SELECT, TUNER_FREQ_MIN_FM, status);
 +out:
 + return ret;
 +}
 +
 +static int pm_fm_suspend(struct poseidon *p)
 +{
 + pm_alsa_suspend(p);
 + usb_set_interface(p-udev, 0, 0);
 + mdelay(2000);
 + return 0;
 +}
 +
 +static int pm_fm_resume(struct poseidon *p)
 +{
 + if (in_hibernation(p)) {
 + __poseidon_fm_close(p-file_for_stream);
 + return 0;
 + }
 + poseidon_check_mode_radio(p);
 + set_frequency(p, p-radio_data.fm_freq);
 + pm_alsa_resume(p);
 + return 0;
 +}
 +
 +static int poseidon_fm_open(struct file *filp)
 +{
 + struct video_device *vfd = video_devdata(filp);
 + struct poseidon *p = video_get_drvdata(vfd);
 + int ret = 0;
 +
 + if (!p)
 + return -1;
 +
 + mutex_lock(p-lock);
 + if (p-state  POSEIDON_STATE_DISCONNECT) {
 + ret = -ENODEV;
 + goto out;
 + }
 +
 + if (p-state  !(p-state  POSEIDON_STATE_FM)) {
 + ret = -EBUSY;
 + goto out;
 + }
 +
 + usb_autopm_get_interface(p-interface);
 + if (0 == p-state) {
 + p-country_code = country_code;
 + set_debug_mode(vfd, debug_mode);
 +
 + ret = poseidon_check_mode_radio(p);
 + if (ret  0)
 + goto out;
 + p-state |= POSEIDON_STATE_FM;
 + }
 + p-radio_data.users++;
 + kref_get(p-kref);
 + filp-private_data = p;
 +out:
 + mutex_unlock(p-lock);
 + return ret;
 +}
 +
 +static int __poseidon_fm_close(struct file *filp)
 +{
 + struct poseidon *p = filp-private_data;
 + struct radio_data *fm = p-radio_data;
 + uint32_t status;
 +
 + mutex_lock(p-lock);
 + fm-users--;
 + if (0 == fm-users)
 + p-state = ~POSEIDON_STATE_FM;
 +
 + if (fm-is_radio_streaming  filp == p-file_for_stream) {
 + fm-is_radio_streaming = 0;
 + send_set_req(p, PLAY_SERVICE, TLG_TUNE_PLAY_SVC_STOP, status);
 + }
 + mutex_unlock(p-lock);
 +
 + kref_put(p-kref, poseidon_delete);
 + filp-private_data = NULL;
 + return 0;
 +}
 +
 +static int poseidon_fm_close(struct file *filp)
 +{
 + struct poseidon *p = filp-private_data;
 +
 + __poseidon_fm_close(filp);
 + usb_autopm_put_interface(p-interface);
 + return 0;
 +}
 +
 +static int vidioc_querycap(struct file *file, void *priv,
 + struct v4l2_capability *v)
 +{
 + strlcpy(v-driver, radio-tele, sizeof(v-driver));
 + strlcpy(v-card, telegent Radio, sizeof(v-card));
 + 

Re: [PATCH 00/11] add linux driver for chip TLG2300

2009-12-09 Thread Mauro Carvalho Chehab
Huang Shijie wrote:
 The TLG2300 is a chip of Telegent System.
 It support analog tv,DVB-T and radio in a single chip.
 The chip has been used in several dongles, such as aeromax DH-9000:
   http://www.b2bdvb.com/dh-9000.htm
 
 You can get more info from:
   [1] http://www.telegent.com/
   [2] http://www.telegent.com/press/2009Sept14_CSI.html
 
 Huang Shijie (10):
   add maitainers for tlg2300
   add readme file for tlg2300
   add Kconfig and Makefile for tlg2300
   add header files for tlg2300
   add the generic file
   add video file for tlg2300
   add vbi code for tlg2300
   add audio support for tlg2300
   add DVB-T support for tlg2300
   add FM support for tlg2300
 

Ok, finished reviewing it.

Patches 01, 02 and 04 seems ok to me. You didn't sent a patch 03.
Patch 05 will likely need some changes (the headers) due to some reviews I did
on the other patches.

The other patches need some adjustments, as commented on separate emails.

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


[PATCH 4/12] drivers/media/radio: Correct size given to memset

2009-12-09 Thread Julia Lawall
From: Julia Lawall ju...@diku.dk

Memset should be given the size of the structure, not the size of the pointer.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// smpl
@@
type T;
T *x;
expression E;
@@

memset(x, E, sizeof(
+ *
 x))
// /smpl

Signed-off-by: Julia Lawall ju...@diku.dk

---
 drivers/media/radio/radio-tea5764.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff -u -p a/drivers/media/radio/radio-tea5764.c 
b/drivers/media/radio/radio-tea5764.c
--- a/drivers/media/radio/radio-tea5764.c
+++ b/drivers/media/radio/radio-tea5764.c
@@ -314,7 +314,7 @@ static int vidioc_g_tuner(struct file *f
if (v-index  0)
return -EINVAL;
 
-   memset(v, 0, sizeof(v));
+   memset(v, 0, sizeof(*v));
strcpy(v-name, FM);
v-type = V4L2_TUNER_RADIO;
tea5764_i2c_read(radio);
@@ -371,7 +371,7 @@ static int vidioc_g_frequency(struct fil
struct tea5764_regs *r = radio-regs;
 
tea5764_i2c_read(radio);
-   memset(f, 0, sizeof(f));
+   memset(f, 0, sizeof(*f));
f-type = V4L2_TUNER_RADIO;
if (r-tnctrl  TEA5764_TNCTRL_PUPD0)
f-frequency = (tea5764_get_freq(radio) * 2) / 125;
--
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 5/12] drivers/media/video/uvc: Correct size given to memset

2009-12-09 Thread Julia Lawall
From: Julia Lawall ju...@diku.dk

Memset should be given the size of the structure, not the size of the pointer.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// smpl
@@
type T;
T *x;
expression E;
@@

memset(x, E, sizeof(
+ *
 x))
// /smpl

Signed-off-by: Julia Lawall ju...@diku.dk

---
 drivers/media/video/uvc/uvc_video.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -u -p a/drivers/media/video/uvc/uvc_video.c 
b/drivers/media/video/uvc/uvc_video.c
--- a/drivers/media/video/uvc/uvc_video.c
+++ b/drivers/media/video/uvc/uvc_video.c
@@ -145,7 +145,7 @@ static int uvc_get_video_ctrl(struct uvc
uvc_warn_once(stream-dev, UVC_WARN_MINMAX, UVC non 
compliance - GET_MIN/MAX(PROBE) incorrectly 
supported. Enabling workaround.\n);
-   memset(ctrl, 0, sizeof ctrl);
+   memset(ctrl, 0, sizeof *ctrl);
ctrl-wCompQuality = le16_to_cpup((__le16 *)data);
ret = 0;
goto out;
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[cron job] v4l-dvb daily build 2.6.22 and up: ERRORS, 2.6.16-2.6.21: WARNINGS

2009-12-09 Thread Hans Verkuil
This message is generated daily by a cron job that builds v4l-dvb for
the kernels and architectures in the list below.

Results of the daily build of v4l-dvb:

date:Wed Dec  9 19:00:02 CET 2009
path:http://www.linuxtv.org/hg/v4l-dvb
changeset:   13588:065f9e34e07b
gcc version: gcc (GCC) 4.3.1
hardware:x86_64
host os: 2.6.26

linux-2.6.30-armv5: OK
linux-2.6.31-armv5: OK
linux-2.6.32-armv5: OK
linux-2.6.32-armv5-davinci: OK
linux-2.6.30-armv5-ixp: OK
linux-2.6.31-armv5-ixp: OK
linux-2.6.32-armv5-ixp: OK
linux-2.6.30-armv5-omap2: OK
linux-2.6.31-armv5-omap2: OK
linux-2.6.32-armv5-omap2: OK
linux-2.6.22.19-i686: WARNINGS
linux-2.6.23.12-i686: ERRORS
linux-2.6.24.7-i686: ERRORS
linux-2.6.25.11-i686: ERRORS
linux-2.6.26-i686: OK
linux-2.6.27-i686: OK
linux-2.6.28-i686: OK
linux-2.6.29.1-i686: WARNINGS
linux-2.6.30-i686: OK
linux-2.6.31-i686: OK
linux-2.6.32-i686: OK
linux-2.6.30-m32r: OK
linux-2.6.31-m32r: OK
linux-2.6.32-m32r: OK
linux-2.6.30-mips: OK
linux-2.6.31-mips: OK
linux-2.6.32-mips: OK
linux-2.6.30-powerpc64: OK
linux-2.6.31-powerpc64: OK
linux-2.6.32-powerpc64: OK
linux-2.6.22.19-x86_64: WARNINGS
linux-2.6.23.12-x86_64: ERRORS
linux-2.6.24.7-x86_64: ERRORS
linux-2.6.25.11-x86_64: ERRORS
linux-2.6.26-x86_64: OK
linux-2.6.27-x86_64: OK
linux-2.6.28-x86_64: OK
linux-2.6.29.1-x86_64: WARNINGS
linux-2.6.30-x86_64: OK
linux-2.6.31-x86_64: OK
linux-2.6.32-x86_64: OK
spec: OK
sparse (linux-2.6.32): ERRORS
linux-2.6.16.61-i686: WARNINGS
linux-2.6.17.14-i686: WARNINGS
linux-2.6.18.8-i686: WARNINGS
linux-2.6.19.5-i686: WARNINGS
linux-2.6.20.21-i686: WARNINGS
linux-2.6.21.7-i686: WARNINGS
linux-2.6.16.61-x86_64: WARNINGS
linux-2.6.17.14-x86_64: WARNINGS
linux-2.6.18.8-x86_64: WARNINGS
linux-2.6.19.5-x86_64: WARNINGS
linux-2.6.20.21-x86_64: WARNINGS
linux-2.6.21.7-x86_64: WARNINGS

Detailed results are available here:

http://www.xs4all.nl/~hverkuil/logs/Wednesday.log

Full logs are available here:

http://www.xs4all.nl/~hverkuil/logs/Wednesday.tar.bz2

The V4L-DVB specification from this daily build is here:

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


MSI StarCam working in vlc only (with poor colors)

2009-12-09 Thread Jozef Riha
Hello dear ML members,

I wonder whether you can help me with the following issue. My webcam
MSI StarCam (http://www.aaronpc.cz/produkty/msi-starcam-370i)
identified as

(lsusb)
Bus 003 Device 002: ID 1b3b:2951 iPassion Technology Inc. PC
Camera/Webcam controller

(dmesg)
input: Video Bus as
/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A03:00/device:1d/LNXVIDEO:00/input/input8
ACPI: Video Device [VID] (multi-head: yes  rom: no  post: no)
Linux video capture interface: v2.00
uvcvideo: Found UVC 1.00 device unnamed (1b3b:2951)
uvcvideo: UVC non compliance - GET_DEF(PROBE) not supported. Enabling
workaround.
input: UVC Camera (1b3b:2951) as
/devices/pci:00/:00:1d.1/usb3/3-1/3-1:1.0/input/input9
usbcore: registered new interface driver uvcvideo
USB Video Class driver (v0.1.0)

It is apparently detected while appropriate modules are loaded
(v4l1_compat, uvcvideo, videodev), but of 3 tested applications: vlc,
xawtv and skype, only vlc shows some output. Moreover there's plenty
of

uvcvideo: Failed to query (130) UVC probe control : -32 (exp. 26).

in dmesg.log.

The console outputs of all three programs follow.

xawtv:

libv4l2: error setting pixformat: Input/output error
ioctl: 
VIDIOC_S_FMT(type=VIDEO_CAPTURE;fmt.pix.width=320;fmt.pix.height=240;fmt.pix.pixelformat=0x47504a4d
[MJPG];fmt.pix.field=NONE;fmt.pix.bytesperline=0;fmt.pix.sizeimage=77312;fmt.pix.colorspace=SRGB;fmt.pix.priv=0):
Input/output error
ioctl: VIDIOC_S_STD(std=0x0 []): Invalid argument

skype:

libv4l2: error setting pixformat: Input/output error

vlc v4l2://

[0xa18a530] main input error: demux doesn't like DEMUX_GET_TIME
(probably irrelevant)

As I wrote above vlc is able to capture the image but the quality is
really low - please see screenshot at
http://yfrog.com/86vlcsnap2009120920h48m50p

I'd be glad to see the colors improved but main concern is that the
camera does not seem to be Skype-friendly.

Is there anything that can be done to improve this situation?

Thank you,

joe
--
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: MSI StarCam working in vlc only (with poor colors)

2009-12-09 Thread Jozef Riha
Jozef Riha jose1711 at gmail.com writes:

 
 Hello dear ML members,
 
 I wonder whether you can help me with the following issue. My webcam
 MSI StarCam (http://www.aaronpc.cz/produkty/msi-starcam-370i)
 identified as
 
 ...


Sorry I forgot to add kernel version. It is 2.6.32, config at  
http://repos.archlinux.org/wsvn/packages/kernel26/repos/core-i686/config

--
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] PWC: parameter trace is only available in debug

2009-12-09 Thread Andrea
This patch fixes a small issue where modinfo says the parameter trace is 
always available, while
it only works if CONFIG_USB_PWC_DEBUG is enabled.

diff -r 065f9e34e07b linux/drivers/media/video/pwc/pwc-if.c
--- a/linux/drivers/media/video/pwc/pwc-if.c	Mon Dec 07 10:08:33 2009 -0200
+++ b/linux/drivers/media/video/pwc/pwc-if.c	Wed Dec 09 20:04:45 2009 +
@@ -1959,7 +1959,9 @@
 MODULE_PARM_DESC(fps, Initial frames per second. Varies with model, useful range 5-30);
 MODULE_PARM_DESC(fbufs, Number of internal frame buffers to reserve);
 MODULE_PARM_DESC(mbufs, Number of external (mmap()ed) image buffers);
+#ifdef CONFIG_USB_PWC_DEBUG
 MODULE_PARM_DESC(trace, For debugging purposes);
+#endif
 MODULE_PARM_DESC(power_save, Turn power save feature in camera on or off);
 MODULE_PARM_DESC(compression, Preferred compression quality. Range 0 (uncompressed) to 3 (high compression));
 MODULE_PARM_DESC(leds, LED on,off time in milliseconds);


no locking on dvb-s2 22000 2/3 8PSK transponder on Astra 19.2E with tt s2-3200

2009-12-09 Thread Newsy Paper
Hi,

no matter if I use Igors or Manus driver, there's no lock on 11303 h 22000 2/3 
8psk. Other users at vdr-portal report same problem.

The strange thing is that all other transponders that use 22000 2/3 8psk do 
work but this transponder doesn't. It worked fine until december 3rd when 
uplink moved to Vienna. I think they changed a parameter like rolloff or 
inversion and the dvb-s2 part of stb6100 is buggy.

regards

Newspaperman

__
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen 
Massenmails. 
http://mail.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: [PATCH - v1 1/2] V4L - vpfe capture - make clocks configurable

2009-12-09 Thread Karicheri, Muralidharan
Kevin,

I think I have figured it out...

First issue was that I was adding my entry at the end of dm644x_clks[]
array. I need to add it before the CLK(NULL, NULL, NULL)

secondly, your suggestion didn't work as is. This is what I had to
do to get it working...

static struct clk ccdc_master_clk = {
.name = dm644x_ccdc,
.parent = vpss_master_clk,
};

static struct clk ccdc_slave_clk = {
.name = dm644x_ccdc,
.parent = vpss_slave_clk,
};

static struct davinci_clk dm365_clks = {


CLK(dm644x_ccdc, master, ccdc_master_clk),
CLK(dm644x_ccdc, slave, ccdc_slave_clk),
CLK(NULL, NULL, NULL); 

Let me know if you think there is anything wrong with the above scheme.

Murali Karicheri
Software Design Engineer
Texas Instruments Inc.
Germantown, MD 20874
phone: 301-407-9583
email: m-kariche...@ti.com

-Original Message-
From: Karicheri, Muralidharan
Sent: Wednesday, December 09, 2009 1:22 PM
To: Karicheri, Muralidharan; Kevin Hilman
Cc: davinci-linux-open-sou...@linux.davincidsp.com; linux-
me...@vger.kernel.org
Subject: RE: [PATCH - v1 1/2] V4L - vpfe capture - make clocks configurable

Kevin,

I tried the following and I get error in clk_enable(). Do you know what
might be wrong?

in DM365.c

CLK(isif, master, vpss_master_clk)

The driver name is isif. I call clk_get(pdev-dev, master) from isif
driver. The platform device name is isif. This call succeeds, but
clk_enable() fails...

clk_ptr = clk_get(pdev-dev, master);
clk_enable(clk_ptr);

r...@dm355-evm:~# cat /proc/davinci_clocks
ref_clk   users= 7  2400 Hz
  pll1users= 6 pll 48600 Hz
pll1_aux_clk  users= 3 pll  2400 Hz
  uart0   users= 1 psc  2400 Hz
  i2c users= 1 psc  2400 Hz
  spi4users= 0 psc  2400 Hz
  pwm0users= 0 psc  2400 Hz
  pwm1users= 0 psc  2400 Hz
  pwm2users= 0 psc  2400 Hz
  timer0  users= 1 psc  2400 Hz
  timer1  users= 0 psc  2400 Hz
  timer2  users= 1 psc  2400 Hz
  timer3  users= 0 psc  2400 Hz
  usb users= 0 psc  2400 Hz
pll1_sysclkbp users= 0 pll  2400 Hz
clkout0   users= 0 pll  2400 Hz
pll1_sysclk1  users= 0 pll 48600 Hz
pll1_sysclk2  users= 0 pll 24300 Hz
pll1_sysclk3  users= 0 pll 24300 Hz
  vpss_dacusers= 0 psc 24300 Hz
  mjcpusers= 0 psc 24300 Hz
pll1_sysclk4  users= 3 pll 12150 Hz
  uart1   users= 0 psc 12150 Hz
  mmcsd1  users= 0 psc 12150 Hz
  spi0users= 0 psc 12150 Hz
  spi1users= 0 psc 12150 Hz
  spi2users= 0 psc 12150 Hz
  spi3users= 0 psc 12150 Hz
  gpiousers= 1 psc 12150 Hz
  aemif   users= 1 psc 12150 Hz
  emacusers= 1 psc 12150 Hz
  asp0users= 0 psc 12150 Hz
  rto users= 0 psc 12150 Hz
pll1_sysclk5  users= 0 pll 24300 Hz
  vpss_master users= 0 psc 24300 Hz
pll1_sysclk6  users= 0 pll  2700 Hz
pll1_sysclk7  users= 0 pll 48600 Hz
pll1_sysclk8  users= 0 pll 12150 Hz
  mmcsd0  users= 0 psc 12150 Hz
pll1_sysclk9  users= 0 pll 24300 Hz
  pll2users= 1 pll 59400 Hz
pll2_aux_clk  users= 0 pll  2400 Hz
clkout1   users= 0 pll  2400 Hz
pll2_sysclk1  users= 0 pll 59400 Hz
pll2_sysclk2  users= 1 pll 29700 Hz
  arm_clk users= 1 psc 29700 Hz
pll2_sysclk3  users= 0 pll 59400 Hz
pll2_sysclk4  users= 0 pll  20482758 Hz
  voice_codec users= 0 psc  20482758 Hz
pll2_sysclk5  users= 0 pll  7425 Hz
pll2_sysclk6  users= 0 pll 59400 Hz
pll2_sysclk7  users= 0 pll 59400 Hz
pll2_sysclk8  users= 0 pll 59400 Hz
pll2_sysclk9  users= 0 pll 59400 Hz
  pwm3users= 0 psc  2400 Hz
r...@dm355-evm:~#



Murali Karicheri
Software Design Engineer
Texas Instruments Inc.
Germantown, MD 20874
phone: 301-407-9583
email: m-kariche...@ti.com

-Original Message-
From: davinci-linux-open-source-boun...@linux.davincidsp.com
[mailto:davinci-linux-open-source-boun...@linux.davincidsp.com] On Behalf
Of Karicheri, Muralidharan
Sent: Wednesday, December 09, 2009 12:45 PM
To: Kevin Hilman
Cc: davinci-linux-open-sou...@linux.davincidsp.com; linux-
me...@vger.kernel.org
Subject: RE: [PATCH - v1 1/2] V4L - vpfe capture - make clocks
configurable

Kevin,

 +/**
 + * vpfe_disable_clock() - Disable clocks for vpfe capture driver
 + * @vpfe_dev - ptr to vpfe capture device
 + *
 + * Disables clocks defined in vpfe configuration.
 + */
  static void vpfe_disable_clock(struct vpfe_device *vpfe_dev)
  {
struct vpfe_config *vpfe_cfg = vpfe_dev-cfg;
 +  int i;

 -  clk_disable(vpfe_cfg-vpssclk);
 -  clk_put(vpfe_cfg-vpssclk);
 -  clk_disable(vpfe_cfg-slaveclk);
 -  clk_put(vpfe_cfg-slaveclk);
 -  

Re: [PATCH v2 1/3] radio-si470x: move some file operations to common file

2009-12-09 Thread Tobias Lorenz
Hi,

good patch. This saves quite some code in the I2C part of the driver...

Acked-by: Tobias Lorenz tobias.lor...@gmx.net

Bye,
Toby

Am Donnerstag 03 Dezember 2009 13:57:22 schrieb Joonyoung Shim:
 The read and poll file operations of the si470x usb driver can be used
 also equally on the si470x i2c driver, so they go to the common file.
 
 Signed-off-by: Joonyoung Shim jy0922.s...@samsung.com
 ---
  drivers/media/radio/si470x/radio-si470x-common.c |   98 
 ++
  drivers/media/radio/si470x/radio-si470x-i2c.c|   15 +---
  drivers/media/radio/si470x/radio-si470x-usb.c|   97 
 +-
  drivers/media/radio/si470x/radio-si470x.h|3 +-
  4 files changed, 104 insertions(+), 109 deletions(-)
 
 diff --git a/drivers/media/radio/si470x/radio-si470x-common.c 
 b/drivers/media/radio/si470x/radio-si470x-common.c
 index 7296cf4..f4645d4 100644
 --- a/drivers/media/radio/si470x/radio-si470x-common.c
 +++ b/drivers/media/radio/si470x/radio-si470x-common.c
 @@ -426,6 +426,104 @@ int si470x_rds_on(struct si470x_device *radio)
  
  
  /**
 + * File Operations Interface
 + **/
 +
 +/*
 + * si470x_fops_read - read RDS data
 + */
 +static ssize_t si470x_fops_read(struct file *file, char __user *buf,
 + size_t count, loff_t *ppos)
 +{
 + struct si470x_device *radio = video_drvdata(file);
 + int retval = 0;
 + unsigned int block_count = 0;
 +
 + /* switch on rds reception */
 + if ((radio-registers[SYSCONFIG1]  SYSCONFIG1_RDS) == 0)
 + si470x_rds_on(radio);
 +
 + /* block if no new data available */
 + while (radio-wr_index == radio-rd_index) {
 + if (file-f_flags  O_NONBLOCK) {
 + retval = -EWOULDBLOCK;
 + goto done;
 + }
 + if (wait_event_interruptible(radio-read_queue,
 + radio-wr_index != radio-rd_index)  0) {
 + retval = -EINTR;
 + goto done;
 + }
 + }
 +
 + /* calculate block count from byte count */
 + count /= 3;
 +
 + /* copy RDS block out of internal buffer and to user buffer */
 + mutex_lock(radio-lock);
 + while (block_count  count) {
 + if (radio-rd_index == radio-wr_index)
 + break;
 +
 + /* always transfer rds complete blocks */
 + if (copy_to_user(buf, radio-buffer[radio-rd_index], 3))
 + /* retval = -EFAULT; */
 + break;
 +
 + /* increment and wrap read pointer */
 + radio-rd_index += 3;
 + if (radio-rd_index = radio-buf_size)
 + radio-rd_index = 0;
 +
 + /* increment counters */
 + block_count++;
 + buf += 3;
 + retval += 3;
 + }
 + mutex_unlock(radio-lock);
 +
 +done:
 + return retval;
 +}
 +
 +
 +/*
 + * si470x_fops_poll - poll RDS data
 + */
 +static unsigned int si470x_fops_poll(struct file *file,
 + struct poll_table_struct *pts)
 +{
 + struct si470x_device *radio = video_drvdata(file);
 + int retval = 0;
 +
 + /* switch on rds reception */
 + if ((radio-registers[SYSCONFIG1]  SYSCONFIG1_RDS) == 0)
 + si470x_rds_on(radio);
 +
 + poll_wait(file, radio-read_queue, pts);
 +
 + if (radio-rd_index != radio-wr_index)
 + retval = POLLIN | POLLRDNORM;
 +
 + return retval;
 +}
 +
 +
 +/*
 + * si470x_fops - file operations interface
 + */
 +static const struct v4l2_file_operations si470x_fops = {
 + .owner  = THIS_MODULE,
 + .read   = si470x_fops_read,
 + .poll   = si470x_fops_poll,
 + .ioctl  = video_ioctl2,
 + .open   = si470x_fops_open,
 + .release= si470x_fops_release,
 +};
 +
 +
 +
 +/**
   * Video4Linux Interface
   **/
  
 diff --git a/drivers/media/radio/si470x/radio-si470x-i2c.c 
 b/drivers/media/radio/si470x/radio-si470x-i2c.c
 index 2d53b6a..4816a6d 100644
 --- a/drivers/media/radio/si470x/radio-si470x-i2c.c
 +++ b/drivers/media/radio/si470x/radio-si470x-i2c.c
 @@ -173,7 +173,7 @@ int si470x_disconnect_check(struct si470x_device *radio)
  /*
   * si470x_fops_open - file open
   */
 -static int si470x_fops_open(struct file *file)
 +int si470x_fops_open(struct file *file)
  {
   struct si470x_device *radio = video_drvdata(file);
   int retval = 0;
 @@ -194,7 +194,7 @@ static int si470x_fops_open(struct file *file)
  /*
   * si470x_fops_release - file release
   */
 -static int si470x_fops_release(struct file *file)
 +int si470x_fops_release(struct file 

Re: [PATCH v2 2/3] radio-si470x: support RDS on si470x i2c driver

2009-12-09 Thread Tobias Lorenz
Hi,

I'm unable to test the functionality, due to missing devices.
But the code compiles cleanly.

Acked-by: Tobias Lorenz tobias.lor...@gmx.net

Bye,
Toby

Am Donnerstag 03 Dezember 2009 13:57:27 schrieb Joonyoung Shim:
 This patch is to support RDS on si470x i2c driver. The routine of RDS
 operation is almost same with thing of usb driver, but this uses RDS
 interrupt.
 
 Signed-off-by: Joonyoung Shim jy0922.s...@samsung.com
 ---
  drivers/media/radio/si470x/radio-si470x-i2c.c |  164 
 +++--
  drivers/media/radio/si470x/radio-si470x.h |1 +
  2 files changed, 155 insertions(+), 10 deletions(-)
 
 diff --git a/drivers/media/radio/si470x/radio-si470x-i2c.c 
 b/drivers/media/radio/si470x/radio-si470x-i2c.c
 index 6a40db8..5466015 100644
 --- a/drivers/media/radio/si470x/radio-si470x-i2c.c
 +++ b/drivers/media/radio/si470x/radio-si470x-i2c.c
 @@ -22,22 +22,17 @@
   */
  
  
 -/*
 - * ToDo:
 - * - RDS support
 - */
 -
 -
  /* driver definitions */
  #define DRIVER_AUTHOR Joonyoung Shim jy0922.s...@samsung.com;
 -#define DRIVER_KERNEL_VERSION KERNEL_VERSION(1, 0, 0)
 +#define DRIVER_KERNEL_VERSION KERNEL_VERSION(1, 0, 1)
  #define DRIVER_CARD Silicon Labs Si470x FM Radio Receiver
  #define DRIVER_DESC I2C radio driver for Si470x FM Radio Receivers
 -#define DRIVER_VERSION 1.0.0
 +#define DRIVER_VERSION 1.0.1
  
  /* kernel includes */
  #include linux/i2c.h
  #include linux/delay.h
 +#include linux/interrupt.h
  
  #include radio-si470x.h
  
 @@ -62,6 +57,20 @@ static int radio_nr = -1;
  module_param(radio_nr, int, 0444);
  MODULE_PARM_DESC(radio_nr, Radio Nr);
  
 +/* RDS buffer blocks */
 +static unsigned int rds_buf = 100;
 +module_param(rds_buf, uint, 0444);
 +MODULE_PARM_DESC(rds_buf, RDS buffer entries: *100*);
 +
 +/* RDS maximum block errors */
 +static unsigned short max_rds_errors = 1;
 +/* 0 means   0  errors requiring correction */
 +/* 1 means 1-2  errors requiring correction (used by original USBRadio.exe) 
 */
 +/* 2 means 3-5  errors requiring correction */
 +/* 3 means   6+ errors or errors in checkword, correction not possible */
 +module_param(max_rds_errors, ushort, 0644);
 +MODULE_PARM_DESC(max_rds_errors, RDS maximum block errors: *1*);
 +
  
  
  /**
 @@ -181,12 +190,21 @@ int si470x_fops_open(struct file *file)
   mutex_lock(radio-lock);
   radio-users++;
  
 - if (radio-users == 1)
 + if (radio-users == 1) {
   /* start radio */
   retval = si470x_start(radio);
 + if (retval  0)
 + goto done;
 +
 + /* enable RDS interrupt */
 + radio-registers[SYSCONFIG1] |= SYSCONFIG1_RDSIEN;
 + radio-registers[SYSCONFIG1] = ~SYSCONFIG1_GPIO2;
 + radio-registers[SYSCONFIG1] |= 0x1  2;
 + retval = si470x_set_register(radio, SYSCONFIG1);
 + }
  
 +done:
   mutex_unlock(radio-lock);
 -
   return retval;
  }
  
 @@ -242,6 +260,105 @@ int si470x_vidioc_querycap(struct file *file, void 
 *priv,
   **/
  
  /*
 + * si470x_i2c_interrupt_work - rds processing function
 + */
 +static void si470x_i2c_interrupt_work(struct work_struct *work)
 +{
 + struct si470x_device *radio = container_of(work,
 + struct si470x_device, radio_work);
 + unsigned char regnr;
 + unsigned char blocknum;
 + unsigned short bler; /* rds block errors */
 + unsigned short rds;
 + unsigned char tmpbuf[3];
 + int retval = 0;
 +
 + /* safety checks */
 + if ((radio-registers[SYSCONFIG1]  SYSCONFIG1_RDS) == 0)
 + return;
 +
 + /* Update RDS registers */
 + for (regnr = 0; regnr  RDS_REGISTER_NUM; regnr++) {
 + retval = si470x_get_register(radio, STATUSRSSI + regnr);
 + if (retval  0)
 + return;
 + }
 +
 + /* get rds blocks */
 + if ((radio-registers[STATUSRSSI]  STATUSRSSI_RDSR) == 0)
 + /* No RDS group ready, better luck next time */
 + return;
 +
 + for (blocknum = 0; blocknum  4; blocknum++) {
 + switch (blocknum) {
 + default:
 + bler = (radio-registers[STATUSRSSI] 
 + STATUSRSSI_BLERA)  9;
 + rds = radio-registers[RDSA];
 + break;
 + case 1:
 + bler = (radio-registers[READCHAN] 
 + READCHAN_BLERB)  14;
 + rds = radio-registers[RDSB];
 + break;
 + case 2:
 + bler = (radio-registers[READCHAN] 
 + READCHAN_BLERC)  12;
 + rds = radio-registers[RDSC];
 + break;
 + case 3:
 + bler = (radio-registers[READCHAN] 
 +  

Re: [PATCH v2 3/3] radio-si470x: support PM functions

2009-12-09 Thread Tobias Lorenz
Hi,

the same here. I'm unable to test it, but it compiles cleanly.

Acked-by: Tobias Lorenz tobias.lor...@gmx.net

Bye,
Toby

Am Donnerstag 03 Dezember 2009 13:57:29 schrieb Joonyoung Shim:
 This patch is to support PM of the si470x i2c driver.
 
 Signed-off-by: Joonyoung Shim jy0922.s...@samsung.com
 ---
  drivers/media/radio/si470x/radio-si470x-i2c.c |   40 
 +
  1 files changed, 40 insertions(+), 0 deletions(-)
 
 diff --git a/drivers/media/radio/si470x/radio-si470x-i2c.c 
 b/drivers/media/radio/si470x/radio-si470x-i2c.c
 index 77532e6..4c6e586 100644
 --- a/drivers/media/radio/si470x/radio-si470x-i2c.c
 +++ b/drivers/media/radio/si470x/radio-si470x-i2c.c
 @@ -486,6 +486,44 @@ static __devexit int si470x_i2c_remove(struct i2c_client 
 *client)
  }
  
  
 +#ifdef CONFIG_PM
 +/*
 + * si470x_i2c_suspend - suspend the device
 + */
 +static int si470x_i2c_suspend(struct i2c_client *client, pm_message_t mesg)
 +{
 + struct si470x_device *radio = i2c_get_clientdata(client);
 +
 + /* power down */
 + radio-registers[POWERCFG] |= POWERCFG_DISABLE;
 + if (si470x_set_register(radio, POWERCFG)  0)
 + return -EIO;
 +
 + return 0;
 +}
 +
 +
 +/*
 + * si470x_i2c_resume - resume the device
 + */
 +static int si470x_i2c_resume(struct i2c_client *client)
 +{
 + struct si470x_device *radio = i2c_get_clientdata(client);
 +
 + /* power up : need 110ms */
 + radio-registers[POWERCFG] |= POWERCFG_ENABLE;
 + if (si470x_set_register(radio, POWERCFG)  0)
 + return -EIO;
 + msleep(110);
 +
 + return 0;
 +}
 +#else
 +#define si470x_i2c_suspend   NULL
 +#define si470x_i2c_resumeNULL
 +#endif
 +
 +
  /*
   * si470x_i2c_driver - i2c driver interface
   */
 @@ -496,6 +534,8 @@ static struct i2c_driver si470x_i2c_driver = {
   },
   .probe  = si470x_i2c_probe,
   .remove = __devexit_p(si470x_i2c_remove),
 + .suspend= si470x_i2c_suspend,
 + .resume = si470x_i2c_resume,
   .id_table   = si470x_i2c_id,
  };
  
 
--
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: no locking on dvb-s2 22000 2/3 8PSK transponder on Astra 19.2E with tt s2-3200

2009-12-09 Thread Matthias Wächter
Am 09.12.2009 21:15, schrieb Newsy Paper:
 no matter if I use Igors or Manus driver, there's no lock on 11303 h 22000 
 2/3 8psk. Other users at vdr-portal report same problem.
 The strange thing is that all other transponders that use 22000 2/3 8psk do 
 work but this transponder doesn't. It worked fine until december 3rd when 
 uplink moved to Vienna. I think they changed a parameter like rolloff or 
 inversion and the dvb-s2 part of stb6100 is buggy.

Reviewing the code and having enabled debugging options for stb6100, I
am puzzled about the high bandwidth values.

I thought that the bandwidth of the frontend would always be around the
bandwidth of the transponder, plus some minimum locking range. 11303h is
a 26 MHz transponder, so I wonder about the excess in bandwidth: 39.7
MHz is requested, 40 MHz bandwidth is the result. I would expect a value
of 22 MSps * (1+0.35) Hz/S = 29.7 MHz (which is more than the
transponder’s 26 MHz, though ?) but less than 40 MHz as in the example
below. If too much bandwidth hits the decoder, it may be facing aliasing
from neighbor channels, but I don’t know if that is the root cause of
the problems. This is http://jusst.de/hg/v4l-dvb/ as advised by Manu.

Tuning to a 27.500 MSps transponder results in a whoppin’ 62 MHz
bandwidth setting. Is this reasonable?

  kernel: stb6100_set_bandwidth: set bandwidth to 3970 Hz
  kernel: stb6100_write_reg_range: Write @ 0x60: [9:1]
  kernel: stb6100_write_reg_range: FCCK: 0x4d
  kernel: stb6100_write_reg_range: Write @ 0x60: [6:1]
  kernel: stb6100_write_reg_range: F: 0xcf
  kernel: stb6100_write_reg_range: Write @ 0x60: [9:1]
  kernel: stb6100_write_reg_range: FCCK: 0x0d
  kernel: stb6100_read_regs: Read from 0x60
  kernel: stb6100_read_regs: LD: 0x81
  kernel: stb6100_read_regs: VCO: 0x64
  kernel: stb6100_read_regs: NI: 0x34
  kernel: stb6100_read_regs: NF: 0x2f
  kernel: stb6100_read_regs: K: 0x3d
  kernel: stb6100_read_regs: G: 0x39
  kernel: stb6100_read_regs: F: 0xcf
  kernel: stb6100_read_regs: DLB: 0xdc
  kernel: stb6100_read_regs: TEST1: 0x8f
  kernel: stb6100_read_regs: FCCK: 0x0d
  kernel: stb6100_read_regs: LPEN: 0xfb
  kernel: stb6100_read_regs: TEST3: 0xde
  kernel: stb6100_get_bandwidth: bandwidth = 4000 Hz
  kernel: stb6100_read_regs: Read from 0x60
  kernel: stb6100_read_regs: LD: 0x81
  kernel: stb6100_read_regs: VCO: 0x64
  kernel: stb6100_read_regs: NI: 0x34
  kernel: stb6100_read_regs: NF: 0x2f
  kernel: stb6100_read_regs: K: 0x3d
  kernel: stb6100_read_regs: G: 0x39
  kernel: stb6100_read_regs: F: 0xcf
  kernel: stb6100_read_regs: DLB: 0xdc
  kernel: stb6100_read_regs: TEST1: 0x8f
  kernel: stb6100_read_regs: FCCK: 0x0d
  kernel: stb6100_read_regs: LPEN: 0xfb
  kernel: stb6100_read_regs: TEST3: 0xde
  kernel: stb6100_set_frequency: Get frontend parameters
  kernel: stb6100_write_reg_range: Write @ 0x60: [1:11]
  kernel: stb6100_write_reg_range: VCO: 0x64
  kernel: stb6100_write_reg_range: NI: 0x34
  kernel: stb6100_write_reg_range: NF: 0x2f
  kernel: stb6100_write_reg_range: K: 0x3d
  kernel: stb6100_write_reg_range: G: 0x39
  kernel: stb6100_write_reg_range: F: 0xcf
  kernel: stb6100_write_reg_range: DLB: 0xdc
  kernel: stb6100_write_reg_range: TEST1: 0x8f
  kernel: stb6100_write_reg_range: FCCK: 0x0d
  kernel: stb6100_write_reg_range: LPEN: 0xeb
  kernel: stb6100_write_reg_range: TEST3: 0xde
  kernel: stb6100_set_frequency: frequency = 1552000, srate = 2200, g = 9, 
 odiv = 0, psd2 = 1, fxtal = 27000, osm = 6, fvco = 3104000, N(I) = 57, N(F) = 
 247
  kernel: stb6100_write_reg_range: Write @ 0x60: [1:11]
  kernel: stb6100_write_reg_range: VCO: 0xe6
  kernel: stb6100_write_reg_range: NI: 0x39
  kernel: stb6100_write_reg_range: NF: 0xf7
  kernel: stb6100_write_reg_range: K: 0x3c
  kernel: stb6100_write_reg_range: G: 0x39
  kernel: stb6100_write_reg_range: F: 0xcf
  kernel: stb6100_write_reg_range: DLB: 0xdc
  kernel: stb6100_write_reg_range: TEST1: 0x8f
  kernel: stb6100_write_reg_range: FCCK: 0x4d
  kernel: stb6100_write_reg_range: LPEN: 0xeb
  kernel: stb6100_write_reg_range: TEST3: 0xde
  kernel: stb6100_write_reg_range: Write @ 0x60: [10:1]
  kernel: stb6100_write_reg_range: LPEN: 0xfb
  kernel: stb6100_write_reg_range: Write @ 0x60: [1:1]
  kernel: stb6100_write_reg_range: VCO: 0x86
  kernel: stb6100_write_reg_range: Write @ 0x60: [1:1]
  kernel: stb6100_write_reg_range: VCO: 0x66
  kernel: stb6100_write_reg_range: Write @ 0x60: [1:9]
  kernel: stb6100_write_reg_range: VCO: 0x66
  kernel: stb6100_write_reg_range: NI: 0x39
  

Re: MSI StarCam working in vlc only (with poor colors)

2009-12-09 Thread Jozef Riha
[j...@darkstar ~]$ LC_ALL=C guvcview --verbose
guvcview 1.1.4
video_device: /dev/video0
vid_sleep: 0
cap_meth: 1
resolution: 640 x 480
windowsize: 480 x 700
vert pane: 0
spin behavior: 0
mode: mjpg
fps: 1/25
Display Fps: 0
bpp: 0
hwaccel: 1
avi_format: 0
sound: 1
sound Device: 0
sound samp rate: 0
sound Channels: 0
Sound Block Size: 1 seconds
Sound Format: 80
Sound bit Rate: 160 Kbps
Pan Step: 2 degrees
Tilt Step: 2 degrees
Video Filter Flags: 0
image inc: 0
profile(default):/home/jose/default.gpfl
starting portaudio...
language catalog= dir:/usr/share/locale type:C lang:C cat:guvcview.mo

(guvcview:31380): GLib-GObject-WARNING **: IA__g_object_set_valist:
object class `GtkSettings' has no property named `gtk-button-images'
mjpg: setting format to 1196444237
capture method = 1
video device: /dev/video0
/dev/video0 - device 1
Init. UVC Camera (1b3b:2951) (location: usb-:00:1d.1-1)
{ pixelformat = 'MJPG', description = 'MJPEG' }
{ discrete: width = 640, height = 480 }
Time interval between frame: 1/30,
{ discrete: width = 320, height = 240 }
Time interval between frame: 1/30,
{ discrete: width = 160, height = 120 }
Time interval between frame: 1/30,
checking format: 1196444237
VIDIOC_S_FORMAT - Unable to set format: Input/output error
Init v4L2 failed !!
Init video returned -2
trying minimum setup ...
capture method = 1
video device: /dev/video0
/dev/video0 - device 1
Init. UVC Camera (1b3b:2951) (location: usb-:00:1d.1-1)
{ pixelformat = 'MJPG', description = 'MJPEG' }
{ discrete: width = 640, height = 480 }
Time interval between frame: 1/30,
{ discrete: width = 320, height = 240 }
Time interval between frame: 1/30,
{ discrete: width = 160, height = 120 }
Time interval between frame: 1/30,
checking format: 1196444237
VIDIOC_S_FORMAT - Unable to set format: Input/output error
Init v4L2 failed !!
ERROR: Minimum Setup Failed.
 Exiting...
Terminated.


On Wed, Dec 9, 2009 at 10:53 PM, Paulo Assis pj.as...@gmail.com wrote:
 Hi,
 Could you please try guvcview ( http://guvcview.berlios.de )

 Please post me the output of guvcview --verbose

 Best regards,
 Paulo

 2009/12/9 Jozef Riha jose1...@gmail.com:
 Jozef Riha jose1711 at gmail.com writes:


 Hello dear ML members,

 I wonder whether you can help me with the following issue. My webcam
 MSI StarCam (http://www.aaronpc.cz/produkty/msi-starcam-370i)
 identified as

 ...


 Sorry I forgot to add kernel version. It is 2.6.32, config at
 http://repos.archlinux.org/wsvn/packages/kernel26/repos/core-i686/config

 --
 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: New DVB-Statistics API

2009-12-09 Thread Julian Scheel

Am 09.12.09 14:02, schrieb Mauro Carvalho Chehab:

Manu Abraham wrote:
   

On Wed, Dec 9, 2009 at 3:43 AM, Mauro Carvalho Chehab
mche...@redhat.com  wrote:
 
   

Even with STB, let's assume a very slow cpu that runs at 100 Megabytes/second. 
So, the clock
speed is 10 nanoseconds. Assuming that this CPU doesn't have a good pipeline, 
being
capable of handling only one instruction per second, you'll have one 
instruction at executed
at each 10 nanoseconds (as a reference, a Pentium 1, running at 133 Mbps is 
faster than this).
   

Incorrect.
A CPU doesn't execute instruction per clock cycle. Clock cycles
required to execute an instruction do vary from 2 cycles 12 cycles
varying from CPU to CPU.
 

See the description of an old Pentium MMX processor (the sucessor of i586, 
running up to 200 MHz):
http://www.intel.com/design/archives/processors/mmx/docs/243185.htm

Thanks to superscalar architecture, it runs 2 instructions per clock cycle 
(IPC).

Newer processors can run more instructions per clock cycle. For example, any 
Pentium-4 processor,
can do 3 IPC:
http://www.intel.com/support/processors/pentium4/sb/CS-017371.htm
   


I don't think you can just take the average IPC rates into account for 
this. When doing a syscall the processors TLB cache will be cleared, 
which will force the CPU to go to the whole instruction pipeline before 
the first syscall instruction is actually executed. This will introduce 
a delay for each syscall you make. I'm not exactly sure about the length 
of the delay, but I think it should be something like 2 clock cycles.

So, even on such bad hardware that is at least 20x slower than a netbook 
running at 1Gbps,
what determines the delay is the amount of I/O you're doing, and not the number 
of extra
code.
   


The I/O overhead required to read 4 registers from hardware is the
same whether you use the ioctl approach or s2api.
 

It seems you got my point. What will determinate the delay is the number of 
I/O's, and not the
amount of instructions.
   
The number of hardware I/Os is constant for both cases, so we do not 
need to discuss them as pro/con for any of the proposals.

Eventually, as you have pointed out yourself, The data struct will be
in the cache all the time for the ioctl approach. The only new
addition to the existing API in the ioctl case is a CALL instruction
as compared to the numerous instructions in comparison to that you
have pointed out as with the s2api approach.
 

True, but, as shown, the additional delay introduced by the code is less than 
0.01%, even on
a processor that has half of the speed of a 12-year old very slow CPU (a 
Pentium MMX @ 100 MHz
is capable of 2 IPC. My calculus assumed 1 IPC).

So, what will affect the delay is the number of I/O you need to do.

To get all data that the ioctl approach struct has, the delay for S2API will be 
equal.
To get less data, S2API will have a small delay.
   
Imho the S2API would be slower when reading all data the ioctl fetches, 
due to the way the instructions would be handled.


Correct me, if I'm wrong with any of this.

Cheers,
Julian

--
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: Details about DVB frontend AP

2009-12-09 Thread Primusmail
n Saturday 05 December 2009 07:59:16 Michael Krufky wrote:
 On Fri, Dec 4, 2009 at 3:02 PM, VDR User user@gmail.com wrote:
  No activity in this thread for 2 weeks now.  Has there been any progress?

 I think I speak on behalf of most LinuxTV developers, when I say that
 nobody wants to spend their free personal time working on something
 that might get shot down with such controversy.

 I have stated that I like Manu's proposal, but I would prefer that the
 get_property (s2api) interface were used, because it totally provides
 an interface that is sufficient for this feature.

 Manu and I agree that these values should all be read at once.

 I think we all (except Mauro) agree that the behavior within the
 driver should fetch all statistics at once and return it to userspace
 as a single structure with all the information as it all relates to
 each other.

 Furthermore, I think we all know that we cant just remove the current
 structures, and we should do something to normalize the current
 reporting values.

 The longer this thread gets, the less likely anybody is to do anything
 about it.

 Let me state my opinion again:

 I would like to see a solution merged, and I think Manu's solution is
 reasonable, although it may be complicated -- if all drivers are
 updated to support it, then it will all be worth it.  The question is,
 will all drivers update to support this?  I don't know.

 We have the S2API's set / get property API -- In my opinion, we should
 use this API to fetch statistic information and have it return a
 single atomic structure.  Applications can use only the information
 that they're interested in.

 In the meanwhile, as a SEPARATE PROJECT, we should do something to
 standardize the values reported by the CURRENT API across the entire
 subsystem.  This should not be confused with Manu's initiative to
 create a better API -- we cant remove the current API, but it should
 be standardized.

 I volunteer to work on the standardization of the CURRENT Api, and I
 am all for seeing a new API introduced for better statistical
 reporting, provided that the get property method is used as an
 interface, rather than adding new ioctls.  However, if we add a new
 API, we haev to make sure that all the current drivers are updated to
 support it -- do we have all the information that we need for this?
 Do we have the manpower and the drive to get it done?

 My urge to do this work is a strong urge, but I have no desire to do
 this if people want to continue arguing about it... In the meanwhile,
 I am working on new drivers for new devices, and this is much more
 interesting that worrying about how strong a signal is for a device
 that already works.

 When you folks stop talking about this, that's when I will push the
 trees containing all the work that I've done already thus far -- we
 need to standardize the current API, and that has nothing to do with
 Manu's proposal.

 We should not confuse standardization the current reporting units with
 the introduction of a new API -- both should be done, but the more
 arguing there is about it, the less of a chance that anybody will
 volunteer their own time to work on it.

 ...and just to clarify -- I think I said it twice already, but
 repeating again -- I (mostly) like Manu's proposal, but if we cant
 update the drivers to support it, then is it worth the trouble?

 Regards,

 Mike Krufky
 --
 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




Good to hear that this is still in someones consciousness. A friend of mine 
has taken Manus patch and has modified the vdr-femon and vdr-rotor plugins to 
display Signal Strength and signal to Noise again. Not accurate numbers but 
they do show when tuning is improving or worsening and thats all I need. This 
is only for TTS2-3200 cards , THis might be of interest to someone.

Mike
--
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: MSI StarCam working in vlc only (with poor colors)

2009-12-09 Thread Paulo Assis
Hi, could you try the following:

echo 2  /sys/module/uvcvideo/parameters/quirks

this will set uvcvideo quirks to 2

or you can also try the latest uvcvideo:
http://www.linuxtv.org/wiki/index.php/How_to_Obtain,_Build_and_Install_V4L-DVB_Device_Drivers

please if you can, use the latest version for guvcview (1.2.1)  :D

Regards,
Paulo

2009/12/9 Jozef Riha jose1...@gmail.com:
 [j...@darkstar ~]$ LC_ALL=C guvcview --verbose
 guvcview 1.1.4
 video_device: /dev/video0
 vid_sleep: 0
 cap_meth: 1
 resolution: 640 x 480
 windowsize: 480 x 700
 vert pane: 0
 spin behavior: 0
 mode: mjpg
 fps: 1/25
 Display Fps: 0
 bpp: 0
 hwaccel: 1
 avi_format: 0
 sound: 1
 sound Device: 0
 sound samp rate: 0
 sound Channels: 0
 Sound Block Size: 1 seconds
 Sound Format: 80
 Sound bit Rate: 160 Kbps
 Pan Step: 2 degrees
 Tilt Step: 2 degrees
 Video Filter Flags: 0
 image inc: 0
 profile(default):/home/jose/default.gpfl
 starting portaudio...
 language catalog= dir:/usr/share/locale type:C lang:C cat:guvcview.mo

 (guvcview:31380): GLib-GObject-WARNING **: IA__g_object_set_valist:
 object class `GtkSettings' has no property named `gtk-button-images'
 mjpg: setting format to 1196444237
 capture method = 1
 video device: /dev/video0
 /dev/video0 - device 1
 Init. UVC Camera (1b3b:2951) (location: usb-:00:1d.1-1)
 { pixelformat = 'MJPG', description = 'MJPEG' }
 { discrete: width = 640, height = 480 }
        Time interval between frame: 1/30,
 { discrete: width = 320, height = 240 }
        Time interval between frame: 1/30,
 { discrete: width = 160, height = 120 }
        Time interval between frame: 1/30,
 checking format: 1196444237
 VIDIOC_S_FORMAT - Unable to set format: Input/output error
 Init v4L2 failed !!
 Init video returned -2
 trying minimum setup ...
 capture method = 1
 video device: /dev/video0
 /dev/video0 - device 1
 Init. UVC Camera (1b3b:2951) (location: usb-:00:1d.1-1)
 { pixelformat = 'MJPG', description = 'MJPEG' }
 { discrete: width = 640, height = 480 }
        Time interval between frame: 1/30,
 { discrete: width = 320, height = 240 }
        Time interval between frame: 1/30,
 { discrete: width = 160, height = 120 }
        Time interval between frame: 1/30,
 checking format: 1196444237
 VIDIOC_S_FORMAT - Unable to set format: Input/output error
 Init v4L2 failed !!
 ERROR: Minimum Setup Failed.
  Exiting...
 Terminated.


 On Wed, Dec 9, 2009 at 10:53 PM, Paulo Assis pj.as...@gmail.com wrote:
 Hi,
 Could you please try guvcview ( http://guvcview.berlios.de )

 Please post me the output of guvcview --verbose

 Best regards,
 Paulo

 2009/12/9 Jozef Riha jose1...@gmail.com:
 Jozef Riha jose1711 at gmail.com writes:


 Hello dear ML members,

 I wonder whether you can help me with the following issue. My webcam
 MSI StarCam (http://www.aaronpc.cz/produkty/msi-starcam-370i)
 identified as

 ...


 Sorry I forgot to add kernel version. It is 2.6.32, config at
 http://repos.archlinux.org/wsvn/packages/kernel26/repos/core-i686/config

 --
 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] WinTV HVR-900 USB (B3C0)

2009-12-09 Thread Emanoil Kotsev

hi,


--- On Wed, 12/9/09, Rob Beard r...@esdelle.co.uk wrote:

 From: Rob Beard r...@esdelle.co.uk
 Subject: Re: [linux-dvb] WinTV HVR-900 USB (B3C0)
 To: Lukasz Sokol el_es...@yahoo.co.uk
 Cc: linux-...@linuxtv.org, linux-media@vger.kernel.org
 Date: Wednesday, December 9, 2009, 10:34 AM
 On 09/12/2009 09:16, Lukasz Sokol
 wrote:
  Rob Beard wrote:
     
  Hi folks,
 
  I've borrowed a WinTV HVR-900 USB stick from a
 friend of mine to see if
  I can get any reception in my area before forking
 out for one however
  I've run in to a couple of problems and wondered
 if anyone had used one
  of these sticks?
 
       
  [snip]
     
  I just wondered if anyone else had one of these
 sticks actually working
  under Ubuntu 9.10?  (I'm running kernel
 2.6.31-16-generic-pae).
 
  Rob

I've been using one (AxC0 I think) for years until the hardware died earlier 
this year. I think I bought it 2006, not quite sure when exactly. I think what 
killed it was that it was working permanently for 1,5years, so it probably 
overheated somwhen in the summer. But it was working fine with analog and dvb 
signal.

 
       
 
  Hi Rob,
  this device uses empia chips.
 
  I have a similar situation with Pinnacle Hybrid Pro
 330e (yes, 3_3_0e) : the only
  driver that works (and was great at it) was Markus
 Rechberger's em28xx-new project.
  (my device has cx88 tuner IIRC). The em28xx-new
 project had some modifications to
  some tuner drivers too. They were based both on RE and
 documentation for which
  Markus had NDA's signed (a vague recollection of past
 googling).

I've never used the in-kernel module rather the v4l-dvb one for this specific 
card. I even did not compiled it recently.

 
  The mainline kernel unfortunately does not support it
 out of the box, and it is not only
  about the firmware you have to download; There is
 something severely nonfunctional.
 
  Why am I writing in past tense ?
  This driver (em28xx-new) has recently been abandoned,
 and its author went proprietary.
  I was using a ubuntu package prepared by some ubuntu
 user, named gborzi.
  Unfortunately the package cannot apply to more recent
 kernels any more.
  The last kernel it worked with, was 2.6.27-14 (Ubuntu
 terminology) and I'm stuck with it.
 
  I have emailed Markus but he seems to have lost any
 interest in the em28xx-new...
  can't blame him though, he gave his reasons, some of
 them unfortunately true.
 
  To v4l developers : as it is the case now that we can
 consider em28xx-new abandonware,
  could somebody see, what got devices like ours working
 in his driver, and push it to
  mainline, please ? Just the DVB support would be
 fine...
 
  To Markus : the above is not a call to
 _steal_your_code_ but merely to somebody have
  a look and modify the mainline drivers so it could
 support A 5 YEAR OLD DEVICE like mine.
  People could employ a 'clean room' like in alternative
 to Broadcom (b43) development.
 
  At least mine, is a 5 YEARS OLD design (bought in
 2006).
  On my computer, which was middle spec 5 years ago,
 I've always had problems with this device
  under Windows (XP) : 100% CPU on max frequency
 (1.6GHz) all the time, when playing.
  Under Linux, stock Ubuntu 8.10 Kaffeine, and
 em28xx-new, it is max 30% CPU at lowest freq (800MHz)).
 
  Stock em28xx driver only supports analog (with no
 sound under stock tvtime, supposedly patched tvtime
 required).
 
  el es
     
 
 Thanks for the heads up, I think I'll have a look and see
 what else is 
 available out there then, luckily I only borrowed it to
 test if it would 
 work.

I'm using now terratec for about 30€. There were again problems with the 
drivers so I'm compiling again the v4l-dvb code. I don't see anything wrong to 
do it on your own.

regards


  
--
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: Details about DVB frontend AP

2009-12-09 Thread VDR User
On Wed, Dec 9, 2009 at 2:02 PM, Primusmail mike_boot...@iprimus.com.au wrote:
 Good to hear that this is still in someones consciousness. A friend of mine
 has taken Manus patch and has modified the vdr-femon and vdr-rotor plugins to
 display Signal Strength and signal to Noise again. Not accurate numbers but
 they do show when tuning is improving or worsening and thats all I need. This
 is only for TTS2-3200 cards , THis might be of interest to someone.

Being able to align dishes to the correct sats @ the best signal is
definitely of interest to many people and since linux lacks a good
signal meter/sat identifier, there is much hope these talks will
actually lead to something tangible for users.  There is also a big
worry that it will degrade to personal conflicts and stall out with no
progress.  Let's cross our fingers the greater good for the users and
a working usable solution is the end result!!

Regards,
Derek
--
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: MSI StarCam working in vlc only (with poor colors)

2009-12-09 Thread Jozef Riha
setting quirks to 2 unfortunately did not help. gucview's 1.2.1 output below

[j...@darkstar ~]$ LC_ALL=C guvcview --verbose
guvcview 1.2.1
unexpected integer value (1) for snd_numsec
Strings must be quoted
video_device: /dev/video0
vid_sleep: 0
cap_meth: 1
resolution: 640 x 480
windowsize: 480 x 700
vert pane: 0
spin behavior: 0
mode: mjpg
fps: 1/25
Display Fps: 0
bpp: 0
hwaccel: 1
avi_format: 0
sound: 1
sound Device: 0
sound samp rate: 0
sound Channels: 0
Sound delay: 0 nanosec
Sound Format: 80
Sound bit Rate: 160 Kbps
Pan Step: 2 degrees
Tilt Step: 2 degrees
Video Filter Flags: 0
image inc: 0
profile(default):/home/jose/default.gpfl
starting portaudio...
language catalog= dir:/usr/share/locale type:C lang:C cat:guvcview.mo
mjpg: setting format to 1196444237
capture method = 1
video device: /dev/video0
/dev/video0 - device 1
Init. UVC Camera (1b3b:2951) (location: usb-:00:1d.1-1)
{ pixelformat = 'MJPG', description = 'MJPEG' }
{ discrete: width = 640, height = 480 }
Time interval between frame: 1/30,
{ discrete: width = 320, height = 240 }
Time interval between frame: 1/30,
{ discrete: width = 160, height = 120 }
Time interval between frame: 1/30,
vid:1b3b
pid:2951
driver:uvcvideo
checking format: 1196444237
VIDIOC_S_FORMAT - Unable to set format: Input/output error
Init v4L2 failed !!
Init video returned -2
trying minimum setup ...
capture method = 1
video device: /dev/video0
/dev/video0 - device 1
Init. UVC Camera (1b3b:2951) (location: usb-:00:1d.1-1)
{ pixelformat = 'MJPG', description = 'MJPEG' }
{ discrete: width = 640, height = 480 }
Time interval between frame: 1/30,
{ discrete: width = 320, height = 240 }
Time interval between frame: 1/30,
{ discrete: width = 160, height = 120 }
Time interval between frame: 1/30,
vid:1b3b
pid:2951
driver:uvcvideo
checking format: 1196444237
VIDIOC_S_FORMAT - Unable to set format: Input/output error
Init v4L2 failed !!
ERROR: Minimum Setup Failed.
 Exiting...
free audio mutex
VIDIOC_REQBUFS - Failed to delete buffers: Invalid argument (errno 22)
closed v4l2 strutures
free controls - vidState
cleaned allocations - 100%
Closing portaudio ...OK
Terminated.

are you sure with the web-page? i cannot see a relationship between
dvb and uvcvideo. shouldn't i download the most recent driver from
http://linux-uvc.berlios.de/#download ?

thank you,

joe

On Wed, Dec 9, 2009 at 11:20 PM, Paulo Assis pj.as...@gmail.com wrote:
 Hi, could you try the following:

 echo 2  /sys/module/uvcvideo/parameters/quirks

 this will set uvcvideo quirks to 2

 or you can also try the latest uvcvideo:
 http://www.linuxtv.org/wiki/index.php/How_to_Obtain,_Build_and_Install_V4L-DVB_Device_Drivers

 please if you can, use the latest version for guvcview (1.2.1)  :D

 Regards,
 Paulo

 2009/12/9 Jozef Riha jose1...@gmail.com:
 [j...@darkstar ~]$ LC_ALL=C guvcview --verbose
 guvcview 1.1.4
 video_device: /dev/video0
 vid_sleep: 0
 cap_meth: 1
 resolution: 640 x 480
 windowsize: 480 x 700
 vert pane: 0
 spin behavior: 0
 mode: mjpg
 fps: 1/25
 Display Fps: 0
 bpp: 0
 hwaccel: 1
 avi_format: 0
 sound: 1
 sound Device: 0
 sound samp rate: 0
 sound Channels: 0
 Sound Block Size: 1 seconds
 Sound Format: 80
 Sound bit Rate: 160 Kbps
 Pan Step: 2 degrees
 Tilt Step: 2 degrees
 Video Filter Flags: 0
 image inc: 0
 profile(default):/home/jose/default.gpfl
 starting portaudio...
 language catalog= dir:/usr/share/locale type:C lang:C cat:guvcview.mo

 (guvcview:31380): GLib-GObject-WARNING **: IA__g_object_set_valist:
 object class `GtkSettings' has no property named `gtk-button-images'
 mjpg: setting format to 1196444237
 capture method = 1
 video device: /dev/video0
 /dev/video0 - device 1
 Init. UVC Camera (1b3b:2951) (location: usb-:00:1d.1-1)
 { pixelformat = 'MJPG', description = 'MJPEG' }
 { discrete: width = 640, height = 480 }
        Time interval between frame: 1/30,
 { discrete: width = 320, height = 240 }
        Time interval between frame: 1/30,
 { discrete: width = 160, height = 120 }
        Time interval between frame: 1/30,
 checking format: 1196444237
 VIDIOC_S_FORMAT - Unable to set format: Input/output error
 Init v4L2 failed !!
 Init video returned -2
 trying minimum setup ...
 capture method = 1
 video device: /dev/video0
 /dev/video0 - device 1
 Init. UVC Camera (1b3b:2951) (location: usb-:00:1d.1-1)
 { pixelformat = 'MJPG', description = 'MJPEG' }
 { discrete: width = 640, height = 480 }
        Time interval between frame: 1/30,
 { discrete: width = 320, height = 240 }
        Time interval between frame: 1/30,
 { discrete: width = 160, height = 120 }
        Time interval between frame: 1/30,
 checking format: 1196444237
 VIDIOC_S_FORMAT - Unable to set format: Input/output error
 Init v4L2 failed !!
 ERROR: Minimum Setup Failed.
  Exiting...
 Terminated.


 On Wed, Dec 9, 2009 at 10:53 PM, Paulo Assis pj.as...@gmail.com wrote:
 Hi,
 Could you please try guvcview ( http://guvcview.berlios.de )

 Please post me the 

Re: no locking on dvb-s2 22000 2/3 8PSK transponder on Astra 19.2E with tt s2-3200

2009-12-09 Thread BOUWSMA Barry
On Wed, 9 Dec 2009, Newsy Paper wrote:

 no matter if I use Igors or Manus driver, there's no lock on 11303 h 22000 
 2/3 8psk. Other users at vdr-portal report same problem.
 
 The strange thing is that all other transponders that use 22000 2/3 8psk do 
 work but this transponder doesn't. It worked fine until december 3rd when 
 uplink moved to Vienna. I think they changed a parameter like rolloff or 
 inversion and the dvb-s2 part of stb6100 is buggy.

Oh jeez, non-wrapping mail...  Anyway, without bothering to see
what I'm replying to, here's the value I get from parsing the
NIT table today:

  Frequency: 18023029 (=  11.30275 GHz)
  Orbital_position: 402 (=  19.2)
  West_East_flag: 1 (0x01)  [= EAST]
  Polarisation: 0 (0x00)  [= linear - horizontal]
  Kind: 1 (0x01)  [= DVB-S2]
  Roll Off Faktor: 0 (0x00)  [= Alpha 0.35]
  Modulation_type: 2 (0x02)  [= 8PSK]
  Symbol_rate: 2228224 (=  22.)
  FEC_inner: 2 (0x02)  [= 2/3 conv. code rate]



Now, I get the following for a different transponder, with a
different roll-off:

  Frequency: 17920117 (=  11.17075 GHz)
  Orbital_position: 402 (=  19.2)
  West_East_flag: 1 (0x01)  [= EAST]
  Polarisation: 0 (0x00)  [= linear - horizontal]
  Kind: 1 (0x01)  [= DVB-S2]
  Roll Off Faktor: 1 (0x01)  [= Alpha 0.25]
  Modulation_type: 2 (0x02)  [= 8PSK]
  Symbol_rate: 2228224 (=  22.)
  FEC_inner: 2 (0x02)  [= 2/3 conv. code rate]


But at the same time I see the same roll-off reported on all
but the 0,25 transponder within the limited NIT table I
nabbed, regardless of 9/10 FEC or 2/3+22000.

I don't know if the above NIT data is 100% accurate, or if
it reflects a change from what it was before.  Actually, I
don't know if I'm parsing everything, because I vaguely
recall there are other selectable options on a real receiver
(which I've never had in front of me) pertaining to pilot
on or off, which apparently affect tuning ability.


barry bouwsma
--
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: MSI StarCam working in vlc only (with poor colors)

2009-12-09 Thread Paulo Assis
You must reload the driver,

rmmod uvcvideo
modprobe uvcvideo

otherwise the quirks want have any effect.

uvcvideo is now mantained in the mercurial repo at linuxtv,
installing v4l-dvb will also install uvcvideo, but if you want, just
follow the instructions on the wiki to compile, but use:
 hg clone http://linuxtv.org/hg/~pinchartl/uvcvideo/
so that you get the very latest (testing) uvc code.
In any case the quirks should be enough:
http://lists.berlios.de/pipermail/linux-uvc-devel/2009-October/005235.html

Best regards,
Paulo

2009/12/9 Jozef Riha jose1...@gmail.com:
 setting quirks to 2 unfortunately did not help. gucview's 1.2.1 output below

 [j...@darkstar ~]$ LC_ALL=C guvcview --verbose
 guvcview 1.2.1
 unexpected integer value (1) for snd_numsec
 Strings must be quoted
 video_device: /dev/video0
 vid_sleep: 0
 cap_meth: 1
 resolution: 640 x 480
 windowsize: 480 x 700
 vert pane: 0
 spin behavior: 0
 mode: mjpg
 fps: 1/25
 Display Fps: 0
 bpp: 0
 hwaccel: 1
 avi_format: 0
 sound: 1
 sound Device: 0
 sound samp rate: 0
 sound Channels: 0
 Sound delay: 0 nanosec
 Sound Format: 80
 Sound bit Rate: 160 Kbps
 Pan Step: 2 degrees
 Tilt Step: 2 degrees
 Video Filter Flags: 0
 image inc: 0
 profile(default):/home/jose/default.gpfl
 starting portaudio...
 language catalog= dir:/usr/share/locale type:C lang:C cat:guvcview.mo
 mjpg: setting format to 1196444237
 capture method = 1
 video device: /dev/video0
 /dev/video0 - device 1
 Init. UVC Camera (1b3b:2951) (location: usb-:00:1d.1-1)
 { pixelformat = 'MJPG', description = 'MJPEG' }
 { discrete: width = 640, height = 480 }
        Time interval between frame: 1/30,
 { discrete: width = 320, height = 240 }
        Time interval between frame: 1/30,
 { discrete: width = 160, height = 120 }
        Time interval between frame: 1/30,
 vid:1b3b
 pid:2951
 driver:uvcvideo
 checking format: 1196444237
 VIDIOC_S_FORMAT - Unable to set format: Input/output error
 Init v4L2 failed !!
 Init video returned -2
 trying minimum setup ...
 capture method = 1
 video device: /dev/video0
 /dev/video0 - device 1
 Init. UVC Camera (1b3b:2951) (location: usb-:00:1d.1-1)
 { pixelformat = 'MJPG', description = 'MJPEG' }
 { discrete: width = 640, height = 480 }
        Time interval between frame: 1/30,
 { discrete: width = 320, height = 240 }
        Time interval between frame: 1/30,
 { discrete: width = 160, height = 120 }
        Time interval between frame: 1/30,
 vid:1b3b
 pid:2951
 driver:uvcvideo
 checking format: 1196444237
 VIDIOC_S_FORMAT - Unable to set format: Input/output error
 Init v4L2 failed !!
 ERROR: Minimum Setup Failed.
  Exiting...
 free audio mutex
 VIDIOC_REQBUFS - Failed to delete buffers: Invalid argument (errno 22)
 closed v4l2 strutures
 free controls - vidState
 cleaned allocations - 100%
 Closing portaudio ...OK
 Terminated.

 are you sure with the web-page? i cannot see a relationship between
 dvb and uvcvideo. shouldn't i download the most recent driver from
 http://linux-uvc.berlios.de/#download ?

 thank you,

 joe

 On Wed, Dec 9, 2009 at 11:20 PM, Paulo Assis pj.as...@gmail.com wrote:
 Hi, could you try the following:

 echo 2  /sys/module/uvcvideo/parameters/quirks

 this will set uvcvideo quirks to 2

 or you can also try the latest uvcvideo:
 http://www.linuxtv.org/wiki/index.php/How_to_Obtain,_Build_and_Install_V4L-DVB_Device_Drivers

 please if you can, use the latest version for guvcview (1.2.1)  :D

 Regards,
 Paulo

 2009/12/9 Jozef Riha jose1...@gmail.com:
 [j...@darkstar ~]$ LC_ALL=C guvcview --verbose
 guvcview 1.1.4
 video_device: /dev/video0
 vid_sleep: 0
 cap_meth: 1
 resolution: 640 x 480
 windowsize: 480 x 700
 vert pane: 0
 spin behavior: 0
 mode: mjpg
 fps: 1/25
 Display Fps: 0
 bpp: 0
 hwaccel: 1
 avi_format: 0
 sound: 1
 sound Device: 0
 sound samp rate: 0
 sound Channels: 0
 Sound Block Size: 1 seconds
 Sound Format: 80
 Sound bit Rate: 160 Kbps
 Pan Step: 2 degrees
 Tilt Step: 2 degrees
 Video Filter Flags: 0
 image inc: 0
 profile(default):/home/jose/default.gpfl
 starting portaudio...
 language catalog= dir:/usr/share/locale type:C lang:C cat:guvcview.mo

 (guvcview:31380): GLib-GObject-WARNING **: IA__g_object_set_valist:
 object class `GtkSettings' has no property named `gtk-button-images'
 mjpg: setting format to 1196444237
 capture method = 1
 video device: /dev/video0
 /dev/video0 - device 1
 Init. UVC Camera (1b3b:2951) (location: usb-:00:1d.1-1)
 { pixelformat = 'MJPG', description = 'MJPEG' }
 { discrete: width = 640, height = 480 }
        Time interval between frame: 1/30,
 { discrete: width = 320, height = 240 }
        Time interval between frame: 1/30,
 { discrete: width = 160, height = 120 }
        Time interval between frame: 1/30,
 checking format: 1196444237
 VIDIOC_S_FORMAT - Unable to set format: Input/output error
 Init v4L2 failed !!
 Init video returned -2
 trying minimum setup ...
 capture method = 1
 video device: /dev/video0
 /dev/video0 - device 1
 Init. UVC Camera (1b3b:2951) 

[PATCH - v2 1/4] V4L - vpfe_capture - remove clock and ccdc resource handling

2009-12-09 Thread m-karicheri2
From: Muralidharan Karicheri m-kariche...@ti.com

This combines the two patches sent earlier to change the clock configuration
and converting ccdc drivers to platform drivers. This has updated comments
against v1 of these patches.

In this patch, the clock configuration is moved to ccdc driver since clocks
are configured for ccdc. Also adding proper error codes for ccdc register
function and removing the ccdc memory resource handling.

Reviewed-by: Vaibhav Hiremath hvaib...@ti.com
Reviewed-by: Kevin Hilman khil...@deeprootsystems.com

Signed-off-by: Muralidharan Karicheri m-kariche...@ti.com
---
Applies to linux-next of v4l-dvb
 drivers/media/video/davinci/vpfe_capture.c |  131 +++-
 1 files changed, 13 insertions(+), 118 deletions(-)

diff --git a/drivers/media/video/davinci/vpfe_capture.c 
b/drivers/media/video/davinci/vpfe_capture.c
index 12a1b3d..091750e 100644
--- a/drivers/media/video/davinci/vpfe_capture.c
+++ b/drivers/media/video/davinci/vpfe_capture.c
@@ -108,9 +108,6 @@ struct ccdc_config {
int vpfe_probed;
/* name of ccdc device */
char name[32];
-   /* for storing mem maps for CCDC */
-   int ccdc_addr_size;
-   void *__iomem ccdc_addr;
 };
 
 /* data structures */
@@ -230,7 +227,6 @@ int vpfe_register_ccdc_device(struct ccdc_hw_device *dev)
BUG_ON(!dev-hw_ops.set_image_window);
BUG_ON(!dev-hw_ops.get_image_window);
BUG_ON(!dev-hw_ops.get_line_length);
-   BUG_ON(!dev-hw_ops.setfbaddr);
BUG_ON(!dev-hw_ops.getfid);
 
mutex_lock(ccdc_lock);
@@ -241,25 +237,23 @@ int vpfe_register_ccdc_device(struct ccdc_hw_device *dev)
 * walk through it during vpfe probe
 */
printk(KERN_ERR vpfe capture not initialized\n);
-   ret = -1;
+   ret = -EFAULT;
goto unlock;
}
 
if (strcmp(dev-name, ccdc_cfg-name)) {
/* ignore this ccdc */
-   ret = -1;
+   ret = -EINVAL;
goto unlock;
}
 
if (ccdc_dev) {
printk(KERN_ERR ccdc already registered\n);
-   ret = -1;
+   ret = -EINVAL;
goto unlock;
}
 
ccdc_dev = dev;
-   dev-hw_ops.set_ccdc_base(ccdc_cfg-ccdc_addr,
- ccdc_cfg-ccdc_addr_size);
 unlock:
mutex_unlock(ccdc_lock);
return ret;
@@ -1787,61 +1781,6 @@ static struct vpfe_device *vpfe_initialize(void)
return vpfe_dev;
 }
 
-static void vpfe_disable_clock(struct vpfe_device *vpfe_dev)
-{
-   struct vpfe_config *vpfe_cfg = vpfe_dev-cfg;
-
-   clk_disable(vpfe_cfg-vpssclk);
-   clk_put(vpfe_cfg-vpssclk);
-   clk_disable(vpfe_cfg-slaveclk);
-   clk_put(vpfe_cfg-slaveclk);
-   v4l2_info(vpfe_dev-pdev-driver,
-vpfe vpss master  slave clocks disabled\n);
-}
-
-static int vpfe_enable_clock(struct vpfe_device *vpfe_dev)
-{
-   struct vpfe_config *vpfe_cfg = vpfe_dev-cfg;
-   int ret = -ENOENT;
-
-   vpfe_cfg-vpssclk = clk_get(vpfe_dev-pdev, vpss_master);
-   if (NULL == vpfe_cfg-vpssclk) {
-   v4l2_err(vpfe_dev-pdev-driver, No clock defined for
-vpss_master\n);
-   return ret;
-   }
-
-   if (clk_enable(vpfe_cfg-vpssclk)) {
-   v4l2_err(vpfe_dev-pdev-driver,
-   vpfe vpss master clock not enabled\n);
-   goto out;
-   }
-   v4l2_info(vpfe_dev-pdev-driver,
-vpfe vpss master clock enabled\n);
-
-   vpfe_cfg-slaveclk = clk_get(vpfe_dev-pdev, vpss_slave);
-   if (NULL == vpfe_cfg-slaveclk) {
-   v4l2_err(vpfe_dev-pdev-driver,
-   No clock defined for vpss slave\n);
-   goto out;
-   }
-
-   if (clk_enable(vpfe_cfg-slaveclk)) {
-   v4l2_err(vpfe_dev-pdev-driver,
-vpfe vpss slave clock not enabled\n);
-   goto out;
-   }
-   v4l2_info(vpfe_dev-pdev-driver, vpfe vpss slave clock enabled\n);
-   return 0;
-out:
-   if (vpfe_cfg-vpssclk)
-   clk_put(vpfe_cfg-vpssclk);
-   if (vpfe_cfg-slaveclk)
-   clk_put(vpfe_cfg-slaveclk);
-
-   return -1;
-}
-
 /*
  * vpfe_probe : This function creates device entries by register
  * itself to the V4L2 driver and initializes fields of each
@@ -1871,7 +1810,7 @@ static __init int vpfe_probe(struct platform_device *pdev)
 
if (NULL == pdev-dev.platform_data) {
v4l2_err(pdev-dev.driver, Unable to get vpfe config\n);
-   ret = -ENOENT;
+   ret = -ENODEV;
goto probe_free_dev_mem;
}
 
@@ -1885,18 +1824,13 @@ static __init int vpfe_probe(struct platform_device 
*pdev)
goto probe_free_dev_mem;
}
 
-   /* enable vpss clocks */
-   ret = vpfe_enable_clock(vpfe_dev);
-

[PATCH - v2 4/4] DaVinci - vpfe capture converting ccdc drivers to platform driver

2009-12-09 Thread m-karicheri2
From: Muralidharan Karicheri m-kariche...@ti.com

This combines the two patches sent earlier to change the clock configuration
and converting ccdc drivers to platform drivers. This has updated comments
against v1 of these patches. Two new clocks are defined for ccdc driver
as per comments from Kevin Hilman.

This adds platform code for ccdc driver on DM355 and DM6446.

Reviewed-by: Vaibhav Hiremath hvaib...@ti.com
Reviewed-by: Kevin Hilman khil...@deeprootsystems.com

Signed-off-by: Muralidharan Karicheri m-kariche...@ti.com
---
Applies to linux-davinci tree
 arch/arm/mach-davinci/dm355.c  |   51 ++-
 arch/arm/mach-davinci/dm644x.c |   30 ++-
 2 files changed, 68 insertions(+), 13 deletions(-)

diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c
index 2244e8c..3cfa709 100644
--- a/arch/arm/mach-davinci/dm355.c
+++ b/arch/arm/mach-davinci/dm355.c
@@ -335,6 +335,16 @@ static struct clk usb_clk = {
.lpsc = DAVINCI_LPSC_USB,
 };
 
+static struct clk ccdc_master_clk = {
+   .name   = dm355_ccdc,
+   .parent = vpss_master_clk,
+};
+
+static struct clk ccdc_slave_clk = {
+   .name   = dm355_ccdc,
+   .parent = vpss_slave_clk,
+};
+
 static struct davinci_clk dm355_clks[] = {
CLK(NULL, ref, ref_clk),
CLK(NULL, pll1, pll1_clk),
@@ -378,6 +388,8 @@ static struct davinci_clk dm355_clks[] = {
CLK(NULL, timer3, timer3_clk),
CLK(NULL, rto, rto_clk),
CLK(NULL, usb, usb_clk),
+   CLK(dm355_ccdc, master, ccdc_master_clk),
+   CLK(dm355_ccdc, slave, ccdc_slave_clk),
CLK(NULL, NULL, NULL),
 };
 
@@ -665,6 +677,17 @@ static struct platform_device dm355_asp1_device = {
.resource   = dm355_asp1_resources,
 };
 
+static void dm355_ccdc_setup_pinmux(void)
+{
+   davinci_cfg_reg(DM355_VIN_PCLK);
+   davinci_cfg_reg(DM355_VIN_CAM_WEN);
+   davinci_cfg_reg(DM355_VIN_CAM_VD);
+   davinci_cfg_reg(DM355_VIN_CAM_HD);
+   davinci_cfg_reg(DM355_VIN_YIN_EN);
+   davinci_cfg_reg(DM355_VIN_CINL_EN);
+   davinci_cfg_reg(DM355_VIN_CINH_EN);
+}
+
 static struct resource dm355_vpss_resources[] = {
{
/* VPSS BL Base address */
@@ -701,6 +724,10 @@ static struct resource vpfe_resources[] = {
.end= IRQ_VDINT1,
.flags  = IORESOURCE_IRQ,
},
+};
+
+static u64 vpfe_capture_dma_mask = DMA_BIT_MASK(32);
+static struct resource dm355_ccdc_resource[] = {
/* CCDC Base address */
{
.flags  = IORESOURCE_MEM,
@@ -708,8 +735,18 @@ static struct resource vpfe_resources[] = {
.end= 0x01c70600 + 0x1ff,
},
 };
+static struct platform_device dm355_ccdc_dev = {
+   .name   = dm355_ccdc,
+   .id = -1,
+   .num_resources  = ARRAY_SIZE(dm355_ccdc_resource),
+   .resource   = dm355_ccdc_resource,
+   .dev = {
+   .dma_mask   = vpfe_capture_dma_mask,
+   .coherent_dma_mask  = DMA_BIT_MASK(32),
+   .platform_data  = dm355_ccdc_setup_pinmux,
+   },
+};
 
-static u64 vpfe_capture_dma_mask = DMA_BIT_MASK(32);
 static struct platform_device vpfe_capture_dev = {
.name   = CAPTURE_DRV_NAME,
.id = -1,
@@ -860,17 +897,7 @@ static int __init dm355_init_devices(void)
davinci_cfg_reg(DM355_INT_EDMA_CC);
platform_device_register(dm355_edma_device);
platform_device_register(dm355_vpss_device);
-   /*
-* setup Mux configuration for vpfe input and register
-* vpfe capture platform device
-*/
-   davinci_cfg_reg(DM355_VIN_PCLK);
-   davinci_cfg_reg(DM355_VIN_CAM_WEN);
-   davinci_cfg_reg(DM355_VIN_CAM_VD);
-   davinci_cfg_reg(DM355_VIN_CAM_HD);
-   davinci_cfg_reg(DM355_VIN_YIN_EN);
-   davinci_cfg_reg(DM355_VIN_CINL_EN);
-   davinci_cfg_reg(DM355_VIN_CINH_EN);
+   platform_device_register(dm355_ccdc_dev);
platform_device_register(vpfe_capture_dev);
 
return 0;
diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c
index e65e29e..ca0843a 100644
--- a/arch/arm/mach-davinci/dm644x.c
+++ b/arch/arm/mach-davinci/dm644x.c
@@ -277,6 +277,16 @@ static struct clk timer2_clk = {
.usecount = ATOMIC_INIT(1), /* REVISIT: why cant' this be disabled? */
 };
 
+static struct clk ccdc_master_clk = {
+   .name   = dm644x_ccdc,
+   .parent = vpss_master_clk,
+};
+
+static struct clk ccdc_slave_clk = {
+   .name   = dm644x_ccdc,
+   .parent = vpss_slave_clk,
+};
+
 struct davinci_clk dm644x_clks[] = {
CLK(NULL, ref, ref_clk),
CLK(NULL, pll1, pll1_clk),
@@ -315,6 +325,8 @@ struct davinci_clk dm644x_clks[] = {
CLK(NULL, timer0, timer0_clk),
CLK(NULL, timer1, timer1_clk),
   

[PATCH - v2 2/4] V4L - vpfe capture - convert dm355 ccdc module to platform driver

2009-12-09 Thread m-karicheri2
From: Muralidharan Karicheri m-kariche...@ti.com

Updated based on Kevin's comments on clock configuration.
The ccdc now uses a generic name for clocks. Master and slave. On individual 
platforms
these clocks will inherit from the platform specific clock. This will allow 
re-use of
the driver for the same IP across different SoCs.

Following are the changes done:-
1) clocks are configured using generic clock names
2) converting the driver to a platform driver
3) cleanup - consolidate all static variables inside a structure, 
ccdc_cfg

Reviewed-by: Kevin Hilman khil...@deeprootsystems.com
Reviewed-by: Vaibhav Hiremath hvaib...@ti.com
Signed-off-by: Muralidharan Karicheri m-kariche...@ti.com
---
Applies to linux-next branch of v4l-dvb
 drivers/media/video/davinci/dm355_ccdc.c |  409 +++---
 1 files changed, 256 insertions(+), 153 deletions(-)

diff --git a/drivers/media/video/davinci/dm355_ccdc.c 
b/drivers/media/video/davinci/dm355_ccdc.c
index 56fbefe..342ff5f 100644
--- a/drivers/media/video/davinci/dm355_ccdc.c
+++ b/drivers/media/video/davinci/dm355_ccdc.c
@@ -37,8 +37,11 @@
 #include linux/platform_device.h
 #include linux/uaccess.h
 #include linux/videodev2.h
+#include linux/clk.h
+
 #include media/davinci/dm355_ccdc.h
 #include media/davinci/vpss.h
+
 #include dm355_ccdc_regs.h
 #include ccdc_hw_device.h
 
@@ -46,67 +49,75 @@ MODULE_LICENSE(GPL);
 MODULE_DESCRIPTION(CCDC Driver for DM355);
 MODULE_AUTHOR(Texas Instruments);
 
-static struct device *dev;
-
-/* Object for CCDC raw mode */
-static struct ccdc_params_raw ccdc_hw_params_raw = {
-   .pix_fmt = CCDC_PIXFMT_RAW,
-   .frm_fmt = CCDC_FRMFMT_PROGRESSIVE,
-   .win = CCDC_WIN_VGA,
-   .fid_pol = VPFE_PINPOL_POSITIVE,
-   .vd_pol = VPFE_PINPOL_POSITIVE,
-   .hd_pol = VPFE_PINPOL_POSITIVE,
-   .gain = {
-   .r_ye = 256,
-   .gb_g = 256,
-   .gr_cy = 256,
-   .b_mg = 256
-   },
-   .config_params = {
-   .datasft = 2,
-   .data_sz = CCDC_DATA_10BITS,
-   .mfilt1 = CCDC_NO_MEDIAN_FILTER1,
-   .mfilt2 = CCDC_NO_MEDIAN_FILTER2,
-   .alaw = {
-   .gama_wd = 2,
+static struct ccdc_oper_config {
+   struct device *dev;
+   /* CCDC interface type */
+   enum vpfe_hw_if_type if_type;
+   /* Raw Bayer configuration */
+   struct ccdc_params_raw bayer;
+   /* YCbCr configuration */
+   struct ccdc_params_ycbcr ycbcr;
+   /* Master clock */
+   struct clk *mclk;
+   /* slave clock */
+   struct clk *sclk;
+   /* ccdc base address */
+   void __iomem *base_addr;
+} ccdc_cfg = {
+   /* Raw configurations */
+   .bayer = {
+   .pix_fmt = CCDC_PIXFMT_RAW,
+   .frm_fmt = CCDC_FRMFMT_PROGRESSIVE,
+   .win = CCDC_WIN_VGA,
+   .fid_pol = VPFE_PINPOL_POSITIVE,
+   .vd_pol = VPFE_PINPOL_POSITIVE,
+   .hd_pol = VPFE_PINPOL_POSITIVE,
+   .gain = {
+   .r_ye = 256,
+   .gb_g = 256,
+   .gr_cy = 256,
+   .b_mg = 256
},
-   .blk_clamp = {
-   .sample_pixel = 1,
-   .dc_sub = 25
-   },
-   .col_pat_field0 = {
-   .olop = CCDC_GREEN_BLUE,
-   .olep = CCDC_BLUE,
-   .elop = CCDC_RED,
-   .elep = CCDC_GREEN_RED
-   },
-   .col_pat_field1 = {
-   .olop = CCDC_GREEN_BLUE,
-   .olep = CCDC_BLUE,
-   .elop = CCDC_RED,
-   .elep = CCDC_GREEN_RED
+   .config_params = {
+   .datasft = 2,
+   .mfilt1 = CCDC_NO_MEDIAN_FILTER1,
+   .mfilt2 = CCDC_NO_MEDIAN_FILTER2,
+   .alaw = {
+   .gama_wd = 2,
+   },
+   .blk_clamp = {
+   .sample_pixel = 1,
+   .dc_sub = 25
+   },
+   .col_pat_field0 = {
+   .olop = CCDC_GREEN_BLUE,
+   .olep = CCDC_BLUE,
+   .elop = CCDC_RED,
+   .elep = CCDC_GREEN_RED
+   },
+   .col_pat_field1 = {
+   .olop = CCDC_GREEN_BLUE,
+   .olep = CCDC_BLUE,
+   .elop = CCDC_RED,
+   .elep = CCDC_GREEN_RED
+   },
},
},
+   /* YCbCr configuration */
+   .ycbcr = {
+   .win = CCDC_WIN_PAL,
+   

Re: New DVB-Statistics API

2009-12-09 Thread Mauro Carvalho Chehab
Julian Scheel wrote:
 Am 09.12.09 14:02, schrieb Mauro Carvalho Chehab:
 Manu Abraham wrote:

 I don't think you can just take the average IPC rates into account for
 this. When doing a syscall the processors TLB cache will be cleared,
 which will force the CPU to go to the whole instruction pipeline before
 the first syscall instruction is actually executed. This will introduce
 a delay for each syscall you make. I'm not exactly sure about the length
 of the delay, but I think it should be something like 2 clock cycles.

True, but this delay is common to both S2API and struct.

 To get all data that the ioctl approach struct has, the delay for
 S2API will be equal.
 To get less data, S2API will have a small delay.

 Imho the S2API would be slower when reading all data the ioctl fetches,
 due to the way the instructions would be handled.
 
 Correct me, if I'm wrong with any of this.

Not sure if I understood your question.

On both cases, just one function call will go to the driver, with one struct
(struct fe, the case of S2API) or two structs (struct fe and the
stats-specific struct(s)) in the case of a new ioctl(s).

As drivers are free to implement any logic, the driver can implement exactly
the same logic with both API calls. So, the delay to get the info will be
equal on both cases.

In a practical case, this will take at least a few milisseconds to retrieve all
data. It may take even more, since, on some drivers, you may need to wait for
some condition to happen before start measuring, in order to be sure that you'll
be getting atomic and accurate values.

After the function return, with an struct, you can just return, while, with 
S2API,
you'll need to put the data into the proper payload fields, but this will add
a delay in the order of nanoseconds.

Let's say that, to get all data, the routine needs 10 milisseconds.

The difference between new ioctl or S2API will be of about 0,00063 milliseconds
on a Pentium MMX. On a machine with 1GHz of clock, 2 IPC, the difference will
be 0,315 milliseconds.

Considering that the Linux kernel is preemptive, and an interrupt or the 
scheduler
could be called during the 10 milliseconds time, I doubt you'll be able to
notice that difference on any practical use case.

On the other hand, if you need for example just the strength of the signal at 
the AGC,
if you call via struct, you'll still be consuming the same 10 ms, while, with 
S2API,
you can do it, let's say, on 1 ms (the real numbers will depend, of course, on 
how
much I/O is needed on hardware, and on how many time do you need to wait there 
to 
get an stable value).

So, if you want to do things like moving a rotor, S2API will give better 
results.
If you want all stats, it will give the same result as a new ioctl.

While I don't think that 0,315 milliseconds is worth enough to cause any 
troubles,
With a simple change like the one bellow, this time can be reduced to 0,105 
milisseconds
with a patch like that (the patch were simplified to change just quality, but, 
of course,
such approach needs to be done on the other fields to get this result):


Index: master/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
===
--- master.orig/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ master/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -1220,6 +1220,7 @@ static int dtv_property_prepare_get_stat
switch (tvp-cmd) {
case DTV_FE_QUALITY:
fe-dtv_property_cache.need_stats |= FE_NEED_QUALITY;
+   fe-dtv_property_cache.quality = tvp-u.data;
break;
case DTV_FE_QUALITY_UNIT:
fe-dtv_property_cache.need_stats |= FE_NEED_QUALITY_UNIT;
@@ -1384,9 +1385,6 @@ static int dtv_property_process_get(stru
break;

/* Quality measures */
-   case DTV_FE_QUALITY:
-   tvp-u.data = fe-dtv_property_cache.quality;
-   break;
case DTV_FE_QUALITY_UNIT:
tvp-u.data = fe-dtv_property_cache.quality_unit;
break;
@@ -1696,10 +1697,12 @@ static int dvb_frontend_ioctl_properties
}
}
 
-   for (i = 0; i  tvps-num; i++) {
-   (tvp + i)-result = dtv_property_process_get(fe,
-   tvp + i, inode, file, need_get_ops);
-   err |= (tvp + i)-result;
+   if (need_get_ops) {
+   for (i = 0; i  tvps-num; i++) {
+   (tvp + i)-result = dtv_property_process_get(fe,
+   tvp + i, inode, file, 
need_get_ops);
+   err |= (tvp + i)-result;
+   }
}
 
if (copy_to_user(tvps-props, tvp, tvps-num * sizeof(struct 
dtv_property))) {
Index: master/linux/drivers/media/dvb/dvb-core/dvb_frontend.h

Re: IR Receiver on an Tevii S470

2009-12-09 Thread Andy Walls
On Wed, 2009-12-09 at 17:54 +0200, Igor M. Liplianin wrote:
Igor and Matthias,
   
Please try the changes that I have for the TeVii S470 that are here:
   
http://linuxtv.org/hg/~awalls/cx23885-ir
   


 In fact some time ago I was writing some code for cx23885 IR, but not reached 
 IR interrupts to 
 work. Though I used PCI_MSK_AV_CORE (1  27), then test register PIN_CTRL 
 for field 
 FLD_IR_IRQ_STAT.

Igor,

You are exactly right on this.  I used the wrong interrupt status flag.
I have pushed a patch to my repository to use the PCI_MSK_AV_CORE status
flag.

Could you please update an test the TeVii S470 again when you have time?


 I have Compro E650F with RC6 remote, also have RC5 remote from TV set.
 I will made little hack to test Compro  RC5.

OK. Thank you.

Regards,
Andy

--
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] uvcvideo: add another YUYV format GUID

2009-12-09 Thread Laurent Pinchart
Hi Daniel,

On Friday 04 December 2009 03:05:37 Daniel Ritz wrote:
 Hi Laurent
 
 On Thu, 2009-12-03 at 21:15 +0100, Laurent Pinchart wrote:
  Hi Daniel,
 
  On Wednesday 02 December 2009 00:48:44 Daniel Ritz wrote:
   For some unknown reason, on a MacBookPro5,3 the iSight
 
  Could you please send me the output of lsusb -v both with the correct and
  wrong GUID ?
 
 sure. i attached three files:
   isight-good.txt, isight-bad.txt, isight-good2.txt
 
 this is three reboots in a row from like 10 minutes ago. the first
 boot into linux was actually rebooting from OSX...first cold boot
 today directly into linux had the right GUID.

Thanks. diff'ing the descriptors shows something interesting (from good to 
good2):

@@ -264,7 +264,7 @@
 dwMaxVideoFrameBufferSize  614400
 dwDefaultFrameInterval 33
 bFrameIntervalType 11
-dwFrameInterval( 0) 3758429717
+dwFrameInterval( 0)33
 dwFrameInterval( 1)363636
 dwFrameInterval( 2)40
 dwFrameInterval( 3)44

3758429717 is 0xe0051615 in hex, and 33 is 0x00051615.

I wonder what other parts of the descriptors could get corrupted that way.

   _sometimes_ report a different video format GUID.
 
  Sometimes only ? Now that's weird. Is that completely random ?
 
 yes, sometimes only. it seems to be related to reboots, but i don't
 know what exactly triggers it. rmmod/modprobe doesn't trigger it.
 also, when the wrong GUID is reported, the only way of fixing it is
 to reboot. it really is just the GUID. even when the wrong one is
 reported, the device works just fine.
 
 i started with a plain ubuntu 9.10, kernel 2.6.31 which was supposed
 to fail, so i upgraded to a 2.6.32-rc8 to fix the iSight and some other
 things, just to see it fail again. a reboot later and it worked, some
 time and reboot later it failed again...

All of those are warm reboots, and you don't boot any alternative OS in-
between, right ?

Does Linux reload the iSight firmware at every boot ? If it does, could you 
try to reload the firmware manually when you get a bad GUID to see if it 
helps ? You will probably need to unload the uvcvideo driver before reloading 
the firmware.

-- 
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 5/12] drivers/media/video/uvc: Correct size given to memset

2009-12-09 Thread Laurent Pinchart
Hi Julia,

thanks for the patch.

On Wednesday 09 December 2009 20:23:49 Julia Lawall wrote:
 From: Julia Lawall ju...@diku.dk
 
 Memset should be given the size of the structure, not the size of the
  pointer.
 
 The semantic patch that makes this change is as follows:
 (http://coccinelle.lip6.fr/)
 
 // smpl
 @@
 type T;
 T *x;
 expression E;
 @@
 
 memset(x, E, sizeof(
 + *
  x))
 // /smpl
 
 Signed-off-by: Julia Lawall ju...@diku.dk

Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com

-- 
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: [GIT PULL for 2.6.33] V4L/DVB updates

2009-12-09 Thread Ingo Molnar

Hi,

FYI, there's a new build failure on 32-bit x86 caused by the new max2165 
tuner driver:

drivers/built-in.o: In function `max2165_set_params':
max2165.c:(.text+0x486293): undefined reference to `__floatunsidf'
max2165.c:(.text+0x4862bc): undefined reference to `__floatunsidf'
max2165.c:(.text+0x4862c5): undefined reference to `__adddf3'
max2165.c:(.text+0x4862cf): undefined reference to `__fixunsdfsi'

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


Re: [GIT PULL for 2.6.33] V4L/DVB updates

2009-12-09 Thread David T. L. Wong

Ingo Molnar wrote:

Hi,

FYI, there's a new build failure on 32-bit x86 caused by the new max2165 
tuner driver:


drivers/built-in.o: In function `max2165_set_params':
max2165.c:(.text+0x486293): undefined reference to `__floatunsidf'
max2165.c:(.text+0x4862bc): undefined reference to `__floatunsidf'
max2165.c:(.text+0x4862c5): undefined reference to `__adddf3'
max2165.c:(.text+0x4862cf): undefined reference to `__fixunsdfsi'

Ingo



A patch is already submitted to v4l mailing list:
http://patchwork.kernel.org/patch/64538/

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


Re: [GIT PULL for 2.6.33] V4L/DVB updates

2009-12-09 Thread Ingo Molnar

* David T. L. Wong davidtlw...@gmail.com wrote:

 Ingo Molnar wrote:
 Hi,
 
 FYI, there's a new build failure on 32-bit x86 caused by the new
 max2165 tuner driver:
 
 drivers/built-in.o: In function `max2165_set_params':
 max2165.c:(.text+0x486293): undefined reference to `__floatunsidf'
 max2165.c:(.text+0x4862bc): undefined reference to `__floatunsidf'
 max2165.c:(.text+0x4862c5): undefined reference to `__adddf3'
 max2165.c:(.text+0x4862cf): undefined reference to `__fixunsdfsi'
 
  Ingo
 
 
 A patch is already submitted to v4l mailing list:
 http://patchwork.kernel.org/patch/64538/

That patch you posted a week ago solves the build problem, thanks.

Ingo
--
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