Re: Regression from a fix in VDR 1.4.1: Needless blocking of CAM DVB cards

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01.12.2008 16:02, Jörn Reder wrote:
Jörn Reder wrote:
With vdr 1.4 this worked perfectly, now with 1.6 VDR always prefers my
Budget CI card for recordings so I can't view any Pay TV when a
recording is active.
The rules that were added with 1.4.1-4 are still present, so they
probably got over-ruled by something else.

I can reproduce it this way:

- watching a non pay TV channel (e.g. ARD)
- manually start a recording on it (go to menu, hit RED button)
- now switching to a pay TV channel is impossible

I've attached a debug patch for impact logging. It dumps the reasons why VDR used a certain device to the console. (replace printf with isyslog if you prefer the log files.)

Output looks like this:

Impact:   LiDeReTrPriPrcNdPrCiDeDc
Dev  0.00: 0 0 0 0 62 63 1 1 1 1 0
Dev  1.00: 0 0 0 0 62 63 0 0 1 0 0
Device  1.00 wins

The first difference decides, lower value wins. In this case, the second device wins because its Nd is 0. Thats the 'needs detach receivers' rule.

Run the above test case and post the corresponding output here.


Cheers,

Udo
--- device.c.orig	2008-12-21 15:46:20.000000000 +0100
+++ device.c	2008-12-21 15:51:44.000000000 +0100
@@ -384,6 +384,8 @@
   cCamSlot *s = NULL;
 
   uint32_t Impact = 0xFFFFFFFF; // we're looking for a device with the least impact
+  printf("Impact:   LiDeReTrPriPrcNdPrCiDeDc\n");
+  int besti=0, bestj=0;
   for (int j = 0; j < NumCamSlots || !NumUsableSlots; j++) {
       if (NumUsableSlots && SlotPriority[j] > MAXPRIORITY)
          continue; // there is no CAM available in this slot
@@ -419,10 +421,29 @@
              imp <<= 1; imp |= NumUsableSlots ? 0 : device[i]->HasCi();                                              // avoid cards with Common Interface for FTA channels
              imp <<= 1; imp |= device[i]->HasDecoder();                                                              // avoid full featured cards
              imp <<= 1; imp |= NumUsableSlots ? !ChannelCamRelations.CamDecrypt(Channel->GetChannelID(), j + 1) : 0; // prefer CAMs that are known to decrypt this channel
+
+             #define bitextract(u, bit, len) (((u) >> (bit)) & ((1 << (len)) - 1))
+             printf("Dev %2i.%02i: %i %i %i %i %02x %02x %i %i %i %i %i\n",
+                    i,
+                    j,
+                    bitextract(imp, 24, 1),
+                    bitextract(imp, 23, 1),
+                    bitextract(imp, 22, 1),
+                    bitextract(imp, 21, 1),
+                    bitextract(imp, 13, 8),
+                    bitextract(imp, 5, 8),
+                    bitextract(imp, 4, 1),
+                    bitextract(imp, 3, 1),
+                    bitextract(imp, 2, 1),
+                    bitextract(imp, 1, 1),
+                    bitextract(imp, 0, 1));
+
              if (imp < Impact) {
                 // This device has less impact than any previous one, so we take it.
                 Impact = imp;
                 d = device[i];
+                besti=i;
+                bestj=j;
                 NeedsDetachReceivers = ndr;
                 if (NumUsableSlots)
                    s = CamSlots.Get(j);
@@ -433,6 +454,7 @@
          break; // no CAM necessary, so just one loop over the devices
       }
   if (d) {
+     printf("Device %2i.%02i wins\n", besti,bestj);
      if (NeedsDetachReceivers)
         d->DetachAllReceivers();
      if (s) {
_______________________________________________
vdr mailing list
vdr@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux