Evga InDTube ATSC tuner in Linux, Solved! - Canadian TV, Computing and Home Theatre Forums
 

Go Back   Canadian TV, Computing and Home Theatre Forums > Consumer Electronics and Home Computing > Home Theatre Personal Computer (HTPC) and Media Extenders

Reply
 
Thread Tools Search this Thread Display Modes

Old 2010-12-18, 11:33 PM   #1
majortom
Veteran
 
Join Date: Jan 2009
Posts: 3,314
Default Evga InDTube ATSC tuner in Linux, Solved!

Psyched!

Finally figured out why this tuner wouldn't work in linux.
I've literally been screwin around with this for months
Apparently none of the default frequency lists located in /usr/share/dvb/atsc/
are compatible with the Samsung s5h1409 frontend demodulator,
Using the stepsize of 62,500 Hz, I made my own freq list to step thru from
174000000 thru 180000000 for VHF CH 7 to find the center frequency
that the device would lock.

I found it would lock in the below range, so I chose 176625000 as the center freq for vhf ch 7,
then just followed the bouncing ball for the rest of the channels.
Now to try playing around with some scripts for the SNR stats.

Code:
#step thru every freq in 62500 hz increments, to find a lock on VHF 7#
# only locks on these, ~ 500 Khz range, nowhere near the stock V4L Freq Lists#
A 176437500 8VSB
A 176500000 8VSB
A 176562500 8VSB
A 176625000 8VSB
A 176687500 8VSB
A 176750000 8VSB
A 176812500 8VSB
A 176875000 8VSB
customised atscbuffalo freq list
Code:
A 176625000 8VSB
A 472625000 8VSB
A 496625000 8VSB
A 508625000 8VSB
A 526625000 8VSB
A 544625000 8VSB
A 580625000 8VSB
A 586625000 8VSB
A 616625000 8VSB
A 622625000 8VSB
A 646625000 8VSB
A 682625000 8VSB
Code:
#snippet from s5h1409.c#
972                 .name                   = "Samsung S5H1409 QAM/8VSB Frontend",
973                 .type                   = FE_ATSC,
974                 .frequency_min          = 54000000,
975                 .frequency_max          = 858000000,
976                 .frequency_stepsize     = 62500,
977                 .caps = FE_CAN_QAM_64 | FE_CAN_QAM_256 | FE_CAN_8VSB
majortom is online now  
Sponsored Links
Advertisement
 
Old 2010-12-19, 10:45 AM   #2
majortom
Veteran
 
Join Date: Jan 2009
Posts: 3,314
Default mythtv Freq Tables, where are they??

Here's a question for all the mythv gurus.
Where do the Frequency Tables live?

i.e. - us-bcast
is it just a text file someplace, or is it buried in the
mysql database, mythconverg ???

This would be why I'm asking.

I need to modify this table so my tuner can tune
when scanning.

Thanks,

mt..
majortom is online now  
Old 2010-12-19, 12:21 PM   #3
Knight
 
Join Date: Apr 2006
Location: South shore of Montreal
Posts: 324
Default

(I'm pretty sure stampeder will move this to either the mythtv or your thread but in the mean time I'll reply to it here....)

Quote:
Originally Posted by majortom View Post
Here's a question for all the mythv gurus.
Where do the Frequency Tables live?

i.e. - us-bcast
is it just a text file someplace, or is it buried in the
mysql database, mythconverg ???
In the libmythtv library...

re: mythtv/libs/libmythtv/frequencies.c

Quote:
This would be why I'm asking.

I need to modify this table so my tuner can tune
when scanning.
This would need to be addressed in the driver and not in MythTV...

Have a nice day!

Nick
Knight is offline  
Old 2010-12-19, 12:44 PM   #4
majortom
Veteran
 
Join Date: Jan 2009
Posts: 3,314
Default

Thanks Knight, found it
Seems pretty silly for developers to hard code frequencies
in to source. I see they haven't even gotten rid of ch 52-69 yet (I know, Canada still uses them),
let alone 70-83 for "US-broadcast" which haven't even been used for
television in what, 20 years?

There's so many different tuner chipsets out there..
I don't see how they can accomodate 'em all that way.
Did send an email to one of the developers of that driver though,
with details of the issue I found.

PS- I think what I'll do is add another list to frequencies.c with what
works for me, give it a new name, and re-compile. Rather than modify
theirs. Never know, someday I might have a diff tuner.
majortom is online now  
Old 2010-12-19, 04:20 PM   #5
Knight
 
Join Date: Apr 2006
Location: South shore of Montreal
Posts: 324
Default

Quote:
Originally Posted by majortom View Post
to hard code frequencies
in to source.
Maybe it's because they don't change very often. Assuming I used the correct command the last time it was changed was in 2007...

Quote:
I see they haven't even gotten rid of ch 52-69 yet (I know, Canada still uses them),
A US LP (Low Power) station my parents get is on channel 52...

Quote:
let alone 70-83 for "US-broadcast" which haven't even been used for television in what, 20 years?
I wonder if there might be a reason for keeping these...

Quote:
There's so many different tuner chipsets out there..
I don't see how they can accomodate 'em all that way.
Usually if they can identify the card and the tuner involved correctly they can accommodate this without too much trouble...

Quote:
Did send an email to one of the developers of that driver though,
with details of the issue I found.
On the linux-media ML or directly?

Quote:
PS- I think what I'll do is add another list to frequencies.c with what
works for me, give it a new name, and re-compile. Rather than modify
theirs. Never know, someday I might have a diff tuner.
That might be the best thing to do for now I guess...

Have a nice day!

Nick
Knight is offline  
Old 2010-12-20, 06:46 PM   #6
majortom
Veteran
 
Join Date: Jan 2009
Posts: 3,314
Default

thanks Knight,

Maybe it's because they don't change very often. Assuming I used the correct command the last time it was changed was in 2007...

Quote:
A US LP Power) station my parents get is on channel 52...
moot I guess, since Canada still uses them too.
Quote:
I wonder if there might be a reason for keeping these...
I can't think of any reason, at least not in North America
Quote:
Usually if they can identify the card and the tuner involved correctly they can accommodate this without too much trouble.
Apparently not so in this case.
Quote:
Did send an email to one of the developers of that driver though,
with details of the issue I found.
Quote:
On the linux-media ML or directly?
Directly, he seemed to think it may have incurred some regression.
he thinks it might be in the em288x driver (USB-DVB)...
since several popular Hauppage boards use the same Samsung demodulator chip,
without issue. Said he has some other boards with the same 2 chips he can test with...

PS- I think what I'll do is add another list to frequencies.c with what
works for me, give it a new name, and re-compile. Rather than modify
theirs. Never know, someday I might have a diff tuner.
Quote:
That might be the best thing to do for now I guess...
Compiled fine, but didn't work. I think there must be another module,
related to the actual scanning that would need to be modified also. I can choose my list, no problem in one menu. but then ya go to the dialog where ya actually scan, it's not there. It's working anyhow, since I just realized ya can just import ur channels.conf
Still would be nice to use the built in scanner...plug away at it as I have time.
majortom is online now  
Old 2010-12-26, 12:14 AM   #7
majortom
Veteran
 
Join Date: Jan 2009
Posts: 3,314
Default

Quote:
Compiled fine, but didn't work. I think there must be another module,
I found it. The code in frequencies.c is only for defining the NTSC / analog freqs.
The code in frequencytables.cpp is used for defining the ATSC / digital freqs.
Below is all I had to change, and now the built in scanner function
works like a champ with this Evga inDtube tuner.
just commented out 4 lines, and replaced em with mine.
could even completely delete the code related to ch 70-83 but just
left that as is, since it's useless anyway...

modification to frequencytables.cpp
Code:
#else // if !DEBUG_DVB_OFFSETS
    // USA Terrestrial (center frequency, subtract 1.75 MHz for visual carrier)
    // VHF 2-4
    fmap["atsc_vsb8_us0"] = new FrequencyTable(
    //  "ATSC Channel %1",  2,  57000000,  69000000, 6000000,
        "ATSC Channel %1",  2,  56625000,  68625000, 6000000,
        DTVModulation::kModulation8VSB);
    // VHF 5-6
    fmap["atsc_vsb8_us1"] = new FrequencyTable(
    //  "ATSC Channel %1",  5,  79000000,  85000000, 6000000,
	"ATSC Channel %1",  5,  78625000,  84625000, 6000000,
        DTVModulation::kModulation8VSB);
    // VHF 7-13
    fmap["atsc_vsb8_us2"] = new FrequencyTable(
     // "ATSC Channel %1",  7, 177000000, 213000000, 6000000,
	"ATSC Channel %1",  7, 176625000, 212625000, 6000000,
        DTVModulation::kModulation8VSB);
    // UHF 14-69
    fmap["atsc_vsb8_us3"] = new FrequencyTable(
    //  "ATSC Channel %1", 14, 473000000, 803000000, 6000000,
        "ATSC Channel %1", 14, 472625000, 802625000, 6000000,	
        DTVModulation::kModulation8VSB);
    // UHF 70-83
    fmap["atsc_vsb8_us4"] = new FrequencyTable(
        "ATSC Channel %1", 70, 809000000, 887000000, 6000000,
        DTVModulation::kModulation8VSB);
#endif // !DEBUG_DVB_OFFSETS
majortom is online now  
Old 2010-12-27, 06:22 PM   #8
Knight
 
Join Date: Apr 2006
Location: South shore of Montreal
Posts: 324
Default

Sorry for the delayed reply, I haven't had much chance to use my pc during this holiday period...

Quote:
Originally Posted by majortom View Post
I can't think of any reason, at least not in North America
I'll try to dig up an answer for you...

Quote:
Directly, he seemed to think it may have incurred some regression.
he thinks it might be in the em288x driver (USB-DVB)...
You probably contacted Devin Heitmueller since he appeared to have done some work on that tuner recently...

Quote:
since several popular Hauppage boards use the same Samsung demodulator chip, without issue. Said he has some other boards with the same 2 chips he can test with...
If he says Hauppauge boards have no trouble with this chip I have great confidence that he is right because AFAIK he works for Hauppauge (just like Steven Toth...)

Quote:
PS- I think what I'll do is add another list to frequencies.c with what
works for me, give it a new name, and re-compile. Rather than modify
theirs. Never know, someday I might have a diff tuner.
Good idea (at least for now...)

Quote:
I found it. The code in frequencies.c is only for defining the NTSC / analog freqs. The code in frequencytables.cpp is used for defining the ATSC / digital freqs.
That's actually the first file I checked (I know somebody in Europe who had to change it for his country) but I disregarded it since it seemed to deal with DVB-S and DVB-T stuff...

I keep forgetting that our ATSC tuners are considered DVB tuners in MythTV...

Happy holidays!

Nick
Knight is offline  
Old 2010-12-27, 07:04 PM   #9
majortom
Veteran
 
Join Date: Jan 2009
Posts: 3,314
Default

Yeah it was Devin.
BTW, I wound up commenting out that ch 70-83 code and re-compiling after all.
Such a waste of time having a TV Tuner scan thru the 850 cellular band
for nothing. Having the built in scanner functioning properly is a big plus for anyone
in to OTA. Should be useful when Tropo Season returns.
majortom is online now  
Old 2010-12-28, 02:25 PM   #10
stampeder
OTA Forum Moderator
 
Join Date: Jan 2005
Location: North Delta, BC (96Av x 116St)
Posts: 23,911
Default

BTW MythTV 0.24 lets you set a lower and upper channel scan range, thankfully!
stampeder is offline  
Old 2010-12-28, 06:34 PM   #11
majortom
Veteran
 
Join Date: Jan 2009
Posts: 3,314
Default

ditto in mythtv-0.23.1+fixes26437.
After re-compiling it I can scan thru the range from 2 thru 69,
instead of 2 thru 83. And it seems pretty good, and quick.
I was also able to modify azap, to spit out the SNR in dB (decimal),
instead of in hex by commenting out this one line below,
and replacing with mine to print it out in decimal.
Who would ever want to see SNR in Hex?

azap.c
Code:
/*		printf ("status %02x | signal %04x| snr %04x| "
			"ber %08x | unc %08x | ",*/		
		
		printf ("status %02x | signal %04d| snr %04d| "
			"ber %08x | unc %08x | ",
			status, signal, snr, ber, uncorrected_blocks);

		if (status & FE_HAS_LOCK)
			printf("FE_HAS_LOCK");
example output: (170 meaning 17.0 dB)
Code:
 /usr/bin/azap -a 1 -c ~/.azap/channels.conf -r CHCH-DT
using '/dev/dvb/adapter1/frontend0' and '/dev/dvb/adapter1/demux0'
tuning to 496625000 Hz
video pid 0x0031, audio pid 0x0034
status 00 | signal 0000| snr 0000| ber 00000000 | unc 00000000 | 
status 1f | signal 0170| snr 0170| ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal 0170| snr 0170| ber 000000c8 | unc 000000c8 | FE_HAS_LOCK
status 1f | signal 0170| snr 0170| ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal 0170| snr 0170| ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal 0170| snr 0170| ber 00000000 | unc 00000000 | FE_HAS_LOCK
majortom is online now  
Old 2010-12-28, 06:49 PM   #12
Knight
 
Join Date: Apr 2006
Location: South shore of Montreal
Posts: 324
Default

MythTV no longer scans the channel 70-83 range for OTA since early this morning.

This has only been done on the main dev branch though (master or what used to be called Trunk with SVN) but it should make its way to the stable branch (0.24-fixes) soon...

Have a nice day!

Nick
Knight is offline  
Old 2010-12-28, 06:59 PM   #13
stampeder
OTA Forum Moderator
 
Join Date: Jan 2005
Location: North Delta, BC (96Av x 116St)
Posts: 23,911
Default

Are you patching against MythTV, Knight?
stampeder is offline  
Old 2010-12-28, 07:28 PM   #14
Knight
 
Join Date: Apr 2006
Location: South shore of Montreal
Posts: 324
Default

Stampeder, if you mean do I have commit access on the main repo, the answer is yes...

Have a nice day!

Nick
Knight is offline  
Old 2010-12-28, 07:35 PM   #15
majortom
Veteran
 
Join Date: Jan 2009
Posts: 3,314
Default

Quote:
MythTV no longer scans the channel 70-83 range for OTA since early this morning.
Nice...
Quote:
Are you patching against MythTV, Knight?
if so, Knight would you happen to know where the SIGNAL / Quality
report that shows up in the OSD as ya tune a new freq comes from?
From what I'm seein, I'm thinkin the only field that actually works is the FE Lock status.
i.e. which module fills in these fields of the OSD, from the tuner's frontend?
majortom is online now  
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -4. The time now is 10:05 AM.

Search Digital Home

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.