KWorld NB-TV 100 CardBus

From LinuxTVWiki
Jump to navigation Jump to search

a.k.a. model VS-NBTV100

KWorld's web page states that it contains a silicon tuner. There are three connectors: Television, Composite and S-Video.

I think this card can be categorized as partially supported but not yet documented and detected.

Identification

The card's lspci id appears to be [17de:7139].

From Linux-2.6.17 "lspci -vvv" output:

07:00.0 Multimedia controller: Philips Semiconductors SAA7133/SAA7135 Video Broadcast Decoder (rev f0)
       Subsystem: KWorld Computer Co. Ltd. Unknown device 7139
       Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
       Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
       Latency: 64 (63750ns min, 63750ns max)
       Interrupt: pin A routed to IRQ 11
       Region 0: Memory at f6000000 (32-bit, non-prefetchable) [size=2K]
       Capabilities: [40] Power Management version 2
               Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
               Status: D0 PME-Enable- DSel=0 DScale=3 PME-

By default my Linux box loads saa7134 driver with UNKNOWN/GENERIC board and no tuner detected.

Video

To make it work I use "modprobe saa7134 card=81 tuner=54", here is snapshot from dmesg:

ACPI: PCI Interrupt 0000:07:00.0[A] -> Link [LNKD] -> GSI 11 (level, low) -> IRQ 11
saa7133[0]: found at 0000:07:00.0, rev: 240, irq: 11, latency: 64, mmio: 0xf6000000
saa7133[0]: subsystem: 17de:7139, board: Philips Tiger reference design [card=81,insmod option]
saa7133[0]: board init: gpio is 40
saa7133[0]: i2c eeprom 00: de 17 39 71 ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
tuner 0-004b: chip found @ 0x96 (saa7133[0])
tuner 0-004b: setting tuner address to 61
tuner 0-004b: type set to tda8290+75a
saa7133[0]: registered device video0 [v4l2]
saa7133[0]: registered device vbi0
saa7133[0]: registered device radio0

There are also other working card parameters, and could be even more:

10 -> Kworld/KuroutoShikou SAA7130-TVPCI
19 -> Compro VideoMate TV                      [185b:c100]
40 -> Compro VideoMate TV PVR/FM               [185b:c100]
41 -> Compro VideoMate TV Gold+                [185b:c100]
43 -> :Zolid Xpert TV7134
46 -> AVerMedia Cardbus TV/Radio (E500)        [1461:d6ee]
49 -> Compro VideoMate Gold+ Pal               [185b:c200]
58 -> ADS Tech Instant TV (saa7135)            [1421:0350,1421:0351,1421:0370,1421:1370]
59 -> Kworld/Tevion V-Stream Xpert TV PVR7134
65 -> V-Stream Studio TV Terminator
76 -> SKNet MonsterTV Mobile                   [1131:4ee9]
78 -> ASUSTeK P7131 Dual                       [1043:4862]
81 -> Philips Tiger reference design           [1131:2018]
82 -> MSI TV@Anywhere plus                     [1462:6231]
88 -> Tevion/KWorld DVB-T 220RF                [17de:7201]

Now it's ready to show some video.

Audio

Starting from 2.6.17 kernel, Linux provides audio device DMA driver:

modprobe saa7134-alsa

The sound must be directed from card's audio device to the main audio device:

sox -c 2 -s -w -r 32000 -t ossdsp /dev/dsp2 -t ossdsp -w -r 32000 /dev/dsp & 

I tried to "optimize" this to use ALSA instead of OSS interface, but then I got lots of occasional framedrops in tvtime. Framedrops stop once I stop sox process on ALSA interface, so I guess there is some race condition between video and audio.

Setting it up in Debian

Add a file /etc/modprobe.d/saa7134 with the following contents:

options saa7134 card=65 tuner=54
install saa7134 /sbin/modprobe --ignore-install saa7134; /sbin/modprobe saa7134-alsa

Reload the modules for the card and tuner id to take effect:

rmmod tuner saa7134-alsa saa7134
modprobe saa7134

Use the following script to start tvtime and audio forwarding at the same time:

#!/bin/sh
sox -q -c 2 -s -w -r 32000 -t ossdsp /dev/dsp2 -t ossdsp -w -r 32000 /dev/dsp &
soxpid=$!
sleep 0.5
tvtime
kill $soxpid

I also use my own script to do suspend to disk which unloads the modules, but for some reason Firefox loaded with Gmail locks the saa7134-alsa module (mixing sound on all audio devices??) and prevents unloading, so I just kill all such processes with:

fuser -9 -kv /dev/dsp2
fuser -9 -kv /dev/mixer2
fuser -9 -kv /dev/snd/pcmC2D0c
fuser -9 -kv /dev/video0

This is just a hack as I don't have time, if you are hybernation (suspend to disk) maintainer you should consult fuser utility and ask user to close those applications gracefully.

Issues

When using ALSA interface, sox reports single audio channel, although the card is capable of stereo. With OSS driver sox somehow configures it to two channels, but still the sound seems to be mono regardless of audio mode settings in tvtime.

The audio mixer exhibits Line-in, Line-in 2 and Video, however changing the volume value of any of those does not do anything. The mute switches are messed up, but one can find (inconsistent) combinations for selecting audio from different sources.

I managed to test the connections to Television and Composite. S-Video is not tested.

Windows Drivers

Some samples could be found here: http://www.cs.aau.dk/~marius/sw/kworld.html

External Links