Re: [PATCH] tm6000: rewrite copy_streams

2010-05-28 Thread George Tellalov
On Fri, May 28, 2010 at 08:03:40PM +0200, stefan.rin...@arcor.de wrote:
 From: Stefan Ringel stefan.rin...@arcor.de
 
 fusion function copy streams and copy_packets to new function copy_streams.
 
 Signed-off-by: Stefan Ringel stefan.rin...@arcor.de
 ---
  drivers/staging/tm6000/tm6000-usb-isoc.h |5 +-
  drivers/staging/tm6000/tm6000-video.c|  329 
 +++---
  2 files changed, 119 insertions(+), 215 deletions(-)
 
 diff --git a/drivers/staging/tm6000/tm6000-usb-isoc.h 
 b/drivers/staging/tm6000/tm6000-usb-isoc.h
 index 5a5049a..138716a 100644
 --- a/drivers/staging/tm6000/tm6000-usb-isoc.h
 +++ b/drivers/staging/tm6000/tm6000-usb-isoc.h
 @@ -39,7 +39,7 @@ struct usb_isoc_ctl {
   int pos, size, pktsize;
  
   /* Last field: ODD or EVEN? */
 - int field;
 + int vfield;
  
   /* Stores incomplete commands */
   u32 tmp_buf;
 @@ -47,7 +47,4 @@ struct usb_isoc_ctl {
  
   /* Stores already requested buffers */
   struct tm6000_buffer*buf;
 -
 - /* Stores the number of received fields */
 - int nfields;
  };
 diff --git a/drivers/staging/tm6000/tm6000-video.c 
 b/drivers/staging/tm6000/tm6000-video.c
 index 2a61cc3..058c6e9 100644
 --- a/drivers/staging/tm6000/tm6000-video.c
 +++ b/drivers/staging/tm6000/tm6000-video.c
 @@ -186,234 +186,145 @@ const char *tm6000_msg_type[] = {
  /*
   * Identify the tm5600/6000 buffer header type and properly handles
   */
 -static int copy_packet(struct urb *urb, u32 header, u8 **ptr, u8 *endp,
 - u8 *out_p, struct tm6000_buffer **buf)
 -{
 - struct tm6000_dmaqueue  *dma_q = urb-context;
 - struct tm6000_core *dev = container_of(dma_q, struct tm6000_core, vidq);
 - u8 c;
 - unsigned int cmd, cpysize, pktsize, size, field, block, line, pos = 0;
 - int rc = 0;
 - /* FIXME: move to tm6000-isoc */
 - static int last_line = -2, start_line = -2, last_field = -2;
 -
 - /* FIXME: this is the hardcoded window size
 -  */
 - unsigned int linewidth = (*buf)-vb.width  1;
 -
 - if (!dev-isoc_ctl.cmd) {
 - c = (header  24)  0xff;
 -
 - /* split the header fields */
 - size  = ((header  0x7e)  1);
 -
 - if (size  0)
 - size -= 4;
 -
 - block = (header  7)  0xf;
 - field = (header  11)  0x1;
 - line  = (header  12)  0x1ff;
 - cmd   = (header  21)  0x7;
 -
 - /* Validates header fields */
 - if(size  TM6000_URB_MSG_LEN)
 - size = TM6000_URB_MSG_LEN;
 -
 - if (cmd == TM6000_URB_MSG_VIDEO) {
 - if ((block+1)*TM6000_URB_MSG_LENlinewidth)
 - cmd = TM6000_URB_MSG_ERR;
 -
 - /* FIXME: Mounts the image as field0+field1
 -  * It should, instead, check if the user selected
 -  * entrelaced or non-entrelaced mode
 -  */
 - pos= ((line1)+field)*linewidth +
 - block*TM6000_URB_MSG_LEN;
 -
 - /* Don't allow to write out of the buffer */
 - if (pos+TM6000_URB_MSG_LEN  (*buf)-vb.size) {
 - dprintk(dev, V4L2_DEBUG_ISOC,
 - ERR: size=%d, num=%d, line=%d, 
 - field=%d\n,
 - size, block, line, field);
 -
 - cmd = TM6000_URB_MSG_ERR;
 - }
 - } else {
 - pos=0;
 - }
 -
 - /* Prints debug info */
 - dprintk(dev, V4L2_DEBUG_ISOC, size=%d, num=%d, 
 -  line=%d, field=%d\n,
 - size, block, line, field);
 -
 - if ((last_line!=line)(last_line+1!=line) 
 - (cmd != TM6000_URB_MSG_ERR) )  {
 - if (cmd != TM6000_URB_MSG_VIDEO)  {
 - dprintk(dev, V4L2_DEBUG_ISOC,  cmd=%d, 
 - size=%d, num=%d, line=%d, field=%d\n,
 - cmd, size, block, line, field);
 - }
 - if (start_line0)
 - start_line=last_line;
 - /* Prints debug info */
 - dprintk(dev, V4L2_DEBUG_ISOC, lines= %d-%d, 
 - field=%d\n,
 - start_line, last_line, field);
 -
 - if ((start_line6  last_line200) 
 - (last_field != field) ) {
 -
 - dev-isoc_ctl.nfields++;
 -  

Re: tm6000: Patch that will fixed analog video (tested on tm5600)

2010-04-22 Thread George Tellalov
On Thu, Apr 22, 2010 at 01:14:39PM +0800, Bee Hock Goh wrote:
 Dear all,
 
 Anyone who have a tm6000 compatible analog device, please do try out this 
 patch.
 
 Its working for me on a tm5600 using mplayer. It can be compile
 against the latest hg tree.
 

Here's what I get using mplayer:

tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
BUG: unable to handle kernel paging request at 00800200
IP: [a0340b48] tm6000_irq_callback+0x32a/0x886 [tm6000]
PGD 5de26067 PUD 5d50d067 PMD 0
Oops: 0002 [#1] SMP
last sysfs file: /sys/devices/platform/abituguru.224/temp3_input
CPU 0
Pid: 0, comm: swapper Tainted: G C 2.6.33 #1 AV8 (VIA K8T800P-8237)/
RIP: 0010:[a0340b48]  [a0340b48] 
tm6000_irq_callback+0x32a/0x886 [tm6000]
RSP: 0018:880001803cc8  EFLAGS: 00010006
RAX: 0004 RBX: 8800425df800 RCX: 0003
RDX: 8800425df800 RSI: 880042612c00 RDI: 00800200
RBP: 8800425df800 R08:  R09: 0002
R10: 8800425df800 R11: 814af69b R12: 8800425dfe9c
R13: 880042612c00 R14: 00b4 R15: 00b4
FS:  459cb950() GS:88000180() knlGS:
CS:  0010 DS:  ES:  CR0: 8005003b
CR2: 00800200 CR3: 5d548000 CR4: 06f0
DR0:  DR1:  DR2: 
DR3:  DR6: 0ff0 DR7: 0400
Process swapper (pid: 0, threadinfo 8160, task 81648020)
Stack:
 81248064 88005f911000 88005d683750 
0 880001803d80 000ca800 880042612ffd 88020001
0 8123420d 5593 d392d818d757d33e 00040003
Call Trace:
 IRQ
 [81248064] ? tcp_v4_do_rcv+0x19b/0x346
 [8123420d] ? __inet_lookup_established+0x43/0x245
 [a0055f65] ? usb_hcd_giveback_urb+0x76/0xa9 [usbcore]
 [a0103a54] ? ehci_urb_done+0x6b/0x7b [ehci_hcd]
 [a0105dfb] ? ehci_work+0x3ec/0x78d [ehci_hcd]
 [a0108f89] ? ehci_irq+0x18f/0x1ba [ehci_hcd]
 [a0055819] ? usb_hcd_irq+0x39/0x7e [usbcore]
 [8107b853] ? handle_IRQ_event+0x58/0x126
 [8107d0e7] ? handle_fasteoi_irq+0x78/0xaf
 [81005664] ? handle_irq+0x17/0x1f
 [81004cb6] ? do_IRQ+0x57/0xbd
 [812b2353] ? ret_from_intr+0x0/0x11
 EOI
 [8101d534] ? native_safe_halt+0x2/0x3
 [8100a0bd] ? default_idle+0x34/0x51
 [81001d9e] ? cpu_idle+0xa2/0xda
 [816b6140] ? early_idt_handler+0x0/0x71
 [816b6cc4] ? start_kernel+0x3e5/0x3f1
 [816b6396] ? x86_64_start_kernel+0xf9/0x106
Code: b8 04 00 00 00 f3 a4 4c 89 ee 48 8b 94 24 98 00 00 00 b1 04 2b 8a a0 06 
00 00 8b ba 9c 06 00 00 48 03 bc 24 b8 00 00 00 48 63 c9 f3 a4 2b 82 a0 06 00 
00 48 98 49 01 c5 eb 63 41 80 7d 03 47 74
RIP  [a0340b48] tm6000_irq_callback+0x32a/0x886 [tm6000]
 RSP 880001803cc8
CR2: 00800200
---[ end trace e0d33b74978ba13e ]---
Kernel panic - not syncing: Fatal exception in interrupt
Pid: 0, comm: swapper Tainted: G  D  C 2.6.33 #1
Call Trace:
 IRQ  [812b00fd] ? panic+0x86/0x14b
 [81069f6b] ? crash_kexec+0xf8/0x101
 [8105259a] ? up+0xe/0x37
 [81037466] ? kmsg_dump+0xa6/0x13e
 [81006635] ? oops_end+0xa6/0xb3
 [8101fcec] ? no_context+0x1f2/0x201
 [8101fea8] ? __bad_area_nosemaphore+0x1ad/0x1d1
 [a0335209] ? tcp_packet+0xc56/0xc99 [nf_conntrack]
 [812627bb] ? bictcp_cong_avoid+0x12/0x247
 [a005710e] ? usb_hcd_submit_urb+0x7f5/0x8eb [usbcore]
 [812b25c5] ? page_fault+0x25/0x30
 [a0340b48] ? tm6000_irq_callback+0x32a/0x886 [tm6000]
 [a0340939] ? tm6000_irq_callback+0x11b/0x886 [tm6000]
 [81248064] ? tcp_v4_do_rcv+0x19b/0x346
 [8123420d] ? __inet_lookup_established+0x43/0x245
 [a0055f65] ? usb_hcd_giveback_urb+0x76/0xa9 [usbcore]
 [a0103a54] ? ehci_urb_done+0x6b/0x7b [ehci_hcd]
 [a0105dfb] ? ehci_work+0x3ec/0x78d [ehci_hcd]
 [a0108f89] ? ehci_irq+0x18f/0x1ba [ehci_hcd]
 [a0055819] ? 

Re: tm6000: Patch that will fixed analog video (tested on tm5600)

2010-04-22 Thread George Tellalov
On Fri, Apr 23, 2010 at 10:05:25AM +0800, Bee Hock Goh wrote:
 George,
 
 Which device are you using?
 

A Hauppauge HVR-900H (usb id 2040:6600).
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Hauppauge WinTV HVR-900H

2010-03-30 Thread George Tellalov
On Mon, Mar 29, 2010 at 08:06:40PM +0200, Stefan Ringel wrote:
  
 Can you scan a cannel list? If yes, then have you the right audio and video 
 setting in vlc? And if you use Kaffeine? The log looks ok, dvb signal has it, 
 streams and feed is on. 
 

For some reason I can't get the dvbscan tool and the vlc to work. However
kaffeine works just fine - it performed the scan and played the channels, so I
can confirm now that dvb works.

Now back to analog. Is there anything I can do to help debugging the oops?
--
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: Re: Re: Hauppauge WinTV HVR-900H

2010-03-29 Thread George Tellalov
  No,  say works, if dvb work. Not more.

DVB doesn't work. Well it sort of works, but without image. Using vlc I was
able to get the channel list and change channels, but no picture or sound is
produced. Teletext presence is detected as well. Debug attached.

PS. Sorry for the wrong thread reply, I didn't get some messages.


tm6000_dvb.gz
Description: Binary data


Hauppauge WinTV HVR-900H

2010-03-28 Thread George Tellalov
Hello linux-media,

I've recently bought an HVR-900H usb hybrid tuner (marketed as 900-without-h)
and discovered that it's been unsupported for a while now. Nevertheless
some work is being done there:
http://www.mail-archive.com/linux-media@vger.kernel.org/msg16498.html
I've tried the patch (with linux 2.6.32) and I got as far as the firmware
being uploaded, but when I tried playing some TV it crashed the kernel.
I'm willing to help speeding up the driver development, so I was wondering if
there's anything I can start with (like testing). Hopefully I'll be able to do
some development later on, but I've got a lot of reading ahead before this could
happen.

Oh, yes - the device id is 2040:6600.

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


Re: Hauppauge WinTV HVR-900H

2010-03-28 Thread George Tellalov
On Sun, Mar 28, 2010 at 01:51:17PM +0200, Stefan Ringel wrote:
  
 In what for mode, analog or dvb-t?
 

The test? It was in analog mode using tvtime.

P.S. Sorry for the double reply, I forgot to reply to the list as well.
--
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: Re: Hauppauge WinTV HVR-900H

2010-03-28 Thread George Tellalov
On Sun, Mar 28, 2010 at 02:12:10PM +0200, Stefan Ringel wrote:
  
 
 And the dmsg log (with debug info), so we can see what wrong is. What for 
 options have you set in the .config file?
 

Okay, I'm on my way to produce that log, but it will take a while. I'll have
to recompile the driver and the kernel because the original compile I did was
quite hacky.
--
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: Re: Re: Hauppauge WinTV HVR-900H

2010-03-28 Thread George Tellalov
 
 I said debug, but I see no debug info for tm6000 is it modprobe tm6000 
 debug=1 debug_i2c=3. From what havew you debug activated? Have you a crash 
 dump in the dmesg log? Can tvtime crash, and if tvtime crashed, then send it 
 to tvtime project (ask Devin Heitmueller). 
 

Sorry that was only with debug=1. Also I didn't make myself clear about the
crash - it's a kernel crash (oops) not tvtime crash. I'm attaching a new debug
run togther with the oops message. The oops message might have typos because I
had to type it myself (no serial console on this pc).
I'm also unable to do a dvbscan are you interested in the debug output of the
scan?


oops.txt.gz
Description: Binary data