Submitted by admin on

Leadtek DTV2000H TV Tuner Card

I am not claiming to be an expert with these cards, hell I installed one just the other night, my first one, I think there may be more so I will document what I found and the configuration of the card and the Remote that comes with it.

Now I did not mess with the analog settings at all, I have only got the digital side of things going. Who really wants analog TV signal when you have experienced Digital TV signal.

Card Configuration Steps

There are only two files you need to adjust and add some text to and that is it, so don't be bloody fazed by this ladies, I see Newbs looking for a plug n' play no config option when working with Linux, I have a little chuckle and move on but FFS although some things can be a marathon to configure somethings a little more than editing a file, copying and pasting lmao, it couldn't get any easier.

Place this text in your /etc/modules file, this file tells the kernel what to boot up when you turn your box on.

# DTV2000H
cx88-dvb

You could run, in Ubuntu anyway

sudo gedit /etc/modules

The next step is edit /etc/modprobe.d/options

# DTV2000H
options cx88xx card=51

sudo gedit /etc/modprobe.d/options

Remote Configuration Steps

This was the first time I have messed with lirc configs, I was confused and probably don't have it 100% right but it can change channels and much more it will do for now, plus this HTPC build definitely comes with a keyboard as well.

hardware.conf Configuration

You must edit this file /etc/lirc/hardware.conf

I will paste my whole hardware.conf file for you to pinch use, I of course pinched it from someone else lol!

Copy from between the lines

------------------------------------------------------------
# /etc/lirc/hardware.conf
#
#Chosen Remote Control
#REMOTE="Winfast DTV2000H ver j (card=51)"

# Arguments which will be used when launching lircd
LIRCD_ARGS=""

#Don't start lircmd even if there seems to be a good config file
START_LIRCMD=false

#Try to load appropriate kernel modules
LOAD_MODULES=true

# Run "lircd --driver=help" for a list of supported drivers.
REMOTE_DRIVER="dev/input"
# If DEVICE is set to /dev/lirc and devfs is in use /dev/lirc/0 will be
# automatically used instead
REMOTE_DEVICE="/dev/input/event5"
# DEVICE="/dev/input/irremote"
MODULES=""

# Default configuration files for your hardware if any
#LIRCD_CONF="/etc/lirc/lircd.conf"
LIRCD_CONF=""
LIRCMD_CONF=""
-----------------------------------------------------------

You must fill in what number event your card is this part of the text below, my event is 5 your's may differ slightly.

# automatically used instead
REMOTE_DEVICE="/dev/input/event5"

Run this command to find out what event the card is using

cat /proc/bus/input/devices

The text below is what you are looking for

I: Bus=0001 Vendor=107d Product=6f2b Version=0001
N: Name="cx88 IR (WinFast DTV2000 H)"
P: Phys=pci-0000:01:06.0/ir0
S: Sysfs=/devices/pci0000:00/0000:00:04.0/0000:01:06.0/input/input5
U: Uniq=
H: Handlers=kbd event5
B: EV=100003
B: KEY=10afc336 2150a4800000000 0 40480010000 19000004801 1e000000004400 10000010000ffc

As you can see this text below here is what I am looking for

Handlers=kbd event5 so 5 is my event number that I need to fill in.

lircd.conf Configuration

Next file to edit is /etc/lirc/lircd.conf Here is the file that I use in conjunction with the other files as well of course!

-----------------------------------------------------------
# Please make this file available to others
# by sending it to
#
# this config file was automatically generated
# using lirc-0.8.2(dev/input) on Mon Jan 28 15:51:28 2008
#
# contributed by
#
# brand: /etc/lircd.conf
# model no. of remote control:
# devices being controlled by this remote:
#

begin remote

name /etc/lircd.conf
bits 32
eps 30
aeps 100

one 0 0
zero 0 0
gap 387992
toggle_bit_mask 0x0

begin codes
POWER 0x80010074
TV 0x80010179
FM 0x80010181
DVD 0x80010185
RED 0x8001018E
GREEN 0x8001018F
YELLOW 0x80010190
BLUE 0x80010191
TEXT 0x80010184
SLEEP 0x8001008E
MUTE 0x80010071
CLEAR 0x80010163
CANCEL 0x800100DF
FULLSCREEN 0x80010174
CHANNELUP 0x80010192
VOLUMEDOWN 0x80010072
ENTER 0x8001001C
VOLUMEUP 0x80010073
MENU 0x8001008B
CHANNELDOWN 0x80010193
CHANNEL 0x8001016B
PREVIOUS 0x8001019C
PLAYPAUSE 0x800100A4
NEXT 0x80010197
SUBTITLE 0x80010172
REWIND 0x800100A8
STOP 0x80010080
FASTFORWARD 0x800100D0
LANGUAGE 0x80010170
1 0x80010002
2 0x80010003
3 0x80010004
EPG 0x80010189
4 0x80010005
5 0x80010006
6 0x80010007
VIDEO 0x80010188
7 0x80010008
8 0x80010009
9 0x8001000A
AUDIO 0x80010166
Dot 0x80010034
0 0x8001000B
LAST 0x80010195
INFO 0x800100EA
MEDIA 0x800100E2
STOP 0x80010080
RECORD 0x800100A7
SHUFFLE 0x80010169
end codes

