[linux-dvb] DEC2000-t help

Peter Beutner p.beutner at gmx.net
Wed Jul 6 03:37:56 CEST 2005


gneeki schrieb:
 > Furthermore, after some discussions with people online and some
 > reading, I now understand that the old-fashioned way of using this in
 > MythTV (dvb-apps's dvbscan -> channels.conf -> channels.conf-import.pl
 > -> mysql) isn't now supported, as MythTVsetup's scan is supposed to
 > work - but doesn't for the DEC2000-t, supposedly because of driver
 > issues, references:
Hi
Appearently there are two things which let mythtv hang during channel scan:
- as the driver always reports a signal lock mythtv waits forever when 
it has tuned to a frequency where is no signal at all
- a filter mask(other than 0xff) for section filter doesnt work
I attach two patches which should resolve these issues. The first one, 
implementing the signal status readout, should be pretty safe. Im using 
it quite some time now. Just hadn't found time to send it here. The 
second one is more a better guess, but it seems to do the right thing, 
eg channel scanning with mythtv works for me. Hope it doesnt break any 
other stuff, although I think it shouldnt ...
So you may give them a try ;)

 > Using tzap feeding into mplayer on stdin it seems to tune into
 > the first few channels I try, but then mplayer rigidly sticks
 > at 0% cache, and refuses to tune in until I reboot (card/module
 > removal/reinsertion doesn't seem to help).

I guess the decoder chip on the box locks up. If you look in your kernel 
log when that happens, you probably will see lots of "bulk message 
failed" errors. At least I see this quite often here after some channel 
zapping. Im still trying to find the real reason for these lockups.

 > For info, when I plug
 > in the card, /var/log/messages first reports it as a DEC2540-t then
 > seems to change its mind (it always did this, even when working):

that shouldnt be a problem iirc.

 > The "snr" reading is always suspiciously zero, even when it works ok,
 > maybe this isn't implemented in the driver?

right, its not implemented, as it is pretty hard to guess from the usb 
traffic logs which values mean SNR/signal strength/etc.

 > Finally, if I can get tzap working reliably, does anyone have any
 > suggestions about how I could even just *watch* TV in Linux on this
 > thing with something other than MythTV, if that remains a problem?
 > xine and mplayer's direct DVB support (for changing channels within
 > the application never seemed to work to me). Is there anything else
 > other than MythTV I could use, even for just viewing?  I really don't
 > want to boot Windows.

I used to use xine but after they reworked the dvb input somewhere in 
1.0-rc* I dont get any video anymore and I still havent found the real 
reason, just the fact that it seems to be another driver problem :(
But after your post and installing mythtv and i must say im really 
impressed by it.I think i will play a bit more with it.Although its 
quite a pain to configure imo, still havent figured out why audio and 
epg dont want to work.

CU
Peter
-------------- next part --------------
--- linux/drivers/media/dvb/ttusb-dec/ttusbdecfe.c.old	2005-07-06 00:51:03.000000000 +0200
+++ linux/drivers/media/dvb/ttusb-dec/ttusbdecfe.c	2005-07-06 01:28:40.000000000 +0200
@@ -42,8 +42,39 @@ struct ttusbdecfe_state {
 
 static int ttusbdecfe_read_status(struct dvb_frontend* fe, fe_status_t* status)
 {
-	*status = FE_HAS_SIGNAL | FE_HAS_VITERBI |
-		  FE_HAS_SYNC | FE_HAS_CARRIER | FE_HAS_LOCK;
+	struct ttusbdecfe_state* state = fe->demodulator_priv;
+	u8 b[] = { 0x00, 0x00, 0x00, 0x00,
+		   0x00, 0x00, 0x00, 0x00 };
+	u8 result[4];
+	int len, ret;
+
+	*status=0;
+
+	ret=state->config->send_command(fe, 0x73, sizeof(b), b, &len, result);
+	if(len != 4) {
+		printk(KERN_ERR "%s: unexpected reply\n", __FUNCTION__);
+		return -1;
+	}
+	if(ret)
+		return ret;
+
+	switch(result[3]) {
+		case 1:  /* is not tuned (proper -EXXX?) */
+			return -1;
+		case 2:  /* not lock*/
+			break;
+		case 3: /* signal found */
+			*status = FE_HAS_SIGNAL | FE_HAS_VITERBI |
+				  FE_HAS_SYNC | FE_HAS_CARRIER | FE_HAS_LOCK;
+			break;
+		case 4:
+			*status = FE_TIMEDOUT;
+			break;
+		default:
+			pr_info("%s: returned unknown value: %d\n",
+				__FUNCTION__, result[3]);
+			return -1;
+	}
 
 	return 0;
 }
-------------- next part --------------
--- linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c.old	2005-06-29 18:07:13.000000000 +0200
+++ linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c	2005-07-05 21:01:40.000000000 +0200
@@ -1029,6 +1029,7 @@ static int ttusb_dec_start_sec_feed(stru
 	memcpy(&b0[0], &pid, 2);
 	memcpy(&b0[4], &x, 1);
 	memcpy(&b0[5], &dvbdmxfeed->filter->filter.filter_value[0], 1);
+	memcpy(&b0[17], &dvbdmxfeed->filter->filter.filter_mask[0], 1);
 
 	result = ttusb_dec_send_command(dec, 0x60, sizeof(b0), b0,
 					&c_length, c);


More information about the linux-dvb mailing list