Twinhan DVB-T (Vision Plus) - my experiences getting it working under MythDora 4.0
Hey guy and gals,
My first post here...
Background: I have a mythtv box running mythtv 0.18 on FC3. Setup following Jarods guide a couple of years ago. It works and it works well but FC3 is defunct now so no easy upgrade to latest myth and I want some of the new features... so I bought a new disk so that I can keep my old install and do a new one.
I use a twinhan vision plus dvb-t card. Now this took a while to get working on FC3 - mainly cos I was a Linux noob (still am tbh) but also because of things like the card not getting detected.
Anyway I got it working using the following in modprobe.conf:
alias char-major-81 bttv
install dvb /sbin/modprobe --first-time videodev && \
{ /sbin/modprobe bttv card=0x71 i2c_hw=1; \
/sbin/modprobe dvb-core; /sbin/modprobe v4l1-compat; \
/sbin/modprobe v4l2-common; /sbin/modprobe video-buf; \
/sbin/modprobe dst; /sbin/modprobe bt878; \
/sbin/modprobe dvb-bt8xx; /bin/true; }
remove dvb { /sbin/modprobe -r dvb-bt8xx dst bt878 video-buf v4l2-common v4l1-compat dvb-core bttv videodev; }
Then using
modprobe -r dvb; modprobe dvb
to load the driver.
This does NOT work on FC6.
I am getting the following errors in dmesg:
bt878_probe: card id=[0x1feff], Unknown card.
Exiting..
ACPI: PCI interrupt for device 0000:02:09.1 disabled
bt878: probe of 0000:02:09.1 failed with error -22
dvb_bt8xx: unable to determine DMA core of card 0,
dvb_bt8xx: if you have the ALSA bt87x audio driver installed, try removing it.
dvb-bt8xx: probe of dvb0 failed with error -14