end remote
-----------------------------------------------------------

lircrc Configuration

Next step is create this file lircrc and place it in your /home/name/.mythtv folder, If that doesn't work place it in your /home/name/.lirc folder as well, or, and or.

-----------------------------------------------------------
################################# ################################## ###
### lircrc file generated from lircrc_template by lircrc_generate ###
################################# ################################## ##

################################## #######
## Program Button Text KeyCode KeyMap (Config) Intended Function
## ------- ----------- ------- --------------- -----------------
################################## ######
## General program execution using irexec
################################## ######
# irexec Power POWER /usr/local/bin/mythpower Start/Stop Mythtv

################################## ######
## MYTHTV Mappings
################################## ######
# mythtv TV TV Alt+T Jump to Live TV
# mythtv FM FM Alt+M Jump to Music
# mythtv DVD DVD Alt+R Jump to Recordings
# mythtv Red RED F2 Menu RED (Teletext?)
# mythtv Green GREEN F3 Menu GREEN (Teletext?)
# mythtv Yellow YELLOW F4 Menu YELLOW (Teletext?)
# mythtv Blue BLUE F5 Menu BLUE (Teletext?)
# mythtv Teletext(C.C) TEXT T Toggle ClosedCaptioning/Teletext
# mythtv Sleep SLEEP F8 Toggle Sleep Timer
# mythtv Mute MUTE F9 Mute
# mythtv BossKey CLEAR Y Switch inputs
# mythtv C CANCEL Esc Cancel
# mythtv CH+ CHANNELUP Up Up
# mythtv ZOOM W Cycle through zoom modes (4:3, 16:9 etc)
# mythtv VOL- VOLUMEDOWN Left Left
# mythtv Enter ENTER Enter Enter
# mythtv Vol+ VOLUMEUP Right Right
# mythtv Menu MENU M Menu

# mythtv Ch- CHANNELDOWN Down Down
# mythtv CH.Surf CHANNEL S Show EPG
# mythtv | # mythtv >/" PLAYPAUSE P Play/Pause
# mythtv >| NEXT PgDown Next Track/Cutpoint
# mythtv SUBTITLE * Arbitrary seek
# mythtv # mythtv Stop STOP Ctrl+X Exit TV Playback without any prompts
# mythtv >> FASTFORWARD > Fast Forward
# mythtv LANGUAGE H Switch to previous channel
# mythtv 1 1 1 1
# mythtv 2 2 2 2
# mythtv 3 3 3 3
# mythtv Video VIDEO U Display program details
# mythtv 4 4 4 4
# mythtv 5 5 5 5
# mythtv 6 6 6 6
# mythtv Audio AUDIO + Next Audio Track
# mythtv 7 7 7 7
# mythtv 8 8 8 8
# mythtv 9 9 9 9
# mythtv Display INFO I Information
# mythtv . DOT F7 Monitor Signal Quality
# mythtv 0 0 0 0
# mythtv # mythtv SnapShot SHUFFLE N Swap PIP Window
# mythtv PIP MEDIA V Toggle Picture in Picture
# mythtv REC Stop STOP Ctrl+X Exit TV Playback without any prompts
# mythtv REC RECORD R Toggle recording of current program (cycles through types
# mythtv TimeShift ARCHIVE End Skip to next commercial break marker
# mythtv FullScreen FULLSCREEN ctrl+y+o Fullscreen
# mythtv EPG EPG ctrl+y+e epg

################################## ######
## MPLAYER Mapping
################################## ######
# mplayer Mute MUTE mute Mute
# mplayer | # mplayer >/" PLAYPAUSE play Play/Pause
# mplayer >| NEXT seek 70 Fast forward 70 seconds (?)
# mplayer # mplayer Stop STOP pause Exit TV Playback without any prompts
# mplayer >> FASTFORWARD seek 10 Fast forward 10 seconds (?)
# mplayer # mplayer C CANCEL quit Exit

