WinTV USB2 on Beagle

Hi,

(sorry for long post)

I am trying to use WinTV USB2 tv tuner (that is analog, based on
em82xx driver) on
my beagle board and use MPlayer for playing, but have not much
success.

I am using OpenEmbedded and kernel 2.6.29-omap1. The card is connected
to
the external self powered USB HUB USB, connected to USB OTG (I
soldered J6).

When I plug in the card, I get.
[ 116.865386] usb 2-1: reset high speed USB device using musb_hdrc
and address 2
[ 117.318664] usb 2-1.3: new high speed USB device using musb_hdrc
and address 3
[ 117.440429] usb 2-1.3: device v2040 p4201 is not supported
[ 117.446655] usb 2-1.3: configuration #1 chosen from 1 choice
[ 117.914367] Linux video capture interface: v2.00
[ 122.466094] em28xx: New device WinTV USB2 @ 480 Mbps (2040:4201,
interface 0, class 0)
[ 122.474182] em28xx #0: Identified as Hauppauge WinTV USB 2 (card=4)
[ 122.498046] em28xx #0: chip ID is em2840
[ 122.662231] em28xx #0: i2c eeprom 00: 1a eb 67 95 40 20 01 42 20 00
45 03 82 18 6a 18
[ 122.670318] em28xx #0: i2c eeprom 10: 00 00 24 57 6e 02 00 00 60 00
00 00 02 00 00 00
[ 122.678375] em28xx #0: i2c eeprom 20: 1e 00 10 10 00 00 00 88 b8 00
00 00 00 00 00 00
[ 122.686462] em28xx #0: i2c eeprom 30: 00 00 20 40 20 80 02 20 10 01
01 01 00 00 00 00
[ 122.694488] em28xx #0: i2c eeprom 40: 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00
[ 122.702514] em28xx #0: i2c eeprom 50: 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00
[ 122.710571] em28xx #0: i2c eeprom 60: 00 00 00 00 00 00 00 00 00 00
18 03 30 00 30 00
[ 122.718627] em28xx #0: i2c eeprom 70: 30 00 38 00 37 00 31 00 35 00
32 00 34 00 38 00
[ 122.726654] em28xx #0: i2c eeprom 80: 00 00 18 03 57 00 69 00 6e 00
54 00 56 00 20 00
[ 122.734710] em28xx #0: i2c eeprom 90: 55 00 53 00 42 00 32 00 00 00
00 00 00 00 00 00
[ 122.742736] em28xx #0: i2c eeprom a0: 84 12 00 00 05 50 1a 7f 44 61
23 1e a4 57 16 91
[ 122.750793] em28xx #0: i2c eeprom b0: ff 00 00 00 04 84 0a 00 01 01
20 77 00 40 f0 fb
[ 122.758819] em28xx #0: i2c eeprom c0: 84 00 74 02 01 06 03 79 22 00
00 00 00 00 00 00
[ 122.766906] em28xx #0: i2c eeprom d0: 84 12 00 00 05 50 1a 7f 44 61
23 1e a4 57 16 91
[ 122.774932] em28xx #0: i2c eeprom e0: ff 00 00 00 04 84 0a 00 01 01
20 77 00 40 f0 fb
[ 122.782958] em28xx #0: i2c eeprom f0: 84 00 74 02 01 06 03 79 22 00
00 00 00 00 00 00
[ 122.791015] em28xx #0: EEPROM ID= 0x9567eb1a, EEPROM hash =
0xb0d01162
[ 122.797607] em28xx #0: EEPROM info:
[ 122.801116] em28xx #0: I2S audio, sample rate=32k
[ 122.805877] em28xx #0: 500mA max power
[ 122.809661] em28xx #0: Table at 0x24, strings=0x1882, 0x186a,
0x0000
[ 122.944030] tveeprom 2-0050: Hauppauge model 42014, rev D197,
serial# 8715248
[ 122.951324] tveeprom 2-0050: tuner model is TCL 2002MB_3H (idx 97,
type 55)
[ 122.958343] tveeprom 2-0050: TV standards PAL(B/G) PAL(D/D1/K)
(eeprom 0x44)
[ 122.965515] tveeprom 2-0050: audio processor is MSP3415 (idx 6)
[ 122.971496] tveeprom 2-0050: has radio
[ 123.177795] msp3400' 2-0044: MSP3415G-B8 found @ 0x88 (em28xx #0)
[ 123.183959] msp3400' 2-0044: msp3400 supports nicam and radio, mode
is autodetect and autoselect
[ 123.261932] tvp5150' 2-005c: chip found @ 0xb8 (em28xx #0)
[ 123.348754] tuner' 2-0063: chip found @ 0xc6 (em28xx #0)
[ 123.488983] tuner-simple 2-0063: creating new instance
[ 123.494232] tuner-simple 2-0063: type set to 55 (TCL 2002MB)
[ 123.537170] em28xx #0: Config register raw data: 0x20
[ 123.542266] em28xx #0: I2S Audio (3 sample rates)
[ 123.547058] em28xx #0: No AC97 audio processor
[ 123.959350] tvp5150' 2-005c: tvp5150am1 detected.
[ 127.013732] em28xx #0: v4l2 driver version 0.1.1
[ 127.670501] em28xx #0: V4L2 device registered as /dev/video0 and /
dev/vbi0
[ 127.677612] usbcore: registered new interface driver em28xx
[ 127.683319] em28xx driver loaded

