Combining MythTV and Asterisk

I’ve had this idea for a while and with the discovery of the Google Text-to-speech and Voice Recognition AGI scripts from Zaf ( & I’ve implemented a quick proof-of-concept.

You can see the results in this YouTube video:

Over the next few days I’ll tidy up the code and write up a blog post about how to do it.  It’s pretty straight forward though, using APIs provided by Google, MythTV and Asterisk and then just glueing them together.


Convincing MythTV to tune in to DVB-T2 MUXes

So that I remember for next time, and so I can start writing down some of the issues I’ve had to sort out since re-building my servers, here is what you have to do to tune to a DVB-T2 mux in MythTV (0.27 fixes).

This is the frequency for the PSB3 mux on Sandy Heath, I expect the encoding scheme will work pretty much where ever. At the very least it should get you started:


Frequency:  474200000
Bandwidth:  8 MHz
Inversion:  Auto
Constellation:  QAM 256
LP Coderate: 2/3
HO Coderate: Auto
Trans. Mode: 8K
Guard Interval: 1/32
Hierarchy:  None

If that doesn’t work, and you know it should (as in you are on the same transmitter) try setting the tuning timeouts higher. Also, just blindly re-trying because “WHY DOESN’T IT WORK” seemed to help.

Device control over HDMI via CEC. libcec FTW.

Blimey, it’s been a while.  I’ve been a bit busy, and let’s be honest; writing up blog posts always sounds like a good idea, but when you get in to it – it’s really hard work.

Anyway – I finally got round to buying a Pulse-Eight CEC to USB adapter:

This awesome little box of tricks makes up for the lack of CEC control in the vast majority of HDMI-Out equipped graphics cards.  It’s the final piece in the jigsaw of a Linux based home entertainment device.  It allows you to talk to the other devices in your HDMI network; your surround sound amplifier and your big screen TV being the best examples (assuming they support CEC of course).

CEC has been around for a long time but for some reason it doesn’t seem to be widely used, or very well implemented, in most consumer electronics devices.  It’s a published standard but with OEM manufacturers wanting to differentiate their products and introduce a bit of vendor lock-in, they all call it something different.  The fact is that your Toshiba Regza Link TV will talk to your Sony Bravia Link Amp just fine, for the most part.  There might be a couple of proprietary things which don’t work, but on, off, volume up, volume down etc will all just work.

Pulse Eight’s USB to CEC adapter lets your computer get in on the act too, and opens up a whole realm of automatic switching, which really cuts down on the number of remote controls you need and the number of buttons you have to remember the purpose of.

The good folk at Pulse Eight have also made libCEC, an open source library to allow pretty much any software to take advantage of the USB adapter.

It comes with C++, C and .NET interfaces, and a CLI utility called cec-client.  XBMC & MythTV already support libCEC and have some neat features baked right in.  It’s good, but it’s not exactly what I was looking for – I want a bit more control.

Now, I don’t know anything about C++ or C or .NET, so until someone writes some Python bindings, my ticket to this party lies solely with the CLI utility cec-client.  It can do most things on the “transmit” side, so you can send commands to your other CEC devices fairly easily.  Acting on a request, or listening to the CEC traffic is a bit more complex – but not beyond the realms of possibility.

This weekend I wrote (and rewrote and rewrote) a couple of Bash scripts to:

  • Let me control the system volume (i.e. the real hardware, not the mixer on the computer) on the TV & Amp from the PCs remote control
  • Let me switch the TV & Amp on and off
  • Activate proper muting, again not the mixer on the computer – the hardware itself
  • Switch the amp & TV to my MythTV PC
  • Power off all the hardware when the PC suspends, and then switching it all back on again
  • Shut the whole lot down when the screensaver on the PC kicks in.

I make these scripts available for your amusement:

cecsimple is a client of the “server” which itself is a client of cec-client.  Fire up the server and then issue it commands down the FIFO either directly or via the abstraction layer which is


I hooked up the volume control and amp power via “irexec” and lirc.  I tell irexec to execute, for example, “ volup” or “ ampon”.  If the server component is already running then these commands are sent very quickly and you don’t really notice the lag.

To switch the TV off when the PC goes in to suspend mode I added a script in /etc/pm/sleep.d which calls “ tvoff” and then “ tvon” when it resumes.  In theory if the TV is using the Amp to output surround sound audio then the TV will tell the Amp to turn off, it it’s not – it wont.

To switch things off when the screensaver kicks in, I simply “sudo pm-suspend” from an “xscreensaver-command -watch” script.


The practical upshot is that I can now control 99% of my media centre from a single remote control.  I’ve opted to use the remote connected to the PC as I found it to be the least laggy – using the TV remote to send up/down/left/right etc to the PC was sluggish.


I think it should be possible to parse the log output from cec-client and write a “listener” component too, but it’s probably a better idea to learn some rudimentary C and do it properly.  Or some Python bindings.  Oh yeah, and you know what would be really cool, a hook in to MythTV so that when I’m watching something in surround sound the amp turns on automatically. That would be cool.


UPDATE 3 Dec 2013:  When someone leaves the amp’s HDMI switch set on the PS3 and you switch the MythTV box on from the remote, the amp doesn’t automatically switch to MythTV.  This has been annoying me for a while now, so I fixed it.

In the scripts linked to above the “active source” command does this:

send_command "tx 45 82 11 00"

4 (the MythTV device) to 5 (the amp) – 82 (switch active source) to – but my Sony amp just ignores this request.

I spent some time trying out a few alternatives with cec-client and I’ve found one which works, and it kinda makes sense why:

send_command "tx 45 70 11 00"

4 (MythTV) to 5 (Sony amp) 70 (System Audio Mode) (the input where MythTV is connected)

My assumption is that amp only speaks “system audio” – what with it being an amp.  I’ve changed the “activesrc” with the 45:70:11:00 code and now it works!  (It also switches the amp on, whether I like it or not – so it’s not perfect).



Useful links:


Trimming Freesat Channels In MythTV

There are loads and loads of free-to-air channels available on the Astra 28 constellation, the vast majority of which I do not watch.

So to make things a bit easier for me after a full re-scan, I’ve put together a list of the channels I don’t watch and with a tiny bit of SQL I can trim them from my channel list.

To make things a bit easier for you here is a SQL dump of my “unwatched channels” list:


And here is the SQL to trim these from your channel list:

update channel set visible=0,useonairguide=0 where name in (select name from unwatched_channels)

You’ll probably want to edit that list yourself to remove and add the channels as you prefer. Generally speaking, my list trims:

  • Regional variations
  • Specialist interest
  • Shopping
  • Games and other text based services

I’ll update this list occasionally, this page will always have my most up to date information.

  • UPDATE: 6 Sept 11.  Refreshed channel list
  • UPDATE: 8 Oct 11. Refreshed channel list
  • UPDATE: 14 Dec 2011.  Refreshed channel list
  • UPDATE: 4 Aug 2012.  Refreshed channel list
  • UPDATE: 29 Dec 2013.  New list of channel IDs available here: unwatched_by_chanid.  Add a new table and import that CSV file.  Then do a “update channel set visible=0 where chanid in (select chanid from <your new table>”

Hauppauge WinTV Nova-S Plus on Linux

The Nova-S Plus is a  good card.

But, it would appear there is a defect in these boards, or at least a strange design, which means that they won’t lock on to some frequencies which require the 22kHz tone sending to the LNB with new drivers because there’s no link between the flange and dolphin-points.  There’s plenty to read about here:

And there’s a patch which fixes the problem by controlling the tone generator directly but it’ll never get in to the main kernel.  For your convenience here is a link to a binary driver built for Ubuntu Lucid kernel version 2.6.32-23-generic:

Replace the current isl6421.ko from /lib/modules/2.6.32-23-generic/kernel/drivers/media/dvb/frontends/isl6421.ko with this one.  It might also work for newer kernel versions, or not.  Who knows?  Not me.

I’ve also got a Hauppauge S2 HD and this patched driver doesn’t seem to effect it.

Search hints:

Hauppauge Nova S plus linux won’t lock horizontal 22khz tone can’t pick up some channels. You can also check out my guide on Everything You Need to Set Up a Backyard Cinema.

Bandwagons roll


Alys’ Backgarden Supermarket (stop sniggering at the back) from BBC Birmingham.

I’ve nothing against Alys Fowler, Lord knows she’s more engaging than Carol ‘monotone’ Klein, but “Punk Rock” she ain’t.
This genre has been done before and it’s been done very very well. Hugh Fearnley-Whittingstall, Jamie Oliver and more recently the brilliant Valentine Warner have all been seen ducking in and out of hedgerows like gastronomic Wombles and they’ve made good TV. I don’t think we really need another one, no matter how much backlit-late-summer-sun slow pans through the flowers and vegetables, pink wellys with flower prints on them, and orange chrysanthemums growing in galvanised watering cans they put in. (If we see all three of these in the first episode I claim some kind of prize).

The stylised gardening-cum-cookery show is perfectly well presented. What isn’t, and what should be, is a TV series of “Joe’s Allotment”. A proper vegetable programme with some human aspects to keep the commissioners happy. I’m sure there is room in the schedules for something like this, call it Alys’ Naughty Allotment if you think that’ll help.

Asterisk set up in the UK with SMS

EDIT: 25 Sept 2010
The below specifically refers to Asterisk 1.4. Go to the bottom for an update on 1.6

Why do I always get myself in to these situations?

Many years ago I knocked up a set of scripts to record TV programs from a DVB-T card.  Getting the TV card working was really hard work.  I had to hack about with the driver source code, compile custom kernels, build endless versions of the driver, and so on and so on and so on.  It was a pain in the arse, which was compounded by the fact that at the time very few other people (end users) were trying to get these cards working, so there wasn’t much community support.  My scripts were great and everything and I could record TV, taxes were low and life was, on the whole, pretty good.

Then Stuart put me on to MythTV.  It quickly became evident that although my scripts were functional they were nothing compared to Myth.  So I moved over.  Again with the pain.

The basics were there but DVB support was in it’s infancy and it was a lot of hard work getting it working.  I persevered and learnt a lot about MythTV in the process.  Yay me.  At the beginning MythTV was a foreign country.  By the time I’d got it working the way I wanted it was my home town.

And so it will be with Asterisk, I hope.

Things I have learnt about Asterisk

  1. The cheap FXO cards they sell on eBay are more trouble than they are worth.
  2. The documentation on the voip-info site is often out of date.
  3. UK Caller ID works with the TDM400’s out of the box.
  4. Sending & receiving SMS’s does work, but it’s a bitch, and unreliable.
  5. The logic in Asterisks’ dial plan (extensions.conf et al) is illogical to me
  6. FreePBX is both a blessing and a curse.
  7. I love it.

In a bit more detail then:

1.  The FXO cards you can get from eBay for about 20 quid work perfectly well.  For making calls.  But, there are a few drawbacks.  They don’t support polarity reversal which is the method by which incoming calls and Caller ID are announced to Asterisk.  You’ll still get ringing indications and be able to make calls, but you won’t get Caller ID.  Or rather, you can get Caller ID but you need to patch the Zaptel drivers and the Asterisk source.  The patches are old and don’t apply perfectly.  They are also seemingly unsupported now, in that no one cares if you are having problems with them.  I got the patches applied but Asterisk wouldn’t compile and I don’t know/care enough to fix it.  I was in the market for an ATA anyway so I put that 40 quid towards the cost of the TDM400p11 from NovaVox and if I hadn’t bought the AX-100 then the initial outlay for a fully supported card isn’t so bad.  It also works out cheaper to add another FXS port the to TDM400 than it does to buy another ATA.  The AX-100 also has a US spec. “hybrid” in it which means that the unbalanced UK spec phone lines and the AX-100 are not perfectly matched which can cause wicked echo.  The TDM400 has a tunable hybrid, and that’s a good thing.  All that said – for 20quid I still think it’s worth getting one to play with.  Ask me about doing a swap, if you’ve got any cool toys you don’t want  (I’ve got a DVB-T card going spare as well!). Find the best toy cars for toddlers that are also suitable for kids, 10 and up, here at top 9 rated. I’m mostly looking for more senior level stuff.

2.  The site is a really good source of data.  The website might be ugly, but there is a lot of Asterisk data on there.  Unfortunately there is little in the way of information, and some of the data is way out of date.  It acts as a good reference point but isn’t for the beginner because most pages assume a lot of prior knowledge.  Sure – I could go in and edit the Wiki, but I don’t know if what I’m doing is the best way of doing it, or even the correct way to do it.  So for now that’s what this blog post is for.

3.  BT send the Caller ID information before the first ring.  The process goes something like this:

Line polarity reversed -> Caller ID sent as FSK (sort of modem tones) -> Phone starts to ring -> Call Connected -> Charlie Brown's Teacher -> Call Hung Up -> Line polarity reversed

You can see the importance of being able to detect polarity reversal in the call set-up and tear-down.  The AX100 simply doesn’t do it.  The TDM400 does, and it’s fully supported out of the box, as is UK style Caller ID, where the ID is sent before the first ring.  The hack for the AX100 keeps a buffer running all the time and then once a call comes in it looks in this buffer for the caller ID FSK and decodes it.  Shonky, I think you’ll agree.  My advice is that if you want to do caller ID in the UK buy a TDM400.  If you are a masochist then feel free to try with the AX100, I’d love to read your HowTo once you’ve got it working.

4.  SMS.  What a bitch.  I recently discovered my subscription with BT gives me 200 free SMS text messages a month.  So to make sure I was getting best value from the phone subscription I went out and spent 100quid on a PCI card and then spent hours and hours and hours fiddling about trying to get it working.  I don’t know why, I probably send about 3 text’s a month from my mobile, the whole “Because it’s there” thing I guess.  A pox on you, Mallory.

Last night I finally got it working semi-reliably for incoming and outgoing texts.  I can send and receive from my mobile, but Stuart doesn’t receive my messages.  Ho hum.

Firstly, receiving SMS’s. Now, I don’t really understand the extensions.conf language.  It’s all a bit, well, wrong, to my eyes.  All I can tell you is that this is how I got it working.  NOTE:  This WILL NOT work for you if you just copy and paste. Sorry about that.  Perhaps someone can help me re-write it so that it does?

I’m using FreePBX as a GUI and it rewrites some of the Asterisk config files for you.  I’m not sure if the context [from-pstn] is one that I created, or a standard one.  What you need to find out is what route incoming calls from the PSTN take i.e. which contexts they pass through before they start ringing on your internal phones.  You can do this my running the Asterisk console and turning verbosity up to about 6 (core set verbose 6) and then calling in from outside.  You should see a trace of what contexts get called as the call comes in.

For example, my call flow goes something like this:

[from-zaptel] -> [from-pstn] -> [macro-user-callerid] -> 600@[ext-group]

Where 600 is an extensions number I set up with FreePBX to ring all internal phones.

I chose to test for SMS’s in the [from-pstn] context. You can visualise what the [from-pstn] context does when a call comes in by using the Asterisk CLI.  Use the command “dialplan show s@from-pstn” to see the instructions that would be followed when [from-pstn] gets called at position “s”, or start.

Originally, mine went something like this:

[ Included context 'ext-did-0001' created by 'pbx_config' ]
's' =>            1. Set(__FROM_DID=${EXTEN})                   [pbx_config]
2. Gosub(cidlookup|cidlookup_1|1)             [pbx_config]
3. ExecIf($[ "${CALLERID(name)}" = "" ] |Set|CALLERID(name)=${CALLERID(num)}) [pbx_config]
5. SetCallerPres(allowed_not_screened)        [pbx_config]
6. Goto(ext-group|600|1)                      [pbx_config]

You can follow the call progression through this quite easily.  We jump in at position (or priority) 1, we set a variable, then we jump to some cidlookup sub-routine, then if the CALLERID(name) is blank we set it to be the same as the caller id number, then something about CALLINGPRES, not sure what that does, ditto the next line, and then we go to ext-group|600|1.  Ahhaaa!  I know that 600 is the group that I call to ring all the phones, so that must be where the call is handed off to other contexts or functions that let you do talking to people.  Since an incoming SMS doesn’t need to get as far as ringing on a phone, it makes sense to me to interrupt the call flow during [from-pstn].

So I added [from-pstn-custom] to /etc/asterisk/extensions_custom.conf like this:

exten => s,3,GotoIf($["${CALLERID(num)}" = "08005875290"]?will-sms,s,1)
exten => s,4,Verbose("Not an incoming SMS")
exten => s,5,Gosub(cidlookup,cidlookup_1,1)
exten => s,n,ExecIf($[ "${CALLERID(name)}" = "" ] ,Set,CALLERID(name)=${CALLERID(num)})
exten => s,n,SetCallerPres(allowed_not_screened)
exten => s,n,Goto(ext-group,600,1)

exten => s,1,Verbose(=============Entered Will SMS)
exten => s,n,Answer()
exten => s,n,Wait(2)
exten => s,n,SMS(default|a)
exten => s,n,Verbose(=============Done with Will SMS)
exten => s,n,Hangup(16)

How does it work?  The [from-pstn-custom] overrides the [from-pstn] from the main extensions.conf file provided by FreePBX and adds a line that branches to a context called [will-sms] which then uses the SMS application to receive the SMS and then hangup the phone.  (Actually, I think SMS hangs up for you.  But, you know, whatever)

In [from-pstn] in extensions.conf is a line that “includes” the config from “from-pstn-custom”.  By virtue of being imported, the instructions in [from-pstn-custom] take precedence over the other config, because it is imported first.  The config files are read line by line in the order they appear in the file.  But, the imported instructions do not completely replace the config that is already there.  They are sort of merged. That’s why I’ve copied a load of bits from the original call flow in to my new [from-pstn-custom].  If I left them out, then some bits of my new context would be applied and some wouldn’t.  The way I got it to work was to replicate the call flow to the point of it branching off to [ext-group] in my new context.  If you do a “dialplan show s@from-pstn” now, you see this:

[ Included context 'from-pstn-custom' created by 'pbx_config' ]
's' =>            3. GotoIf($["${CALLERID(num)}" = "08005875290"]?will-sms|s|1) [pbx_config]
4. Verbose("Not an incoming SMS")             [pbx_config]
6. Gosub(cidlookup|cidlookup_1|1)             [pbx_config]
7. ExecIf($[ "${CALLERID(name)}" = "" ] |Set|CALLERID(name)=${CALLERID(num)}) [pbx_config]
10. SetCallerPres(allowed_not_screened)       [pbx_config]
11. Goto(ext-group|600|1)                     [pbx_config]

[ Included context 'ext-did-0001' created by 'pbx_config' ]
's' =>            1. Set(__FROM_DID=${EXTEN})                   [pbx_config]
2. Gosub(cidlookup|cidlookup_1|1)             [pbx_config]
3. ExecIf($[ "${CALLERID(name)}" = "" ] |Set|CALLERID(name)=${CALLERID(num)}) [pbx_config]
5. SetCallerPres(allowed_not_screened)        [pbx_config]
6. Goto(ext-group|600|1)                      [pbx_config]

[ Included context 'ext-did-catchall' created by 'pbx_config' ]
'_.' =>           1. Noop(Catch-All DID Match - Found ${EXTEN} - You probably want a DID for this.) [pbx_config]
2. Goto(ext-did|s|1)                          [pbx_config]

You can see my new [from-pstn-custom] context at the start, along with the copied commands from ext-did-001 to ensure that they run in the way I expected.  The upshot of this is that I now branch to my new context [will-sms] when the incoming caller ID is the BT 0800 number from where SMS’s originate.  You should note that the 0800 number can change if you have more than one incoming SMS box registered, so don’t do that.  Just register one incoming address  (more on this later).

The [will-sms] is pretty straight forward.  Answer the phone, wait 2 seconds, and then start the SMS application which does all the clever noises.  The key here is Wait.  Without it SMS reception is intermittent at best.  The SMS(default|a) tells the SMS app to receive in to the default queue (this works, don’t understand fully why) and to do an “a” for answer.  I had a load of problems with the example from VOIP-info where it passes in the extension number, which is “s” for start.  If the SMS application sees an “s” it thinks it means “send”.  That won’t work!

If you manage to bodge all this in to your dial plan then you should find your incoming SMS’s in /var/spool/asterisk/sms/mtrx

Make sure that /var/spool/asterisk is writeable by the same user as Asterisk is running as.

Sending SMS’s. Was a whole bunch of no fun as well.  Especially if you don’t understand Asterisk properly.

The command line I’m using to send an SMS is:

smsq --motx-channel=Zap/2/17094009 -d <phone number>  -m "<message>"

That works because zap channel 2 is my PSTN line.  You might need to change this.  17094009 is the SMSC centre number for BT to accept SMS messages for delivery to other networks.

When I was trying to get sending working, which I actually did first, I couldn’t reliably get Asterisk to talk to the SMSC.  Before I had the receive working properly the BT system would ring me up and I’d answer the phone, then not hearing a carrier the BT system would hang up again.  This gave me an idea, if I could emulate the carrier then I could hear what the BT system was sending down the line.  I sent an SMS to the home phone, it rang in on one of the extensions and I whistled at it.  Because I am just so 1337 I hit the right tone and I could hear FSK noises coming down the line, but they were really really quiet.  I tweaked the gain up a little bit in the /etc/asterisk/zapata.conf file:


and tried again.  It was louder!  Sending a test message to “00000” with the text of “test”  causes the BT system to send a message back to you  (you need to send “register” to 00000 before BT will send you messages as text instead of reading them to you by the way – but if it can’t successfully deliver the message back to you to say it has received your “register” message it will ignore the request and you’ll keep getting the messages read to you by a friendly robot – hence the need to get receiving working first).  It sent!  I saw some hex coming from the SMS application in the Asterisk log.  I sent a text to my mobile, and it arrived.  Yay!  problem solved.

5.  Asterisk’s dial plan.  Bonkers.  I still can’t make sense of them.  Oh well, I’ll get there in the end.

6.  FreePBX is brilliant if you want to get Asterisk configured with some very complex applications (think voicemail) in a matter of minutes.  But, if it makes editing the config files by hand a bit more complicated because you have to use xxxx_custom files.  Thus, all the replication of code when as above when you don’t understand how it all works.

7.  Check out my hold music hacked together from various online sources, and no doubt subject to various copyright restrictions.  I’ve compressed the hell out of it, if you want a better quality version for your own amusement let me know.

Hold Music

I crack myself up, I really do.

Also – think of all the cool things you could do if you could phone or text your computer and get it to do things for you.

Now I’m off to write myself an gmail <-> SMS gateway doodad.

Ok – with Asterisk 1.6 the above is slightly less relevant.  Try this in your dialplan instead:

exten => s,1,Verbose(=============Entered Will SMS)
exten => s,n,Answer()
exten => s,n,SMS(default,ap(1500))
exten => s,n,Verbose(=============Done with Will SMS)
exten => s,n,Hangup(16)

The SMS application has the option to add a pause which I've set to 1500 ms.  Seems to work.

Aspire Revo as a MythTV frontend

It’s brilliant!

If you’re reading this then I will assume you already know about MythTV and you’ve searched Google to find out if the Aspire Revo box will make a decent MythTV frontend. In short, yes – it works fantastically well.

I bought the 8GB SSD Linux version from Play for about 150 quid (get a Play credit card and you can knock off about another 15 quid in vouchers and get 9 months interest free credit, for what it’s worth), and I also bought 2 x 2GB SODIMM.

The first thing I did was take the lid off to have a look inside.  This wasn’t as easy as I thought.  There’s one little screw under a sticker that says something about a warranty and then you just have to prise the lid off. It’s pretty stiff, to the extent that I was convinced there was another screw somewhere, but it comes off in the end.   I removed the WiFi card since I won’t use it and it might reduce the heat/power.   The RAM swap presented no surprises, but the appearance of a 160GB HDD did.

I had sort of decided that the SSD was the better option for me for two reasons; less heat and less noise. But, seeing as I’ve been gifted 160GB of disk space and under use the HDD makes no noise, I’m very happy!

I decided on XUbuntu over the normal version partly because of the reduced overheads and software bloat, I really don’t need Open Office and The Gimp installed on this box and I can’t be bothered with manually selecting packages at install, so I downloaded the XUbuntu ISO and stuck it on a USB pen drive with Unetbootin.  I had a few problems booting from the pen drive, it kept complaining that the initrd was corrupt, so in the end I had to use the alternative version and run through the install on the command line.   I blew away all the partitions on the disk, I won’t need any of the Acer software – there’s nothing much of use on there anyway.

Once XUbuntu was installed I downloaded and compiled the latest NVIDIA drivers:

(this is the latest version at I write this, check if there is a newer one)

and then I downloaded the SVN version of Myth and enabled VDPAU. If you’re looking for help setting up Myth and VDPAU check the MythTV wiki, there’s more information there than I can recreate here. Read the “Installing SVN on Breezy” document to give you a hand getting all the bits and bobs installed to allow you to compile Myth. Note: some libraries have changed name, e.g. liblame is now libmp3lame.

Then it’s a case of enabling VDPAU at compile time using the configure script and then creating a playback profile to use VDPAU from within the frontend.

My old frontend had a dual core 2GHz processor in and would sit at about 80 to 90 percent usage on both cores while watching 1080p video and sucked somewhere in the region of 80 to 100 watts. The Revo’s Atom processor sits at about 10% usage (obviously the graphics card is doing the work) and sucks less than 20watts, while also being nearly silent.

Sound was a bit of a faff – the Revo has an HDMI connector with the audio path built in. To hear anything I needed to enable and unmute the IEC958 (spdif) channel and then tell Myth to use ALSA:hdmi for audio.   Ubuntu detected the sound card perfectly well, so trust me when I say you do not need to download a later version of ALSA, you just need to get the settings right.   You might also need to tell your telly to pick up digital audio, not analogue.   I haven’t got system sounds going down the HDMI just yet , but I don’t think this will be a problem.

Summary then; very very good choice for a small, quiet and cheap frontend that can also double as an Internet browser.

I think I might buy another one.

DVB-T reception on the cheap

In an effort to reduce noise and electricity consumption in my living room I’m removing the current MythTV frontend and replacing it with an Aspire Revo.

The box under the telly at the moment is a dual-core Pentium 4 somethingorother running at about 2Gz in a nice looking “media” case.   It’s great and everything, and it decodes HD perfectly well but it has fans on the processor, fans on the video card and fans in the PSU which all add up to a noisy box.

So it’s going to get re-purposed as a general computer and the Revo will go in it’s place.   Actually it will get bolted on to the back of the telly to keep it out of the reach of children who like to press buttons.  I’ll report back on the building of a frontend on a Revo once I wrestle the package from the hands of the worlds most apathetic delivery company “Home Delivery Network”.  (I think they use the word “delivery” quite incorrectly)

Anyway, as part of this upgrade I need to add a DVB-T tuner to the Revo but with no PCI slots the only option is to use a USB tuner.   My father-in-law put me on to Kenable who have a lot of bits and bobs at good prices, specifically the PEAK DVB-T USB tuner for 15quid:

USB Peak DIGITAL DVB-T Freeview TV Card XP MCE Vista Dongle

I wasn’t able to find much about about it before I bought it, but I thought I’d take a punt and get one anyway and worry about getting it working under Linux later.

It arrived the other day and I popped the lid off to find an AF9015 demodulator and a QT1010 tuner inside.   I checked on the Linux TV wiki and things looked pretty good on the whole.  When I plugged it in to an Ubuntu 9.04 box nothing happened which was a shame but a bit more digging made me think that I should download the latest Linux TV drivers and have another go.

I followed the instructions from here:,_Build_and_Install_V4L-DVB_Device_Drivers

and downloaded, compiled and installed the new drivers.  You’ll also need some different firmware to that which is supplied with Ubuntu, download 4.95.0 from here:

and place the .fw file in /lib/firmware (not as most people say /lib/firmware/<kernel version>).  You’ll need to overwrite the other version, or rename it or whatever.

Reboot and you’re golden. The stick is detected and the firmware loads and I have been watching live TV on my Aspire One netbook courtesy of Mplayer.

You probably need to bear in mind that if you apply any future kernel/driver updates from Ubuntu then your drivers might get over written.  There’s a change that the new version of the Ubuntu drivers will include the required AF9015 driver, but it might not.  Also, you probably don’t need to compile all the drivers, just the ones for the AF9015 and QT1010 modules.  I’ll look in to this, and if you promise to be good I’ll provide a nice little package with everything in.


UPDATE:  So here we are two and a bit years later.  I’ve just found this same tuner in the bottom of a box and plugged it in to my 11.04 Ubuntu machine.  When I plugged it in Ubuntu automatically suggested I download the firmware.  Awesome.  It now “just works”.  Well pleased.