Categories
Linux

Using the KWorld PC160-2T with Mythtv on Ubuntu Linux 11.10

The PCI card is internally implemented as a USB interface connected to the two tuners over USB which is interesting to say the least. Presumably its cheaper to put an extra USB chip on a PCI card than to make a new design specifically for PCI.

The first problem I had was that there was no firmware. I spotted this in the output from dmesg:

[ 13.980942] dvb-usb: found a 'KWorld PlusTV Dual DVB-T PCI (DVB-T PC160-2T)' in cold state, will try to load a firmware
[ 15.147767] dvb-usb: did not find the firmware file. (dvb-usb-af9015.fw) Please see linux/Documentation/dvb/ for more details on firmware-problems. (-2)
[ 15.147781] dvb_usb_af9015: probe of 3-1:1.0 failed with error -2

Although the documentation describes a method to obtain the firmware by running a script, it turns out that Ubuntu already has the firmware packaged. So I just needed to install linux-firmware-nonfree.

sudo apt-get install linux-firmware-nonfree

Then I needed reinsert the modules so that the firmware could get downloaded:

sudo rmmod dvb_usb_af9015
sudo rmmod dvb-usb
modprobe
modprobe dvb-usb
sudo modprobe dvb-usb
sudo modprobe dvb_usb_af9015

Next time I ran dmesg, there were some much more promising lines:

[   29.822162] dvb-usb: found a 'KWorld PlusTV Dual DVB-T PCI (DVB-T PC160-2T)' in cold state, will try to load a firmware
[   29.967469] dvb-usb: downloading firmware from file 'dvb-usb-af9015.fw'
[   30.037577] dvb-usb: found a 'KWorld PlusTV Dual DVB-T PCI (DVB-T PC160-2T)' in warm state.
[   30.037783] dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
[   30.038103] DVB: registering new adapter (KWorld PlusTV Dual DVB-T PCI (DVB-T PC160-2T))
[   30.042065] af9013: firmware version:4.95.0.0
[   30.046814] DVB: registering adapter 0 frontend 0 (Afatech AF9013 DVB-T)...
[   30.048791] tda18271 0-00c0: creating new instance
[   30.054815] TDA18271HD/C2 detected @ 0-00c0
[   30.324093] dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
[   30.324505] DVB: registering new adapter (KWorld PlusTV Dual DVB-T PCI (DVB-T PC160-2T))
[   30.596052] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   31.040928] af9013: found a 'Afatech AF9013 DVB-T' in warm state.
[   31.044418] af9013: firmware version:4.95.0.0
[   31.058424] DVB: registering adapter 1 frontend 0 (Afatech AF9013 DVB-T)...
[   31.058533] tda18271 0-00c0: attaching existing instance
[   31.058541] Registered IR keymap rc-empty
[   31.058604] input: IR-receiver inside an USB DVB receiver as /devices/pci0000:00/0000:00:1e.0/0000:05:01.2/usb3/3-1/rc/rc0/input4
[   31.058713] rc0: IR-receiver inside an USB DVB receiver as /devices/pci0000:00/0000:00:1e.0/0000:05:01.2/usb3/3-1/rc/rc0
[   31.058716] dvb-usb: schedule remote query interval to 500 msecs.
[   31.058720] dvb-usb: KWorld PlusTV Dual DVB-T PCI (DVB-T PC160-2T) successfully initialized and connected.
[   31.076254] usbcore: registered new interface driver dvb_usb_af9015

I found http://parker1.co.uk/mythtv_dvb.php to have some useful information - it shows a method of verifying that the card is working by taking mythtv out of the equation.

Now that I knew that the card was working, I configured it in mythtv. As there are two tuners I configured both in mythtv, making sure to increase the setting allowing multiple streams to be recorded from the same multiplex. (This is due to the way dvb-t/freeview works - several stations are transmitted on the same channel). My biggest worry when I ordered the card was that it would not have this funtionality and that I would never be able to watch or record more than 2 channels simultaneously, but the following line in the output of dmesg reassured me:

[   30.324093] dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.

I was able to watch some TV on mythtv and caught the end of Gypsy Wedding...probably the only reality TV show that I can tolerate! I then set up some recordings to take place over the next few days unfortunately none of these worked. It turns out that there is currently a bug in the 3.0 and 3.2 kernels' drivers that handles the chip - the driver doesn't like switching between the two tuners. A symptom of the bug is i2c read errors such as this:

[   38.379309] af9013: I2C read failed reg:d417

This bug causes both tuners to eventually stop working. I worked around this by disabling the second tuner in mythtv, and mythtv has been stable since. I will solve this later, but for now I need to get the remote working!