I know MPlayer works, because I can play DivX movies. However, when I
try to play tv:
$ mplayer tv://
MPlayer dev-SVN-r28346-4.3.1 (C) 2000-2009 MPlayer Team
CPU: ARM

Playing tv://.
TV file format detected.
Selected driver: v4l2
name: Video 4 Linux 2 input
author: Martin Olschewski <olschewski@zpr.uni-koeln.de>
comment: first try, more to come :wink:
[ 220.670288] tvp5150' 2-005c: tvp5150am1 detected.
Selected device: Hauppauge WinTV USB 2
Tuner cap: STEREO LANG1 LANG2
Tuner rxs: MONO
Capabilites: video capture tuner audio read/write streaming
supported norms: 0 = NTSC; 1 = NTSC-M; 2 = NTSC-M-JP; 3 = NTSC-M-KR;
4 = NTSC-443; 5 = PAL; 6 = PAL-BG; 7 = PAL-H; 8 = PAL-I; 9 = PAL-DK;
10 = PA;
inputs: 0 = Television; 1 = S-Video;
Current input: 0
Current format: YUYV
v4l2: current audio mode is : STEREO
v4l2: ioctl set format failed: Invalid argument
v4l2: ioctl set format failed: Invalid argument
v4l2: ioctl set format failed: Invalid argument

first the board freezes, and after 1 minute I get:

