[mythtv] a small patch

Emmanuel Anne emmanuel.anne at gmail.com
Tue Mar 23 23:03:09 UTC 2010


Hi !

I have been struggling for quite some time to get the sound working on all
channels with my freebox network recorder. The problem seemed easy enough,
so I took a look at the code...

In fact there are some "low bandwidth" channels which use some 24Khz samples
(AAC, 2 channels). And a lot of modern sound chips can't play directly this
sample rate.
So you have to use the alsa built-in resamping abilities, but for this to
work you just need to setup the hw parameters before calling
snd_pcm_hw_params_get_period_size (and not after). I got the solution if the
source of aplay, the alsa utility.

While I was at it, I also added a test to replace the mixer device by "hw:0"
when it is set to "/dev/dsp" for alsa (the default configuration sets it
like that, and alsa can't work with /dev/dsp). You might want to put this
test elsewhere, but for now it fixes broken configs without any manual
intervention.

A few problems I noticed with this setup :
 - the biggest one : the tv guide which uses xmltv stores its programs using
a unique channel identifier (chanid = integer(10)) in the table program. The
problem with that is what can you do when you have for example 3 channels
available which are exactly the same channel but in 3 different quality (hd,
standard, low bandwidth). With that, you can have the guide for only 1 of
the 3 channels apparently, which is rather bad...
 - the same kind of problem : with these 3 channels, they share the same
number in the m3u of the network adapter. So only 1 channel appears in the
channel list in mythtv (the last one). Here again, it's too bad...

Except that the current version (debian testing, 0.22+patches) of mythtv is
rather unstable for me : if you simply change the channels too fast, you
loose the control of mythtv, and you have to kill it to exit. And
mythbackend died so often during my tests that I didn't even count !

But anyway it''s still a very interesting program ! :)

I hope you find the patch useful, created by using svn diff in the
mythtv-0-22/mythtv directory.


-- 
zfs-fuse git repository :
http://rainemu.swishparty.co.uk/cgi-bin/gitweb.cgi?p=zfs;a=summary
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mythtv.org/pipermail/mythtv-dev/attachments/20100324/8b617ea3/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch
Type: application/octet-stream
Size: 1508 bytes
Desc: not available
URL: <http://mythtv.org/pipermail/mythtv-dev/attachments/20100324/8b617ea3/attachment.obj>


More information about the mythtv-dev mailing list