DViCO FusionHDTV DVB-T Dual Digital Installation

From MythTV Official Wiki
Jump to: navigation, search

Clean.png Cleanup: This page should be cleared off in preparation for deletion. Tuner specific information should be migrated to the LinuxTV Wiki, and any additional information moved to more generic pages. Discuss the issue on the talk page

Hardware

Sound

When installing your card, ensure that you plug the dvico audio-out port into the CD-in port (or AUX, if you have one), on your sound card or directly into your motherboard if it has onboard sound. This is an on-card port in both cases - not one of the ones at the rear that you can access from outside your computer. A suitable cable is supplied with the Dual Digital.

2nd USB Tuner and Remote

The "DViCO FusionHDTV DVB-T Dual Tuner" card has two tuners. One is PCI, the other is USB. You will either need to connect an external USB cable to your card, or use the supplied internal USB cable which connects to your motherboard. This will enable the second tuner and is needed for the remote to function.

Kernel / Packages

type dmesg to see that the PCI portion at least has been detected.

#dmesg
*snip*
CORE cx88[0]: subsystem: 18ac:db50, board: DViCO FusionHDTV DVB-T Dual Digital [card=44,autodetected]
TV tuner 4 at 0x1fe, Radio tuner -1 at 0x1fe
ACPI: PCI Interrupt Link [APC1] enabled at IRQ 16
ACPI: PCI Interrupt 0000:05:08.2[A] -> Link [APC1] -> GSI 16 (level, low) -> IRQ 66
cx88[0]/2: found at 0000:05:08.2, rev: 5, irq: 66, latency: 32, mmio: 0xfa000000
cx88[0]/2: cx2388x based dvb card
DVB: registering new adapter (cx88[0]).
DVB: registering frontend 0 (Zarlink MT352 DVB-T)...
*snip*


You should also see the directory /dev/dvb/adapter0

Firmware

The card requires firmware to operate. To get the firmware to the following:

cd /lib/firmware/2.6.17-11-generic/
wget http://www.linuxtv.org/downloads/firmware/dvb-usb-bluebird-01.fw

USB Problem

I have had a problem with the usb which may be fixed in the next release of Ubuntu. Let me step you through it if you get this problem.

1. unplug and replug your usb

#dmesg
usb 5-3: USB disconnect, address 2
usb 5-3: new high speed USB device using ehci_hcd and address 3
usb 5-3: config 1 has an invalid descriptor of length 1, skipping remainder of the config
usb 5-3: config 1 has 0 interfaces, different from the descriptor's value: 1
usb 5-3: configuration #1 chosen from 1 choice

Looking at the error I noticed ehci_hcd so for the hell of it - I removed it!

#rmmod ehci_hcd
#dmesg
ehci_hcd 0000:00:10.4: remove, state 1
usb usb5: USB disconnect, address 1
usb 5-3: USB disconnect, address 3
ehci_hcd 0000:00:10.4: USB bus 5 deregistered
ACPI: PCI interrupt for device 0000:00:10.4 disabled
usb 2-1: new full speed USB device using uhci_hcd and address 2
usb 2-1: config 1 has an invalid descriptor of length 1, skipping remainder of the config
usb 2-1: configuration #1 chosen from 1 choice
dvb-usb: found a 'DViCO FusionHDTV DVB-T Dual USB' in cold state, will try to load a firmware
dvb-usb: downloading firmware from file 'dvb-usb-bluebird-01.fw'
usbcore: registered new driver dvb_usb_cxusb
usb 2-1: USB disconnect, address 2
dvb-usb: generic DVB-USB module successfully deinitialized and disconnected.
usb 2-1: new full speed USB device using uhci_hcd and address 3
usb 2-1: configuration #1 chosen from 1 choice
dvb-usb: found a 'DViCO FusionHDTV DVB-T Dual USB' in warm state.
dvb-usb: This USB2.0 device cannot be run on a USB1.1 port. (it lacks a hardware PID filter)
dvb-usb: DViCO FusionHDTV DVB-T Dual USB error while loading driver (-19)
dvb_usb_cxusb: probe of 2-1:1.0 failed with error -22[/code]

In this dmesg you can see that it found our firmware that we downloaded and changed our USB from a cold state to a warm state. However it told us that it needs the usb2.0 drivers to work properly. So we will reload the module that we removed before.

#modprobe ehci_hcd
#dmesg
ACPI: PCI Interrupt 0000:00:10.4[C] -> GSI 21 (level, low) -> IRQ 177
ehci_hcd 0000:00:10.4: EHCI Host Controller
ehci_hcd 0000:00:10.4: new USB bus registered, assigned bus number 5
ehci_hcd 0000:00:10.4: irq 177, io mem 0xbb000000
ehci_hcd 0000:00:10.4: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb5: configuration #1 chosen from 1 choice
hub 5-0:1.0: USB hub found
hub 5-0:1.0: 8 ports detected
usb 2-1: USB disconnect, address 3
usb 5-3: new high speed USB device using ehci_hcd and address 2
usb 5-3: configuration #1 chosen from 1 choice
dvb-usb: found a 'DViCO FusionHDTV DVB-T Dual USB' in warm state.
dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
DVB: registering new adapter (DViCO FusionHDTV DVB-T Dual USB).
DVB: registering frontend 1 (Zarlink MT352 DVB-T)...
input: IR-receiver inside an USB DVB receiver as /class/input/input3
dvb-usb: schedule remote query interval to 150 msecs.
dvb-usb: DViCO FusionHDTV DVB-T Dual USB successfully initialized and connected.

So there you have it, USB second tuner fully loaded and the remote is now working too. You should now have:

/dev/dvb/adapter0 - The PCI tuner
/dev/dvb/adapter1 - The USB Tuner

Remote Control (Lircd)

This I found to be the most painful as I was using the wrong driver for a long time. But after i switched it became a breeze. Now on my system i have 2 /dev/input/events that work when you press a button. When i do a cat /dev/input/event3 and press the 0 key on the remote this happens:

cat /dev/input/event3
0000             
[Control-C to quit]

So it seems that this should be the one to use.... Unfortunately Not! Something else is parsing the input from your remote and is producing that. What you really want is something that produces binary gibberish when you press a button:

cat /dev/input/event4
����E�
�����E�
[Control-C to quit]

If your screen is mangled from catting out that then you can type "reset" to reset your terminal. So now that we have determined what device we should use it is time to see if we can record our key presses. We will be using the driver dev/input and not the driver dvico like i did for way to many days. Another thing that may stop the following from working is if lircd is running. You can stop it by "/etc/init.d/lirc stop".

irrecord --driver=dev/input --device=/dev/input/event4 bob.txt
*snip*
Press RETURN to continue.
Hold down an arbitrary button.
................................................................................
Found gap length: 251753
Now enter the names for the buttons.

You must get dots when holding down a key and nothing else. If you don't get dots or other symbols are showing up then you either have a driver problem or are using the wrong input. Otherwise bob.txt will hold all your keys. Also I found that it wants to set the toggle bit to 1 in bob.txt. This is wrong as you will most likely get multiple keypresses sent. Set toggle_bit=0.

Sometimes irrecord sets an incorrect toggle_bit_mask as well. Mine was set to 0x80000000 and I suffered from duplicate events on every keypress. Changing it to toggle_bit_mask 0x16000000 fixed this problem for me.

If you have come this far then your remote is working like a charm. Time to map the keys and make lircd run automatically. This is done with 3 files:

gedit /etc/lirc/hardware.conf

Make sure you modify your DRIVER and DEVICE to be the same as you used for irrecord. I also changed START_LIRCMD=false for some reason.

Script.png /etc/lirc/hardware.conf

 # /etc/lirc/hardware.conf
 #
 # 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.
 DRIVER="dev/input"
 # If DEVICE is set to /dev/lirc and devfs is in use /dev/lirc/0 will be
 # automatically used instead
 DEVICE="/dev/input/event4"
 MODULES=""<br>
 # Default configuration files for your hardware if any
 LIRCD_CONF="/etc/lircd/lircd.conf"
 LIRCMD_CONF=""
gedit /etc/lirc/lircd.conf

Script.png /etc/lirc/lircd.conf

 # Please make this file available to others
 # by sending it to <lirc@bartelmus.de>
 #
 # this config file was automatically generated
 # using lirc-0.8.0(userspace) on Mon Mar  5 16:00:35 2007
 #
 # contributed by: Soth
 #
 # brand:  DViCO FusionHDTV DVB-T Dual Digital
 # model no. of remote control: Fusion MCE
 # devices being controlled by this remote:
 #
   
   begin remote
   
     name  DViCO_Dual_Digital
     bits           16
     eps            30
     aeps          100
   
     one             0     0
     zero            0     0
     pre_data_bits   16
     pre_data       0x1
     gap            251756
     toggle_bit      0   
   
         begin codes
 #starting at the top
             dtv                      0x0179
             mp3                      0x0187
             dvd                      0x0185
             cpf                      0x016C
 #outer circle clockwise from top
             tvpower                  0x0164
             guide                    0x016D
             info                     0x0166
             alttab                   0x000F
             skip                     0x00A3
             start                    0x001C
             replay                   0x00A5
             dvdmenu                  0x008B
             back                     0x009E
             setup                    0x008D
 #inner circle
             up                       0x0067
             down                     0x006C
             left                     0x0069
             right                    0x006A
             ok                       0x0160
 #volume and channel
             voldn                    0x0072
             volup                    0x0073
             chup                     0x0192
             chdn                     0x0193
 #keypad
             camera                   0x00D4
             live                     0x0182
             folder                   0x0086
             1                        0x0002
             2                        0x0003
             3                        0x0004
             4                        0x0005
             5                        0x0006
             6                        0x0007
             7                        0x0008
             8                        0x0009
             9                        0x000A
             aspect                   0x0173
             0                        0x000B
             zoom                     0x0174
 #play buttons
             rew                      0x00A8
             playpause                0x00A4
             ff                       0x00D0
             mute                     0x0071
             stop                     0x0080
             rec                      0x00A7
             power                    0x0074
         end codes 
   end remote

