From patchwork Sun Aug 13 20:03:36 2006 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tomas Berglund X-Patchwork-Id: 12373 Received: from pne-smtpout1-sn2.hy.skanova.net ([81.228.8.83]) by www.linuxtv.org with esmtp (Exim 4.50) id 1GCMBf-0000LH-7B for vdr@linuxtv.org; Sun, 13 Aug 2006 22:03:55 +0200 Received: from enterprise (81.233.132.140) by pne-smtpout1-sn2.hy.skanova.net (7.2.075) id 44A2E86F0090445E for vdr@linuxtv.org; Sun, 13 Aug 2006 22:03:23 +0200 From: "Tomas Berglund" To: "'VDR Mailing List'" Subject: RE: [vdr] Blank screen when switching channels on same transponder with Dpid Date: Sun, 13 Aug 2006 22:03:36 +0200 Message-ID: <000001c6bf13$91ac9b90$1400a8c0@enterprise> MIME-Version: 1.0 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <44DDD230.2050803@cadsoft.de> Thread-Index: Aca+EBD20g6PXcI/SGOmMQ4/ItDTaQBAbl1A X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Aug 2006 20:03:55 -0000 Status: O X-Status: X-Keywords: X-UID: 10417 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(). My folloving patch eliminates my problem, but don't work when switching to ch1 or ch2 with dolby as selected track. Regards, Tomas Berglund > -----Ursprungligt meddelande----- > Från: vdr-bounces@linuxtv.org > [mailto:vdr-bounces@linuxtv.org] För Klaus Schmidinger > Skickat: den 12 augusti 2006 15:06 > Till: vdr@linuxtv.org > Ämne: Re: [vdr] Blank screen when switching channels onsame > transponderwithDpid > > Tomas Berglund wrote: > > Now I can switch channels with Dpid without problem. The > following patch in cDvbDevice::SetChannelDevice fixes it. > > The PRINTPIDs debug function now show adding and deleting Dpids. > > > > But when I select the Dolby track my kernel panics... > Well.. I'm not Klaus ;-) > > Just tried you patch, and my system also freezed. > > > @@ -849,15 +857,16 @@ > > > > if (TurnOnLivePIDs) { > > SetAudioBypass(false); > > - if (!(AddPid(Channel->Ppid(), ptPcr) && > AddPid(Channel->Vpid(), ptVideo) && AddPid(Channel->Apid(0), > ptAudio))) { > > + if (!(AddPid(Channel->Ppid(), ptPcr) && > AddPid(Channel->Vpid(), ptVideo) && AddPid(Channel->Apid(0), > ptAudio) && > > AddPid(Channel->Dpid(0), ptDolby))) { > > I guess the basic problem is with your CAM, which probably only > supports a very limited number of PIDs to decode at the same time. > > There is indeed an unsymmetry in the way VDR handles the additional > live audio PIDs, which doesn't matter too much if the CAM is powerful > enough to handle many PIDs. Once you switch to a different transponder > the problem should be gone, since then all PIDs are cleared > in the CAM. > > What I could suggest as a quick workaround is this: > > --- dvbdevice.c 2006/06/11 09:03:55 1.159 > +++ dvbdevice.c 2006/08/12 12:42:12 > @@ -856,7 +856,8 @@ > //XXX quick workaround for additional live audio PIDs: > if (ciHandler) { > ciHandler->SetPid(Channel->Apid(1), true); > - ciHandler->SetPid(Channel->Dpid(0), true); > + if (Setup.UseDolbyDigital) > + ciHandler->SetPid(Channel->Dpid(0), true); > } > if (IsPrimaryDevice()) > AddPid(Channel->Tpid(), ptTeletext); > > This would at least not set the DPID if you don't use Dolby. > > The change you have suggested above actually sets up a PID > filter in the DVB device for the DPID, which apparently causes > trouble when actually trying to switch to live Dolby. > > I can see that this is a bit messy right now, but improving the > CAM handling is the first thing I'm going to do in version 1.5... > > Klaus > > _______________________________________________ > vdr mailing list > vdr@linuxtv.org > http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr --- ../vdr-1.4.1-4.untouched/dvbdevice.c 2006-06-11 11:03:55.000000000 +0200 +++ dvbdevice.c 2006-08-13 21:49:41.000000000 +0200 @@ -856,7 +856,13 @@ //XXX quick workaround for additional live audio PIDs: if (ciHandler) { ciHandler->SetPid(Channel->Apid(1), true); - ciHandler->SetPid(Channel->Dpid(0), true); + if (Setup.UseDolbyDigital) { // only set Dpid when dolby is used + if (Channel->Dpid(0) == 4614) + ciHandler->SetPid(4615, false); // deactivate channel 2 Dpid before we set Dpid for channel 1 + if (Channel->Dpid(0) == 4615) + ciHandler->SetPid(4614, false); // deactivate channel 1 Dpid before we set Dpid for channel 2 + ciHandler->SetPid(Channel->Dpid(0), true); + } } if (IsPrimaryDevice()) AddPid(Channel->Tpid(), ptTeletext);