By ff

Systems software engineer with interests in C/C++/Rust on Linux, electronic music and games.

14 replies on “Using the KWorld PC160-2T with Mythtv on Ubuntu Linux 11.10”

Hello!
I have the same errormsg like "Using the KWorld PC160-2T with Mythtv on Ubuntu Linux 11.10" describes. Is there a bugfix published yet?
I have a terratec cinergy t dvbt stick dual rc. It works fine for all tuners and frontends - until the htpc running <2h idle.

I think its to do with EIT scanning (or at least exacerbated by it). Do you download your programme data over the internet or over the air? If the latter you could try turning off EIT in mythtv. But apart from that there is no fix yet, I am still trying to get to the bottom of the problem.

Hello

I had the same problem and followed your instructions exactly. I have Mythbuntu 12.04 loaded and was surprised the Kworld PC160 was not instantly recognised by the Mythtv probe. It worked really well in ubuntu 10.04 and Mythtv 0.23 and seems to have fallen off the perch in later versions.

Having run sudo apt-get install linux-firmware-nonfree, a load of stuff was downloaded however when I run sudo rmmod dvb_usb_af9015 I got the following error:

dvb_usb_af9015 does not exist in /proc/modules so I am stumped.

Is this card still supported or should I revert to an earlier version of Ubuntu.

I do not know where to find an earlier version of MythTv as I tried to do that before without success.

Any suggestions?

Judging by this (old) post here (http://ubuntuforums.org/showthread.php?t=1259314) your card might not be exactly the same as my one, but its close enough and I would expect it to work.

That error seems to indicate that that module isn't loaded for some reason - possibly because your card is slightly different. Don't worry about that, just reboot the machine which will have the same effect as what those commands were trying to achieve.

Then have a look at your dmesg output, and see if you get a section like the one I pasted in the article.

Sorry, I found nothing in my Dmesg out at all that referred to dvb-usb.
Its like the card is not attached to the PCI interface at all and if I boot into Win7 it works perfectly?

Why is it not detected. I copied the af9015.fw firmware to the /lib/firmware folder.

What should I do next

Do you have entries similar to these in your lsusb/lspci output? (the pci card implements a usb hub internally, and the dvb tuner is connected to the hub)

frankster@mythtv:~$ lspci
...
05:01.0 USB controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 62)
05:01.2 USB controller: VIA Technologies, Inc. USB 2.0 (rev 65)

frankster@mythtv:~$ lsusb
...
Bus 002 Device 004: ID 1b80:e409 Afatech IT9137FN Dual DVB-T [KWorld UB499-2T]
Bus 003 Device 002: ID 1b80:c160 Afatech

Hello

I have run lspci with this output:

00:00.0 Host bridge: Intel Corporation 82Q35 Express DRAM Controller (rev 02)
00:02.0 VGA compatible controller: Intel Corporation 82Q35 Express Integrated Graphics Controller (rev 02)
00:19.0 Ethernet controller: Intel Corporation 82566DM-2 Gigabit Network Connection (rev 02)
00:1a.0 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 02)
00:1a.1 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 02)
00:1a.2 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #6 (rev 02)
00:1a.7 USB controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 02)
00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 02)
00:1d.0 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 02)
00:1d.1 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 02)
00:1d.2 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 02)
00:1d.7 USB controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 92)
00:1f.0 ISA bridge: Intel Corporation 82801IO (ICH9DO) LPC Interface Controller (rev 02)
00:1f.2 IDE interface: Intel Corporation 82801IR/IO/IH (ICH9R/DO/DH) 4 port SATA Controller [IDE mode] (rev 02)
00:1f.3 SMBus: Intel Corporation 82801I (ICH9 Family) SMBus Controller (rev 02)
00:1f.5 IDE interface: Intel Corporation 82801I (ICH9 Family) 2 port SATA Controller [IDE mode] (rev 02)
11:0a.0 USB controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 62)
11:0a.2 USB controller: VIA Technologies, Inc. USB 2.0 (rev 65)

lsusb provides this output:
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 009 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 010 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 002: ID 045e:0750 Microsoft Corp. Wired Keyboard 600
Bus 007 Device 003: ID 046d:c019 Logitech, Inc. Optical Tilt Wheel Mouse

It is like the card is not connected however if I boot into Win7 it all works fine.

What do I need to do?

My card had problems sometimes where it got itself into an invalid state and a cold boot was necessary. By cold boot, I mean disconnecting it from the mains for 30s or so (as the bios was still supplying power to my PCI bus while the PC was "off") so this meant that the card didn't get a full reset unless I did this.