Ok since we have set up these two files lets check our work.

/etc/init.d/lirc restart
ps aux | grep lircd
root 12671  0.0  0.0 2740 572 ?     Ss  16:27  0:00 /usr/sbin/lircd --driver=dev/input --device=/dev/input/event4
root 12675  0.0  0.0 2796 748 pts/1 R+  16:27  0:00 grep lircd

lircd is running with the correct driver and device. Ok let run irw and press some keys (Up, Ok and Start) on our remote

irw
0000000000010067 00 up DViCO_Dual_Digital
0000000000010160 00 ok DViCO_Dual_Digital
000000000001001c 00 start DViCO_Dual_Digital

Great Now we have to map these keys so that mythtv can use them. which brings us to our final file lircrc. You should save this file in your user directory as it is for personal mappings of the remote.

Script.png lircrc

 # lircrc.example.DVICO-nativelirc
 # 2004-07-04, Chris Pascoe
 # mailto:linuxdvb@itee.uq.edu.au
 # Save this file in ~/.mythtv/lircrc
 #
 # Note the "repeat =" strings in the volume and channel.
 # This means that if you hold down the key, every nth instance will be
 # passed.  This depends on your system, so you may want to increase or
 # decrease this and see what happens.  repeat = 1 is probably too
 # fast.
 
 ### Top 4 buttons ###
 
 # DTV - Change focus for PiP (to change channel in the other window)
   begin
     prog = mythtv
     button = dtv
     config = B
  end    
 
  begin
     prog = mythtv
     button = mp3
     config = Ctrl+M
  end
 
  begin
     prog = mythtv
     button = dvd
     config = Ctrl+D
  end
 
  begin
     prog = mythtv
     button = cpf
     config = 
  end
 
 ### Outer Circle (clockwise from the top) ### 
 
 begin
      prog = mythtv
      button = tvpower
      config = Esc
  end
  
  begin
      prog = mythtv
      button = guide
      config = S
  end
  
  begin
      prog = mythtv
      button = info
      config = I
  end
 
 #swap the pip windows
  begin 
     prog = mythtv
     button = alttab
     config = N
  end
 
 #commercial skip forwards
  begin
     prog = mythtv
     button = skip
     config = Z
  end
  
  begin
      prog = mythtv
      button = start
      config = Return
  end
 
 #commercial skip backwards
  begin
     prog = mythtv
     button = replay
     config = Q
  end  
 
  begin
      prog = mythtv
      button = dvdmenu
 #     config = undefined
  end
 
  begin
      prog = mythtv
      button = back
      config = Esc
  end
    
  begin
      prog = mythtv
      button = setup
 #     config = undefined
  end
  
 ### Inner Circle ###
  
  begin
      prog = mythtv
      button = up
      config = Up
  end
  
  begin
      prog = mythtv
      button = down
      config = Down
  end
  
  begin
      prog = mythtv
      button = left
      config = Left
  end
  
  begin
      prog = mythtv
      button = right
      config = Right
  end
  
  begin
      prog = mythtv
      button = ok
      config = Return
  end
 
 ### Volume and Channel ###
  
  begin
    prog = mythtv
    button = voldn
    repeat = 1
    config = F10
  end
  
  begin
    prog = mythtv
    button = volup
    repeat = 1
    config = F11
  end
  
  begin
      prog = mythtv
      button = chup
      config = Up
  end
  
  begin
      prog = mythtv
      button = chdn
      config = Down
  end
 
 ### Keypad ###
 
  begin
      prog = mythtv
      button = camera
      config = P
  end
 
  begin
      prog = mythtv
      button = live
 #      config = undefined
  end
 
  begin
      prog = mythtv
      button = folder
      config = C
  end
  
  begin
      prog = mythtv
      button = 1
      config = 1
      config = return
  end
  
  begin
      prog = mythtv
      button = 2
      config = 2
      config = return
  end
  
  begin
      prog = mythtv
      button = 3
      config = 3
      config = return
  end
  
  begin
      prog = mythtv
      button = 4
      config = 4
      config = return
  end
  
  begin
      prog = mythtv
      button = 5
      config = 5
      config = return
  end
  
  begin
      prog = mythtv
      button = 6
      config = 6
      config = return
  end
  
  begin
      prog = mythtv
      button = 7
      config = 7
      config = return
  end
  
  begin
      prog = mythtv
      button = 8
      config = 8
      config = return
  end
  
  begin
      prog = mythtv
      button = 9
      config = 9
      config = return
  end
 
  begin
     prog = mythtv
     button = aspect
     config = W
  end    
 
  begin
      prog = mythtv
      button = 0
      config = 0
      config = return
  end
 
 # Toggle PiP on/off
  begin
     prog = mythtv
     button = zoom
     config = V
  end
  
 ### Play buttons ###
  
  begin
      prog = mythtv
      button = rew
      config = Left
 #    config = seek -180
  end
  
  begin
      prog = mythtv
      button = playpause
      config = ctrl+p
  end
  
  begin
      prog = mythtv
      button = ff
      config = Right
 #     config = seek +180
  end
    
  begin
      prog = mythtv
      button = mute
      config = |
  end
  
  begin
      prog = mythtv
      button = stop
      config = P
  end
  
  begin
      prog = mythtv
      button = rec
      config = R
  end
  
  begin
      prog = mythtv
      button = power
      config = Esc
  end
 
 # Xine
  
  begin
     prog = xine
     button = playpause
     repeat = 3
     config = Play
  end
  
  begin
     prog = xine
     button = stop
     repeat = 3
     config = Pause
  end
  
  begin
     prog = xine
     button = back
     config = Quit
  end
  
  begin
     prog = xine
     button = tv_onoff
     config = Quit
  end
  
  begin
     prog = xine
     button = right
     repeat = 3
     config = SeekRelative+10
  end
  
  begin
     prog = xine
     button = left
     repeat = 3
     config = SeekRelative-10
  end
  
  begin
     prog = xine
     button = ff
     repeat = 3
     config = SeekRelative+30
  end
  
  begin
     prog = xine
     button = rew
     repeat = 3
     config = SeekRelative-30
  end
  
  begin
     prog = xine
     button = skip
     repeat = 3
     config = SeekRelative+300
  end
  
  begin
     prog = xine
     button = replay
     repeat = 3
     config = SeekRelative-300
  end
  
  begin
     prog = xine
     button = up
     repeat = 1
     config = EventUp
  end
  
  begin
     prog = xine
     button = down
     repeat = 1
     config = EventDown
  end
  
  begin
     prog = xine
     button = ok
     repeat = 0
     config = EventSelect
  end
  
  begin
     prog = xine
     button = guide
     repeat = 0
     config = Menu
  end
  
  begin
     prog = xine
     button = setup
     repeat = 0
     config = Menu
  end
  
  begin
     prog = xine
     button = volup
     repeat = 1
     config = Volume+
  end
  
  begin
     prog = xine
     button = voldn
     repeat = 1
     config = Volume-
  end

Remote Not Working after reboot

Now you may run into this as I did. I rebooted my computer without my USB mouse plugged in and my remotes device /dev/input/event3 had changed to /dev/input/event2. So we now need a way to make sure that the IR is always the same device. A very simple solution is to look at its name in dmesg:

dmesg | grep IR
input: IR-receiver inside an USB DVB receiver as /class/input/input4

Its name is IR-receiver inside an USB DVB receiver so we take that name and edit the udev rules to create a symlink each time it is plugged in. Add the following to the bottom of the file:

gedit /etc/udev/rules.d/60-symlinks.rules
KERNEL=="event*",SYSFS{name}=="IR-receiver inside an USB DVB receiver",SYMLINK="input/irremote"

No reboot is nesessary just unplug and replug the USB. You should now have /dev/input/irremote. So now change your hardware.conf to this new device and restart lirc:

gedit /etc/lirc/hardware.conf

Script.png /etc/lirc/hardware.conf

 # If DEVICE is set to /dev/lirc and devfs is in use /dev/lirc/0 will be
 # automatically used instead
 DEVICE="/dev/input/irremote"
 MODULES=""
/etc/init.d/lirc restart

VLC DVD and Media Player

I Like VLC as it has never failed to play something i have in Linux or Windows. I did try xine but it failed to play a Divx 5 film that i had. So I went for gold old VLC. It was surprisingly easy to configure too:

  • Synaptic > Search for VLC > Download and Install.
  • To Set up your remote paste the following into your local .lircrc file (NOT .mythtv/lircrc):
gedit ~/.lircrc 


Script.png ~/.lircrc

 # lircrc for VLC
 #
 # Card: Dvico FusionHDTV DVB-T Dual Digital
 # Included Remote: Chunky Fusion MCE Remote
 # 
 # copy to ~/.lircrc
 # Available Keys from: src/libvlc.h or vlc --help --advanced
 #
 #
 ### Top 4 Keys ###
 
   begin
     prog = vlc
     button = dtv
  end    
 
  begin
     prog = vlc
     button = mp3
  end
 
  begin
     prog = vlc
     button = dvd
  end
 
  begin
     prog = vlc
     button = cpf
  end
 
 ### Outer Circle (clockwise from the top) ### 
 
 begin
      prog = vlc
      button = tvpower
      config = key-quit
  end
  
  begin
      prog = vlc
      button = guide
  end
  
  begin
      prog = vlc
      button = info
      config = key-position
  end
 
  begin 
     prog = vlc
     button = alttab
  end
 
  begin
     prog = vlc
     button = skip
     config = key-chapter-next
  end
  
  begin
      prog = vlc
      button = start
  end
 
  begin
     prog = vlc
     button = replay
     config = key-chapter-prev
  end  
 
  begin
      prog = vlc
      button = dvdmenu
      config = key-disc-menu
  end
 
  begin
      prog = vlc
      button = back
      config = key-quit
  end
    
  begin
      prog = vlc
      button = setup
  end
  
 ### Inner Circle ###
  
  begin
      prog = vlc
      button = up
      config = key-nav-up
  end
  
  begin
      prog = vlc
      button = down
      config = key-nav-down
  end
  
  begin
      prog = vlc
      button = left
      config = key-nav-left
  end
  
  begin
      prog = vlc
      button = right
      config = key-nav-right
  end
  
  begin
      prog = vlc
      button = ok
      config = key-nav-activate
  end
 
 ### Volume and Channel ###
  
  begin
    prog = vlc
    button = voldn
    repeat = 1
    config = key-vol-down
  end
  
  begin
    prog = vlc
    button = volup
    repeat = 1
    config = key-vol-up
  end
  
  begin
      prog = vlc
      button = chup
      config = key-title-next
  end
  
  begin
      prog = vlc
      button = chdn
      config = key-title-prev
  end
 
 ### Keypad ###
 
  begin
      prog = vlc
      button = camera
      config = key-snapshot
  end
 
  begin
      prog = vlc
      button = live
  end
 
  begin
      prog = vlc
      button = folder
  end
  
  begin
      prog = vlc
      button = 1
      config = 1
  end
  
  begin
      prog = vlc
      button = 2
      config = 2
  end
  
  begin
      prog = vlc
      button = 3
      config = 3
  end
  
  begin
      prog = vlc
      button = 4
      config = 4
  end
  
  begin
      prog = vlc
      button = 5
      config = 5
  end
  
  begin
      prog = vlc
      button = 6
      config = 6
  end
  
  begin
      prog = vlc
      button = 7
      config = 7
  end
  
  begin
      prog = vlc
      button = 8
      config = 8
  end
  
  begin
      prog = vlc
      button = 9
      config = 9
  end
 
  begin
     prog = vlc
     button = aspect
  end    
 
  begin
      prog = vlc
      button = 0
      config = 0
  end
 
  begin
     prog = vlc
     button = zoom
  end
  
 ### Play buttons ###
  
  begin
      prog = vlc
      button = rew
      config = key-jump-10sec
  end
  
  begin
      prog = vlc
      button = playpause
      config = key-play-pause
  end
  
  begin
      prog = vlc
      button = ff
      config = key-jump+10sec
  end
    
  begin
      prog = vlc
      button = mute
      config = key-vol-mute
  end
 
  begin
      prog = vlc
      button = stop
      config = key-stop
  end
  
  begin
      prog = vlc
      button = rec
  end
  
 begin
      prog = vlc
      button = power
      config = key-quit
 end
  • Finally run mythfrontend > Utilities/Setup > Setup > Media Settings > Video Settings > Player Settings
  • Set VLC to run fullscreen with remote: vlc --control=lirc -f %s

If you want to know what keys you can use for this config file check out: VLC - Lirc Keys. If you just want to use vlc for the show you cant use in xine or mplayer then there is an option to use a separate player for each video.