[mythtv] a small patch

Michael T. Dean mtdean at thirdcontact.com
Wed Mar 24 00:03:14 UTC 2010


On 03/23/2010 07:03 PM, Emmanuel Anne wrote:
> 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.

Please submit patches to http://svn.mythtv.org/ .  Thanks.

>
> 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 should almost always use ALSA:default, not hw:0, for the ALSA mixer 
device in MythTV (which, BTW, is the other option in the list).

> You might want to put this test elsewhere, but for now it fixes broken 
> configs without any manual intervention.

That would be ideal as separate ticket on Trac.

> 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...

I'd be happy to explain how to properly configure this on the 
mythtv-users mailing list if you want to post a question there about it.

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

Thanks, again, for the patch (and thanks, in advance, for putting it in 
Trac).

Mike


More information about the mythtv-dev mailing list