[vdr] Patch suggestion: Force CAM reset before upcoming recording

Oliver Schinagl oliver at schinagl.nl
Tue Mar 6 10:19:45 CET 2012



On 29-02-12 16:39, Klaus Schmidinger wrote:
> On 29.02.2012 12:44, Kende wrote:
>> On Wed, Feb 29, 2012 at 12:18:00PM +0100, Klaus Schmidinger wrote:
>>> On 29.02.2012 12:13, Heikki Manninen wrote:
>>>> I have a number of different Conax CAM modules from different 
>>>> manufacturers and all of them disappear from VDR after a couple of 
>>>> days running. Hitting CAM reset on the CI menu will bring it back 
>>>> "online". Naturally all Conax channel recordings will fail silently 
>>>> as a result of this until the CAM has been brought back up. 
>>>> Switching to an encrypted channel just gives the standard "channel 
>>>> not available" message.
>>>>
>>>> This happens (for me) with Satelco DVB-C card with Satelco CI. From 
>>>> what I understand, this seems to be a common problem though I'm not 
>>>> sure whether it is limited to Satelco devices only.
>>>>
>>>> Would it be possible to force CAM reset on all CI slots when VDR is 
>>>> trying to start recording non-FTA channel?
>>>
>>> Wouldn't it be better to fix the actual problem and prevent
>>> the CAM from "disappearing"?
>>
>> Hola,
>>
>> For me this seems to be driver issue, not VDRs fault. CI poll ioctl 
>> write seems to fail sometimes with my KNC One (saa7146) budget cards 
>> . Following patch seems to help in my case:
>>
>> --- dvbci.c     2007-01-04 14:49:10.000000000 +0200
>> +++ ../vdr-1.7.21/dvbci.c       2011-10-12 10:49:45.689684447 +0300
>> @@ -62,8 +62,10 @@
>>   void cDvbCiAdapter::Write(const uint8_t *Buffer, int Length)
>>   {
>>     if (Buffer&&  Length>  0) {
>> -     if (safe_write(fd, Buffer, Length) != Length)
>> +    if (safe_write(fd, Buffer, Length) != Length) {
>>           esyslog("ERROR: can't write to CI adapter on device %d: 
>> %m", device->De
>> viceNumber());
>> +       Reset(device->DeviceNumber());
>> +    }
>>        }
>>   }
>
> I tried this, but I'm afraid it doesn't help.
> The Reset() call was never triggered, even though my CAM went from normal
> operation to the "CAM ready" state, and not even an explicit reset via
> the Setup/CAM menu brought it to life again. Only after reloading the
> driver and restarting VDR did it work again.
>
> My theory is that switching channels is what's causing the problem.
YES! I have so far only experienced this issue when switching channels. 
Staying on the same channel hasn't ever caused any problems. Changing 
channels causes various things, one being the cam needing to be reset.
> When I trigger an EPG scan, the problem typically occurs after a while.
> Maybe it's caused by tuning to channels that are no longer available,
> so the frontend times out. However, there's no reason why a frontend
> timeout should lead to a CAM freeze...
>
> Klaus
>
> _______________________________________________
> vdr mailing list
> vdr at linuxtv.org
> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr



More information about the vdr mailing list