[mythtv] Digital tuner channel change on bad channel - PATCH

Eric Anderson rico99 at sbcglobal.net
Sat Jan 8 01:28:27 EST 2005


Hi  -

[First of all, if this topic has been discussed in detail before, if 
someone
could point me to the correct thread topic, I'd appreciate it...]

Regarding channel changes for HD cards, if you change to a channel
for which there is no good signal, the channel changing code seems to
go nuts. And in fact, it seems to start scanning the full tuning channel
list (Ch2 - 83 here in the US). In the end a message is printed to the
effect of "Maybe your channel lineup isn't configured properly?"

I was running into this with the HD3000 card. Because I have another
standard-def tuner card in my system, I figured that, okay -- maybe I
don't have my channel lineups configured properly. But yesterday I
cleaned them up. And I *think* I have things set up right.

So after some investigation I discovered is that in channel.cpp, the 
Channel
class'  ChannelUp() function calls the ChannelBase class' ChannelUp() 
function.
But if that function returns 'false' (indicating failure), the code 
goes into a fall-back
mode where it tries to tune *something* from the channel lineup. So 
it's trying to
tune channels #2, #3, etc. But on the tuner I'm using my channels are 
not numbered
as integer strings. They're subchannel strings like: 5.1, 6.1, 7.1, 
7.2, 9.1, 9.2, etc...

So as an example, say that "6.1" really shouldn't be in my channel list
(because I don't get enough signal strength). But it's definitely 
annoying
to have the code just kind of bomb out just because I have one bad 
channel
configured on my card!

Attached below is a simple fix. If someone understands the reasoning
behind the code that scans the normal channels in the event of an error,
perhaps they can explain the fall-back code and suggest a better fix. 
Since
I didn't understand the intention of that code, I replaced it with code 
that, in
the event of a failure to tune a channel, simply continues on to the 
next channel.
It continues cycling until it returns back to the first channel (I'm 
assuming that
GetNextChannel() will eventually return a string that matches the 
first).

Regards.

-Eric

-------------- next part --------------
A non-text attachment was scrubbed...
Name: channel-change.patch
Type: application/octet-stream
Size: 2680 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20050107/8959cd72/channel-change.obj
-------------- next part --------------





More information about the mythtv-dev mailing list