[mythtv] simple DEC-2000t fixes for 0.l8

Nathaniel Daw daw at gatsby.ucl.ac.uk
Wed Apr 20 10:58:17 UTC 2005

Two very simple code changes are required to get channel scanning and EIT
working with the DEC-2000t, which is a usb terrestrial dvb box. The
problem seems to be that this box or its driver (presumably due to USB 1.1
bandwidth) doesn't send service packets unless you specifically request
the exact packet type with a filter ioctl -- a permissive mask doesn't
work. So for instance if I dvbsnoop 0x11 I get nothing, but if I dvbsnoop
-f 0x42 0x11, I get channel descriptors. And dvbsnoop -f 0x46 -m 0xfb 0x11
only gives me 0x46 packets (channels on other transmitters), not 0x42
(channels on the current transmitter).

Since the last command is equivalent to what the mythtv-setup channel
scanner does, it fails to get anywhere (it seems to ignore the 0x46 
packets and to really want 0x42 packets).

The fix is simple: in ServiceHandler::GetPIDs in sitypes.cpp the line

filter = 0x46;

needs to be changed to

filter = 0x42;

There is an exactly analagous problem with the EIT -- EIT packets are not 
received unless a filter is set up for 0x50 (same transmitter) or 0x51 
(different transmitter)

The relevant change is to the line


in siparser.cpp, which needs to be


(note that filter / mask order is reversed here from the rest of the
AddPid methods.) In principle, you could set up a whole series of these
listening for 0x51 (other transmitters' programs) and the now/next packets
as well, which would be unnecessary but hopefully harmless on other cards
given the permissive mask. e.g.


However -- I haven't totally dived into the rest of the code but I'm not
entirely sure it is really set up to handle multiple event filters yet
though the data structure is in place -- the for loops over the pid lists
are a little strange (looks to me like there may be boundary errors on
loop conditions throughout such that you need the second pid to get the
first one to do anything, and also maybe that the loops over pids in any
case return after the first). In any case, with code like this I got my
program guide filled in with programs from the same, but not other,
transmitters than the one I had tuned.

Hope that's helpful. I can generate a (trivial) patch if that would be of 


More information about the mythtv-dev mailing list