Tuesday, February 28, 2006

Preview unavailable causing frontend delays

I mentioned a couple of preview-generation issues in my last post, after which I saw a few related posts in the MythTV lists...

It looks like preview images are only generated after the show has finished recording in 0.19. This means selecting a show that's currently recording from the watch recordings screen or just using a jump key into the watch recordings screen will cause a 6s freeze while the frontend tries to retrieve the non-existent preview image 12 times.

I'm now hitting this problem all of the time.

06/12/06 UPDATE: This appears to be fixed in the latest 0.19-fixes branch.

Sunday, February 26, 2006

MythTV 0.19

Upgraded to 0.19 today via the most recent atrpm packages. I held off for a couple weeks to see how others faired and to give a chance for some fixes to get folded back in. LiveTV in 0.18.x hasn't worked properly for me in ages and I was waiting for 0.19 to avoid having to spend a lot of time tracking down the problem. However, several people reported a bunch of issues with the reworked LiveTV code in 0.19 and I wanted to wait for them to be fixed. According to the MythTV Users and Dev lists, it looks like they're now gone.

Here's the upgrade procedure I used:
  1. Shutdown all frontends
  2. Shutdown mythbackend on slave
  3. Shutdown mythbackend on master
  4. Backup mythconverg database (v0.18.1)
  5. yum update on master
  6. Run mythtvsetup on master (to update database schema)
  7. Backup mythconverg database (v0.19)
  8. yum update on slave
  9. Start mythbackend on master
  10. Start mythbackend on slave
  11. Start mythfrontend
Unfortunately, (6) didn't go as smoothly as I'd hoped. At some point in the past, I'd run a CVS frontend on my OSX laptop and this hosed a database schema update. I remember having to fixup a few things afterward to regain stability. Anyway, the 0.18.1 -> 0.19 schema update failed and I had to repeatedly undo failed updates (remove table columns etc.) and re-run mythtvsetup until the schema finally updated cleanly to version 1123. A few other people on the lists had similar issues and I think they're all related to previous failed schema updates.

Here's a few things I've noticed today that may be bugs in 0.19 or bugs in my config or just random application or OS errors:
  • My remote occassionally loses focus in the setup screens of mythfrontend or at least the up/down/right/left buttons stop working. Restarting mythfrontend fixes the problem.
  • When LiveTV was interrupted with a scheduled recording and I later quit back to the menu, no bookmark was saved and the watch recording screen didn't indicate that the recording was continuing, even though it continued and completed just fine.
  • mythcommflag didn't auto-run for the above LiveTV-interrupted, scheduled recording
  • A few IOBOUND errors appeared in my slave log
  • Autoexpire deletions are working but the slave complains about not finding appropriate db entries
  • Slave could not produce a preview image because the mpg was 'not valid' even though it was watchable and a preview finally appeared after > 1hr.
  • Preview unavailable on an otherwise ok recording. What should generate this? The Slave backend, master backend or the frontend? Some previews are being generated as mythtv.mythtv (frontend perms) rather than root as under 0.18.x... The preview only appeared after trying to watch the recording.
  • Couldn't get MythTV's internal DVD player to send digital audio out of the SPDIF on my Shuttle.

Saturday, February 25, 2006

Digital Audio out!

Finally, I have digital audio out working on the Shuttle. The SPDIF output is hooked up to my Yamaha amp which is now cheerfully decoding Dolby Digital and PCM data.

This required a recent version of the kernel ALSA drivers (it first worked with 1.0.9b but I'm now using 1.0.10 which appears to be more stable) and I had to use the following atiixp module option in /etc/modprobe.conf:

# try the direct approach...
options snd_atiixp spdif_aclink=0

I needed to add this to ~mythtv/.asoundrc:

pcm.!default {
type plug
slave {
pcm "spdif"
rate 48000
format S16_LE
}
}
and set the sound device to ALSA:default in the local frontend MythTV configuration in order to get non-48KHz PCM data (eg. from mythmusic) to be re-sampled and sent out as a digital stream.

To get this working with DVDs (video output using Xv on the PVR350), I used mplayer with these flags:
mplayer -geometry 720x576+0+0 -noaspect dvd:// -ao alsa:noblock -vo xv -afm hwac3 -alang en
I also made it work with xine after editing the config to allow AC3 pass-through.