[pvrusb2] problems compiling the latest snapshot

Aljaž Prusnik prusnik at gmail.com
Thu Jun 11 14:04:17 CDT 2009


On sre, 2009-06-10 at 22:25 -0500, Mike Isely wrote:
> I actually use Debian as my development target, always building
> custom kernels from a vanilla kernel base (i.e. from kernel.org).  It
> sounds like you're doing the same thing.  But obviously no problems
> here.
> 

Well, lucky you. :) From time to time I get to think that I messed up
something when doing upgrades and everything, but this one I didn't
crack.

> First of all, you should not need to move ANY files into the pvrusb2
> drivers directory.  The instructions for building the driver don't
> require this.  Rather, what you need to do is run "make" from inside
> the drivers directory with KDIR pointing to where you have the kernel
> source tree living.  And by "kernel source tree", I mean a snapshot of
> the SAME source tree that you already used to build your kernel that
> you intend to run.  One side effect of the 2.6 kernel build system is
> that it generates additional files which are needed when building an
> out-of-tree driver.  Thus you need an already-built kernel tree to
> work from.

I did so as it says in your manual and the messages about not finding
dvb_frontend.h and others was there. I switched the lib/modules
directory with the one that I actually build kernel from. I checked for
the files and they were there! Only then I tried copying the files to
the driver folder only to find out that only then the make procedure
sees them. I still can't figure out why make doesn't find those files in
the kernel tree - it must be something dead obvious. :)

> > Then I chose to compile it on mythbuntu 9.04. It did compile but when I
> > connected the device the process stopped when it said it is loading the
> > v4l-cx2341x-enc.fw file but tt is never loaded (it stops on the message
> > "loading the firmware...". I tried the CD firmware, the beta 4.8a
> > drivers. It's all the same.
> Actually it probably *is* loaded.  The pvrusb2 driver prints the
> message to indicate that the firmware is being loaded but it won't say
> anything else beyond that point unless a problem occurs.
> 

khm... If that is so, then I would see the device but mythtv does not
recognize it. Let me check again... Aaaah, the analog device is there
and working under mplayer (under mythtv only darkness is there although
it says it has found channels so I still have to figure out why no
picture in mythtv).

But the true problem is the digital tuner. It's just not there. No
device, mythtv does not see it (before it did), and I tried kaffeine
just to check and it also didn't show up either (it says No DVB-Devices
found). Now, I have one more computer to check. If there's the same
behaviour then it must be a bad karma I guess. ;)

This is the dmesg in mythbuntu after I unplug and replug the device:

[ 4945.219957] usb 1-1: USB disconnect, address 3
[ 4945.221145] pvrusb2: Device being rendered inoperable
[ 4945.221418] pvrusb2: unregistered device video0 [mpeg]
[ 4945.222150] tda18271 1-0060: destroying instance
[ 4949.372042] usb 1-1: new high speed USB device using ehci_hcd and
address 4
[ 4949.533345] usb 1-1: configuration #1 chosen from 1 choice
[ 4950.532166] usb 1-1: firmware: requesting v4l-pvrusb2-73xxx-01.fw
[ 4950.585917] pvrusb2: Device microcontroller firmware (re)loaded; it
should now reset and reconnect.
[ 4950.617703] usb 1-1: USB disconnect, address 4
[ 4950.618248] pvrusb2: Device being rendered inoperable
[ 4952.372041] usb 1-1: new high speed USB device using ehci_hcd and
address 5
[ 4952.540488] usb 1-1: configuration #1 chosen from 1 choice
[ 4952.622277] cx25840' 1-0044: cx25843-24 found @ 0x88 (pvrusb2_a)
[ 4952.656517] tuner' 1-0042: chip found @ 0x84 (pvrusb2_a)
[ 4952.668324] pvrusb2: Automatic loading ir-kbd-i2c has been disabled.
[ 4952.770335] tveeprom 1-00a2: Hauppauge model 73219, rev D1E9, serial#
4959858
[ 4952.770343] tveeprom 1-00a2: MAC address is 00-0D-FE-4B-AE-72
[ 4952.770348] tveeprom 1-00a2: tuner model is Philips 18271_8295 (idx
149, type 54)
[ 4952.770354] tveeprom 1-00a2: TV standards PAL(B/G) PAL(I) SECAM(L/L')
PAL(D/D1/K) ATSC/DVB Digital (eeprom 0xf4)
[ 4952.770360] tveeprom 1-00a2: audio processor is CX25843 (idx 37)
[ 4952.770364] tveeprom 1-00a2: decoder processor is CX25843 (idx 30)
[ 4952.770368] tveeprom 1-00a2: has radio, has IR receiver, has IR
transmitter
[ 4952.770383] pvrusb2: Supported video standard(s) reported available
in hardware: PAL-B/B1/D/D1/G/H/I/K;SECAM-B/D/G/H/K/K
[ 4952.770389] pvrusb2: Based on hardware available list, also
supporting: PAL-N/Nc
[ 4952.770399] pvrusb2: Mapping standards mask=0x3ff06ff
(PAL-B/B1/D/D1/G/H/I/K/N/Nc;SECAM-B/D/G/H/K/K1/L/LC;ATSC-8VSB/16VSB)
[ 4952.770405] pvrusb2: Setting up 22 unique standard(s)
[ 4952.770412] pvrusb2: Set up standard idx=0 name=PAL-B/G
[ 4952.770417] pvrusb2: Set up standard idx=1 name=PAL-D/K
[ 4952.770421] pvrusb2: Set up standard idx=2 name=SECAM-B/G
[ 4952.770425] pvrusb2: Set up standard idx=3 name=SECAM-D/K
[ 4952.770429] pvrusb2: Set up standard idx=4 name=PAL-B
[ 4952.770433] pvrusb2: Set up standard idx=5 name=PAL-B1
[ 4952.770437] pvrusb2: Set up standard idx=6 name=PAL-G
[ 4952.770441] pvrusb2: Set up standard idx=7 name=PAL-H
[ 4952.770444] pvrusb2: Set up standard idx=8 name=PAL-I
[ 4952.770448] pvrusb2: Set up standard idx=9 name=PAL-D
[ 4952.770452] pvrusb2: Set up standard idx=10 name=PAL-D1
[ 4952.770456] pvrusb2: Set up standard idx=11 name=PAL-K
[ 4952.770460] pvrusb2: Set up standard idx=12 name=PAL-N
[ 4952.770464] pvrusb2: Set up standard idx=13 name=PAL-Nc
[ 4952.770468] pvrusb2: Set up standard idx=14 name=SECAM-B
[ 4952.770472] pvrusb2: Set up standard idx=15 name=SECAM-D
[ 4952.770476] pvrusb2: Set up standard idx=16 name=SECAM-G
[ 4952.770480] pvrusb2: Set up standard idx=17 name=SECAM-H
[ 4952.770484] pvrusb2: Set up standard idx=18 name=SECAM-K
[ 4952.770488] pvrusb2: Set up standard idx=19 name=SECAM-K1
[ 4952.770492] pvrusb2: Set up standard idx=20 name=SECAM-L
[ 4952.770496] pvrusb2: Set up standard idx=21 name=SECAM-LC
[ 4952.770500] pvrusb2: Initial video standard auto-selected to PAL-B/G
[ 4952.770519] pvrusb2: Device initialization completed successfully.
[ 4952.781080] pvrusb2: registered device video0 [mpeg]
[ 4952.808609] cx25840' 1-0044: firmware: requesting v4l-cx25840.fw
[ 4955.045025] cx25840' 1-0044: loaded v4l-cx25840.fw firmware (16382
bytes)
[ 4955.228549] tda829x 1-0042: setting tuner address to 60
[ 4955.252611] tda18271 1-0060: creating new instance
[ 4955.296808] TDA18271HD/C1 detected @ 1-0060
[ 4957.596669] tda829x 1-0042: type set to tda8295+18271
[ 4960.986466] cx25840' 1-0044: Video signal:              present
[ 4960.986474] cx25840' 1-0044: Detected format:           PAL-BDGHI
[ 4960.986478] cx25840' 1-0044: Specified standard:        PAL-BDGHI
[ 4960.986482] cx25840' 1-0044: Specified video input:     Composite 7
[ 4960.986486] cx25840' 1-0044: Specified audioclock freq: 48000 Hz
[ 4960.994346] cx25840' 1-0044: Detected audio mode:       mono
[ 4960.994353] cx25840' 1-0044: Detected audio standard:   no detected
audio standard
[ 4960.994357] cx25840' 1-0044: Audio muted:               no
[ 4960.994361] cx25840' 1-0044: Audio microcontroller:     detecting
[ 4960.994365] cx25840' 1-0044: Configured audio standard: automatic
detection
[ 4960.994370] cx25840' 1-0044: Configured audio system:   automatic
standard and mode detection
[ 4960.994374] cx25840' 1-0044: Specified audio input:     Tuner (In8)
[ 4960.994378] cx25840' 1-0044: Preferred audio mode:      stereo
[ 4960.994382] cx25840' 1-0044: Selected 65 MHz format:    autodetect
[ 4960.994386] cx25840' 1-0044: Selected 45 MHz format:    chroma
[ 4961.071303] cx25840' 1-0044: firmware: requesting v4l-cx25840.fw
[ 4963.322767] cx25840' 1-0044: loaded v4l-cx25840.fw firmware (16382
bytes)
[ 4965.603977] cx25840' 1-0044: 720x576 is not a valid size!
[ 4965.603992] usb 1-1: firmware: requesting v4l-cx2341x-enc.fw

It ends here. When I start a media application like kaffeine, no new
messages appear. DVB device apparently does not get registered (no dvb
entry under /dev).


> Once you see a message like this:
> pvrusb2: registered device video0 [mpeg]
> Then the driver has completed its initialization successfully and is
> basically ready to go.
> 

This part is seen.


> 
> > make INSTALL_MOD_DIR=pvrusb2 -C /lib/modules/2.6.29.4-custom/source
> > M=/share/dmz/hardware/Hauppauge/pvrusb2-mci-20090509/driver
> > CONFIG_VIDEO_PVRUSB2=m CONFIG_VIDEO_PVRUSB2_24XXX=y
> > CONFIG_VIDEO_PVRUSB2_SYSFS=y CONFIG_VIDEO_PVRUSB2_DVB=y
> > CONFIG_VIDEO_PVRUSB2_DEBUGIFC=y CONFIG_VIDEO_ADV_DEBUG=y modules
> 
> This is not the procedure I documented.  See earlier.  (However with
> that said, what you have above may still work - it's just not what I
> do.  I tried to set up the snapshot driver build so that it will
> always "play well" with the kernel build system so what you're doing
> may very well be fine.)
> 

What is wrong with this? This is what I get when I hit enter after make
command. Do you mean the settings or something else?

I do this in the "driver" folder:
export KREL=`uname -r`
export KDIR=/lib/modules/$KREL/source
make

and the output is what I posted.

Now, if I say locate the first of the missing files I get: 
/share/dmz/software/Linux/kernel/linux-2.6.30/drivers/media/dvb/dvb-core/dvb_frontend.h

so instead of the 

export KDIR=/lib/modules/$KREL/source

folder I give give him the source for building the kernel

export KDIR=/share/dmz/software/Linux/kernel/linux-2.6.30

But it's still the same (no such file...)

It must be a Debian thing I guess.

Additionally this is my config from the most fresh 2.6.30:
CONFIG_DVB_CORE=m
CONFIG_VIDEOBUF_DVB=m
CONFIG_VIDEO_BT848_DVB=y
CONFIG_VIDEO_SAA7134_DVB=m
CONFIG_VIDEO_CX88_DVB=m
CONFIG_VIDEO_PVRUSB2_DVB=y
CONFIG_VIDEO_EM28XX_DVB=m
CONFIG_VIDEO_CX231XX_DVB=m
# CONFIG_DVB_DYNAMIC_MINORS is not set
CONFIG_DVB_CAPTURE_DRIVERS=y

all other DVB devices and frontends are marked as a module

> This is probably more "shrapnel" from not having DVB present in the
> kernel.

I wish. I probably have it somewhere something but I'm not really in the
mood for a reinstallation. ;)




More information about the pvrusb2 mailing list