Hello

Cold reboot has made no difference. Is there any version of Ubuntu that can support this card?

I also purchased a Fusion HDTV Dual Express PCIe because it was on the compatibility list however when I tried to use it I found it was a newer version that is not supported so it too will never work. Another 28 hours lost.

http://www.linuxtv.org/wiki/index.php/DViCO_FusionHDTV_DVB-T_Dual_Express2

http://forums.whirlpool.net.au/archive/1642545

The Kworld remains listed as supported however how do you get it working?

I have 2 dual TV cards that work fine in Windows that cannot be probed by Ubuntu.

Help

That's really unfortunate that your new card doesn't work either.

With your old card the order of things that in general need to be verified to debug a problem are:

1) PCI: your card should be visible via lspci (I think we saw this in your lspci listing. But can you show me a "lspci -nn" to be sure)
2) USB: Then your card should be visible via usb (I didn't see this card visible in your usb listing before. So either this is failing somehow or your card works differently to mine).)
3) Linux DVB layer: assuming your card is visible via USB then it should be detectable by the linux dvb layer and a driver installed. (we're not there yet though)
4) Linux software e.g. mythtv: assuming driver is installed then need to verify its recognised in mythtv.

I'm not convinced you've got beyond #2 yet as I didn't see any vendor id in the output you displayed from lsusb.

If we had got as far as 3 I might recommend using the latest media drivers. It describes how to install them into the currently running kernel.

Hello

What does this error message mean "Module dvb_usb_af9015 does not exist in /proc/modules" when I have installed the firmware in the /lib/firmware/ kernalversion folder? What else to do?

Does this happen when you are removing a module with rmmod? It just means that the module isn't installed. Which is what you were trying to achive by using rmmod!

Hello

Here is the output of lspci -nn

anthony@MythTV:~$ lspci -nn
00:00.0 Host bridge [0600]: Intel Corporation 82Q35 Express DRAM Controller [8086:29b0] (rev 02)
00:02.0 VGA compatible controller [0300]: Intel Corporation 82Q35 Express Integrated Graphics Controller [8086:29b2] (rev 02)
00:19.0 Ethernet controller [0200]: Intel Corporation 82566DM-2 Gigabit Network Connection [8086:10bd] (rev 02)
00:1a.0 USB controller [0c03]: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 [8086:2937] (rev 02)
00:1a.1 USB controller [0c03]: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 [8086:2938] (rev 02)
00:1a.2 USB controller [0c03]: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #6 [8086:2939] (rev 02)
00:1a.7 USB controller [0c03]: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 [8086:293c] (rev 02)
00:1b.0 Audio device [0403]: Intel Corporation 82801I (ICH9 Family) HD Audio Controller [8086:293e] (rev 02)
00:1d.0 USB controller [0c03]: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 [8086:2934] (rev 02)
00:1d.1 USB controller [0c03]: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 [8086:2935] (rev 02)
00:1d.2 USB controller [0c03]: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 [8086:2936] (rev 02)
00:1d.7 USB controller [0c03]: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 [8086:293a] (rev 02)
00:1e.0 PCI bridge [0604]: Intel Corporation 82801 PCI Bridge [8086:244e] (rev 92)
00:1f.0 ISA bridge [0601]: Intel Corporation 82801IO (ICH9DO) LPC Interface Controller [8086:2914] (rev 02)
00:1f.2 IDE interface [0101]: Intel Corporation 82801IR/IO/IH (ICH9R/DO/DH) 4 port SATA Controller [IDE mode] [8086:2920] (rev 02)
00:1f.3 SMBus [0c05]: Intel Corporation 82801I (ICH9 Family) SMBus Controller [8086:2930] (rev 02)
00:1f.5 IDE interface [0101]: Intel Corporation 82801I (ICH9 Family) 2 port SATA Controller [IDE mode] [8086:2926] (rev 02)
11:0a.0 USB controller [0c03]: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller [1106:3038] (rev 62)
11:0a.2 USB controller [0c03]: VIA Technologies, Inc. USB 2.0 [1106:3104] (rev 65)

The comment about the problem being caused by EIT scanning was the clincher for me. Previously both tuners only worked for a few hours. I disabled "active EIT scan" in Recorder Options section of Capture Card setup, and lo & behold everything has been stable ever since. I had previously set up XMLTV to get program data for most channels so this isn't a problem, and to be blunt who needs channels like "Russia Today" anyway?

Leave a Reply to Anthony Rooney Cancel reply

Your email address will not be published. Required fields are marked *