Saturday, February 6, 2010

Kernel Patch to Device Detected!

I get in touch with one of my contacts and he suggested me to try using tvtime, again.

scanning channel..
$ tvtime-scanner --norm=PAL
Reading configuration from /etc/tvtime/tvtime.xml
Reading configuration from /home/bitto/.tvtime/tvtime.xml
Scanning using TV standard PAL.
/home/bitto/.tvtime/stationlist.xml: No existing PAL station list "Custom".

Your capture card driver: em28xx [Kaiomy TVnPC U2/usb-0000:00:12.2-5/258]
does not support studio-quality colour images required by tvtime.
This is a hardware limitation of some cards including many
low-quality webcams. Please select a different video device to use
with the command line option --device.

Message from the card was: Device or resource busy

Nothing's found.

bitto@bitto:/lib/firmware$ dmesg | tail
[87829.944624] em28xx #0: AC97 features = 0x6a90
[87829.944628] em28xx #0: Empia 202 AC97 audio processor detected
[87830.784726] tvp5150 1-005c: tvp5150am1 detected.
[87834.463771] em28xx #0: v4l2 driver version 0.1.2
[87835.963945] em28xx #0: Registered radio device as /dev/radio0
[87835.963951] em28xx #0: V4L2 device registered as /dev/video0 and /dev/vbi0
[87835.963956] em28xx-audio.c: probing for em28x1 non standard usbaudio
[87835.963960] em28xx-audio.c: Copyright (C) 2006 Markus Rechberger
[87836.502795] tvp5150 1-005c: tvp5150am1 detected.
[87848.800602] tvp5150 1-005c: tvp5150am1 detected.

My firmware is good.

$ lsmod
Module Size Used by
nls_iso8859_1 5280 1
nls_cp437 6976 1
vfat 13184 1
fat 59832 1 vfat
em28xx_alsa 9508 1
binfmt_misc 10220 1
tuner_xc2028 22560 1
tuner_simple 16468 1
tuner_types 18496 1 tuner_simple
tuner 24520 2
tvp5150 17492 1
snd_hda_codec_realtek 277860 1
snd_hda_intel 31880 2
snd_hda_codec 87584 2 snd_hda_codec_realtek,snd_hda_intel
snd_hwdep 9352 1 snd_hda_codec
snd_pcm_oss 44704 0
snd_mixer_oss 18976 1 snd_pcm_oss
snd_pcm 93160 4 em28xx_alsa,snd_hda_intel,snd_hda_codec,snd_pcm_oss
snd_seq_dummy 3460 0
snd_seq_oss 33440 0
iptable_filter 3872 0
snd_seq_midi 8192 0
snd_rawmidi 27360 1 snd_seq_midi
snd_seq_midi_event 8448 2 snd_seq_oss,snd_seq_midi
ip_tables 21200 1 iptable_filter
x_tables 25832 1 ip_tables
snd_seq 60608 6 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_midi_event
em28xx 95184 1 em28xx_alsa
snd_timer 26992 2 snd_pcm,snd_seq
ir_common 52740 1 em28xx
snd_seq_device 8308 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmidi,snd_seq
v4l2_common 21024 3 tuner,tvp5150,em28xx
videodev 43360 4 tuner,tvp5150,em28xx,v4l2_common
v4l1_compat 16804 1 videodev
v4l2_compat_ioctl32 13344 1 videodev
videobuf_vmalloc 7844 1 em28xx
videobuf_core 21188 2 em28xx,videobuf_vmalloc
tveeprom 14884 1 em28xx
psmouse 57124 0
serio_raw 6596 0
ppdev 8232 0
fglrx 2234552 33
parport_pc 37352 1
amd64_edac_mod 26688 0
edac_core 48876 1 amd64_edac_mod
snd 77096 19 em28xx_alsa,snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_seq_oss,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
soundcore 9088 1 snd
shpchp 37756 0
snd_page_alloc 10928 2 snd_hda_intel,snd_pcm
lp 11908 0
i2c_piix4 11728 0
parport 40528 3 ppdev,parport_pc,lp
usb_storage 66016 1
usbhid 43968 0
sky2 55556 0

Then only I know that the fimware has stop its support until kernel 2.6.28 while I'm using 2.6.31

$ uname -r
2.6.31-17-generic

So I have to install the kernel patch which add compatibility with backward kernel. Source

$ hg clone http://linuxtv.org/hg/v4l-dvb
destination directory: v4l-dvb
requesting all changes
adding changesets
adding manifests
adding file changes

This process took a long time that I decided to just download directly from the link.

Untar it.
$ tar xf v4l-dvb-bc2c81548b60.tar.bz2

$ cd v4l-dvb-bc2c81548b60/
$ make

'make' produces this error

/home/bitto/Downloads/v4l-dvb-bc2c81548b60/v4l/firedtv-1394.c: At top level:
/home/bitto/Downloads/v4l-dvb-bc2c81548b60/v4l/firedtv-1394.c:267: error: variable 'fdtv_driver' has initializer but incomplete type
/home/bitto/Downloads/v4l-dvb-bc2c81548b60/v4l/firedtv-1394.c:268: error: unknown field 'name' specified in initializer
/home/bitto/Downloads/v4l-dvb-bc2c81548b60/v4l/firedtv-1394.c:268: warning: excess elements in struct initializer
/home/bitto/Downloads/v4l-dvb-bc2c81548b60/v4l/firedtv-1394.c:268: warning: (near initialization for 'fdtv_driver')
/home/bitto/Downloads/v4l-dvb-bc2c81548b60/v4l/firedtv-1394.c:269: error: unknown field 'id_table' specified in initializer
/home/bitto/Downloads/v4l-dvb-bc2c81548b60/v4l/firedtv-1394.c:269: warning: excess elements in struct initializer
/home/bitto/Downloads/v4l-dvb-bc2c81548b60/v4l/firedtv-1394.c:269: warning: (near initialization for 'fdtv_driver')
/home/bitto/Downloads/v4l-dvb-bc2c81548b60/v4l/firedtv-1394.c:270: error: unknown field 'update' specified in initializer
/home/bitto/Downloads/v4l-dvb-bc2c81548b60/v4l/firedtv-1394.c:270: warning: excess elements in struct initializer
/home/bitto/Downloads/v4l-dvb-bc2c81548b60/v4l/firedtv-1394.c:270: warning: (near initialization for 'fdtv_driver')
/home/bitto/Downloads/v4l-dvb-bc2c81548b60/v4l/firedtv-1394.c:271: error: unknown field 'driver' specified in initializer
/home/bitto/Downloads/v4l-dvb-bc2c81548b60/v4l/firedtv-1394.c:271: error: extra brace group at end of initializer
/home/bitto/Downloads/v4l-dvb-bc2c81548b60/v4l/firedtv-1394.c:271: error: (near initialization for 'fdtv_driver')
/home/bitto/Downloads/v4l-dvb-bc2c81548b60/v4l/firedtv-1394.c:274: warning: excess elements in struct initializer
/home/bitto/Downloads/v4l-dvb-bc2c81548b60/v4l/firedtv-1394.c:274: warning: (near initialization for 'fdtv_driver')
/home/bitto/Downloads/v4l-dvb-bc2c81548b60/v4l/firedtv-1394.c:277: error: variable 'fdtv_highlevel' has initializer but incomplete type
/home/bitto/Downloads/v4l-dvb-bc2c81548b60/v4l/firedtv-1394.c:278: error: unknown field 'name' specified in initializer
/home/bitto/Downloads/v4l-dvb-bc2c81548b60/v4l/firedtv-1394.c:278: warning: excess elements in struct initializer
/home/bitto/Downloads/v4l-dvb-bc2c81548b60/v4l/firedtv-1394.c:278: warning: (near initialization for 'fdtv_highlevel')
/home/bitto/Downloads/v4l-dvb-bc2c81548b60/v4l/firedtv-1394.c:279: error: unknown field 'fcp_request' specified in initializer
/home/bitto/Downloads/v4l-dvb-bc2c81548b60/v4l/firedtv-1394.c:279: warning: excess elements in struct initializer
/home/bitto/Downloads/v4l-dvb-bc2c81548b60/v4l/firedtv-1394.c:279: warning: (near initialization for 'fdtv_highlevel')
/home/bitto/Downloads/v4l-dvb-bc2c81548b60/v4l/firedtv-1394.c: In function 'fdtv_1394_init':
/home/bitto/Downloads/v4l-dvb-bc2c81548b60/v4l/firedtv-1394.c:286: error: implicit declaration of function 'hpsb_register_highlevel'
/home/bitto/Downloads/v4l-dvb-bc2c81548b60/v4l/firedtv-1394.c:287: error: implicit declaration of function 'hpsb_register_protocol'
/home/bitto/Downloads/v4l-dvb-bc2c81548b60/v4l/firedtv-1394.c:290: error: implicit declaration of function 'hpsb_unregister_highlevel'
/home/bitto/Downloads/v4l-dvb-bc2c81548b60/v4l/firedtv-1394.c: In function 'fdtv_1394_exit':
/home/bitto/Downloads/v4l-dvb-bc2c81548b60/v4l/firedtv-1394.c:297: error: implicit declaration of function 'hpsb_unregister_protocol'
make[3]: *** [/home/bitto/Downloads/v4l-dvb-bc2c81548b60/v4l/firedtv-1394.o] Error 1
make[2]: *** [_module_/home/bitto/Downloads/v4l-dvb-bc2c81548b60/v4l] Error 2
make[2]: Leaving directory `/usr/src/linux-headers-2.6.31-17-generic'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/home/bitto/Downloads/v4l-dvb-bc2c81548b60/v4l'
make: *** [all] Error 2

make[3]: *** [/home/bitto/Downloads/v4l-dvb-bc2c81548b60/v4l/firedtv-1394.o] Error 1
make[2]: *** [_module_/home/bitto/Downloads/v4l-dvb-bc2c81548b60/v4l] Error 2
make[2]: Leaving directory `/usr/src/linux-headers-2.6.31-17-generic'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/home/bitto/Downloads/v4l-dvb-bc2c81548b60/v4l'
make: *** [all] Error 2

