Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linux-dvb] How to CA support in current driver? (was: Re: Re: OSD problems investigated)
- To: <linux-dvb@linuxtv.org>
- Subject: [linux-dvb] How to CA support in current driver? (was: Re: Re: OSD problems investigated)
- From: "Henning Holtschneider" <hh@holtschneider.com>
- Date: Sun, 24 Feb 2002 20:16:23 +0100
- Content-Transfer-Encoding: 7bit
- Content-Type: text/plain;charset="iso-8859-1"
- Delivered-To: mhonarc@limes.convergence.de
- References: <5.1.0.14.1.20020218094009.00a04a80@mail-host.pcmsgroup.com>
- Sender: linux-dvb-bounce@linuxtv.org
----- Original Message -----
From: "John Williams" <John.Williams@pcmsdatafit.co.uk>
To: <linux-dvb@linuxtv.org>
Sent: Monday, February 18, 2002 10:41 AM
Subject: [linux-dvb] Re: OSD problems investigated
> You might like to investigate the new code to read and write the CI that
> has appeared in the latest driver versions (0.9.4 and later). It is
> undocumented, but I suppose it is doing the same as my code was trying to
> do. Perhaps Convergence have fixed the CI support in their firmware; if
so,
> then I'll be the first to throw away what I've done and use their code.
I'm currently trying to use the new code, but I don't know how to do it
right. I haven't done any DVB programming before so please be gentle with me
if I'm doing something fundamentally wrong here ;-)
If I understand correctly, I have to send the Program Number to the
CA-Interface to start decrypting a program stream. How do I do this? The
driver code in dvb.c just reads:
[dvb.c lines 4154ff]
case CA_SEND_MSG:
break;
This does nothing, so how do I get a message sent to the CA system?
Here is my "work in progress" patch against VDR 0.99:
--- dvbapi.c.orig Sun Feb 24 18:15:46 2002
+++ dvbapi.c Sun Feb 24 20:09:18 2002
@@ -48,6 +48,7 @@
#define DEV_OST_DEMUX "/dev/ost/demux"
#define DEV_OST_VIDEO "/dev/ost/video"
#define DEV_OST_AUDIO "/dev/ost/audio"
+#define DEV_OST_CA "/dev/ost/ca"
// The size of the array used to buffer video data:
// (must be larger than MINVIDEODATA - see remux.h)
@@ -3262,6 +3263,24 @@
if (fd_audio >= 0)
CHECK(ioctl(fd_audio, AUDIO_SET_AV_SYNC, true));
}
+
+ // hh
+ if (Ca) {
+ ca_msg_t msg;
+ if(fd_ca >= 0)
+ close(fd_ca);
+ fd_ca = OstOpen(DEV_OST_CA, 0, O_RDWR);
+ if (fd_ca >= 0) {
+ esyslog(LOG_INFO, "sending Pnr %d to CA", Pnr);
+ msg.type = 0xfffe;
+ msg.index = Pnr;
+ CHECK(ioctl(fd_ca, CA_SEND_MSG, &msg));
+ close(fd_ca);
+ fd_ca = -1;
+ } else {
+ esyslog(LOG_ERR, "Error: could not open CA on card %d", Ca);
+ }
+ }
if (this == PrimaryDvbApi && siProcessor)
siProcessor->SetCurrentServiceID(Pnr);
--- dvbapi.h.orig Sun Feb 24 20:13:50 2002
+++ dvbapi.h Sun Feb 24 20:13:06 2002
@@ -26,6 +26,7 @@
#include <ost/video.h>
#include <ost/audio.h>
#include <ost/osd.h>
+#include <ost/ca.h>
#include <stdio.h>
#include "dvbosd.h"
@@ -89,7 +90,7 @@
friend class cTransferBuffer;
private:
FrontendType frontendType;
- int fd_osd, fd_frontend, fd_sec, fd_dvr, fd_audio, fd_video, fd_demuxa1,
fd_demuxa2, fd_demuxd1, fd_demuxd2, fd_demuxv, fd_demuxt;
+ int fd_osd, fd_frontend, fd_sec, fd_dvr, fd_audio, fd_video, fd_demuxa1,
fd_demuxa2, fd_demuxd1, fd_demuxd2, fd_demuxv, fd_demuxt, fd_ca;
int vPid, aPid1, aPid2, dPid1, dPid2;
bool SetPid(int fd, dmxPesType_t PesType, int Pid, dmxOutput_t Output);
bool SetVpid(int Vpid, dmxOutput_t Output) { return SetPid(fd_demuxv,
DMX_PES_VIDEO, Vpid, Output); }
Thanks,
hh
--
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.
Home |
Main Index |
Thread Index