[ 289.912048] BUG: soft lockup - CPU#0 stuck for 61s! [mplayer:1725]
[ 289.918273] Modules linked in: tuner_simple tuner_types tuner
tvp5150 msp3400 v4l2_common em28xx ir_common videodev v4l1_compat
videobuf_vmallo6
[ 289.933898]
[ 289.935394] Pid: 1725, comm: mplayer
[ 289.940124] CPU: 0 Not tainted (2.6.29-omap1 #1)
[ 289.945129] PC is at dma_cache_maint+0x3c/0xd8
[ 289.949615] LR is at usb_hcd_submit_urb+0x15c/0x8a4
[ 289.954528] pc : [<c00401ec>] lr : [<c02c4b0c>] psr: 20000013
[ 289.954528] sp : cf359b90 ip : cf359bb0 fp : cf359bac
[ 289.966094] r10: 00000010 r9 : 00000000 r8 : cf98c000
[ 289.971343] r7 : cf2fa000 r6 : 00019320 r5 : cf114400 r4 :
ffc45000
[ 289.977905] r3 : c05e3f18 r2 : 00000002 r1 : d0000000 r0 :
ffc45000
[ 289.984466] Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM
Segment user
[ 289.991638] Control: 10c5387d Table: 8f27c019 DAC: 00000015
[ 289.997436] [<c003cd7c>] (show_regs+0x0/0x50) from [<c0087f7c>]
(softlockup_tick+0x124/0x174)
[ 290.006042] r4:000000d1
[ 290.008605] [<c0087e58>] (softlockup_tick+0x0/0x174) from
[<c0067994>] (run_local_timers+0x1c/0x20)
[ 290.017761] r8:00000117 r7:00000117 r6:2ff7f3d1 r5:cf36b320
r4:00000000
[ 290.024536] [<c0067978>] (run_local_timers+0x0/0x20) from
[<c00679c4>] (update_process_times+0x2c/0x5c)
[ 290.033996] [<c0067998>] (update_process_times+0x0/0x5c) from
[<c007cd3c>] (tick_sched_timer+0x90/0xcc)
[ 290.043487] r5:cf359b48 r4:c05b2090
[ 290.047088] [<c007ccac>] (tick_sched_timer+0x0/0xcc) from
[<c00750c4>] (__run_hrtimer+0x74/0x130)
[ 290.056060] r7:c0579ff8 r6:c0579ff8 r5:00000000 r4:c05b2090
[ 290.061798] [<c0075050>] (__run_hrtimer+0x0/0x130) from
[<c0075d40>] (hrtimer_interrupt+0x17c/0x1ec)
[ 290.071014] r6:2ff7f3d1 r5:7fffffff r4:ffffffff
[ 290.075683] [<c0075bc4>] (hrtimer_interrupt+0x0/0x1ec) from
[<c0045a2c>] (omap2_gp_timer_interrupt+0x28/0x34)
[ 290.085693] [<c0045a04>] (omap2_gp_timer_interrupt+0x0/0x34) from
[<c008855c>] (handle_IRQ_event+0x3c/0x74)
[ 290.095520] [<c0088520>] (handle_IRQ_event+0x0/0x74) from
[<c0089970>] (handle_level_irq+0x94/0xec)
[ 290.104644] r7:cf2fa000 r6:00019320 r5:0000005f r4:c057bd78
[ 290.110382] [<c00898dc>] (handle_level_irq+0x0/0xec) from
[<c003b058>] (__exception_text_start+0x58/0x70)
[ 290.120025] r5:00000000 r4:0000005f
[ 290.123626] [<c003b000>] (__exception_text_start+0x0/0x70) from
[<c003ba30>] (__irq_svc+0x30/0x80)
[ 290.132690] Exception stack(0xcf359b48 to 0xcf359b90)
[ 290.137756] 9b40: ffc45000 d0000000 00000002
c05e3f18 ffc45000 cf114400
[ 290.146148] 9b60: 00019320 cf2fa000 cf98c000 00000000 00000010
cf359bac cf359bb0 cf359b90
[ 290.154541] 9b80: c02c4b0c c00401ec 20000013
ffffffff
[ 290.162902] r5:d8200000 r4:ffffffff
[ 290.166503] [<c00401b0>] (dma_cache_maint+0x0/0xd8) from
[<c02c4b0c>] (usb_hcd_submit_urb+0x15c/0x8a4)
[ 290.175903] r6:00000020 r5:cf114400 r4:ffc45000
[ 290.180572] [<c02c49b0>] (usb_hcd_submit_urb+0x0/0x8a4) from
[<c02c586c>] (usb_submit_urb+0x240/0x25c)
[ 290.189971] [<c02c562c>] (usb_submit_urb+0x0/0x25c) from
[<bf07dbf4>] (em28xx_init_isoc+0x268/0x2dc [em28xx])
[ 290.200073] r8:00019320 r7:00000005 r6:cf10b800 r5:00000000
r4:cf117400
[ 290.206848] [<bf07d98c>] (em28xx_init_isoc+0x0/0x2dc [em28xx]) from
[<bf07987c>] (buffer_prepare+0x134/0x144 [em28xx])
[ 290.217712] [<bf079748>] (buffer_prepare+0x0/0x144 [em28xx]) from
[<bf04ae5c>] (videobuf_qbuf+0x2dc/0x3f4 [videobuf_core])
[ 290.228912] r7:cf01836c r6:c044560f r5:cf019a60 r4:cf018360
[ 290.234619] [<bf04ab80>] (videobuf_qbuf+0x0/0x3f4 [videobuf_core])
from [<bf0793a4>] (vidioc_qbuf+0x30/0x34 [em28xx])
[ 290.245391] r8:00000000 r7:cf359e28 r6:c044560f r5:cf359e28
r4:cf018360
[ 290.252166] [<bf079374>] (vidioc_qbuf+0x0/0x34 [em28xx]) from
[<bf05d064>] (__video_do_ioctl+0x1014/0x3468 [videodev])
[ 290.263031] r5:00000000 r4:bf079374
[ 290.266632] [<bf05c050>] (__video_do_ioctl+0x0/0x3468 [videodev])
from [<bf05f6a0>] (video_ioctl2+0x1e8/0x314 [videodev])
[ 290.277709] [<bf05f4b8>] (video_ioctl2+0x0/0x314 [videodev]) from
[<bf05b1a0>] (v4l2_ioctl+0x58/0x60 [videodev])
[ 290.287994] [<bf05b148>] (v4l2_ioctl+0x0/0x60 [videodev]) from
[<c00c6e30>] (vfs_ioctl+0x6c/0x7c)
[ 290.296966] r4:cf9b7ac0
[ 290.299530] [<c00c6dc4>] (vfs_ioctl+0x0/0x7c) from [<c00c7310>]
(do_vfs_ioctl+0x4a4/0x508)
[ 290.307861] r6:c044560f r5:cf9b7ac0 r4:00000003
[ 290.312530] [<c00c6e6c>] (do_vfs_ioctl+0x0/0x508) from [<c00c73b4>]
(sys_ioctl+0x40/0x64)
[ 290.320800] [<c00c7374>] (sys_ioctl+0x0/0x64) from [<c003be80>]
(ret_fast_syscall+0x0/0x2c)
[ 290.329223] r7:00000036 r6:0000004c r5:00000000 r4:00b1a4c0

Has anybody used em82xx device on BeagleBoard?
What should I try?

Thank you and best regards,
Matej