MythTV: HTPC Setup

| by Ken | in Technology Add comments

Now with my new Home Theater PC built, the install was easy. All I had to do was boot from the CD and select the option for a secondary backend. The setup completed and I did an immediate update. The OS was in decent shape.

But there were a few nagging issues with this install. First of all, there was a menu entry named “aumix” which wasn’t on my first install and when I clicked on it, it would blink a terminal window and close. I have no idea where it came from but it was confusing since the “Mixer” was in the same menu and I kept picking the wrong one. It turned out to be as simple as deleting the file /usr/share/applications/aumix.desktop.

Second, I had to do the static IP setup like I did in the first computer. For the sake of completeness, I’ll list the steps here:

  1. Edit the /etc/hosts file to change the IP address to the new one in the top line
  2. ifconfig -a
  3. Edit the /etc/network/interfaces file and add the following lines:
    auto eth0
    iface eth0 inet static
    address 192.168.2.212
    netmask 255.255.255.0
    network 192.168.2.0
    broadcast 192.168.2.255
    gateway 192.168.2.1

  4. sudo /etc/init.d/networking restart

Those were easy fixes. From here, things got much harder. The next problem I had was weird crashes when trying to watch TV or previously recorded TV from the master backend. The first thing I did was try some of the same tricks as last time. For example, in the backend setup, I changed the IP for the local backend from 127.0.0.1 to the static IP that I had set earlier. I also rebooted my HDHomeRun and both the master backend and this new secondary backend. But the crashes continued. Sometimes the whole system would go to a black screen and freeze requiring a forced reboot; sometimes, the screen would go black and then jump right back to the menu. The fix, it turned out, was to change the playback profile in the frontend setup. Somehow, my playback profile had been changed to “CPU+” which was causing problems with my video card. I changed it to “Normal” and the problem went away and the video playback looked great.

The hardest thing to do was get the audio working with MythTV. Using the command
speaker-test -c 2 -P 2
I confirmed that I got audio output from the back jack on the computer and from the headphone jack on the front. But I didn’t get any audio output through my HDMI feed using that test. As a brief aside, the reason I want both is so that I can use the rear panel analog output to connect to my receiver (a new receiver is in the future but not yet) and so that I can use the HDMI feed to send audio to the remote TV that uses only HDMI as it’s only input. An HDMI splitter and automatic switcher complete the setup.

So I need audio output from both devices, using the command line I only had one device working, and in MythTV, there was no audio output at all. I knew the solution would be based on configuring /etc/asound.conf or asound.rc but I couldn’t find sufficient documentation to figure it out myself. Lots and lots of searching finally turned up the answer at KnoppMythWiki. I copied the contents from that page and pasted it into my /etc/asound.conf and made modifications. So, this is what my /etc/asound.conf looks like now:

pcm.!default {
type plug
slave {
pcm multi
rate 48000
}
ttable.0.0 1.0
ttable.1.1 1.0
ttable.0.2 1.0
ttable.1.3 1.0
}
pcm.stereo {
type plug
slave {
pcm multi
rate 48000
}
ttable.0.0 1.0
ttable.1.1 1.0
ttable.0.2 1.0
ttable.1.3 1.0
}
ctl.stereo {
type hw
card 0
}
pcm.multi {
type multi
slaves.a.pcm "front"
slaves.a.channels 2
slaves.b.pcm "hdmi"
slaves.b.channels 2
bindings.0.slave a
bindings.0.channel 0
bindings.1.slave a
bindings.1.channel 1
bindings.2.slave b
bindings.2.channel 0
bindings.3.slave b
bindings.3.channel 1
}
ctl.multi {
type hw
card 0
}


The two names in quotes, “front” and “hdmi”, are the built in devices as determined by using
aplay -L
After making these changes, I ran the same speaker test as before and was pleased to hear the test signal from both the HDMI and to the analog back panel (and headphone) jack. The final step was to go into MythTV and reset the audio output device to ALSA:default now that the asound.conf file had correctly set the default.

So I’ve got MythTV set up on a secondary (“slave”) backend with a corresponding frontend. I’m able to play videos I’ve ripped on the master backend and I’m able to watch TV I recorded on the master backend both from the secondary frontend. I can watch live TV on either device. So this is all good.

But what a hassle of a setup. This should be way easier. Most of my hassles here are things that I think should not be things an end user needs to deal with. Of course, the version of Myth I’m using is “0.23” and the next, soon-to-be-released version is “0.24”. I suppose I shouldn’t expect production software quality from free software that hasn’t even reached version “1”. But on the other hand, I think the kind of issues that MythTV has with setup and the less than straightforward problems that need solving are things that endemic to the software and unlikely to be removed in the next release or any version “1” release. I’m going to continue with MythTV because I have the aptitude to deal with the things it throws at me but I can’t help wishing it was much much better.

2 Responses to “MythTV: HTPC Setup”

  1. […] written about one of the more unusual aspects to my MythTV setup. I had mentioned in the original setup post that I had a second TV hooked up to the system. Originally, I had a Comcast DVR hooked up to […]

  2. […] I did that for years and I’ve been happy to be solely Mac based at home now (except for the MythTV stuff on Ubuntu, but that’s not really home based computing).  Besides, a company that abandons the Mac, […]

Leave a Reply

Human Verification *

All content Copyright © Katharsys LLC Created with Wordpress, Theme "Synergy" by Pagelines modified by Katharsys LLC