HVR-4000, vdr-1.7.2 and v4l-dvb'hg ?

Message ID Pine.LNX.4.64.0901021650320.7072@shogun.pilppa.org
State New
Headers

Commit Message

Mika Laitio Jan. 2, 2009, 3:37 p.m. UTC
  >> Hmm, the differences in my and your setup are
>> 1) I have also hvr-1300 in my system (for dvb-t)
>> 2) I modified the vdr sources instead of modifying the driver for
>> informing the system from the S2 capabilities (klaus explained also that
>> method in his 1.7.2 announcements). I can re-test this in another way once
>> the 2G_CAP patch is applied to v4l-dvb repository.
>
> I applied Klaus latest patch to v4l-dvb source and changed
> FE_CAN_2ND_GEN_MODULATION to FE_CAN_2G_MODULATION in dvbdevice.c.
>
> Do you have MFE's version of v4l-dvb aswell ?

Yes, I have. I am actually now using 2 day old version from
http://linuxtv.org/hg/v4l-dvb which includes the FE_CAN_2G_MODULATION 
flag support in driver.

And now I am finally able to watch the
HD content with my vdr 1.7.2 and streamdev server plugin by using mplayer 
or vlc as a client with HVR-4000.

BUT there is somewhere bug in the vdr channel tuning because it seems that
if I want to watch dvb-s or dvb-s2 channels, I must first tune to correct 
channel with vdr-1.6.0 or with szap-s2...

I tried to put step by step guide/notes how I got VDR172/h264 KIND of 
working... Maybe you could get it working in similar way...

1) Build and install latest v4l-dvb drivers
2) Checkout s2-szap from http://mercurial.intuxication.org/hg/szap-s2
   (I am using couple of weeks old version), and change INCLUDE line in
   Makefile to point your v4l-dvb driver sources. I have for example
INCLUDE=-I/home/lamikr/dvb/drivers/20081231/v4l-dvb/linux/include
   Then build it.
3) Add hd channel info to szap2 channels.conf With astra-28.2E I can 
use following with szap2channels.conf
arteHD:11361:hC23M5O35S1:S19.2E:22000:6210:6230:0:11120:1:1011:0
4) Test whether tuning works with szap2, I use

[lamikr@tinka szap-s2]$ ./szap-s2 -a 1 -S 2 -c szap2channels.conf arteHD
ERROR: invalid value for parameter ''
reading channels from file 'szap2channels.conf'
zapping to 1 'arteHD':
delivery DVB-S2, modulation 8PSK
sat 0, frequency 11361 MHz H, symbolrate 22000000, coderate 2/3, rolloff 
0.35
vpid 0x1842, apid 0x1856, sid 0x0000
using '/dev/dvb/adapter1/frontend0' and '/dev/dvb/adapter1/demux0'
status 1f | signal d000 | snr 0000 | ber 00000000 | unc 00000000 | 
FE_HAS_LOCK
status 1f | signal c2c0 | snr 8b33 | ber 00000000 | unc 00000000 | 
FE_HAS_LOCK

(I could then try to record and watch from command line by using commands:
# dvbstream -c 1 8192 -o > test3.mpg
# vlc test3.mpg
)

4) Extract vdr-1.7.2 (I have cloned from unofficial vdr git repo)

5) Apply attached 2G modulation support patch for vdr-1.7.2 (due to flag 
name change in official V4L-DVB drivers)
patch -p1 < ../vdr172_v4ldvb_2g_modulation_support.patch

6) Apply h264 support patch for vdr-1.7.2 that has been earlier send to 
mailing list:
patch -p1 < 
../vdr-1.7.2-h264-syncearly-framespersec-audioindexer-fielddetection-speedup.diff

7) download and configure latest dvbstreamdev plugin from cvs
- update plugins/streamdev/streamdevhosts.conf
- update svdrphosts.conf
- update runvdr
(VDRCMD="$VDRPRG --lirc -w 15 -c 
/home/lamikr/dvb/vdr/vdr-git -Pstreamdev-server")

8) Include arteHD info to top of the vdr channels.conf
arte;ARD:10743:hC56M5O0S0:S19.2E:22000:401=2:402=deu,403=fra:404:0:28724:1:1051:0
arte 
HD;ZDFvision:11361:hC23M16O35S1:S19.2E:22000:6210=27:6221=deu,6222=fra:6230:0:11120:1:1011:0

9) Make sure you have tuned to arteHD with szap-s2 and then closed szap 
(see step 4)

10) launch vdr 1.7.2 with runvdr

11) watch arteHD with
vlc http://localhost:3000/TS/2

If I now would like to watch arte instead, I would need to close vdr, 
szap first from command line and then re-launch vdr...

Btw... I now really envy the vdpay/nvidia cpu usage as with 780G 
motherboard I have...

Tasks: 174 total,   3 running, 171 sleeping,   0 stopped,   0 zombie
Cpu(s): 55.4%us,  3.5%sy,  0.5%ni, 40.5%id,  0.0%wa,  0.0%hi,  0.2%si, 
0.0%st
Mem:   1799896k total,  1779300k used,    20596k free,   272416k buffers
Swap:  8185076k total,      176k used,  8184900k free,   728196k cached

   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
  8866 lamikr    20   0  598m  57m  20m S  108  3.2   0:23.90 vlc
  8854 root      20   0  214m  24m 4460 S    2  1.4   0:01.12 vdr
  5200 lamikr     9 -11  224m 5776 3848 S    2  0.3   1:31.79 pulseaudio
  

Comments

Reinhard Nissl Jan. 2, 2009, 7:19 p.m. UTC | #1
Hi,

Mika Laitio schrieb:

> BUT there is somewhere bug in the vdr channel tuning because it seems that
> if I want to watch dvb-s or dvb-s2 channels, I must first tune to
> correct channel with vdr-1.6.0 or with szap-s2...

I do not see such a behavior with stb0899 based TT-3200 here.
Arte and ArteHD work out of the box with VDR-1.7.2 using this
repository:

	http://mercurial.intuxication.org/hg/s2-liplianin

Sure, had to add 2g flag in stb0899 source though. Before using
this repository it was hardly possible to tune to ArteHD.

Bye.
  
Artem Makhutov Jan. 2, 2009, 7:50 p.m. UTC | #2
Hi,

On Fri, Jan 02, 2009 at 08:19:11PM +0100, Reinhard Nissl wrote:
> Hi,
> 
> Mika Laitio schrieb:
> 
> > BUT there is somewhere bug in the vdr channel tuning because it seems that
> > if I want to watch dvb-s or dvb-s2 channels, I must first tune to
> > correct channel with vdr-1.6.0 or with szap-s2...
> 
> I do not see such a behavior with stb0899 based TT-3200 here.
> Arte and ArteHD work out of the box with VDR-1.7.2 using this
> repository:
> 
> 	http://mercurial.intuxication.org/hg/s2-liplianin
> 
> Sure, had to add 2g flag in stb0899 source though. Before using
> this repository it was hardly possible to tune to ArteHD.

I tried vdr 1.7.2 a few days ago with drivers from s2-liplianin and my stb0899 card.
I was not able to tune to any channels, but I have patched vdr with this patches:
h264, livebuffer, sourcecaps. So I am not sure what was causing the problem, maybe it
was one of the patches. I will try out vdr 1.7.2 without any patches tomorrow.

Regards, Artem
  
