This is an old revision of the document!
Table of Contents
Backend
Intro
Rebuild of the new machine with the dual tuner. Looks like support for the card (both the firmware and the direct kernel modules) seem much more stable at this point. Fingers crossed. It actually had been doing very well recording, just occasionally would STOP WORKING. Nothing a reboot didn't fix, but annoying if you didn't catch it. I set auto-update on security updates, so that should reboot the machine often enough either way hehehe.
Install
Base
- Did an Update, but that apparently “wiped” the drive anyway…
- Chose the primary backend
- Enabled ALL services: SAMBA, NFS, SSH, Mythtv
- Update the packages to the latest and reboot
- Install some programs I cannot live without:
- jed:
sudo apt-get install jed
Configuration
- Modify your network settings like this:
sudo nano /etc/network/interfaces
- set our IP address to what you want:
# The primary network interface auto eth0 iface eth0 inet static address xx.xx.xx.xx netmask 255.255.255.0 network xx.xx.xx.xx # this one is the same as gateway I think broadcast xx.xx.xx.255 gateway xx.xx.xx.1 # dns-* options are implemented by the resolvconf package, if installed dns-nameservers xx.xx.xx.xx dns-search some.domain.com
- Restart the networking:
sudo /etc/init.d/networking restart
HVR-2250 Drivers
I did a grep of dmesg looking for the 7164 card, and sure enough the support is there, but it can't find the firmware that the kernel was compiled with. I did a quick google and found the link to where the firmware file was. Here is what I did and how I installed the driver:
- Look in the log for what was missing:
[ 6.508493] saa7164_downloadfirmware() no first image [ 6.508515] saa7164_downloadfirmware() Waiting for firmware upload (NXP7164-2010-03-10.1.fw) [ 7.756686] saa7164_downloadfirmware() Upload failed. (file not found?)
- After doing a google search for that firmware, I found the link to here http://www.kernellabs.com/blog/?p=1443, which led to a direct place to get the firmware:
cd ~/Downloads wget http://www.steventoth.net/linux/hvr22xx/firmwares/4019072/NXP7164-2010-03-10.1.fw
- Copy this firmware into the Ubuntu folder:
sudo cp ~/Downloads/NXP7164-2010-03-10.1.fw /lib/firmware/
- Restart the module:
sudo rmmod saa7164 sudo modprobe saa7164
- And there was much rejoicing!
[ 1037.124209] Histogram named irq intervals (ms, count, last_update_jiffy) [ 1037.124220] Total: 0 [ 1037.124224] Histogram named deferred intervals (ms, count, last_update_jiffy) [ 1037.124230] Total: 0 [ 1037.124233] Histogram named irq to deferred intervals (ms, count, last_update_jiffy) [ 1037.124239] Total: 0 [ 1037.124242] Histogram named encoder/vbi read() intervals (ms, count, last_update_jiffy) [ 1037.124248] Total: 0 [ 1037.124252] Histogram named encoder/vbi poll() intervals (ms, count, last_update_jiffy) [ 1037.124257] Total: 0 [ 1037.124261] Histogram named encoder/vbi read() intervals (ms, count, last_update_jiffy) [ 1037.124267] Total: 0 [ 1037.124270] Histogram named encoder/vbi poll() intervals (ms, count, last_update_jiffy) [ 1037.124276] Total: 0 [ 1037.124299] saa7164 0000:01:00.0: PCI INT A disabled [ 1042.954006] saa7164 driver loaded [ 1042.954176] saa7164 0000:01:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16 [ 1042.956572] CORE saa7164[0]: subsystem: 0070:8851, board: Hauppauge WinTV-HVR2250 [card=7,autodetected] [ 1042.956586] saa7164[0]/0: found at 0000:01:00.0, rev: 129, irq: 16, latency: 0, mmio: 0xfd400000 [ 1042.956601] saa7164 0000:01:00.0: setting latency timer to 64 [ 1043.116024] saa7164_downloadfirmware() no first image [ 1043.116041] saa7164_downloadfirmware() Waiting for firmware upload (NXP7164-2010-03-10.1.fw) [ 1043.144214] saa7164_downloadfirmware() firmware read 4019072 bytes. [ 1043.144222] saa7164_downloadfirmware() firmware loaded. [ 1043.144226] Firmware file header part 1: [ 1043.144235] .FirmwareSize = 0x0 [ 1043.144239] .BSLSize = 0x0 [ 1043.144243] .Reserved = 0x3d538 [ 1043.144247] .Version = 0x3 [ 1043.144251] saa7164_downloadfirmware() SecBootLoader.FileSize = 4019072 [ 1043.144263] saa7164_downloadfirmware() FirmwareSize = 0x1fd6 [ 1043.144268] saa7164_downloadfirmware() BSLSize = 0x0 [ 1043.144272] saa7164_downloadfirmware() Reserved = 0x0 [ 1043.144277] saa7164_downloadfirmware() Version = 0x1661c00 [ 1050.004040] saa7164_downloadimage() Image downloaded, booting... [ 1050.108032] saa7164_downloadimage() Image booted successfully. [ 1050.108063] starting firmware download(2) [ 1052.232025] saa7164_downloadimage() Image downloaded, booting... [ 1054.104036] saa7164_downloadimage() Image booted successfully. [ 1054.104067] firmware download complete. [ 1054.152527] tveeprom 14-0000: Hauppauge model 88061, rev C4F2, serial# 7079441 [ 1054.152537] tveeprom 14-0000: MAC address is 00:0d:fe:6c:06:11 [ 1054.152544] tveeprom 14-0000: tuner model is NXP 18271C2_716x (idx 152, type 4) [ 1054.152552] tveeprom 14-0000: TV standards NTSC(M) ATSC/DVB Digital (eeprom 0x88) [ 1054.152559] tveeprom 14-0000: audio processor is SAA7164 (idx 43) [ 1054.152565] tveeprom 14-0000: decoder processor is SAA7164 (idx 40) [ 1054.152571] tveeprom 14-0000: has radio, has IR receiver, has no IR transmitter [ 1054.152577] saa7164[0]: Hauppauge eeprom: model=88061 [ 1054.515587] tda18271 15-0060: creating new instance [ 1054.520221] TDA18271HD/C2 detected @ 15-0060 [ 1054.771027] DVB: registering new adapter (saa7164) [ 1054.771042] DVB: registering adapter 0 frontend 0 (Samsung S5H1411 QAM/8VSB Frontend)... [ 1055.066157] tda18271 16-0060: creating new instance [ 1055.070573] TDA18271HD/C2 detected @ 16-0060 [ 1055.320827] tda18271: performing RF tracking filter calibration [ 1057.669998] tda18271: RF tracking filter calibration complete [ 1057.672579] DVB: registering new adapter (saa7164) [ 1057.672593] DVB: registering adapter 1 frontend 0 (Samsung S5H1411 QAM/8VSB Frontend)... [ 1057.673899] saa7164[0]: registered device video0 [mpeg] [ 1057.904351] saa7164[0]: registered device video1 [mpeg] [ 1058.115641] saa7164[0]: registered device vbi0 [vbi] [ 1058.115759] saa7164[0]: registered device vbi1 [vbi]
Backend Configuration
Run Settings → MythTV Backend Setup
- General
- [Page 1] IP Address to xx.xx.xx.xx
- [Page 1] Master backend IP address to same xx.xx.xx.xx
- [Last Page] Automatically run mythfilldatabase
- Capture Cards
- New Capture Card → DVB 0
- New Capture Care → DVB 1
- Video Source
- New Video Source
- Video Source name: Local ATSC
- Username:
- Password:
- PRESS Retrieve lineups and pull up our zip code channels
- Input Connections
- Connect each tuner to the video source
- Scan for channels Once
- Set each to have a good default station, I'm using 67_1 for both
- Exit
- Run mythfilldatabase and that will take a while to get a fresh listing for 2 weeks
Now enable a few more things:
Run Settings → Mythbuntu Control Centre
- MythExport
- Enable MythExport (so we can maybe export shows to iPod format for instance?)
- Plugins
- MythWeb
- Enable Password Protection
Tweaks
Filename Symbolic Links
So that the samba share is actually useful, I will make a cron job that will every day build a list of links to the recorded shows.
- Download the mythname.pl script. I think I modified it, so just in case here is the version that runs on mythth now: mythname.pl.zip
- Place that perl script in /usr/local/bin
- Make a directory / home for the symbolic links
sudo mkdir /var/lib/mythtv/recordings/links/
- Place the following script in mythtv_cronjob_symlink_recordings.sh
#!/bin/bash cd /var/lib/mythtv/recordings/links/ for filename in /var/lib/mythtv/recordings/*.mpg do # windows did not like the colons in the name, so changing to underscores and periods fname=`/usr/local/bin/mythname.pl --rep=. --subtitle $filename | tr : _ | tr ';.' .`.mpg ##### no need to echo for a cron job ##### echo "Linking $filename to $fname" ln -s $filename $fname done exit 0
- Copy that file into /etc/cron.daily/
sudo cp mythtv_cronjob_symlink_recordings.sh /etc/cron.daily/
- Set the ownership and permissions
sudo chown root:root /etc/cron.daily/mythtv_cronjob_symlink_recordings.sh sudo chmod 755 /etc/cron.daily/mythtv_cronjob_symlink_recordings.sh
Frontend
Basics
- Installed Mythbuntu from CD making this computer just a “front end”
- Enabled SSH
- Left DHCP as I have my daemon giving out the proper IP based on MAC address
Configuration
- Modified theme to the one I LIKE!
- Modified ALSA mixer so that audio SPDIF is output
- Load up the mixer as root
sudo alsamixer
- Modify the line: Item: S/PDIF Output [Off] with the 'M' key
- Save your configuration with:
sudo alsactl store 0
- Modified the Audio output to use S/PDIF:
- Utilities / Setup → Setup → General → Page 4
Speaker Configuration from Stereo to 5.1NOTE: This seems to BREAK my audio now?! If I leave it stereo it works.Upmix: Best- Audio Processing Capabilities: Check both Dolby Digital AND DTS
- Set our VIDEO output to VDPAU:
- Utilities / Setup → TV Settings → Playback → Page 3/8
- Current Video Playback Profile:VDPAU High Quality
Remote Control Configuration
I added the following lines to my lirc configuration: ~/.lirc/mythtv
### added by david rabine (dlr) 2009.12.28 ### # I added the following - dlr 2008/10/18 # Skip forward (10 min default) begin remote = Streamzap_PC_Remote prog = mythtv button = >> repeat = 0 config = PgDown delay = 0 end begin remote = Streamzap_PC_Remote prog = mythtv button = << repeat = 0 config = PgUp delay = 0 end # Seek to previous commercial cut point begin remote = Streamzap_PC_Remote prog = mythtv button = YELLOW repeat = 0 config = Q end # Seek to next commercial cut point begin remote = Streamzap_PC_Remote prog = mythtv button = BLUE repeat = 0 config = Z end
Media Library
Audio
- Add in symbolic links to our libraries
- Go to Listen to Music and it will scan for new files
Video
- Add in symbolic links for all our shares / files
- Go to Utilities / Setup → Setup → Media Settings → Video Settings → General Settings: /var/lib/mythtv/video as Directories that hold videos
Trouble Shooting
- The images were “tearing” with some High Definition content, found http://www.mythtv.org/wiki/VDPAU this page. Not sure why disabling the composite output on the card fixes this, but it does.
sudo nvidia-xconfig --no-composite