cont....
An exhausting google session found this post (only):
http://www.curious-contraptions.com/forums/showthread.php?t=513&highlight=Twinhan+102g+cardid&page=2
which details a patch to add card id = 0x0001feff to the card list in bt878.c (bt878 kernel module).
I compared the source code from the FC3 version of bt878.c and the FC6 version and the card identification code is quite different.
So, I did the following:
(as root)
Get kernel source rpm:
wget http://download.fedora.redhat.com/pub/fedora/linux/core/updates/6/SRPMS/kernel-2.6.20-1.2944.fc6.src.rpm
Install kernel source:
rpm -ivh kernel-2.6.20-1.2944.fc6.src.rpm
Install make:
yum install make
Install gcc:
yum install gcc
Install gcc-c++ (for g++ in case its needed):
yum install gcc-c++
Next to edit the source and compile kernel module
cont...
Compile the kernel module:
cd /usr/src/redhat/SOURCES/linux-2.6.20
make oldconfig && make prepare
make M=scripts/mod/ --- had to do this because of error I got
make M=scripts/genksyms/ --- had to do this because of error I got
make M=drivers/media/dvb/bt8xx/
I then had updated .ko files in:
/usr/src/redhat/SOURCES/linux-2.6.20/drivers/media/dvb/bt8xx
bt878.ko dst_ca.ko dst.ko dvb-bt8xx.ko
Copied these to:
/lib/modules/2.6.20-1.2944.fc6/kernel/drivers/media/dvb/bt8xx
I backed up originals first ;)
Rebooted and hey presto.
When I ran "modprobe dvb" it works.... sort of.
The card is 100% working. Detected, tunes in mythtv-setup and I can watch TV. Yay.
Only one niggle - In dmesg I get:
bttv: driver version 0.9.16 loaded
bttv: using 8 buffers with 2080k (520 pages) each for capture
bttv: Bt8xx card found (0).
bttv0: Bt878 (rev 17) at 0000:00:08.0, irq: 20, latency: 32, mmio: 0xe6000000
bttv0: subsystem: feff:0001 (UNKNOWN)
bttv0: using: Twinhan DST + clones [card=113,insmod option]
bttv0: gpio: en=00000000, out=00000000 in=00f500ff [init]
bttv0: using tuner=4
bttv0: add subdevice "dvb0"
bt878: no version for "struct_module" found: kernel tainted.
bt878: AUDIO driver version 0.0.0 loaded
bt878: Bt878 AUDIO function found (0).
bt878_probe: card id=[0x1feff],[ Twinhan VisionPlus DVB ] has DVB functions.
bt878(0): Bt878 (rev 17) at 00:08.1, irq: 20, latency: 32, memory: 0xe6001000
DVB: registering new adapter (bttv0).
Any anyone help me fix this small annoyance?
Anyway... regardless, it is now working OK so I hope this long post helps someone out!! It took me a load of googling to find the solution.
P.S.
Incedenctally, the twinhan does seem to be a popular DVB card and I find it surprising that no-one else has seen this problem... I have heard that these cards can get the I2C EEPROM corrupted occasionaly. I wonder if that has caused my card ID to get screwed...
Did you happen to install
Did you happen to install the video4linux rpm during install? This has updated DVB drivers in it. The reason your not seeing anyone with this problem is because that patch was from last year for kernel-2.6.16. Very old stuff. This I'm almost sure of is now supported in video4linux. It should be in the kernel to be honest with you.
"Please ignore the man behind the curtain"
Dennis
"Please ignore the man behind the curtain"
Dennis
Nope.... :(
I thought all the DVB drivers were in kernel so I didn't.
I'll probably give it a go again tonight and install V4L during install.
Well - it was fun doing all that and I learnt some new stuff anyway ;)
And thanks for the rapid response mate!
So....
Just to be sure, were you saying I should have installed the V4L RPM?
I don't see that as an install option on mythdora 4. There is an option to install more capture card drivers and I did use this.
I'll try installing v4l rpm via yum and see if it makes a difference.
Cheers...
It's there in the Additional
It's there in the Additional Capture card drivers section as an option just like you mentioned.
"Please ignore the man behind the curtain"
Dennis
"Please ignore the man behind the curtain"
Dennis
V4L source - no fix in this code
Hi Dennis,
I downloaded the v4l source from:
http://dl.atrpms.net/src/fc6-i386/atrpms/stable/
(this is the srpms for Mythdora 4 right? - I saw it in some other post)
I installed the source and checked /video4linux-20070420/linux/drivers/media/dvb/bt8xx/bt878.c
The fix I need is definitely not in this code - i.e should be a line like:
{ 0x0001feff, BTTV_BOARD_TWINHAN_DST, "Twinhan VisionPlus DVB" },
in the code below:
static struct cards card_list[] __devinitdata = {
{ 0x01010071, BTTV_BOARD_NEBULA_DIGITV, "Nebula Electronics DigiTV" },
{ 0x07611461, BTTV_BOARD_AVDVBT_761, "AverMedia AverTV DVB-T 761" },
{ 0x001c11bd, BTTV_BOARD_PINNACLESAT, "Pinnacle PCTV Sat" },
{ 0x002611bd, BTTV_BOARD_TWINHAN_DST, "Pinnacle PCTV SAT CI" },
{ 0x00011822, BTTV_BOARD_TWINHAN_DST, "Twinhan VisionPlus DVB" },
{ 0xfc00270f, BTTV_BOARD_TWINHAN_DST, "ChainTech digitop DST-1000 DVB-S" },
{ 0x07711461, BTTV_BOARD_AVDVBT_771, "AVermedia AverTV DVB-T 771" },
{ 0xdb1018ac, BTTV_BOARD_DVICO_DVBT_LITE, "DViCO FusionHDTV DVB-T Lite" },
{ 0xdb1118ac, BTTV_BOARD_DVICO_DVBT_LITE, "Ultraview DVB-T Lite" },
{ 0xd50018ac, BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE, "DViCO FusionHDTV 5 Lite" },
{ 0x20007063, BTTV_BOARD_PC_HDTV, "pcHDTV HD-2000 TV" },
{ 0x00261822, BTTV_BOARD_TWINHAN_DST, "DNTV Live! Mini" }
};
Seems like I'll definitely need to recompile the bt878 kernel module - any recommendations on best way to do this? Should I do as I did before (in 1st post) and live with the kernel taint? or is there a better way (i'm sure there is!! - i'm a noob at this)...