Apologies, Now I know how what the command "diff" is for. Attached are my patches. -----Original Message----- From: Johannes Stezenbach [mailto:js@xxxxxxxxxxx] Sent: Thursday, December 01, 2005 6:21 PM To: bander ajba Cc: 'Peter Beutner' Subject: Re: [linux-dvb] DEC3000-s Hi, your mail is too large for the linux-dvb list, it got dropped. Plaese send patches (diff -up file.c.orig file.c), not whole files. Thanks, Johannes On Thu, Dec 01, 2005 at 05:24:01PM +0300, bander ajba wrote: > Hello again, > > Sorry If I cannot provide patches due to my weak programming skills. > However, I will post the 2 driver files and I will explain my findings which > hopefully gives you an idea on what's wrong. > > There are 5 things I found if you do something about them you will have a > working dec3000: > > Finding 1: My last searches on the dec3000s driver on this forum pointed > that the scanning for channels sometime works and some does not. The reason > for this is in ttusbdecfe.c: > > [ state->hi_band ] > > in function > > [static int ttusbdecfe_dvbs_set_frontend(...)] is always set to zero. > > Which sets the variable [band] to the constant [LOF_LO] causing the dec3000 > to fail. > > I tried to sets the variable when the diseqc command is sent but it does not > work. So I set it to 1 because most of the channels I tuned to are in the > high band anyway. I believe the error lies in passing the variable from the > dvb_demux -> ttusbdecfe.c > > So setting the [hi_band] correctly will cause the DEC3000 to tune okay. > (critical) > > > Finding 2: some applications fail (like mplayer, and mythtv) when Sending > Burst tone to the DEC. Apparently the DEC does not care about the burst tone > (I think automatically detected) so I always return success. > > So ignoring the [Burst_tone] and returning success will case the application > to work correctly.(annoyance) > > Finding 3: adding the range for min_symbolrate, and max_symbolrate will stop > some applications to complain about symbolrate being out of range > (Annoyance) > > Finding 4: this should concerns myth users, once you suite yourself with the > 3 above findings go to /mythtv-0.18.1/libs/libmythtv/siparser.cpp and > recheck the filter value on ::ParseSDT (). Setting the filter to 0x4E cause > mythtv to tune successfully and automatically scan for channels. I'm not > sure if I changed any other filters so I will post this file too. > > Please note: in siparser.cpp I added a functionality routine to grab EIT > from space and insert them in the Database. It functions okay but there many > null entries in the mythconverg.program table. The reason for this is that > xmltv does not fit my needs.(extra feature) > > Finding 5: I reached this finding just yesterday when I successfully was > able to watch encrypted channels in Mythtv. > > After many many many many starring at the usb sniffer dumps between the > dec3000 and Windows, I found out that there some commands need to be send in > the initialization time of the DEC which causes the CAM to initialize. > > > /**************************************************************************/ > static int ttusb_dec_set_interface(struct ttusb_dec *dec, > enum ttusb_dec_interface interface) > { > int result = 0; > u8 b[] = { 0x05 }; > u8 b0[] = {0x01 }; > u8 b1[]= { 0x00, 0x00, 0x00,0x01}; > > if (interface != dec->interface) { > switch (interface) { > case TTUSB_DEC_INTERFACE_INITIAL: > result = usb_set_interface(dec->udev, 0, 0); > break; > case TTUSB_DEC_INTERFACE_IN: > result = ttusb_dec_send_command(dec, 0x80, > sizeof(b),b, NULL, NULL); > result = ttusb_dec_send_command(dec, 0xac, 0,NULL, > NULL, NULL); > result = ttusb_dec_send_command(dec, 0xa6, > sizeof(b0),b0, NULL, NULL); > result = ttusb_dec_send_command(dec, 0x81, 0,NULL, > NULL, NULL); > /**************************************************************************/ > > However, that's the easy part. Now every time you set the section filter for > the channel, you need to send the ServiceID or the Program Number of the > channel to the DEC. until now I did not figure out the way to pass this > value from the PAT parser at the application level to the driver level. So > as an easy layback temporary solution, I added switch case to the frequently > used scrambled channels in the driver and boom it works. > > This is the code: > /**************************************************************************/ > static int ttusb_dec_start_sec_feed(struct dvb_demux_feed *dvbdmxfeed) > { > struct ttusb_dec *dec = dvbdmxfeed->demux->priv; > u8 b0[] = { 0x00, 0x00, 0x00, 0x01, > 0x00, 0x00, 0x00, 0x00, > 0x00, 0x00, 0x00, 0x00, > 0x00, 0x00, 0x00, 0x00, > 0x00, 0xff, 0x00, 0x00, > 0x00, 0x00, 0x00, 0x00, > 0x00, 0x00, 0x00, 0x00, > 0x00 }; > u16 pid; > u16 sid; > int flag = 0; > u8 c[COMMAND_PACKET_SIZE]; > int c_length; > int result; > struct filter_info *finfo; > unsigned long flags; > u8 b1[]={ 0x00 , 0x00 }; > > u8 b2[]={ 0x00, 0x00, 0x00, 0x01, > 0x00, 0x00, 0x00, 0x00 }; > u8 x = 1; > > dprintk("%s\n", __FUNCTION__); > pid = htons(dvbdmxfeed->pid); > sid = 0;//htons(dvbdmxfeed->sid); > memcpy(&b0[0], &pid, 2); > memcpy(&b0[4], &x, 1); > memcpy(&b0[5], &dvbdmxfeed->filter->filter.filter_value[0], 1); > > switch(dvbdmxfeed->pid) > { > case 101: sid =301; break; > case 102: sid =302; break; > case 103: sid =303; break; > case 104: sid =304; break; > case 270: sid =2307; break; > case 271: sid =1013; break; > case 272: sid =421; break; > case 273: sid =422; break; > case 274: sid =423; break; > case 275: sid =721; break; > case 276: sid =425; break; > case 277: sid =426; break; > > default: > sid = 0; > > } > //dprintk("sid is %d\n",dvbdmxfeed->sid); > sid = htons(sid); > memcpy(&b1[0], &sid,2); > if (dvbdmxfeed->pid > 18 && sid > 0) > { > dprintk("pid is %d\n",dvbdmxfeed->pid); > result = ttusb_dec_send_command(dec, 0xa5, sizeof(b1), b1, > &c_length,c); > result = ttusb_dec_send_command(dec, 0x73, sizeof(b2), b2, > &c_length,c); > result = ttusb_dec_send_command(dec, 0xa5, sizeof(b1), b1, > &c_length,c); > result = ttusb_dec_send_command(dec, 0x73, sizeof(b2), b2, > &c_length,c); > result = ttusb_dec_send_command(dec, 0x73, sizeof(b2), b2, > &c_length,c); > } > /*************************************************************************/ > > The reason for reptetion on the last part is just simulating what windows is > doing. > > > I hope my post is thorough. > > > > > > > > > > -----Original Message----- > From: Peter Beutner [mailto:p.beutner@xxxxxxx] > Sent: Thursday, December 01, 2005 10:28 AM > To: bander ajba > Cc: linux-dvb@xxxxxxxxxxx > Subject: Re: [linux-dvb] DEC3000-s > > bander ajba schrieb: > > Hello All, > > > > This is my first post so I hope that I see active people with me. > > > > I have successfully used DEC3000-s with MYTHTV. I did few changes in the > > ttusb_dec drvier and few changes in Mythtv code. > > > > Please if anybody is interested then I will explain everything in details. > > So please respond. > > > Given the fact that the ttusb_dec driver doesn't really work that well and > especially > regarding the DEC3000s I remember several reports that it didn't work at > all, I think it > would be nice if you post your changes and try to get them committed to cvs. > > > > > > > Currently I'm trying to figure out how to work the DEC3000-S CI using > IRDETO > > system. > > > > > > > > --Bander > > > > > > > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > > > linux-dvb@xxxxxxxxxxx > > http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb -------------- next part -------------- A non-text attachment was scrubbed... Name: ttusb_dec.patch Type: application/octet-stream Size: 4363 bytes Desc: not available Url : http://www.linuxtv.org/pipermail/linux-dvb/attachments/20051202/b0c5610c/ttusb_dec-0001.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: ttusbdecfe.patch Type: application/octet-stream Size: 2798 bytes Desc: not available Url : http://www.linuxtv.org/pipermail/linux-dvb/attachments/20051202/b0c5610c/ttusbdecfe-0001.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: siparser.patch Type: application/octet-stream Size: 2412 bytes Desc: not available Url : http://www.linuxtv.org/pipermail/linux-dvb/attachments/20051202/b0c5610c/siparser-0001.obj