From patchwork Sat May 3 10:51:02 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Klaus Schmidinger X-Patchwork-Id: 12653 Received: from raven.cadsoft.de ([217.7.101.211]) by www.linuxtv.org with esmtp (Exim 4.63) (envelope-from ) id 1JsFKd-0002bY-9V for vdr@linuxtv.org; Sat, 03 May 2008 12:51:08 +0200 Received: from [192.168.100.10] (hawk.cadsoft.de [192.168.100.10]) by raven.cadsoft.de (8.13.3/8.13.3) with ESMTP id m43Ap35v031048 for ; Sat, 3 May 2008 12:51:03 +0200 Message-ID: <481C4396.8000002@cadsoft.de> Date: Sat, 03 May 2008 12:51:02 +0200 From: Klaus Schmidinger Organization: CadSoft Computer GmbH User-Agent: Thunderbird 2.0.0.12 (X11/20080226) MIME-Version: 1.0 To: vdr@linuxtv.org References: <000d01c8a5d9$f7e3d910$7501010a@ad.sytec.com> <481B1F8F.5000504@cadsoft.de> <006c01c8ac79$98a01f30$7501010a@ad.sytec.com> In-Reply-To: <006c01c8ac79$98a01f30$7501010a@ad.sytec.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (raven.cadsoft.de [192.168.1.1]); Sat, 03 May 2008 12:51:03 +0200 (CEST) X-LSpam-Score: -2.1 (--) X-LSpam-Report: No, score=-2.1 required=5.0 tests=AWL=0.512, BAYES_00=-2.599 autolearn=ham Subject: Re: [vdr] vdr-1.6.0 channel not available X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.9 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: Sat, 03 May 2008 10:51:08 -0000 Status: O X-Status: X-Keywords: X-UID: 16712 On 05/02/08 19:26, Simon Baxter wrote: >> You could add some debug outputs to >> >> cDevice::GetDevice(const cChannel *Channel, int Priority, bool LiveView) >> >> to find out why it thinks that channel 9 is not available. > > Can someone help me out here? How do I do this? Try the attached patch. Klaus --- device.c 2008/04/12 14:12:14 2.2 +++ device.c 2008/05/03 10:49:26 @@ -372,6 +372,7 @@ cDevice *cDevice::GetDevice(const cChannel *Channel, int Priority, bool LiveView) { + printf("GetDevice %d %d %d %d\n", Channel->Number(), Priority, LiveView, avoidDevice ? avoidDevice->CardIndex() : -1);//XXX cDevice *AvoidDevice = avoidDevice; avoidDevice = NULL; // Collect the current priorities of all CAM slots that can decrypt the channel: @@ -391,7 +392,9 @@ } } if (!NumUsableSlots) + {printf("no usable CAM slots!\n");//XXX return NULL; // no CAM is able to decrypt this channel + }//XXX } bool NeedsDetachReceivers = false; @@ -432,6 +435,7 @@ 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 + printf("j = %d, i = %d, imp = %08X, Impact = %08X\n", j, i, imp, Impact);//XXX if (imp < Impact) { // This device has less impact than any previous one, so we take it. Impact = imp; @@ -446,6 +450,7 @@ break; // no CAM necessary, so just one loop over the devices } if (d) { + printf("device %d\n", d->CardIndex());//XXX if (NeedsDetachReceivers) d->DetachAllReceivers(); if (s) { @@ -460,6 +465,7 @@ else if (d->CamSlot() && !d->CamSlot()->IsDecrypting()) d->CamSlot()->Assign(NULL); } + else printf("no device found\n");//XXX return d; }