I have to edit this file '.config'

$ cd v4l
$ sudo gedit .config
From FIREDTV=m to FIREDTV=n

$cd ..
$make
$sudo make install

$lsmod | grep em28xx
em28xx_alsa 9412 1
em28xx 105400 1 em28xx_alsa
v4l2_common 21504 3 tuner,tvp5150,em28xx
videodev 45376 4 tuner,tvp5150,em28xx,v4l2_common
ir_common 53120 1 em28xx
videobuf_vmalloc 7844 1 em28xx
videobuf_core 20964 2 em28xx,videobuf_vmalloc
ir_core 8728 2 em28xx,ir_common
snd_pcm 93160 4 em28xx_alsa,snd_hda_intel,snd_hda_codec,snd_pcm_oss
tveeprom 14820 1 em28xx
snd 77096 19 em28xx_alsa,snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,sn

$ dmesg
[ 13.081741] Linux video capture interface: v2.00
[ 13.095654] EXT4-fs (sda1): internal journal on sda1:8
[ 13.110462] em28xx: New device USB 2863 Device @ 480 Mbps (eb1a:e303, interface 0, class 0)
[ 13.110757] em28xx #0: chip ID is em2860
[ 13.116393] hda_codec: Unknown model for ALC662 rev1, trying auto-probe from BIOS...
[ 13.117981] input: HDA Digital PCBeep as /devices/pci0000:00/0000:00:14.2/input/input5
[ 13.471114] sky2 eth0: enabling interface
[ 13.471364] ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 13.526763] __ratelimit: 9 callbacks suppressed
[ 13.526766] type=1505 audit(1265352709.654:14): operation="profile_replace" pid=949 name=/usr/share/gdm/guest-session/Xsession
[ 13.528074] type=1505 audit(1265352709.654:15): operation="profile_replace" pid=950 name=/sbin/dhclient3
[ 13.528331] type=1505 audit(1265352709.654:16): operation="profile_replace" pid=950 name=/usr/lib/NetworkManager/nm-dhcp-client.action
[ 13.528480] type=1505 audit(1265352709.654:17): operation="profile_replace" pid=950 name=/usr/lib/connman/scripts/dhclient-script
[ 13.531311] type=1505 audit(1265352709.654:18): operation="profile_replace" pid=951 name=/usr/bin/evince
[ 13.535537] type=1505 audit(1265352709.664:19): operation="profile_replace" pid=951 name=/usr/bin/evince-previewer
[ 13.537981] type=1505 audit(1265352709.664:20): operation="profile_replace" pid=951 name=/usr/bin/evince-thumbnailer
[ 13.542718] type=1505 audit(1265352709.664:21): operation="profile_replace" pid=953 name=/usr/lib/cups/backend/cups-pdf
[ 13.543040] type=1505 audit(1265352709.664:22): operation="profile_replace" pid=953 name=/usr/sbin/cupsd
[ 13.544522] type=1505 audit(1265352709.674:23): operation="profile_replace" pid=954 name=/usr/sbin/mysqld
[ 13.589885] em28xx #0: i2c eeprom 00: 1a eb 67 95 1a eb 03 e3 d0 00 5c 03 6a 22 00 00
[ 13.589893] em28xx #0: i2c eeprom 10: 00 00 04 57 4e 03 01 00 00 00 00 00 00 00 00 00
[ 13.589901] em28xx #0: i2c eeprom 20: 06 00 01 00 f0 10 01 00 00 00 00 00 5b 00 00 00
[ 13.589907] em28xx #0: i2c eeprom 30: 00 00 20 40 20 80 02 20 01 01 00 00 00 00 00 00
[ 13.589913] em28xx #0: i2c eeprom 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 13.589919] em28xx #0: i2c eeprom 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 13.589924] em28xx #0: i2c eeprom 60: 00 00 00 00 00 00 00 00 00 00 22 03 55 00 53 00
[ 13.589930] em28xx #0: i2c eeprom 70: 42 00 20 00 32 00 38 00 36 00 33 00 20 00 44 00
[ 13.589936] em28xx #0: i2c eeprom 80: 65 00 76 00 69 00 63 00 65 00 00 00 00 00 00 00
[ 13.589942] em28xx #0: i2c eeprom 90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 13.589948] em28xx #0: i2c eeprom a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 13.589954] em28xx #0: i2c eeprom b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 13.589959] em28xx #0: i2c eeprom c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 13.589965] em28xx #0: i2c eeprom d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 13.589971] em28xx #0: i2c eeprom e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 13.589977] em28xx #0: i2c eeprom f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 13.589984] em28xx #0: EEPROM ID= 0x9567eb1a, EEPROM hash = 0x9dca1441
[ 13.589985] em28xx #0: EEPROM info:
[ 13.589987] em28xx #0: AC97 audio (5 sample rates)
[ 13.589988] em28xx #0: 500mA max power
[ 13.589990] em28xx #0: Table at 0x04, strings=0x226a, 0x0000, 0x0000
[ 13.591500] em28xx #0: Identified as Kaiomy TVnPC U2 (card=63)
[ 13.595277] tvp5150 1-005c: chip found @ 0xb8 (em28xx #0)
[ 13.597551] tuner 1-0000: chip found @ 0x0 (em28xx #0)
[ 13.598782] tuner 1-0061: chip found @ 0xc2 (em28xx #0)
[ 13.706942] tuner-simple 1-0000: unable to probe Alps TSBE1, proceeding anyway.
[ 13.706946] tuner-simple 1-0000: creating new instance
[ 13.706949] tuner-simple 1-0000: type set to 10 (Alps TSBE1)
[ 13.730554] xc2028 1-0061: creating new instance
[ 13.730557] xc2028 1-0061: type set to XCeive xc2028/xc3028 tuner
[ 13.743789] usb 1-5: firmware: requesting xc3028-v27.fw
[ 13.926762] xc2028 1-0061: Error: firmware xc3028-v27.fw not found.
[ 13.943840] input: em28xx IR (em28xx #0) as /devices/pci0000:00/0000:00:12.2/usb1/1-5/input/input6
[ 13.943896] Creating IR device irrcv0
[ 13.944693] em28xx #0: Config register raw data: 0xd0
[ 13.984709] em28xx #0: AC97 vendor ID = 0xffffffff
[ 14.004281] em28xx #0: AC97 features = 0x6a90
[ 14.004283] em28xx #0: Empia 202 AC97 audio processor detected
[ 14.847183] tvp5150 1-005c: tvp5150am1 detected.
[ 15.151073] sky2 eth0: Link is up at 100 Mbps, full duplex, flow control both
[ 15.168534] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 16.881287] usplash:370 freeing invalid memtype ffffffffd0000000-ffffffffd1000000
[ 18.673773] em28xx #0: v4l2 driver version 0.1.2
[ 20.313863] em28xx #0: Registered radio device as radio0
[ 20.313867] em28xx #0: V4L2 video device registered as video0
[ 20.313869] em28xx #0: V4L2 VBI device registered as vbi0
[ 20.333803] usbcore: registered new interface driver em28xx
[ 20.333807] em28xx driver loaded
[ 20.336965] em28xx-audio.c: probing for em28x1 non standard usbaudio
[ 20.336968] em28xx-audio.c: Copyright (C) 2006 Markus Rechberger
[ 20.337243] Em28xx: Initialized (Em28xx Audio Extension) extension
[ 20.646428] [fglrx] GART Table is not in FRAME_BUFFER range
[ 20.646549] alloc irq_desc for 27 on node 0
[ 20.646551] alloc kstat_irqs on node 0
[ 20.646560] fglrx_pci 0000:01:05.0: irq 27 for MSI/MSI-X
[ 20.647018] [fglrx] Firegl kernel thread PID: 2169
[ 21.512265] [fglrx] Gart USWC size:547 M.
[ 21.512269] [fglrx] Gart cacheable size:215 M.
[ 21.512274] [fglrx] Reserved FB block: Shared offset:0, size:1000000
[ 21.512277] [fglrx] Reserved FB block: Unshared offset:fffb000, size:5000
[ 25.560015] eth0: no IPv6 routers present
[ 387.790506] tvp5150 1-005c: tvp5150am1 detected.
[ 392.110514] tvp5150 1-005c: tvp5150am1 detected.
[ 396.471058] tvp5150 1-005c: tvp5150am1 detected.
[ 400.790694] tvp5150 1-005c: tvp5150am1 detected.
[ 405.110706] tvp5150 1-005c: tvp5150am1 detected.

* Note the capture device part

The device is now detected!

0 comments:

Post a Comment