[mythtv] [patch] dvb cam fixes

Taylor Jacob rtjacob at earthlink.net
Thu Apr 15 15:32:53 EDT 2004


> Kenneth Aafløy wrote:
>>> I don't think this is a broken CAM. I think it is because ComHem is running  dual layer of
encryptions! The CAM is using conax coding imbedded in viaccess encryption.
>> I highly doubt Conax and ViaAccess would allow such combination of their products, where did
you aquire this information?
>
> I don't have any official information on this but this is the information i have gotten from
multiple people aswell.
>
>>> The red box of 'No Right' is not a very common experience, I have only seen a couple of times,
maybe four times in  this year. I just used it to explain what I think is the probler
solution.
>> Well, it certainly is a problem somewhere. And given the fact that other CAMs behave properly,
as far as I know. Then the problem either must be that the CAM is not following the
specification made by ETSI or that ComHem sends the CAM information in some wired form. You
could send me a copy of the PMT for the offending channel(s), and I'll have a look.
>
> The problem is that if you start on channel 1 and switch to 2 it may work but then it fails when
you switch to channel 8 and after a restart of the backend you can go from 1 to 8 and then maybe
channel 2 will trigger the problem and so on although i have noticed that some channels seems to
trigger the problem more easily.


I just noticed this. In VDR the CA_PID is 12 bytes, and I recall seeing this elsewhere, but I
can't recall where from.  The function FindCaDescriptors treats it as though its 16 bits.  So if
the reserved fields that make up the extra 3 bits are always 0 you can get away with this, but if
it changes from time to time it could cause a problem..

I don't know if this is the cause of your problems above, but i think this is a bug.

-----

bool DVBCam::FindCaDescriptors(cCiCaPmt &capmt, const unsigned short *caids, int slot)
currently is               uint16_t ca_pid = ((*(b+5)) <<8) | *(b+6);
should be                  uint16_t ca_pid = ((*(b+5) & 0x1f) <<8) | *(b+6);

------

Bit Definitions from VDR

/* 0x09 ca_descriptor */

#define DESCR_CA_LEN 6
typedef struct descr_ca_struct {
   u_char descriptor_tag                         :8;
   u_char descriptor_length                      :8;
   u_char CA_type_hi                             :8;
   u_char CA_type_lo                             :8;
#if BYTE_ORDER == BIG_ENDIAN
   u_char reserved                               :3;
   u_char CA_PID_hi                              :5;
#else
   u_char CA_PID_hi                              :5;
   u_char reserved                               :3;
#endif
   u_char CA_PID_lo                              :8;
} descr_ca_t;


------


More information about the mythtv-dev mailing list