################################## ######
## Xine Mappings
################################## ######
# xine | # xine >/" PLAYPAUSE Play Play
# xine >| NEXT EventNext Next Chapter
# xine # xine Stop STOP Stop Stop
# xine REC RECORD Pause Pause
# xine >> FASTFORWARD SeekRelative+45 Fast forward some amount
# xine CH+ CHANNELUP EventUp Up
# xine ZOOM ZoomIn Zoom in
# xine BossKey CLEAR ZoomOut Zoom out
# xine VOL- VOLUMEDOWN EventLeft Left
# xine Enter ENTER EventSelect Select
# xine Vol+ VOLUMEUP EventRight Right
# xine Menu MENU Menu Menu
# xine Ch- CHANNELDOWN EventDown Down
# xine # xine C CANCEL Quit Exit

################################## #######
## Program Button Text KeyCode KeyMap (Config) Intended Function
## ------- ----------- ------- --------------- -----------------
################################## ######
## General program execution using irexec
################################## ######
# Start/Stop Mythtv
begin
prog = irexec
button = POWER
config = /usr/local/bin/mythpower
end

################################## ######
## MYTHTV Mappings
################################## ######
# Jump to Live TV
begin
prog = mythtv
button = TV
config = Alt+T
end

# Jump to Music
begin
prog = mythtv
button = FM
config = Alt+M
end

# Jump to Recordings
begin
prog = mythtv
button = DVD
config = Alt+R
end

# Menu RED (Teletext?)
begin
prog = mythtv
button = RED
config = F2
end

# Menu GREEN (Teletext?)
begin
prog = mythtv
button = GREEN
config = F3
end

# Menu YELLOW (Teletext?)
begin
prog = mythtv
button = YELLOW
config = F4
end

# Menu BLUE (Teletext?)
begin
prog = mythtv
button = BLUE
config = F5
end

# Toggle ClosedCaptioning/Teletext
begin
prog = mythtv
button = TEXT
config = T
end

# Toggle Sleep Timer
begin
prog = mythtv
button = SLEEP
config = F8
end

# Mute
begin
prog = mythtv
button = MUTE
config = F9
end

# Switch inputs
#begin
# prog = mythtv
# button = CLEAR
# config = Y
#end

# Cancel
begin
prog = mythtv
button = CANCEL
config = Esc
end

# Up
begin
prog = mythtv
button = CHANNELUP
config = Up
end

# Cycle through zoom modes (4:3, 16:9 etc)
begin
prog = mythtv
button = ZOOM
config = W
end

# Left
begin
prog = mythtv
button = VOLUMEDOWN
config = Left
end

# Enter
begin
prog = mythtv
button = ENTER
config = Enter
end

# Right
begin
prog = mythtv
button = VOLUMEUP
config = Right
end

# Menu
begin
prog = mythtv
button = MENU
config = M
end

# Down
begin
prog = mythtv
button = CHANNELDOWN
config = Down
end

# Show EPG
begin
prog = mythtv
button = CHANNEL
config = S
end

# Previous Track/CutPoint
begin
prog = mythtv
button = PREVIOUS
config = PgUp
end

# Play/Pause
begin
prog = mythtv
button = PLAYPAUSE
config = P
end

# Next Track/Cutpoint
begin
prog = mythtv
button = NEXT
config = PgDown
end

# Arbitrary seek
begin
prog = mythtv
button = SUBTITLE
config = *
end

# Rewind
begin
prog = mythtv
button = REWIND
config = end

# Exit TV Playback without any prompts
begin
prog = mythtv
button = STOP
config = Ctrl+X
end

# Fast Forward
begin
prog = mythtv
button = FASTFORWARD
config = >
end

# Switch to previous channel
begin
prog = mythtv
button = LANGUAGE
config = H
end

# 1
begin
prog = mythtv
button = 1
config = 1
end

# 2
begin
prog = mythtv
button = 2
config = 2
end

# 3
begin
prog = mythtv
button = 3
config = 3
end

# Display program details
begin
prog = mythtv
button = VIDEO
config = U
end

# 4
begin
prog = mythtv
button = 4
config = 4
end

# 5
begin
prog = mythtv
button = 5
config = 5
end

# 6
begin
prog = mythtv
button = 6
config = 6
end

# Next Audio Track
begin
prog = mythtv
button = AUDIO
config = +
end

# 7
begin
prog = mythtv
button = 7
config = 7
end

# 8
begin
prog = mythtv
button = 8
config = 8
end

# 9
begin
prog = mythtv
button = 9
config = 9
end

# Information
begin
prog = mythtv
button = INFO
config = I
end

# Monitor Signal Quality
begin
prog = mythtv
button = DOT
config = F7
end

# 0
begin
prog = mythtv
button = 0
config = 0
end

# Delete
begin
prog = mythtv
button = LAST
config = D
end

# Swap PIP Window
begin
prog = mythtv
button = SHUFFLE
config = N
end

# Toggle Picture in Picture
begin
prog = mythtv
button = MEDIA
config = V
end

# Exit TV Playback without any prompts
begin
prog = mythtv
button = STOP
config = Ctrl+X
end

# Toggle recording of current program (cycles through types
begin
prog = mythtv
button = RECORD
config = R
end

# Skip to next commercial break marker
begin
prog = mythtv
button = ARCHIVE
config = End
end

################################## ######
## MPLAYER Mapping
################################## ######
# Mute
begin
prog = mplayer
button = MUTE
config = mute
end

# Volume up
begin
prog = mplayer
button = VOLUMEUP
config = volume 1
repeat = 1
end

# Volume down
begin
prog = mplayer
button = VOLUMEDOWN
config = volume -1
repeat = 1
end

# Tracking up
begin
prog = mplayer
button = CHANNELUP
config = audio_delay 0.1
repeat = 1
end

# Tracking down
begin
prog = mplayer
button = CHANNELDOWN
config = audio_delay -0.1
repeat = 1
end

# Change aspect ratio
begin
prog = mplayer
button = BLUE
config = switch_ratio 1.333
end

# Change aspect ratio
begin
prog = mplayer
button = YELLOW
config = switch_ratio 1.778
end

# Change aspect ratio
begin
prog = mplayer
button = RED
config = switch_ratio 1
end

# Change aspect ratio
begin
prog = mplayer
button = GREEN
config = switch_ratio 2
end

# Play/Pause
begin
prog = mplayer
button = PLAYPAUSE
config = pause
end
# used to be asd follows, but the command "play" doesn't actually exist
# config = play

# Play/Pause
begin
prog = mplayer
button = STOP
config = pause
end

# Fast forward 70 seconds (?)
begin

prog = mplayer
button = NEXT
config = seek 70
end

# Fast forward 10 seconds (?)
begin
prog = mplayer
button = FASTFORWARD
config = seek 10
end

# Rewind 10 seconds (?)
begin
prog = mplayer
button = REWIND
config = seek -10
end

# Rewind 70 seconds (?)
begin
prog = mplayer
button = PREVIOUS
config = seek -70
end

# Exit
#begin
# prog = mplayer
# button = LAST
# config = quit
#end

# Exit
begin
prog = mplayer
button = CANCEL
config = quit
end

################################## ######
## Xine Mappings
################################## ######
# Previous Chapter
begin
prog = xine
button = PREVIOUS
config = EventPrior
end

# Play
begin
prog = xine
button = PLAYPAUSE
config = Play
end

# Next Chapter
begin
prog = xine
button = NEXT
config = EventNext
end

# Rewind some amount
begin
prog = xine
button = REWIND
config = SeekRelative-45
end

# Stop
begin
prog = xine
button = STOP
config = Stop
end

# Pause
begin
prog = xine
button = RECORD
config = Pause
end

# Fast forward some amount
begin
prog = xine
button = FASTFORWARD
config = SeekRelative+45
end

# Up
begin
prog = xine
button = CHANNELUP
config = EventUp
end

# ZoomIn
begin
prog = xine
button =
config = ZOOM
end
Zoom in
# Zoom out
begin
prog = xine
button = CLEAR
config = ZoomOut
end

# Left
begin
prog = xine
button = VOLUMEDOWN
config = EventLeft
end

# Select
begin
prog = xine
button = ENTER
config = EventSelect
end

# Right
begin
prog = xine
button = VOLUMEUP
config = EventRight
end

# Menu
begin
prog = xine
button = MENU
config = Menu
end

# Down
begin
prog = xine
button = CHANNELDOWN
config = EventDown
end

# Exit
begin
prog = xine
button = LAST
config = Quit
end

# Exit
begin
prog = xine
button = CANCEL
config = Quit
end
-----------------------------------------------------------

Run this command to get it all up and running

sudo /etc/init.d/lirc restart

You can test all this by running irw in a terminal, if all is well you should be able to press buttons on your remote and for each button you press a code I guess you could call it, will show for each key press.

Thanks to all those that worked all this out, I hope it can help someone setting up a Leadtek DTV2000 H TV Tuner card for MythTV and Linux.

This how to was constructed from the Ubuntu Forums thread link below

DTV2000H Remote Configuration

http://ubuntuforums.org/showthread.php?t=708217&highlight=DTV2000H+Remote

Thanks to all contributors in the above thread. I still have a bit of a problem with the volume controls for MythTV, the Volume Up and Volume Down buttons skip ahead or back for liveTV when I press the left and right Volume buttons on the remote control. It's not perfect for me, though with a keyboard as well, it is good enough, for now anyway. ;o)

Tags: