Blank screen when switching channels on same transponder with Dpid

Message ID 44E046F5.2080000@cadsoft.de
State New
Headers

Commit Message

Klaus Schmidinger Aug. 14, 2006, 9:48 a.m. UTC
  Tomas Berglund wrote:
> Your workaround patch only prevent additional dpids to be set when dolby is disabled. I really would like to switch channels with
> dolby enabled. The problem is that those additional pids are never removed....or set to false in SetPid(). 
> 
> Is there any other way to add additional pids without setting them with ciHandler->SetPid ? If AddPid() is used to set them, they
> would be removed in cDevice::DelPid().

Please try the attached patch. At least with my CAM here I don't
get any more sticky PIDs in the CAM now.

Klaus
  

Comments

Tomas Berglund Aug. 14, 2006, 6:34 p.m. UTC | #1
WOW...It works. My system now tolerates switching channels on same transponder with Dpid without my CAM (Conax) hanging.

Nicely done Klaus. 

Is it going in vdr-1.4.1-5, vdr-1.4.2 or vdr-1.5?

 
Tomas
 

> -----Ursprungligt meddelande-----
> Från: vdr-bounces@linuxtv.org 
> [mailto:vdr-bounces@linuxtv.org] För Klaus Schmidinger
> Skickat: den 14 augusti 2006 11:49
> Till: vdr@linuxtv.org
> Ämne: Re: [vdr] Blank screen when switching channels on same 
> transponderwith Dpid
> 
> Tomas Berglund wrote:
> > Your workaround patch only prevent additional dpids to be 
> set when dolby is disabled. I really would like to switch 
> channels with
> > dolby enabled. The problem is that those additional pids 
> are never removed....or set to false in SetPid(). 
> > 
> > Is there any other way to add additional pids without 
> setting them with ciHandler->SetPid ? If AddPid() is used to 
> set them, they
> > would be removed in cDevice::DelPid().
> 
> Please try the attached patch. At least with my CAM here I don't
> get any more sticky PIDs in the CAM now.
> 
> Klaus
>
  
Klaus Schmidinger Aug. 14, 2006, 8:29 p.m. UTC | #2
Tomas Berglund wrote:
> WOW...It works. My system now tolerates switching channels on same transponder with Dpid without my CAM (Conax) hanging.
> 
> Nicely done Klaus. 
> 
> Is it going in vdr-1.4.1-5, vdr-1.4.2 or vdr-1.5?

Originally I wanted to declare version 1.4.1-4 to be the final 1.4.2
next weekend, but since this appears to be a rather important bugfix
I guess I'll make it a 1.4.1-5.

Klaus
  

Patch

--- dvbdevice.c	2006/06/11 09:03:55	1.159
+++ dvbdevice.c	2006/08/14 09:38:32
@@ -853,11 +853,6 @@ 
         esyslog("ERROR: failed to set PIDs for channel %d on device %d", Channel->Number(), CardIndex() + 1);
         return false;
         }
-     //XXX quick workaround for additional live audio PIDs:
-     if (ciHandler) {
-        ciHandler->SetPid(Channel->Apid(1), true);
-        ciHandler->SetPid(Channel->Dpid(0), true);
-        }
      if (IsPrimaryDevice())
         AddPid(Channel->Tpid(), ptTeletext);
      CHECK(ioctl(fd_audio, AUDIO_SET_MUTE, true)); // actually one would expect 'false' here, but according to Marco Schlüßler <marco@lordzodiac.de> this works
@@ -927,8 +922,14 @@ 
      if (IS_AUDIO_TRACK(Type) || (IS_DOLBY_TRACK(Type) && SetAudioBypass(true))) {
         if (pidHandles[ptAudio].pid && pidHandles[ptAudio].pid != TrackId->id) {
            DetachAll(pidHandles[ptAudio].pid);
+           if (ciHandler)
+              ciHandler->SetPid(pidHandles[ptAudio].pid, false);
            pidHandles[ptAudio].pid = TrackId->id;
            SetPid(&pidHandles[ptAudio], ptAudio, true);
+           if (ciHandler) {
+              ciHandler->SetPid(pidHandles[ptAudio].pid, true);
+              ciHandler->StartDecrypting();
+              }
            }
         }
      else if (IS_DOLBY_TRACK(Type)) {