Grégoire Favre Jan. 2, 2009, 8:51 p.m. UTC | #3
:-( The time of multiproto was so good :-(

cx88[0]/2: subsystem: 0070:6902, board: Hauppauge WinTV-HVR4000 DVB-S/S2/T/Hybrid [card=68]
BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
IP: [<ffffffffa090d15a>] vp3054_i2c_probe+0x1a/0x160 [cx88_vp3054_i2c]
PGD 7f85e067 PUD 5143c067 PMD 0
Oops: 0000 [#1] PREEMPT SMP
last sysfs file: /sys/devices/pci0000:00/0000:00:1e.0/0000:04:05.0/video4linux/vbi1/index
CPU 0
Modules linked in: cx88_dvb(+) saa7115(+) cx88_alsa vp27smpx cx25840 upd64031a saa717x cx8802 cs53l32a budget_av saa7127 cx2341x msp3400 wm8775 cx8800 cs5345 tuner m52790 upd64083 v4l2_common v4l2_compat_ioctl32 budget_ci cx88xx budget saa7146_vv dib3000mc or51132 tuner_simple dib7000m videobuf_dma_sg videodev dib7000p budget_core ir_kbd_i2c or51211 videobuf_dvb lgdt330x stv0299 mxl5005s nxt200x ves1x93 ves1820 bcm3510 stb0899 stv0288 sp887x dvb_pll au8522 stv0297 stb6000 dib3000mb v4l2_int_device tda8083 drx397xD s5h1409 sp8870 lnbp22 cx24113 tda8290 lnbp21 dibx000_common mt2131 videobuf_core tuner_types tda10023 tua6100 tveeprom l64781 tda9887 mt20xx isl6421 ir_common btcx_risc mb86a16 zl10353 lgs8gl5 tda18271 tda10021 cx24110 tda827x cx22702 cx22700 s5h1420 tda10086 mt352 tea5767 mt312 cx24116 v4l1_compat s921 saa7146 cx24123 dvb_core ttpci_eeprom stb6100 dvb_dummy_fe tda10048 tda826x tda8261 si21xx dib0070 isl6405 af9013 xc5000 tuner_xc2028 nxt6000 cx88_vp3054_i2c cu1216 tda1004x itd1000 s5h1411 tea5761 lgdt3304 i2c_algo_bit udf nls_cp850 usb_storage ipv6 coretemp w83627ehf w83791d hwmon_vid hwmon nfs lockd sunrpc nvidia(P) firewire_ohci firewire_core crc_itu_t snd_hda_intel ohci1394 i2c_i801 ieee1394
Pid: 16124, comm: modprobe Tainted: P           2.6.28-gentoo #1
RIP: 0010:[<ffffffffa090d15a>]  [<ffffffffa090d15a>] vp3054_i2c_probe+0x1a/0x160 [cx88_vp3054_i2c]
RSP: 0018:ffff880076aa5d18  EFLAGS: 00010246
RAX: ffffffffa0bee080 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffff88007f8f8000 R08: 0000000000000000 R09: ffff88015fea7a20
R10: 0000000000000000 R11: 00000000807ca320 R12: ffff88015fea7a20
R13: 0000000000000000 R14: 0000000001c3c160 R15: 0000000001c3c178
FS:  00007f69c725a6f0(0000) GS:ffffffff80721200(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000000000 CR3: 000000007fad3000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process modprobe (pid: 16124, threadinfo ffff880076aa4000, task ffff88017c9dfa60)
Stack:
 0000000000000070 00000000ffffffed ffff88007f8f8000 ffff88015fea7a20
 0000000000000000 ffffffffa0c20848 0000000000000000 0000000000000000
 ffff88002dbac890 ffff880076aa5d78 0000000000000000 ffff88005a8ff9b0
Call Trace:
 [<ffffffffa0c20848>] ? cx8802_dvb_probe+0x78/0x1e10 [cx88_dvb]
 [<ffffffff802f3019>] ? __sysfs_add_one+0x39/0xb0
 [<ffffffffa0bef73f>] ? cx8802_register_driver+0x1cf/0x258 [cx8802]
 [<ffffffffa0c226a0>] ? dvb_init+0x0/0x30 [cx88_dvb]
 [<ffffffff80209042>] ? _stext+0x42/0x1b0
 [<ffffffff802670bc>] ? load_module+0x177c/0x19b0
 [<ffffffff80247c90>] ? msleep+0x0/0x40
 [<ffffffff802673a5>] ? sys_init_module+0xb5/0x1e0
 [<ffffffff8020bbcb>] ? system_call_fastpath+0x16/0x1b
Code: 98 df 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 48 83 ec 28 48 89 5c 24 08 48 89 6c 24 10 4c 89 64 24 18 4c 89 6c 24 20 31 db <4c> 8b 27 48 89 fd 41 83 bc 24 c0 06 00 00 2a 74 1b 89 d8 48 8b
RIP  [<ffffffffa090d15a>] vp3054_i2c_probe+0x1a/0x160 [cx88_vp3054_i2c]
 RSP <ffff880076aa5d18>
CR2: 0000000000000000
---[ end trace cc94b7f30d43f659 ]---

Is there somewhere an up to date multiproto tree ?

Thank you very much,
  
Grégoire Favre Jan. 2, 2009, 8:53 p.m. UTC | #4
On Fri, Jan 02, 2009 at 05:37:55PM +0200, Mika Laitio wrote:

> BUT there is somewhere bug in the vdr channel tuning because it seems that
> if I want to watch dvb-s or dvb-s2 channels, I must first tune to correct 
> channel with vdr-1.6.0 or with szap-s2...

I give up... thank for your answer.
  
Morfsta Jan. 2, 2009, 9:51 p.m. UTC | #5
On Fri, Jan 2, 2009 at 8:53 PM, Gregoire Favre <gregoire.favre@gmail.com> wrote:

> I give up... thank for your answer.

I am still using multiproto here ... it works. :-)
  
Mika Laitio Jan. 2, 2009, 10:04 p.m. UTC | #6
>> BUT there is somewhere bug in the vdr channel tuning because it seems that
>> if I want to watch dvb-s or dvb-s2 channels, I must first tune to
>> correct channel with vdr-1.6.0 or with szap-s2...
>
> I do not see such a behavior with stb0899 based TT-3200 here.
> Arte and ArteHD work out of the box with VDR-1.7.2 using this
> repository:
>
> 	http://mercurial.intuxication.org/hg/s2-liplianin
>
> Sure, had to add 2g flag in stb0899 source though. Before using
> this repository it was hardly possible to tune to ArteHD.

Ok, so one would need to find out what are the real S2API tuning specific 
code in vdr h264 extension patches so that I could find out why vdr fails 
to tune with hvr-4000. Or actually maybe the correct answer is to 
understand what is the difference between those two S2-API drivers.

szap-s2 seems to work with my card fastly when the tuning data is 
available. With scan-s2 I remember having some problems for finding HD 
channels if I had not szapped first.

I will try the s2-liplian tree also omorrow for 
verifying whether that tree works identically with my card.

Could you send for verification how you have defined arteHD data in vdr 
channels.conf? (Just to verify that I do not have there any mistakes)
I have it in following way:
arte 
HD;ZDFvision:11361:hC23M16O35S1:S19.2E:22000:6210=27:6221=deu,6222=fra:6230:0:11120:1:1011:0

Mika
  
Mika Laitio Jan. 2, 2009, 10:10 p.m. UTC | #7
>> BUT there is somewhere bug in the vdr channel tuning because it seems that
>> if I want to watch dvb-s or dvb-s2 channels, I must first tune to correct
>> channel with vdr-1.6.0 or with szap-s2...
>
> I give up... thank for your answer.

Well, in reality my family also still use vdr-1.6.0 for real (tm) tv 
watching as xine-sfxe client is much handier for my child to use 
than launching mplayer/vlc with correct channel url from the console.

But hopefully the h264 acceleration support in radeonhd drivers as well 
as the xineliboutput support for vdr-1.7.x is not far away anymore.

Mika
  
Reinhard Nissl Jan. 2, 2009, 10:35 p.m. UTC | #8
Hi,

Mika Laitio schrieb:

> Could you send for verification how you have defined arteHD data in vdr 
> channels.conf? (Just to verify that I do not have there any mistakes)
> I have it in following way:
> arte 
> HD;ZDFvision:11361:hC23M16O35S1:S19.2E:22000:6210=27:6221=deu,6222=fra:6230:0:11120:1:1011:0

arte
HD;ZDFvision:11361:hC23M16O35S1:S19.2E:22000:6210=27:6221=deu,6222=fra:6230:0:11120:1:1011:0

Bye.
  
Mika Laitio Jan. 3, 2009, 12:12 a.m. UTC | #9
>> I do not see such a behavior with stb0899 based TT-3200 here.
>> Arte and ArteHD work out of the box with VDR-1.7.2 using this
>> repository:
>>
>> 	http://mercurial.intuxication.org/hg/s2-liplianin
>>
>> Sure, had to add 2g flag in stb0899 source though. Before using
>> this repository it was hardly possible to tune to ArteHD.
>
> Ok, so one would need to find out what are the real S2API tuning specific
> code in vdr h264 extension patches so that I could find out why vdr fails
> to tune with hvr-4000. Or actually maybe the correct answer is to
> understand what is the difference between those two S2-API drivers.

Ok, I made more tests.
1) s2-liplianin drivers.
  - checked out
  - applied S2 capability patches from v4l-dvb drivers to s2-liplianin
http://www.linuxtv.org/hg/v4l-dvb/rev/0f6097dd419c
http://www.linuxtv.org/hg/v4l-dvb/rev/3e5f56413191
  - compiler and rebooted computer
2) rebuild vdr and streamdev plugin
  - make clean in vdr-git and vdr-git/PLUGINS/src/streamdev directories
  - changed driver path in vdr-git/Make.config
DVBDIR   = /home/lamikr/dvb/drivers/20090103/s2-liplianin/linux
  - copied compiler.h from kernel sources to 
/home/lamikr/dvb/drivers/20090103/s2-liplianin/linux/include/linux/
  - make && make plugins
  - launched vdr

--> mplayer and vlc were still unable to show arte or arteHD channels 
until I used szap/szap-s2 first

I am using 64 bit version of Linux in AMD/780G system...

Mika
  

Patch

diff --git a/dvbdevice.c b/dvbdevice.c
index e0b05a1..08dc63f 100644
--- a/dvbdevice.c
+++ b/dvbdevice.c
@@ -32,7 +32,7 @@ 
 // unpatched driver. However, with an unpatched driver it will not support
 // DVB-S2 hardware. If you have DVB-S2 hardware you need to either patch
 // the driver or modify the line that uses this macro in cDvbDevice::cDvbDevice().
-#define FE_CAN_2ND_GEN_MODULATION 0x10000000
+#define FE_CAN_2G_MODULATION 0x10000000
 
 #define DO_REC_AND_PLAY_ON_PRIMARY_DEVICE 1
 #define DO_MULTIPLE_RECORDINGS 1
@@ -491,7 +491,7 @@  cDvbDevice::cDvbDevice(int n)
   if (fd_frontend >= 0) {
      if (ioctl(fd_frontend, FE_GET_INFO, &frontendInfo) >= 0) {
         switch (frontendInfo.type) {
-          case FE_QPSK: frontendType = (frontendInfo.caps & FE_CAN_2ND_GEN_MODULATION) ? SYS_DVBS2 : SYS_DVBS; break;
+          case FE_QPSK: frontendType = (frontendInfo.caps & FE_CAN_2G_MODULATION) ? SYS_DVBS2 : SYS_DVBS; break;
           case FE_OFDM: frontendType = SYS_DVBT; break;
           case FE_QAM:  frontendType = SYS_DVBC_ANNEX_AC; break;
           case FE_ATSC: frontendType = SYS_ATSC; break;
@@ -505,6 +505,7 @@  cDvbDevice::cDvbDevice(int n)
         if (frontendType == SYS_DVBS2)
            numProvidedSystems++;
         isyslog("device %d provides %s (\"%s\")", CardIndex() + 1, DeliverySystems[frontendType], frontendInfo.name);
+	printf("device %d provides %s (\"%s\")\n", CardIndex() + 1, DeliverySystems[frontendType], frontendInfo.name);
         dvbTuner = new cDvbTuner(fd_frontend, CardIndex(), frontendType);
         }
      }