From owner-freebsd-multimedia@FreeBSD.ORG Tue Jun 26 17:47:14 2012 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 384E21065675 for ; Tue, 26 Jun 2012 17:47:14 +0000 (UTC) (envelope-from nox@jelal.kn-bremen.de) Received: from smtp.kn-bremen.de (gelbbaer.kn-bremen.de [78.46.108.116]) by mx1.freebsd.org (Postfix) with ESMTP id B0F888FC08 for ; Tue, 26 Jun 2012 17:47:13 +0000 (UTC) Received: by smtp.kn-bremen.de (Postfix, from userid 10) id D63AC1E000A9; Tue, 26 Jun 2012 19:47:12 +0200 (CEST) Received: from triton8.kn-bremen.de (noident@localhost [127.0.0.1]) by triton8.kn-bremen.de (8.14.4/8.14.4) with ESMTP id q5QHkFZ8071727; Tue, 26 Jun 2012 19:46:15 +0200 (CEST) (envelope-from nox@triton8.kn-bremen.de) Received: (from nox@localhost) by triton8.kn-bremen.de (8.14.4/8.14.3/Submit) id q5QHkFWB071726; Tue, 26 Jun 2012 19:46:15 +0200 (CEST) (envelope-from nox) From: Juergen Lock Date: Tue, 26 Jun 2012 19:46:14 +0200 To: Juergen Lock Message-ID: <20120626174614.GA71689@triton8.kn-bremen.de> References: <4FE83768.6000909@itservice-schaefer.de> <4FE9D99F.5000005@itservice-schaefer.de> <4FE9DB34.7010806@itservice-schaefer.de> <201206261725.q5QHPV4r070734@triton8.kn-bremen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <201206261725.q5QHPV4r070734@triton8.kn-bremen.de> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-multimedia@freebsd.org Subject: Re: DVB-C (CT-3650) with UnityMedia CI Module not working X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jun 2012 17:47:14 -0000 On Tue, Jun 26, 2012 at 07:25:31PM +0200, Juergen Lock wrote: > In article <201206261804.05819.hselasky@c2i.net> you write: > >On Tuesday 26 June 2012 17:54:28 Timo Schäfer wrote: > >> Am 26.06.2012 17:47, schrieb Timo Schäfer: > >> > Am 26.06.2012 17:37, schrieb Hans Petter Selasky: > >> >> On Monday 25 June 2012 17:48:05 Timo Schäfer wrote: > >> >>> ./adapter0/ca0 > >> >> > >> >> Can you use the device shown above? > >> >> > >> >> --HPS > >> > > >> > how? vdr is not talking to it / does not detect it. > >> > > >> > under linux vdr looks at the attached ci module and inserted smartcard > >> > to unscramble > >> > the channel if needed. > >> > > >> > with my freebsd setup vdr does not detect the ci module and cannot use > >> > the smartcard > >> > to open the scrambled channels. > >> > > >> > crw-rw---- 1 webcamd webcamd 0, 97 Jun 26 17:40 ca0 > >> > > >> > has the needed rights, but i guess its not used/detected. > >> > >> Ah there is something in /var/log/messages: > >> > >> Jun 26 14:00:20 barney vdr: [680406016] ERROR: can't get info of CAM > >> slot 0 on device 0: Invalid argument > >> Jun 26 14:00:28 barney last message repeated 15 times > > > >Hi, > > > >> > >> does not look good but that seems to be the problem. > > > >Maybe it is a known IOCTL issue. Some IOCTL needs to be fixed before they can > >be used, because the RW flags are not correct. > > > >Try figuring out what IOCTL this is with ktrace or something like that. Or > >simply grep in the code for that error message. Then see if the RW flags are > >correct. > > Bingo! :) At least CA_GET_SLOT_INFO needs to be _IOWR not _IOR. > Try this patch in ports/multimedia/v4l_compat/files/patch-dvb-ca.h: > > --- dvb/ca.h.orig > +++ dvb/ca.h > @@ -80,7 +80,13 @@ typedef struct ca_pid { > > #define CA_RESET _IO('o', 128) > #define CA_GET_CAP _IOR('o', 129, ca_caps_t) > + > +/* At least CA_GET_SLOT_INFO needs to be _IOWR not _IOR. > + * This is wrong on Linux too but there the driver doesn't care. > + * > #define CA_GET_SLOT_INFO _IOR('o', 130, ca_slot_info_t) > + */ > +#define CA_GET_SLOT_INFO _IOWR('o', 130, ca_slot_info_t) > #define CA_GET_DESCR_INFO _IOR('o', 131, ca_descr_info_t) > #define CA_GET_MSG _IOR('o', 132, ca_msg_t) > #define CA_SEND_MSG _IOW('o', 133, ca_msg_t) > > .and a very similar one in > ports/multimedia/webcamd/files/patch-media_tree-include-linux-dvb-ca.h: > > --- media_tree/include/linux/dvb/ca.h.orig > +++ media_tree/include/linux/dvb/ca.h > @@ -80,7 +80,13 @@ typedef struct ca_pid { > > #define CA_RESET _IO('o', 128) > #define CA_GET_CAP _IOR('o', 129, ca_caps_t) > + > +/* At least CA_GET_SLOT_INFO needs to be _IOWR not _IOR. > + * This is wrong on Linux too but there the driver doesn't care. > + * > #define CA_GET_SLOT_INFO _IOR('o', 130, ca_slot_info_t) > + */ > +#define CA_GET_SLOT_INFO _IOWR('o', 130, ca_slot_info_t) > #define CA_GET_DESCR_INFO _IOR('o', 131, ca_descr_info_t) > #define CA_GET_MSG _IOR('o', 132, ca_msg_t) > #define CA_SEND_MSG _IOW('o', 133, ca_msg_t) > > and then rebuild these two and multimedia/vdr too. > > Good luck, :) > Juergen > > PS: The submitter of the WebcamCompat wiki TT S2-3650 entry told me > he tested the CI too, I wonder what he tested... (Or maybe the old > vdr version ignored the error?) And seems CA_GET_MSG needs to be _IOWR too, tho vdr doesn't use it so the two patches should still be enough for testing. Juergen